@8wave/ai-elements 0.126.0-beta.19 → 0.126.0-beta.20

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 (42) hide show
  1. package/dist/ai-elements.es.js +2330 -2322
  2. package/dist/ai-elements.es.js.map +1 -1
  3. package/dist-vue/PkChatbot.js +1 -1
  4. package/dist-vue/PkChatbotViewChat.js +1 -1
  5. package/dist-vue/PkChatbotViewConversations.js +1 -1
  6. package/dist-vue/PkChatbotViewFiles.js +1 -1
  7. package/dist-vue/PkChatbotViewProfile.js +1 -1
  8. package/dist-vue/_chunks/{PkChatbot-DZFxgvYU.js → PkChatbot-CxphD_YU.js} +6 -6
  9. package/dist-vue/_chunks/{PkChatbot-DZFxgvYU.js.map → PkChatbot-CxphD_YU.js.map} +1 -1
  10. package/dist-vue/_chunks/{PkChatbotViewChat-Drq-IICd.js → PkChatbotViewChat-2J6g9Etg.js} +3 -3
  11. package/dist-vue/_chunks/{PkChatbotViewChat-Drq-IICd.js.map → PkChatbotViewChat-2J6g9Etg.js.map} +1 -1
  12. package/dist-vue/_chunks/{PkChatbotViewConversations-D7ANZR5O.js → PkChatbotViewConversations-BbCnRdv4.js} +2 -2
  13. package/dist-vue/_chunks/{PkChatbotViewConversations-D7ANZR5O.js.map → PkChatbotViewConversations-BbCnRdv4.js.map} +1 -1
  14. package/dist-vue/_chunks/{PkChatbotViewFiles-Cvzxr1n-.js → PkChatbotViewFiles-gwoZqmza.js} +2 -2
  15. package/dist-vue/_chunks/{PkChatbotViewFiles-Cvzxr1n-.js.map → PkChatbotViewFiles-gwoZqmza.js.map} +1 -1
  16. package/dist-vue/_chunks/{PkChatbotViewProfile-BMIvkLEf.js → PkChatbotViewProfile-B7DroVld.js} +2 -2
  17. package/dist-vue/_chunks/{PkChatbotViewProfile-BMIvkLEf.js.map → PkChatbotViewProfile-B7DroVld.js.map} +1 -1
  18. package/dist-vue/_chunks/{PkFilePreview-BAAimkTM.js → PkFilePreview-N0kWPuFh.js} +2 -2
  19. package/dist-vue/_chunks/{PkFilePreview-BAAimkTM.js.map → PkFilePreview-N0kWPuFh.js.map} +1 -1
  20. package/dist-vue/_chunks/{PkFilePreviewDialog-C6iAW53k.js → PkFilePreviewDialog-DqBESOIS.js} +2 -2
  21. package/dist-vue/_chunks/{PkFilePreviewDialog-C6iAW53k.js.map → PkFilePreviewDialog-DqBESOIS.js.map} +1 -1
  22. package/dist-vue/_chunks/{createChatbotApiClient-DFADeRmJ.js → createChatbotApiClient-BACnmIzY.js} +108 -102
  23. package/dist-vue/_chunks/createChatbotApiClient-BACnmIzY.js.map +1 -0
  24. package/dist-vue/_chunks/{useChatbotStore-Bc99inD5.js → useChatbotStore-B-WenuyB.js} +2 -2
  25. package/dist-vue/_chunks/{useChatbotStore-Bc99inD5.js.map → useChatbotStore-B-WenuyB.js.map} +1 -1
  26. package/dist-vue/api.js +1 -1
  27. package/dist-vue/composables.js +6 -4
  28. package/dist-vue/composables.js.map +1 -1
  29. package/dist-vue/index.js +10 -10
  30. package/dist-vue/index.js.map +1 -1
  31. package/dist-vue/packages/ability/src/types.d.ts +1 -0
  32. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -0
  33. package/dist-vue/packages/composable/src/chatbot/useConversationActions.d.ts +2 -0
  34. package/dist-vue/packages/models/src/schema/Chat.d.ts +12 -0
  35. package/dist-vue/packages/models/src/schema/ChatProject.d.ts +68 -0
  36. package/dist-vue/packages/models/src/schema/Invitation.d.ts +1 -1
  37. package/dist-vue/packages/models/src/schema/Member.d.ts +4 -4
  38. package/dist-vue/packages/models/src/schema/Organization.d.ts +9 -0
  39. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +2 -0
  40. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  41. package/package.json +1 -1
  42. package/dist-vue/_chunks/createChatbotApiClient-DFADeRmJ.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./rolldown-runtime-CGnMp29N.js";
2
- import { t } from "./PkFilePreview-BAAimkTM.js";
2
+ import { t } from "./PkFilePreview-N0kWPuFh.js";
3
3
  import { VvDialog as n } from "@volverjs/ui-vue/components";
4
4
  import { createBlock as r, createVNode as i, defineComponent as a, mergeModels as o, openBlock as s, useModel as c, withCtx as l } from "vue";
5
5
  // ../../packages/components/src/chat/PkFilePreviewDialog.vue?vue&type=script&setup=true&lang.ts
@@ -113,4 +113,4 @@ var u = /*@__PURE__*/ a({
113
113
  }), d = /* @__PURE__ */ e({ default: () => f }), f = u;
114
114
  export { d as n, f as t };
115
115
 
116
- //# sourceMappingURL=PkFilePreviewDialog-C6iAW53k.js.map
116
+ //# sourceMappingURL=PkFilePreviewDialog-DqBESOIS.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PkFilePreviewDialog-C6iAW53k.js","names":["_useModel","_openBlock","_createBlock","_withCtx","_createVNode","PkFilePreview","__exportAll","PkFilePreviewDialog_vue_vue_type_script_setup_true_lang_default","\"mode\"","\"modeModifiers\"","\"sheet\"","\"sheetModifiers\"","\"zoom\"","\"zoomModifiers\"","\"fit\"","\"fitModifiers\"","__emit","emit","mode","useModel","__props","sheet","zoom","fit","_component_VvDialog","VvDialog","openBlock","createBlock","_cache","$event","withCtx","createVNode","PkFilePreview_default","text","pointer","action","PkFilePreviewDialog_exports","PkFilePreviewDialog_default"],"sources":["../../../../packages/components/src/chat/PkFilePreviewDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import type {\n ChatFilePreview,\n FilePointer,\n SelectionGroupCapability,\n } from 'models'\n import PkFilePreview from './PkFilePreview.vue'\n import type { ChatFilePreviewChanges } from './previewChanges'\n import type { ChatFilePreviewTarget, WordPreviewMode } from './utils'\n\n /**\n * The viewer of a file stored in a chat in a dialog over the page: the\n * chat's when it has no room for the panel beside it or the reader\n * expands it, the chat log's always. Open while it is mounted: `close`\n * asks the host to drop it. The viewer draws its own head, with the file\n * and the close button, so the dialog has no title and takes its name.\n */\n defineProps<{\n target: ChatFilePreviewTarget\n /** The authenticated download URL of the same version. */\n downloadUrl: string\n preview?: ChatFilePreview\n /** What the version changed from the one shown before, for a moment. */\n changes?: ChatFilePreviewChanges\n loading?: boolean\n error?: boolean\n /** Covers the screen, for a phone. */\n fullscreen?: boolean\n /** The versions of the file in the conversation, from 1. */\n versions?: number[]\n /** The shown version can be written again as the newest one. */\n restorable?: boolean\n /** Offers to go back to the panel beside the chat. */\n resize?: 'shrink'\n /** The selection bar's actions for this format: absent in the chat logs. */\n selectionActions?: SelectionGroupCapability\n /** The agent answers in the chat the dialog covers. */\n working?: boolean\n }>()\n\n const emit = defineEmits<{\n close: []\n version: [version: number]\n restore: []\n resize: []\n showChat: []\n selectionSend: [\n text: string,\n pointer: FilePointer,\n action: { id: string; size: number },\n ]\n }>()\n\n // How the file is shown, kept by the host across panel and dialog\n const mode = defineModel<WordPreviewMode>('mode')\n const sheet = defineModel<number>('sheet')\n const zoom = defineModel<number>('zoom')\n // A boolean prop left out is false, not the viewer's default: the chat\n // logs keep no zoom, and their pages opened at 100% instead of fitted\n const fit = defineModel<boolean>('fit', { default: true })\n</script>\n\n<template>\n <VvDialog\n :model-value=\"true\"\n :aria-label=\"target.filename\"\n :modifiers=\"fullscreen ? 'fullscreen' : undefined\"\n class=\"pk-file-preview-dialog\"\n @update:model-value=\"!$event && emit('close')\">\n <PkFilePreview\n v-model:mode=\"mode\"\n v-model:sheet=\"sheet\"\n v-model:zoom=\"zoom\"\n v-model:fit=\"fit\"\n :kind=\"target.kind\"\n :filename=\"target.filename\"\n :version=\"target.version\"\n :versions\n :download-url\n :preview\n :changes\n :loading\n :error\n :restorable\n :resize\n :file-id=\"target.fileId\"\n :stored-file-name=\"target.storedFileName\"\n :selection-actions\n :working\n @version=\"emit('version', $event)\"\n @restore=\"emit('restore')\"\n @resize=\"emit('resize')\"\n @show-chat=\"emit('showChat')\"\n @selection-send=\"\n (text, pointer, action) =>\n emit('selectionSend', text, pointer, action)\n \"\n @close=\"emit('close')\" />\n </VvDialog>\n</template>\n\n<style lang=\"scss\">\n // Almost the whole window, room for a page of Word and a grid of Excel;\n // the viewer scrolls in its own box, so the content does not pad it.\n .pk-file-preview-dialog {\n &:not(.vv-dialog--fullscreen) > article {\n width: min(90rem, 94dvw);\n height: 92dvh;\n }\n\n // The library writes `max-height: auto`, which is no value: the\n // wrapper kept its 90dvh and the phone saw the chat around it\n &.vv-dialog--fullscreen > article {\n max-height: none;\n }\n\n .vv-dialog__content {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCI,IAAMiB,IAAOD,GAcPE,IAAOlB,EAA4BoB,GAAC,MAAM,GAC1CC,IAAQrB,EAAmBoB,GAAC,OAAO,GACnCE,IAAOtB,EAAmBoB,GAAC,MAAM,GAGjCG,IAAMvB,EAAoBoB,GAAC,KAAwB;;;GAIzD,OAAAnB,EAAA,GAAAC,EAmCWsB,GAAA;IAlCN,eAAa;IACb,cAAYJ,EAAA,OAAO;IACnB,WAAWA,EAAA,aAAU,eAAkB,KAAA;IACxC,OAAM;IACL,uBAAkB,AAAAQ,EAAA,SAAA,MAAA,CAAGC,KAAUZ,EAAI,OAAA;;IACpC,SAAAd,QA4B6B,CA5B7BC,EA4B6BC,GAAA;KA3BjB,MAAMa,EAAA;KAAA,iBAAA,AAAAU,EAAA,QAAA,MAAA,EAAI,QAAAC;KACV,OAAOR,EAAA;KAAA,kBAAA,AAAAO,EAAA,QAAA,MAAA,EAAK,QAAAC;KACZ,MAAMP,EAAA;KAAA,iBAAA,AAAAM,EAAA,QAAA,MAAA,EAAI,QAAAC;KACV,KAAKN,EAAA;KAAA,gBAAA,AAAAK,EAAA,QAAA,MAAA,EAAG,QAAAC;KACf,MAAMT,EAAA,OAAO;KACb,UAAUA,EAAA,OAAO;KACjB,SAASA,EAAA,OAAO;KAChB,UAAAA,EAAA;KACA,gBAAAA,EAAA;KACA,SAAAA,EAAA;KACA,SAAAA,EAAA;KACA,SAAAA,EAAA;KACA,OAAAA,EAAA;KACA,YAAAA,EAAA;KACA,QAAAA,EAAA;KACA,WAASA,EAAA,OAAO;KAChB,oBAAkBA,EAAA,OAAO;KACzB,qBAAAA,EAAA;KACA,SAAAA,EAAA;KACA,WAAO,AAAAQ,EAAA,QAAA,MAAEX,EAAI,WAAYY,CAAM;KAC/B,WAAO,AAAAD,EAAA,QAAA,MAAEX,EAAI,SAAA;KACb,UAAM,AAAAW,EAAA,QAAA,MAAEX,EAAI,QAAA;KACZ,YAAS,AAAAW,EAAA,QAAA,MAAEX,EAAI,UAAA;KACf,iBAAc,AAAAW,EAAA,QAAoB,GAAM,GAAS,MAA+BX,EAAI,iBAAkBgB,GAAMC,GAASC,CAAM;KAI3H,SAAK,AAAAP,EAAA,QAAA,MAAEX,EAAI,OAAA"}
1
+ {"version":3,"file":"PkFilePreviewDialog-DqBESOIS.js","names":["_useModel","_openBlock","_createBlock","_withCtx","_createVNode","PkFilePreview","__exportAll","PkFilePreviewDialog_vue_vue_type_script_setup_true_lang_default","\"mode\"","\"modeModifiers\"","\"sheet\"","\"sheetModifiers\"","\"zoom\"","\"zoomModifiers\"","\"fit\"","\"fitModifiers\"","__emit","emit","mode","useModel","__props","sheet","zoom","fit","_component_VvDialog","VvDialog","openBlock","createBlock","_cache","$event","withCtx","createVNode","PkFilePreview_default","text","pointer","action","PkFilePreviewDialog_exports","PkFilePreviewDialog_default"],"sources":["../../../../packages/components/src/chat/PkFilePreviewDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import type {\n ChatFilePreview,\n FilePointer,\n SelectionGroupCapability,\n } from 'models'\n import PkFilePreview from './PkFilePreview.vue'\n import type { ChatFilePreviewChanges } from './previewChanges'\n import type { ChatFilePreviewTarget, WordPreviewMode } from './utils'\n\n /**\n * The viewer of a file stored in a chat in a dialog over the page: the\n * chat's when it has no room for the panel beside it or the reader\n * expands it, the chat log's always. Open while it is mounted: `close`\n * asks the host to drop it. The viewer draws its own head, with the file\n * and the close button, so the dialog has no title and takes its name.\n */\n defineProps<{\n target: ChatFilePreviewTarget\n /** The authenticated download URL of the same version. */\n downloadUrl: string\n preview?: ChatFilePreview\n /** What the version changed from the one shown before, for a moment. */\n changes?: ChatFilePreviewChanges\n loading?: boolean\n error?: boolean\n /** Covers the screen, for a phone. */\n fullscreen?: boolean\n /** The versions of the file in the conversation, from 1. */\n versions?: number[]\n /** The shown version can be written again as the newest one. */\n restorable?: boolean\n /** Offers to go back to the panel beside the chat. */\n resize?: 'shrink'\n /** The selection bar's actions for this format: absent in the chat logs. */\n selectionActions?: SelectionGroupCapability\n /** The agent answers in the chat the dialog covers. */\n working?: boolean\n }>()\n\n const emit = defineEmits<{\n close: []\n version: [version: number]\n restore: []\n resize: []\n showChat: []\n selectionSend: [\n text: string,\n pointer: FilePointer,\n action: { id: string; size: number },\n ]\n }>()\n\n // How the file is shown, kept by the host across panel and dialog\n const mode = defineModel<WordPreviewMode>('mode')\n const sheet = defineModel<number>('sheet')\n const zoom = defineModel<number>('zoom')\n // A boolean prop left out is false, not the viewer's default: the chat\n // logs keep no zoom, and their pages opened at 100% instead of fitted\n const fit = defineModel<boolean>('fit', { default: true })\n</script>\n\n<template>\n <VvDialog\n :model-value=\"true\"\n :aria-label=\"target.filename\"\n :modifiers=\"fullscreen ? 'fullscreen' : undefined\"\n class=\"pk-file-preview-dialog\"\n @update:model-value=\"!$event && emit('close')\">\n <PkFilePreview\n v-model:mode=\"mode\"\n v-model:sheet=\"sheet\"\n v-model:zoom=\"zoom\"\n v-model:fit=\"fit\"\n :kind=\"target.kind\"\n :filename=\"target.filename\"\n :version=\"target.version\"\n :versions\n :download-url\n :preview\n :changes\n :loading\n :error\n :restorable\n :resize\n :file-id=\"target.fileId\"\n :stored-file-name=\"target.storedFileName\"\n :selection-actions\n :working\n @version=\"emit('version', $event)\"\n @restore=\"emit('restore')\"\n @resize=\"emit('resize')\"\n @show-chat=\"emit('showChat')\"\n @selection-send=\"\n (text, pointer, action) =>\n emit('selectionSend', text, pointer, action)\n \"\n @close=\"emit('close')\" />\n </VvDialog>\n</template>\n\n<style lang=\"scss\">\n // Almost the whole window, room for a page of Word and a grid of Excel;\n // the viewer scrolls in its own box, so the content does not pad it.\n .pk-file-preview-dialog {\n &:not(.vv-dialog--fullscreen) > article {\n width: min(90rem, 94dvw);\n height: 92dvh;\n }\n\n // The library writes `max-height: auto`, which is no value: the\n // wrapper kept its 90dvh and the phone saw the chat around it\n &.vv-dialog--fullscreen > article {\n max-height: none;\n }\n\n .vv-dialog__content {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCI,IAAMiB,IAAOD,GAcPE,IAAOlB,EAA4BoB,GAAC,MAAM,GAC1CC,IAAQrB,EAAmBoB,GAAC,OAAO,GACnCE,IAAOtB,EAAmBoB,GAAC,MAAM,GAGjCG,IAAMvB,EAAoBoB,GAAC,KAAwB;;;GAIzD,OAAAnB,EAAA,GAAAC,EAmCWsB,GAAA;IAlCN,eAAa;IACb,cAAYJ,EAAA,OAAO;IACnB,WAAWA,EAAA,aAAU,eAAkB,KAAA;IACxC,OAAM;IACL,uBAAkB,AAAAQ,EAAA,SAAA,MAAA,CAAGC,KAAUZ,EAAI,OAAA;;IACpC,SAAAd,QA4B6B,CA5B7BC,EA4B6BC,GAAA;KA3BjB,MAAMa,EAAA;KAAA,iBAAA,AAAAU,EAAA,QAAA,MAAA,EAAI,QAAAC;KACV,OAAOR,EAAA;KAAA,kBAAA,AAAAO,EAAA,QAAA,MAAA,EAAK,QAAAC;KACZ,MAAMP,EAAA;KAAA,iBAAA,AAAAM,EAAA,QAAA,MAAA,EAAI,QAAAC;KACV,KAAKN,EAAA;KAAA,gBAAA,AAAAK,EAAA,QAAA,MAAA,EAAG,QAAAC;KACf,MAAMT,EAAA,OAAO;KACb,UAAUA,EAAA,OAAO;KACjB,SAASA,EAAA,OAAO;KAChB,UAAAA,EAAA;KACA,gBAAAA,EAAA;KACA,SAAAA,EAAA;KACA,SAAAA,EAAA;KACA,SAAAA,EAAA;KACA,OAAAA,EAAA;KACA,YAAAA,EAAA;KACA,QAAAA,EAAA;KACA,WAASA,EAAA,OAAO;KAChB,oBAAkBA,EAAA,OAAO;KACzB,qBAAAA,EAAA;KACA,SAAAA,EAAA;KACA,WAAO,AAAAQ,EAAA,QAAA,MAAEX,EAAI,WAAYY,CAAM;KAC/B,WAAO,AAAAD,EAAA,QAAA,MAAEX,EAAI,SAAA;KACb,UAAM,AAAAW,EAAA,QAAA,MAAEX,EAAI,QAAA;KACZ,YAAS,AAAAW,EAAA,QAAA,MAAEX,EAAI,UAAA;KACf,iBAAc,AAAAW,EAAA,QAAoB,GAAM,GAAS,MAA+BX,EAAI,iBAAkBgB,GAAMC,GAASC,CAAM;KAI3H,SAAK,AAAAP,EAAA,QAAA,MAAEX,EAAI,OAAA"}
@@ -1,16 +1,16 @@
1
- import { C as e, S as t, b as n, g as r, h as i, m as a, o, r as s, s as c, u as l, y as u } from "./schemas-CwcNxjnD.js";
2
- import { l as d, t as ee } from "./Media-0U2B_qCS.js";
3
- import { Dt as f, Et as te, c as p, ct as m, j as h, l as ne, m as re, o as ie, r as ae, u as oe, v as se } from "./Agent-CRwhrv5Z.js";
4
- import { t as ce } from "./StreamError-FMgvyJMX.js";
1
+ import { C as e, S as t, b as n, g as r, h as i, m as a, o, r as s, s as c, u as l, w as u, x as ee, y as d } from "./schemas-CwcNxjnD.js";
2
+ import { l as f, t as te } from "./Media-0U2B_qCS.js";
3
+ import { Dt as p, Et as m, c as ne, ct as re, j as ie, l as ae, m as oe, o as se, r as ce, u as le, v as ue } from "./Agent-CRwhrv5Z.js";
4
+ import { t as de } from "./StreamError-FMgvyJMX.js";
5
5
  import "./src-nb8MU1sh.js";
6
- import { r as g, t as le } from "./url-validation-CJV9pp4v.js";
7
- import { buildMongoQueryMatcher as ue, createAliasResolver as de } from "@casl/ability";
8
- import { createAccessControl as fe } from "better-auth/plugins";
9
- import { adminAc as pe, defaultStatements as me, memberAc as _, ownerAc as he } from "better-auth/plugins/organization/access";
6
+ import { r as h, t as fe } from "./url-validation-CJV9pp4v.js";
7
+ import { buildMongoQueryMatcher as pe, createAliasResolver as me } from "@casl/ability";
8
+ import { createAccessControl as he } from "better-auth/plugins";
9
+ import { adminAc as ge, defaultStatements as _e, memberAc as g, ownerAc as ve } from "better-auth/plugins/organization/access";
10
10
  // ../../packages/models/src/schema/ConversationAnalysis.ts
11
- var ge = /* @__PURE__ */ function(e) {
11
+ var ye = /* @__PURE__ */ function(e) {
12
12
  return e.Harassment = "harassment", e.HateSpeech = "hate_speech", e.SexualContent = "sexual_content", e.SelfHarm = "self_harm", e.Violence = "violence", e.PromptInjection = "prompt_injection", e.DataExtraction = "data_extraction", e.Spam = "spam", e.OffTopicPersistent = "off_topic_persistent", e.Impersonation = "impersonation", e;
13
- }({}), _e = /* @__PURE__ */ function(e) {
13
+ }({}), _ = /* @__PURE__ */ function(e) {
14
14
  return e.Low = "low", e.Medium = "medium", e.High = "high", e;
15
15
  }({}), v = /* @__PURE__ */ function(e) {
16
16
  return e.FalseSuccess = "false_success", e.Hallucination = "hallucination", e.OffBrand = "off_brand", e.DataLeak = "data_leak", e.InappropriateTone = "inappropriate_tone", e.RefusalLoop = "refusal_loop", e.Repetition = "repetition", e.FailedAction = "failed_action", e.EmptyReply = "empty_reply", e.StuckFlow = "stuck_flow", e;
@@ -25,7 +25,7 @@ var ge = /* @__PURE__ */ function(e) {
25
25
  }({}), C = /* @__PURE__ */ function(e) {
26
26
  return e.Improving = "improving", e.Stable = "stable", e.Degrading = "degrading", e;
27
27
  }({}), w = 1e3, T = r({
28
- analyzedAt: d().describe("When the analysis was generated."),
28
+ analyzedAt: f().describe("When the analysis was generated."),
29
29
  analysisTrigger: s(y).describe("What triggered this analysis run."),
30
30
  sentiment: s(S).describe("Overall user sentiment in the conversation."),
31
31
  sentimentTrend: s(C).describe("How the user sentiment evolved during the conversation."),
@@ -33,8 +33,8 @@ var ge = /* @__PURE__ */ function(e) {
33
33
  language: n().max(10).describe("ISO 639-1 language code of the conversation (e.g. \"en\", \"it\")."),
34
34
  topics: o(n().max(100)).max(10).describe("Main topics discussed, as short lowercase labels."),
35
35
  userAbuseDetected: c().describe("Whether user abuse was detected. If false, userAbuseCategories MUST be empty."),
36
- userAbuseCategories: o(s(ge)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
37
- userAbuseConfidence: s(_e).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
36
+ userAbuseCategories: o(s(ye)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
37
+ userAbuseConfidence: s(_).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
38
38
  userAbuseSummary: n().max(w).optional().describe("Brief description of the abusive behavior detected. Always write in English. Set only if userAbuseDetected is true."),
39
39
  llmIssueDetected: c().describe("Whether an LLM quality issue was detected. If false, llmIssueCategories MUST be empty."),
40
40
  llmIssueCategories: o(s(v)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
@@ -47,10 +47,10 @@ var ge = /* @__PURE__ */ function(e) {
47
47
  text: n()
48
48
  }), D = r({
49
49
  type: a("file"),
50
- mediaType: n().regex(ee),
50
+ mediaType: n().regex(te),
51
51
  url: e(),
52
52
  filename: n().optional(),
53
- providerMetadata: u(n(), u(n(), t())).optional()
53
+ providerMetadata: d(n(), d(n(), t())).optional()
54
54
  }), O = l("type", [E, D]);
55
55
  r({
56
56
  id: n(),
@@ -67,21 +67,22 @@ r({
67
67
  maxOutputTokens: i().positive().optional(),
68
68
  presencePenalty: i().min(-2).max(2).optional(),
69
69
  frequencyPenalty: i().min(-2).max(2).optional(),
70
- searchMode: s(oe).optional(),
70
+ searchMode: s(le).optional(),
71
71
  limit: i().optional(),
72
- ranking: p.optional(),
73
- reasoning: ne,
74
- webSearch: re.optional(),
72
+ ranking: ne.optional(),
73
+ reasoning: ae,
74
+ webSearch: oe.optional(),
75
75
  maxStepCount: i().int().min(1).max(40).optional(),
76
- disabledTools: o(s(ae)).optional(),
76
+ disabledTools: o(s(ce)).optional(),
77
77
  fallbackModels: o(n()).optional(),
78
- gatewayOptions: ie.partial().optional(),
79
- deviceContext: m.optional(),
80
- externalContext: u(n(), t()).optional(),
78
+ gatewayOptions: se.partial().optional(),
79
+ deviceContext: re.optional(),
80
+ externalContext: d(n(), t()).optional(),
81
81
  smoothStream: c().optional(),
82
82
  hostTools: o(t()).optional(),
83
83
  pageTools: t().optional(),
84
- confirmations: se.optional()
84
+ confirmations: ue.optional(),
85
+ projectId: u().optional()
85
86
  }), r({
86
87
  id: n().min(1),
87
88
  messages: o(r({ role: n() }).loose()).min(1)
@@ -107,8 +108,8 @@ function A(e) {
107
108
  }
108
109
  continue;
109
110
  }
110
- let n = te(e, r.keys()), s = n && r.get(n);
111
- s && (t.state === "output-error" && ce.test(t.errorText ?? "") ? o.add(s) : a.add(s));
111
+ let n = m(e, r.keys()), s = n && r.get(n);
112
+ s && (t.state === "output-error" && de.test(t.errorText ?? "") ? o.add(s) : a.add(s));
112
113
  }
113
114
  let s = new Set(n.selected), c = new Set(n.seeded), l = t.groups.map((e) => ({
114
115
  id: e.id,
@@ -144,54 +145,59 @@ var j = [
144
145
  title: n().nullable(),
145
146
  summary: n().nullable(),
146
147
  messageCountAtLastSummary: n().nullable(),
147
- createdAt: d(),
148
- updatedAt: d(),
149
- metadata: u(n(), t()),
148
+ createdAt: f(),
149
+ updatedAt: f(),
150
+ metadata: d(n(), t()),
150
151
  totalCostInUSD: n(),
151
152
  usage: t(),
152
153
  agentId: n().nullable(),
153
154
  userId: n(),
154
155
  organizationId: n(),
155
156
  deleted: c(),
156
- deletedAt: d().nullable(),
157
+ deletedAt: f().nullable(),
157
158
  deletedBy: n().nullable(),
158
159
  conversationAnalysis: T.nullable().optional(),
159
160
  blocked: c(),
160
- blockedAt: d().nullable(),
161
+ blockedAt: f().nullable(),
161
162
  blockedReasonCode: s(k).nullable(),
162
163
  blockedReason: n().nullable(),
163
164
  warningCount: i(),
164
- lastMessageAt: d(),
165
- turnInProgress: c().optional()
166
- });
165
+ lastMessageAt: f(),
166
+ turnInProgress: c().optional(),
167
+ projectId: n().nullable().optional(),
168
+ authorName: n().optional()
169
+ }), P = "none";
167
170
  r({
168
- ...f.pagination(),
169
- ...f.sort([
171
+ ...p.pagination(),
172
+ ...p.sort([
170
173
  "updatedAt",
171
174
  "createdAt",
172
175
  "lastMessageAt"
173
176
  ]),
174
- ...f.filters(["agentId", "userId"]),
175
- ...f.range("updatedAt"),
176
- ...f.range("lastMessageAt"),
177
- ...f.ids(),
177
+ ...p.filters(["agentId", "userId"]),
178
+ "filter[projectId]": ee([u(), a(P)]).optional(),
179
+ ...p.range("updatedAt"),
180
+ ...p.range("lastMessageAt"),
181
+ ...p.ids(),
178
182
  startDate: n().optional(),
179
183
  endDate: n().optional(),
180
184
  search: n().trim().max(200).optional()
181
185
  });
182
- var P = r({
186
+ var be = r({
183
187
  id: n(),
184
188
  agentId: n().optional(),
185
189
  organizationId: n(),
186
190
  summary: n().optional(),
187
191
  title: n().optional(),
188
192
  userId: n(),
189
- createdAt: d(),
190
- updatedAt: d(),
191
- lastMessageAt: d(),
193
+ createdAt: f(),
194
+ updatedAt: f(),
195
+ lastMessageAt: f(),
192
196
  messages: o(t()),
193
197
  blocked: c(),
194
- turnInProgress: c().optional()
198
+ turnInProgress: c().optional(),
199
+ projectId: n().nullable().optional(),
200
+ authorName: n().optional()
195
201
  }), F = class {
196
202
  constructor(e, t) {
197
203
  this.operator = e, this.value = t, Object.defineProperty(this, "_notes", { writable: !0 });
@@ -207,13 +213,13 @@ var P = r({
207
213
  if (!Array.isArray(t)) throw Error(`"${e}" operator expects to receive an array of conditions`);
208
214
  super(e, t);
209
215
  }
210
- }, ve = "__itself__", R = class extends F {
216
+ }, xe = "__itself__", R = class extends F {
211
217
  constructor(e, t, n) {
212
218
  super(e, n), this.field = t;
213
219
  }
214
- }, ye = new I("__null__", null);
220
+ }, Se = new I("__null__", null);
215
221
  Object.hasOwn;
216
- function be(e, t) {
222
+ function Ce(e, t) {
217
223
  let n;
218
224
  for (let r = 0, i = t.length; r < i; r++) {
219
225
  let i = t[r];
@@ -230,10 +236,10 @@ function be(e, t) {
230
236
  }
231
237
  return n || t;
232
238
  }
233
- function xe(e, t) {
239
+ function we(e, t) {
234
240
  if (t.length === 1) return t[0];
235
241
  if (t.length === 0) return new L(e, t);
236
- let n = be(e, t);
242
+ let n = Ce(e, t);
237
243
  return n.length === 1 ? n[0] : (n.length, new L(e, n));
238
244
  }
239
245
  Object.defineProperty(Object.create(null), "__@type@__", { value: "ignore value" });
@@ -247,37 +253,37 @@ var z = Object.defineProperty;
247
253
  });
248
254
  return t || z(n, Symbol.toStringTag, { value: "Module" }), n;
249
255
  })({
250
- $all: () => De,
256
+ $all: () => Ae,
251
257
  $and: () => B,
252
- $elemMatch: () => we,
258
+ $elemMatch: () => De,
253
259
  $eq: () => K,
254
- $exists: () => ke,
260
+ $exists: () => Me,
255
261
  $gt: () => G,
256
262
  $gte: () => W,
257
263
  $in: () => U,
258
- $lt: () => Ae,
259
- $lte: () => je,
260
- $mod: () => Oe,
261
- $ne: () => Me,
262
- $nin: () => Ee,
263
- $nor: () => Se,
264
- $not: () => Ce,
265
- $options: () => q,
264
+ $lt: () => Ne,
265
+ $lte: () => Pe,
266
+ $mod: () => je,
267
+ $ne: () => Fe,
268
+ $nin: () => ke,
269
+ $nor: () => Te,
270
+ $not: () => Ee,
271
+ $options: () => Le,
266
272
  $or: () => V,
267
- $regex: () => Ne,
268
- $size: () => Te,
269
- $where: () => Pe
273
+ $regex: () => Ie,
274
+ $size: () => Oe,
275
+ $where: () => Re
270
276
  });
271
277
  var B = {
272
278
  type: "compound",
273
- validate: Y,
279
+ validate: J,
274
280
  parse(e, t, n) {
275
281
  let r = H(e, t, n);
276
- return xe(e.name, r);
282
+ return we(e.name, r);
277
283
  }
278
- }, V = B, Se = {
284
+ }, V = B, Te = {
279
285
  type: "compound",
280
- validate: Y,
286
+ validate: J,
281
287
  parse(e, t, n) {
282
288
  let r = H(e, t, n);
283
289
  return new L(e.name, r);
@@ -287,11 +293,11 @@ function H(e, t, n) {
287
293
  let r = Array(t.length);
288
294
  for (let i = 0; i < t.length; i++) {
289
295
  let a = t[i];
290
- Ie(e, a, i), r[i] = n.parse(a);
296
+ ze(e, a, i), r[i] = n.parse(a);
291
297
  }
292
298
  return r;
293
299
  }
294
- var Ce = {
300
+ var Ee = {
295
301
  type: "field",
296
302
  validate(e, t) {
297
303
  if (!(t && (t instanceof RegExp || t.constructor === Object))) throw Error(`"${e.name}" expects to receive either regular expression or object of field operators`);
@@ -300,33 +306,33 @@ var Ce = {
300
306
  let r = t instanceof RegExp ? new R("regex", n.field, t) : n.parse(t, n);
301
307
  return new L(e.name, [r]);
302
308
  }
303
- }, we = {
309
+ }, De = {
304
310
  type: "field",
305
311
  validate(e, t) {
306
312
  if (!t || t.constructor !== Object) throw Error(`"${e.name}" expects to receive an object with nested query or field level operators`);
307
313
  },
308
314
  parse(e, t, { parse: n, field: r, hasOperators: i }) {
309
- let a = i(t) ? n(t, { field: ve }) : n(t);
315
+ let a = i(t) ? n(t, { field: xe }) : n(t);
310
316
  return new R(e.name, r, a);
311
317
  }
312
- }, Te = {
318
+ }, Oe = {
313
319
  type: "field",
314
320
  validate: X("number")
315
321
  }, U = {
316
322
  type: "field",
317
- validate: J
318
- }, Ee = U, De = U, Oe = {
323
+ validate: q
324
+ }, ke = U, Ae = U, je = {
319
325
  type: "field",
320
326
  validate(e, t) {
321
327
  if (!Array.isArray(t) || t.length !== 2) throw Error(`"${e.name}" expects an array with 2 numeric elements`);
322
328
  }
323
- }, ke = {
329
+ }, Me = {
324
330
  type: "field",
325
331
  validate: X("boolean")
326
332
  }, W = {
327
333
  type: "field",
328
- validate: Fe
329
- }, G = W, Ae = G, je = G, K = { type: "field" }, Me = K, Ne = {
334
+ validate: Y
335
+ }, G = W, Ne = G, Pe = G, K = { type: "field" }, Fe = K, Ie = {
330
336
  type: "field",
331
337
  validate(e, t) {
332
338
  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`);
@@ -335,20 +341,20 @@ var Ce = {
335
341
  let r = typeof t == "string" ? new RegExp(t, n.query.$options || "") : t;
336
342
  return new R(e.name, n.field, r);
337
343
  }
338
- }, q = {
344
+ }, Le = {
339
345
  type: "field",
340
- parse: () => ye
341
- }, Pe = {
346
+ parse: () => Se
347
+ }, Re = {
342
348
  type: "document",
343
349
  validate: X("function")
344
350
  };
345
- function J(e, t) {
351
+ function q(e, t) {
346
352
  if (!Array.isArray(t)) throw Error(`"${e.name}" expects value to be an array`);
347
353
  }
348
- function Y(e, t) {
349
- if (J(e, t), !t.length) throw Error(`"${e.name}" expects to have at least one element in array`);
354
+ function J(e, t) {
355
+ if (q(e, t), !t.length) throw Error(`"${e.name}" expects to have at least one element in array`);
350
356
  }
351
- function Fe(e, t) {
357
+ function Y(e, t) {
352
358
  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)`);
353
359
  }
354
360
  function X(e) {
@@ -356,7 +362,7 @@ function X(e) {
356
362
  if (typeof n !== e) throw Error(`"${t.name}" expects value to be a "${e}"`);
357
363
  };
358
364
  }
359
- function Ie(e, t, n) {
365
+ function ze(e, t, n) {
360
366
  let r = t;
361
367
  if (!r || r.constructor !== Object) throw Error(`"${e.name}" expects item at index ${n} to be an object`);
362
368
  }
@@ -364,17 +370,17 @@ function Ie(e, t, n) {
364
370
  var Z = /* @__PURE__ */ function(e) {
365
371
  return e.Backoffice = "backoffice", e.Frontoffice = "frontoffice", e.System = "system", e.Public = "public", e;
366
372
  }({});
367
- de({ modify: [
373
+ me({ modify: [
368
374
  "read",
369
375
  "update",
370
376
  "delete"
371
- ] }), ue({ $or: V });
372
- var Q = fe(me);
373
- Q.newRole(pe.statements), Q.newRole(he.statements), Q.newRole(_.statements), Q.newRole(_.statements);
377
+ ] }), pe({ $or: V });
378
+ var Q = he(_e);
379
+ Q.newRole(ge.statements), Q.newRole(ve.statements), Q.newRole(g.statements), Q.newRole(g.statements);
374
380
  // ../../packages/composable/src/chatbot/api/resolveShortUrls.ts
375
- async function Le(e, t, n = {}) {
381
+ async function Be(e, t, n = {}) {
376
382
  try {
377
- let r = g(e), i = await fetch(`${r}/api/r/resolve`, {
383
+ let r = h(e), i = await fetch(`${r}/api/r/resolve`, {
378
384
  method: "POST",
379
385
  credentials: n.credentials ?? "include",
380
386
  headers: {
@@ -389,12 +395,12 @@ async function Le(e, t, n = {}) {
389
395
  }
390
396
  }
391
397
  // ../../packages/composable/src/chatbot/api/createChatbotApiClient.ts
392
- var Re = N.or(P);
398
+ var Ve = N.or(be);
393
399
  function $(e) {
394
- let t = Re.safeParse(e);
400
+ let t = Ve.safeParse(e);
395
401
  return t.success ? t.data : e;
396
402
  }
397
- async function ze(e) {
403
+ async function He(e) {
398
404
  let t = `${e.status} ${e.statusText}`.trim();
399
405
  try {
400
406
  let n = await e.json();
@@ -403,8 +409,8 @@ async function ze(e) {
403
409
  return t;
404
410
  }
405
411
  }
406
- function Be(e) {
407
- let t = e.basePath ? le(e.basePath) : `/api/v1/${Z.Public}`, n = `${g(e.baseUrl)}${t}`, r = `${g(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${Z.Frontoffice}`)}`;
412
+ function Ue(e) {
413
+ let t = e.basePath ? fe(e.basePath) : `/api/v1/${Z.Public}`, n = `${h(e.baseUrl)}${t}`, r = `${h(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${Z.Frontoffice}`)}`;
408
414
  async function i(t, r, i = "json") {
409
415
  let a = await fetch(`${n}${t}`, {
410
416
  credentials: e.credentials ?? "include",
@@ -414,7 +420,7 @@ function Be(e) {
414
420
  ...r?.headers
415
421
  }
416
422
  });
417
- if (!a.ok) throw Error(await ze(a));
423
+ if (!a.ok) throw Error(await He(a));
418
424
  if (i !== "void" && a.status !== 204) return a.json();
419
425
  }
420
426
  return {
@@ -596,7 +602,7 @@ function Be(e) {
596
602
  return i(`/agents/${encodeURIComponent(e)}/mcp-oauth/status?${n}`);
597
603
  },
598
604
  async createVoiceSession(e, t, n) {
599
- return h.parse(await i(`/agents/${encodeURIComponent(e)}/voice/session`, {
605
+ return ie.parse(await i(`/agents/${encodeURIComponent(e)}/voice/session`, {
600
606
  method: "POST",
601
607
  headers: { "Content-Type": "application/json" },
602
608
  body: JSON.stringify({
@@ -615,13 +621,13 @@ function Be(e) {
615
621
  }, "void");
616
622
  },
617
623
  resolveShortUrls(t) {
618
- return Le(e.baseUrl, t, {
624
+ return Be(e.baseUrl, t, {
619
625
  headers: e.headers?.(),
620
626
  credentials: e.credentials
621
627
  });
622
628
  }
623
629
  };
624
630
  }
625
- export { A as a, j as i, Z as n, M as r, Be as t };
631
+ export { A as a, j as i, Z as n, M as r, Ue as t };
626
632
 
627
- //# sourceMappingURL=createChatbotApiClient-DFADeRmJ.js.map
633
+ //# sourceMappingURL=createChatbotApiClient-BACnmIzY.js.map