@epam/ai-dial-chat-hooks 1.2.0-dev.158 → 1.2.0-dev.159

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.
@@ -2,52 +2,52 @@ import { safeDecodeURIComponent as e } from "../shared/string-utils.js";
2
2
  import { isPublicToolsetId as t } from "../oauth/toolset-id.js";
3
3
  import { resolveLocalizedText as n } from "../shared/locale.js";
4
4
  import { mapEntityDetailsToCatalogDetails as r } from "./map-entity-details-to-catalog.js";
5
- import { CatalogEntityType as i, formatLastUsed as a } from "@epam/ai-dial-chat-shared";
6
- import { CredentialStatus as o, ToolsetAuthenticationType as s } from "@epam/ai-dial-catalog";
5
+ import { CatalogEntityType as i, PUBLIC_BUCKET as a, formatLastUsed as o } from "@epam/ai-dial-chat-shared";
6
+ import { CredentialStatus as s, ToolsetAuthenticationType as c } from "@epam/ai-dial-catalog";
7
7
  //#region src/catalog/map-deployment-to-catalog-item.ts
8
- var c = {
9
- NONE: s.None,
10
- API_KEY: s.ApiKey,
11
- OAUTH: s.OAuth
12
- }, l = {
13
- SIGNED_IN: o.SignedIn,
14
- SIGNED_OUT: o.SignedOut,
15
- FAILED: o.Failed
16
- }, u = (e, n, r) => {
8
+ var l = {
9
+ NONE: c.None,
10
+ API_KEY: c.ApiKey,
11
+ OAUTH: c.OAuth
12
+ }, u = {
13
+ SIGNED_IN: s.SignedIn,
14
+ SIGNED_OUT: s.SignedOut,
15
+ FAILED: s.Failed
16
+ }, d = (e, n, r) => {
17
17
  if (n == null) return;
18
- let i = t(e), a = n.userLevelAuthStatus ? l[n.userLevelAuthStatus] : void 0, u = n.globalAuthStatus ? l[n.globalAuthStatus] : void 0;
18
+ let i = t(e), a = n.userLevelAuthStatus ? u[n.userLevelAuthStatus] : void 0, o = n.globalAuthStatus ? u[n.globalAuthStatus] : void 0;
19
19
  return {
20
- authenticationType: !r && i && a !== o.SignedIn && u === o.SignedIn ? s.None : c[n.authenticationType],
20
+ authenticationType: !r && i && a !== s.SignedIn && o === s.SignedIn ? c.None : l[n.authenticationType],
21
21
  userStatus: a,
22
- globalStatus: u,
22
+ globalStatus: o,
23
23
  isPublic: i,
24
24
  isManageableByAdmin: r && i,
25
25
  apiKeyHeader: n.apiKeyHeader
26
26
  };
27
- }, d = {
27
+ }, f = {
28
28
  model: i.Model,
29
29
  toolset: i.Toolset,
30
30
  application: i.Agent
31
- }, f = "applications/", p = "toolsets/", m = "public", h = (t, n) => (t.startsWith(n) ? t.slice(n.length) : t).split("/").filter(Boolean).map(e), g = (e, t) => {
31
+ }, p = "applications/", m = "toolsets/", h = (t, n) => (t.startsWith(n) ? t.slice(n.length) : t).split("/").filter(Boolean).map(e), g = (e, t) => {
32
32
  if (e.isMy) return [t.personal];
33
- let n = h(e.applicationFolder ?? "", f);
34
- return e.sharedWithMe ? [t.shared, ...n.slice(1)] : n.length === 0 && e.type?.toLowerCase() === "application" ? [t.public] : n[0]?.toLowerCase() === m ? [t.public, ...n.slice(1)] : n;
33
+ let n = h(e.applicationFolder ?? "", p);
34
+ return e.sharedWithMe ? [t.shared, ...n.slice(1)] : n.length === 0 && e.type?.toLowerCase() === "application" ? [t.public] : n[0]?.toLowerCase() === a ? [t.public, ...n.slice(1)] : n;
35
35
  }, _ = (e, t) => {
36
36
  if (e.isMy && t != null) return [t.personal];
37
37
  let n = e.toolset || e.id;
38
- if (!n.startsWith(p)) return t == null ? [] : e.sharedWithMe ? [t.shared] : n.length > 0 && !n.includes("/") ? [t.public] : [];
39
- let r = h(n, p).slice(0, -1);
40
- return e.sharedWithMe && t != null ? [t.shared, ...r.slice(1)] : r[0]?.toLowerCase() === m && t != null ? [t.public, ...r.slice(1)] : r.slice(1);
41
- }, v = (e, { favoriteIds: t = /* @__PURE__ */ new Set(), entityDetails: o, folderLabels: s, editableSchemaIds: c = [], isCustomAppsEditable: l = !1, activeLocale: u, primaryLocale: f, resolveIconUrl: p }) => {
42
- let m = n(e.displayName, u, f) || e.id, h = (e.type ?? "").toLowerCase();
38
+ if (!n.startsWith(m)) return t == null ? [] : e.sharedWithMe ? [t.shared] : n.length > 0 && !n.includes("/") ? [t.public] : [];
39
+ let r = h(n, m).slice(0, -1);
40
+ return e.sharedWithMe && t != null ? [t.shared, ...r.slice(1)] : r[0]?.toLowerCase() === a && t != null ? [t.public, ...r.slice(1)] : r.slice(1);
41
+ }, v = (e, { favoriteIds: t = /* @__PURE__ */ new Set(), entityDetails: a, folderLabels: s, editableSchemaIds: c = [], isCustomAppsEditable: l = !1, activeLocale: u, primaryLocale: d, resolveIconUrl: p }) => {
42
+ let m = n(e.displayName, u, d) || e.id, h = (e.type ?? "").toLowerCase();
43
43
  return {
44
44
  id: e.id,
45
- type: d[h] ?? i.Model,
45
+ type: f[h] ?? i.Model,
46
46
  name: m,
47
- description: n(e.description, u, f),
47
+ description: n(e.description, u, d),
48
48
  iconUrl: p(e.iconUrl),
49
49
  version: e.displayVersion ?? "",
50
- lastUsed: a(e.updatedAt),
50
+ lastUsed: o(e.updatedAt),
51
51
  updatedAt: e.updatedAt,
52
52
  createdAt: e.createdAt,
53
53
  isFeatured: e.isFeatured ?? !1,
@@ -59,20 +59,20 @@ var c = {
59
59
  sharedWithMe: e.sharedWithMe ?? !1,
60
60
  isEditable: (!!e.isMy || !!e.canEdit) && (c.length > 0 && c.includes(e.applicationTypeSchemaId ?? "") || l && !e.applicationTypeSchemaId && h === "application"),
61
61
  folder: g(e, s),
62
- details: o == null ? void 0 : r(o),
62
+ details: a == null ? void 0 : r(a),
63
63
  supportsMcp: e.features?.mcp === !0,
64
64
  supportsChat: e.interfaces == null || e.interfaces.includes("chat")
65
65
  };
66
- }, y = (e, { favoriteIds: t = /* @__PURE__ */ new Set(), isAdmin: r = !1, folderLabels: o, activeLocale: s, primaryLocale: c, resolveIconUrl: l }) => {
67
- let d = n(e.displayName, s, c) || e.toolset || e.reference || e.id, f = e.allowedTools ?? [];
66
+ }, y = (e, { favoriteIds: t = /* @__PURE__ */ new Set(), isAdmin: r = !1, folderLabels: a, activeLocale: s, primaryLocale: c, resolveIconUrl: l }) => {
67
+ let u = n(e.displayName, s, c) || e.toolset || e.reference || e.id, f = e.allowedTools ?? [];
68
68
  return {
69
69
  id: e.id,
70
70
  type: i.Toolset,
71
- name: d,
71
+ name: u,
72
72
  description: n(e.description, s, c),
73
73
  iconUrl: l(e.iconUrl),
74
74
  version: e.displayVersion ?? "",
75
- lastUsed: a(e.updatedAt),
75
+ lastUsed: o(e.updatedAt),
76
76
  updatedAt: e.updatedAt,
77
77
  createdAt: e.createdAt,
78
78
  isFeatured: !1,
@@ -83,10 +83,10 @@ var c = {
83
83
  isMyApp: e.isMy ?? !1,
84
84
  sharedWithMe: e.sharedWithMe ?? !1,
85
85
  isEditable: !!(e.isMy || e.canEdit),
86
- folder: _(e, o),
87
- credentials: u(e.id, e.authSettings, r),
86
+ folder: _(e, a),
87
+ credentials: d(e.id, e.authSettings, r),
88
88
  details: f.length > 0 ? { tools: { tools: f.map((e) => ({ name: e })) } } : void 0
89
89
  };
90
90
  };
91
91
  //#endregion
92
- export { v as mapDeploymentToCatalogItem, u as mapDeploymentToolsetCredentials, y as mapToolsetToCatalogItem, g as resolveDeploymentFolder };
92
+ export { v as mapDeploymentToCatalogItem, d as mapDeploymentToolsetCredentials, y as mapToolsetToCatalogItem, g as resolveDeploymentFolder };
@@ -1,13 +1,13 @@
1
1
  import { safeDecodeURIComponent as e } from "../shared/string-utils.js";
2
- import { CatalogEntityType as t } from "@epam/ai-dial-chat-shared";
2
+ import { CatalogEntityType as t, PUBLIC_BUCKET as n } from "@epam/ai-dial-chat-shared";
3
3
  //#region src/catalog/publish.ts
4
- var n = {
4
+ var r = {
5
5
  [t.Model]: "model",
6
6
  [t.Toolset]: "toolset",
7
7
  [t.Agent]: "application",
8
8
  [t.Prompt]: "prompt",
9
9
  [t.Skill]: "skill"
10
- }, r = (e) => n[e], i = "public", a = (e) => e.split("/")[1] === i, o = (t) => a(t) ? t.split("/").slice(2, -1).map(e) : [], s = (e) => ({
10
+ }, i = (e) => r[e], a = (e) => e.split("/")[1] === n, o = (t) => a(t) ? t.split("/").slice(2, -1).map(e) : [], s = (e) => ({
11
11
  version: e.version,
12
12
  publishedAt: Date.parse(e.publishedAt),
13
13
  folderPath: e.folderPath.split("/").filter(Boolean),
@@ -17,4 +17,4 @@ var n = {
17
17
  folderPath: e.folderPath.split("/").filter(Boolean)
18
18
  });
19
19
  //#endregion
20
- export { o as getPublicCatalogEntityFolderPath, a as isPublicCatalogEntityId, c as mapPublishConversationResultDto, s as mapPublishHistoryEntryDto, r as toPublishEntityType };
20
+ export { o as getPublicCatalogEntityFolderPath, a as isPublicCatalogEntityId, c as mapPublishConversationResultDto, s as mapPublishHistoryEntryDto, i as toPublishEntityType };
package/catalog.d.ts CHANGED
@@ -646,7 +646,11 @@ declare enum PromptSource {
646
646
  Public = "public"
647
647
  }
648
648
 
649
- /** DIAL Core bucket holding organisation-wide skills. */
649
+ /**
650
+ * DIAL Core bucket holding organisation-wide skills.
651
+ *
652
+ * @deprecated Use `PUBLIC_BUCKET` from `@epam/ai-dial-chat-shared`.
653
+ */
650
654
  export declare const PUBLIC_SKILL_BUCKET = "public";
651
655
 
652
656
  /** The DIAL publish API surface produced by {@link createPublishApiClient}. */
@@ -1,32 +1,40 @@
1
1
  import { formatDateYMD as e } from "./date.js";
2
2
  import { ExportFileNameKind as t } from "./types.js";
3
3
  //#region src/conversation/conversation-transfer/export-conversation.ts
4
- var n = "ai_dial", r = (e) => e.map(({ attachments: e, ...t }) => t), i = (e) => {
4
+ var n = "ai_dial", r = (e) => e.map(({ attachments: e, ...t }) => t), i = (e) => e.map((e) => {
5
+ if (e.body?.source == null) return e;
6
+ let { source: t, ...n } = e.body;
7
+ return {
8
+ ...e,
9
+ body: n
10
+ };
11
+ }), a = (e) => {
5
12
  let t = e.custom_content;
6
13
  if (!t) return e;
7
- let { attachments: n, stages: i, ...a } = t;
8
- if (n == null && i == null) return e;
9
- let o = {
10
- ...a,
11
- ...i ? { stages: r(i) } : {}
14
+ let { attachments: n, stages: a, annotations: o, ...s } = t;
15
+ if (n == null && a == null && o == null) return e;
16
+ let c = {
17
+ ...s,
18
+ ...a ? { stages: r(a) } : {},
19
+ ...o ? { annotations: i(o) } : {}
12
20
  };
13
- if (Object.keys(o).length > 0) return {
21
+ if (Object.keys(c).length > 0) return {
14
22
  ...e,
15
- custom_content: o
23
+ custom_content: c
16
24
  };
17
- let { custom_content: s, ...c } = e;
18
- return c;
19
- }, a = (e) => ({
25
+ let { custom_content: l, ...u } = e;
26
+ return u;
27
+ }, o = (e) => ({
20
28
  ...e,
21
- messages: e.messages.map(i)
22
- }), o = (e, t = []) => ({
29
+ messages: e.messages.map(a)
30
+ }), s = (e, t = []) => ({
23
31
  version: 5,
24
32
  history: e,
25
33
  folders: t
26
- }), s = (e) => new Blob([JSON.stringify(e, null, 2)], { type: "application/json" }), c = {
34
+ }), c = (e) => new Blob([JSON.stringify(e, null, 2)], { type: "application/json" }), l = {
27
35
  [t.SingleConversation]: "json",
28
36
  [t.SingleConversationWithAttachments]: "dial",
29
37
  [t.AllConversationsHistory]: "json"
30
- }, l = (t, n, r = /* @__PURE__ */ new Date()) => `${e(r)}_${n}_${t}.${c[t]}`;
38
+ }, u = (t, n, r = /* @__PURE__ */ new Date()) => `${e(r)}_${n}_${t}.${l[t]}`;
31
39
  //#endregion
32
- export { n as EXPORT_APP_NAME, o as buildExportEnvelope, l as buildExportFileName, s as serializeExportEnvelope, a as stripConversationAttachments };
40
+ export { n as EXPORT_APP_NAME, s as buildExportEnvelope, u as buildExportFileName, c as serializeExportEnvelope, o as stripConversationAttachments };
@@ -1,57 +1,57 @@
1
1
  import { collectAttachmentRefs as e, splitFileIdAnchor as t } from "./attachment-refs.js";
2
2
  import { resolveDialFileBucketAndPath as n } from "./dial-file-resolve.js";
3
- import { generateUUID as r, sanitizeConversationName as i, stripTrailingDots as a, truncateToUtf8Bytes as o } from "@epam/ai-dial-chat-shared";
3
+ import { PUBLIC_BUCKET as r, generateUUID as i, sanitizeConversationName as a, stripTrailingDots as o, truncateToUtf8Bytes as s } from "@epam/ai-dial-chat-shared";
4
4
  //#region src/conversation/conversation-transfer/import-conversation.ts
5
- var s = class extends Error {
5
+ var c = class extends Error {
6
6
  constructor(e) {
7
7
  super(e), this.name = "UnsupportedImportFormatError";
8
8
  }
9
- }, c = (e) => typeof e == "object" && !!e, l = 5, u = (e) => {
9
+ }, l = (e) => typeof e == "object" && !!e, u = 5, d = (e) => {
10
10
  let t;
11
11
  try {
12
12
  t = JSON.parse(e);
13
13
  } catch {
14
- throw new s("Import file is not valid JSON");
14
+ throw new c("Import file is not valid JSON");
15
15
  }
16
- if (!c(t) || t.version !== l || !Array.isArray(t.history)) throw new s("Import file is not a supported export format");
16
+ if (!l(t) || t.version !== u || !Array.isArray(t.history)) throw new c("Import file is not a supported export format");
17
17
  let n = Array.isArray(t.folders) ? t.folders : [];
18
18
  return {
19
- version: l,
19
+ version: u,
20
20
  history: t.history,
21
21
  folders: n
22
22
  };
23
- }, d = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, f = "__", p = 255, m = "applications", h = /[-+]/, g = /^\d+$/, _ = (e) => e ? e.split(h)[0].split(".").every((e) => g.test(e)) : !1, v = (e) => a(o(e.replace(/\r\n|\r/g, "\n").split("\n").map((e) => i(e).trim()).filter(Boolean)[0] ?? "", p)).trimEnd(), y = (e, t, n) => {
24
- let i = e.split(f);
25
- if (i.length < 2) return [e, r()].join(f);
26
- let a = n && _(i[1]) ? i.slice(0, 2) : i.slice(0, 1), o = a.length > 1 ? d.test(i[i.length - 1]) : i.length >= 3, s = i.slice(a.length, o ? -1 : void 0).join(f);
23
+ }, f = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, p = "__", m = 255, h = "applications", g = /[-+]/, _ = /^\d+$/, v = (e) => e ? e.split(g)[0].split(".").every((e) => _.test(e)) : !1, y = (e) => o(s(e.replace(/\r\n|\r/g, "\n").split("\n").map((e) => a(e).trim()).filter(Boolean)[0] ?? "", m)).trimEnd(), b = (e, t, n) => {
24
+ let r = e.split(p);
25
+ if (r.length < 2) return [e, i()].join(p);
26
+ let a = n && v(r[1]) ? r.slice(0, 2) : r.slice(0, 1), o = a.length > 1 ? f.test(r[r.length - 1]) : r.length >= 3, s = r.slice(a.length, o ? -1 : void 0).join(p);
27
27
  return [
28
28
  ...a,
29
29
  t || s,
30
- r()
31
- ].join(f);
32
- }, b = "conversations/", x = (e) => e.startsWith(b) ? e.slice(14) : e, S = (e, t) => {
33
- let n = x(e.id), r = n.split("/"), i = x(e.folderId), a = r[0], o = i.startsWith(`${a}/`) ? i.slice(a.length + 1).split("/").filter(Boolean) : [], s = r.slice(1).slice(o.length), c = s.slice(0, -1), l = s.at(-1) ?? r.at(-1) ?? n, u = [...o, ...c], d = v(e.name), f = y(l, d, u[0] === m), p = [...u, f].join("/"), h = o.length ? `${t}/${o.join("/")}` : t;
30
+ i()
31
+ ].join(p);
32
+ }, x = "conversations/", S = (e) => e.startsWith(x) ? e.slice(14) : e, C = (e, t) => {
33
+ let n = S(e.id), r = n.split("/"), i = S(e.folderId), a = r[0], o = i.startsWith(`${a}/`) ? i.slice(a.length + 1).split("/").filter(Boolean) : [], s = r.slice(1).slice(o.length), c = s.slice(0, -1), l = s.at(-1) ?? r.at(-1) ?? n, u = [...o, ...c], d = y(e.name), f = b(l, d, u[0] === h), p = [...u, f].join("/"), m = o.length ? `${t}/${o.join("/")}` : t;
34
34
  return {
35
35
  conversation: {
36
36
  ...e,
37
37
  ...d ? { name: d } : {},
38
38
  id: `${t}/${p}`,
39
- folderId: h
39
+ folderId: m
40
40
  },
41
41
  subPath: p
42
42
  };
43
- }, C = (e) => {
44
- let t = x(e.folderId).split("/").filter(Boolean).slice(1);
43
+ }, w = (e) => {
44
+ let t = S(e.folderId).split("/").filter(Boolean).slice(1);
45
45
  return t.length ? t.join(" / ") : void 0;
46
- }, w = (e) => e.map((e) => `"${e}"`).join(", "), T = (e, n) => {
46
+ }, T = (e) => e.map((e) => `"${e}"`).join(", "), E = (e, n) => {
47
47
  if (!e) return;
48
48
  let { fileId: r, anchor: i } = t(e), a = n.get(r);
49
49
  if (a != null) return {
50
50
  ...a,
51
51
  url: `${a.url}${i}`
52
52
  };
53
- }, E = (e, t) => {
54
- let n = T(e.url, t), r = T(e.reference_url, t);
53
+ }, D = (e, t) => {
54
+ let n = E(e.url, t), r = E(e.reference_url, t);
55
55
  if (n == null && r == null) return;
56
56
  let i = n?.title ?? r?.title;
57
57
  return {
@@ -59,19 +59,19 @@ var s = class extends Error {
59
59
  ...r == null ? {} : { reference_url: r.url },
60
60
  ...i == null ? {} : { title: i }
61
61
  };
62
- }, D = (e, t) => e.map((e) => e.attachments?.length ? {
62
+ }, O = (e, t) => e.map((e) => e.attachments?.length ? {
63
63
  ...e,
64
64
  attachments: e.attachments.map((e) => {
65
- let n = E(e, t);
65
+ let n = D(e, t);
66
66
  return n ? {
67
67
  ...e,
68
68
  ...n
69
69
  } : e;
70
70
  })
71
- } : e), O = (e, t) => e.map((e) => {
71
+ } : e), k = (e, t) => e.map((e) => {
72
72
  let n = e.body?.source;
73
73
  if (n?.attachment == null) return e;
74
- let r = E(n.attachment, t);
74
+ let r = D(n.attachment, t);
75
75
  return r == null ? e : {
76
76
  ...e,
77
77
  body: {
@@ -85,7 +85,7 @@ var s = class extends Error {
85
85
  }
86
86
  }
87
87
  };
88
- }), k = (e, t) => ({
88
+ }), A = (e, t) => ({
89
89
  ...e,
90
90
  messages: e.messages.map((e) => {
91
91
  let n = e.custom_content;
@@ -96,23 +96,72 @@ var s = class extends Error {
96
96
  custom_content: {
97
97
  ...n,
98
98
  ...r?.length ? { attachments: r.map((e) => {
99
- let n = E(e, t);
99
+ let n = D(e, t);
100
100
  return n ? {
101
101
  ...e,
102
102
  ...n
103
103
  } : e;
104
104
  }) } : {},
105
- ...i?.length ? { stages: D(i, t) } : {},
106
- ...a?.length ? { annotations: O(a, t) } : {}
105
+ ...i?.length ? { stages: O(i, t) } : {},
106
+ ...a?.length ? { annotations: k(a, t) } : {}
107
107
  }
108
108
  };
109
109
  })
110
- }), A = (e) => e.split("/").pop() || e, j = (t, r, i) => {
110
+ }), j = (e, i) => {
111
+ if (!e) return;
112
+ let a = n(t(e).fileId);
113
+ if (!(!a || a.bucket === i || a.bucket === r)) return a.path.split("/").pop() || a.path;
114
+ }, M = (e, t, n) => e.flatMap((e) => {
115
+ let r = j(e.url, t);
116
+ if (r != null) return n.push(r), [];
117
+ let i = j(e.reference_url, t);
118
+ if (i == null) return [e];
119
+ n.push(i);
120
+ let { reference_url: a, reference_type: o, ...s } = e;
121
+ return s.url == null && s.data == null ? [] : [s];
122
+ }), N = (e, t, n) => e.map((e) => {
123
+ let r = e.body, i = j(r?.source?.attachment?.url, t);
124
+ if (r == null || i == null) return e;
125
+ n.push(i);
126
+ let { source: a, ...o } = r;
127
+ return {
128
+ ...e,
129
+ body: o
130
+ };
131
+ }), P = (e, t) => {
132
+ let n = [], r = e.messages.map((e) => {
133
+ let r = e.custom_content;
134
+ if (!r) return e;
135
+ let { attachments: i, stages: a, annotations: o } = r;
136
+ return !i?.length && !a?.length && !o?.length ? e : {
137
+ ...e,
138
+ custom_content: {
139
+ ...r,
140
+ ...i?.length ? { attachments: M(i, t, n) } : {},
141
+ ...a?.length ? { stages: a.map((e) => e.attachments?.length ? {
142
+ ...e,
143
+ attachments: M(e.attachments, t, n)
144
+ } : e) } : {},
145
+ ...o?.length ? { annotations: N(o, t, n) } : {}
146
+ }
147
+ };
148
+ });
149
+ return n.length ? {
150
+ conversation: {
151
+ ...e,
152
+ messages: r
153
+ },
154
+ droppedNames: n
155
+ } : {
156
+ conversation: e,
157
+ droppedNames: n
158
+ };
159
+ }, F = (e) => e.split("/").pop() || e, I = (t, r, i) => {
111
160
  let a = [], o = [];
112
161
  for (let s of e(t)) {
113
162
  let e = n(s.fileId);
114
163
  if (!e) {
115
- o.push(A(s.fileId));
164
+ o.push(F(s.fileId));
116
165
  continue;
117
166
  }
118
167
  let t = e.path.split("/").pop() ?? e.path, c = r.get(e.path);
@@ -133,4 +182,4 @@ var s = class extends Error {
133
182
  };
134
183
  };
135
184
  //#endregion
136
- export { s as UnsupportedImportFormatError, w as formatQuotedNameList, C as getFolderBreadcrumb, u as parseImportEnvelope, j as planAttachmentUploads, S as rebaseConversationId, k as rewriteAttachmentUrls };
185
+ export { c as UnsupportedImportFormatError, P as dropForeignAttachmentRefs, T as formatQuotedNameList, w as getFolderBreadcrumb, d as parseImportEnvelope, I as planAttachmentUploads, C as rebaseConversationId, A as rewriteAttachmentUrls };
@@ -171,12 +171,12 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
171
171
  }, s);
172
172
  return I.startJob(c, (e) => R(c, t, i, o, s, e));
173
173
  }, [I, R]), B = b(async (e, t, n) => {
174
- let r = d.ExportAll, a = [], s;
174
+ let r = d.ExportAll, a = [], c;
175
175
  do {
176
176
  if (n.aborted) return;
177
177
  let t;
178
178
  try {
179
- t = await x.listConversations({ nextToken: s }, { signal: n });
179
+ t = await x.listConversations({ nextToken: c }, { signal: n });
180
180
  } catch (t) {
181
181
  if (n.aborted) return;
182
182
  if (E(t).isUnauthorized) F?.({
@@ -197,18 +197,18 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
197
197
  a.push(...t.items.filter(j).map((e) => ({
198
198
  id: e.id,
199
199
  title: e.title
200
- }))), s = t.nextToken;
201
- } while (s);
200
+ }))), c = t.nextToken;
201
+ } while (c);
202
202
  I.setJobProgress(e, p({
203
203
  kind: r,
204
204
  phase: f.Prepare
205
205
  }));
206
- let c = [];
206
+ let l = [];
207
207
  for (let t of a) {
208
208
  if (n.aborted) return;
209
209
  try {
210
210
  let e = await A(x, T(t.id), n);
211
- c.push(e);
211
+ l.push(e);
212
212
  } catch (r) {
213
213
  if (n.aborted) return;
214
214
  let i = E(r);
@@ -240,17 +240,17 @@ var S = 5, C = 512 * 1024 * 1024, w = 429, T = 5, E = 2e3, D = (e) => e instance
240
240
  I.setJobProgress(e, p({
241
241
  kind: r,
242
242
  phase: f.Transfer,
243
- completed: c.length,
243
+ completed: l.length,
244
244
  total: a.length
245
245
  }, {
246
- completed: c.length,
246
+ completed: l.length,
247
247
  total: a.length,
248
248
  kind: v.Conversation
249
249
  }));
250
250
  }
251
251
  }
252
252
  if (!n.aborted) try {
253
- y(o(i(c, [])), t), k?.({ jobId: e }), I.succeedJob(e);
253
+ y(o(i(l.map(s), [])), t), k?.({ jobId: e }), I.succeedJob(e);
254
254
  } catch (t) {
255
255
  let n = M(t) ? g.FileTooLarge : g.Unknown, r = await D(t);
256
256
  F?.({
@@ -1,20 +1,20 @@
1
1
  import { formatDateYM as e } from "../conversation-transfer/date.js";
2
2
  import { ConversationTransferWarningCode as t } from "../conversation-transfer/types.js";
3
- import { UnsupportedImportFormatError as n, getFolderBreadcrumb as r, parseImportEnvelope as i, planAttachmentUploads as a, rebaseConversationId as o, rewriteAttachmentUrls as s } from "../conversation-transfer/import-conversation.js";
4
- import { createUploadPathAllocator as c } from "../conversation-transfer/build-upload-path.js";
5
- import { runWithConcurrency as l } from "../conversation-transfer/async.js";
6
- import { ConversationTransferKind as u, ConversationTransferPhase as d, buildTransferProgress as f } from "../conversation-transfer/progress.js";
7
- import { useConversationTransferQueue as p } from "../conversation-transfer/queue.js";
8
- import { parseDialArchive as m } from "../conversation-transfer/zip-import.js";
9
- import { ConversationTransferErrorCode as h, ConversationTransferSubjectKind as g, ConversationTransferUnitKind as _, generateUUID as v } from "@epam/ai-dial-chat-shared";
10
- import { useCallback as y } from "react";
3
+ import { UnsupportedImportFormatError as n, dropForeignAttachmentRefs as r, getFolderBreadcrumb as i, parseImportEnvelope as a, planAttachmentUploads as o, rebaseConversationId as s, rewriteAttachmentUrls as c } from "../conversation-transfer/import-conversation.js";
4
+ import { createUploadPathAllocator as l } from "../conversation-transfer/build-upload-path.js";
5
+ import { runWithConcurrency as u } from "../conversation-transfer/async.js";
6
+ import { ConversationTransferKind as d, ConversationTransferPhase as f, buildTransferProgress as p } from "../conversation-transfer/progress.js";
7
+ import { useConversationTransferQueue as m } from "../conversation-transfer/queue.js";
8
+ import { parseDialArchive as h } from "../conversation-transfer/zip-import.js";
9
+ import { ConversationTransferErrorCode as g, ConversationTransferSubjectKind as _, ConversationTransferUnitKind as v, generateUUID as y } from "@epam/ai-dial-chat-shared";
10
+ import { useCallback as b } from "react";
11
11
  //#region src/conversation/useConversationImport/useConversationImport.ts
12
- var b = 5, x = 5, S = (e) => /\.(dial|zip)$/i.test(e.name), C = (e) => new Promise((t, n) => {
12
+ var x = 5, S = 5, C = (e) => /\.(dial|zip)$/i.test(e.name), w = (e) => new Promise((t, n) => {
13
13
  let r = new FileReader();
14
14
  r.onload = () => t(r.result), r.onerror = () => n(r.error), r.readAsText(e);
15
- }), w = async (e) => {
16
- if (S(e)) {
17
- let { envelope: t, attachments: n } = await m(e);
15
+ }), T = async (e) => {
16
+ if (C(e)) {
17
+ let { envelope: t, attachments: n } = await h(e);
18
18
  return {
19
19
  history: t.history,
20
20
  attachments: n,
@@ -22,15 +22,15 @@ var b = 5, x = 5, S = (e) => /\.(dial|zip)$/i.test(e.name), C = (e) => new Promi
22
22
  };
23
23
  }
24
24
  return {
25
- history: i(await C(e)).history,
25
+ history: a(await w(e)).history,
26
26
  attachments: /* @__PURE__ */ new Map(),
27
27
  isArchive: !1
28
28
  };
29
- }, T = async (e, t, n, r, i, o, s, c) => {
30
- let { plan: u, skippedNames: d } = a(e, t, r), f = !1, p = await l(u, b, async (e) => {
29
+ }, E = async (e, t, n, r, i, a, s, c) => {
30
+ let { plan: l, skippedNames: d } = o(e, t, r), f = !1, p = await u(l, x, async (e) => {
31
31
  if (c.aborted || f) return;
32
32
  let t = e.allocated;
33
- for (let a = 0; a <= x; a += 1) try {
33
+ for (let o = 0; o <= S; o += 1) try {
34
34
  let r = new File([new Uint8Array(e.bytes)], t.fileName), a = await i.uploadFile({
35
35
  bucket: n,
36
36
  path: t.path,
@@ -45,11 +45,11 @@ var b = 5, x = 5, S = (e) => /\.(dial|zip)$/i.test(e.name), C = (e) => new Promi
45
45
  };
46
46
  } catch (n) {
47
47
  if (c.aborted) return;
48
- if (o(n)) {
48
+ if (a(n)) {
49
49
  f = !0;
50
50
  return;
51
51
  }
52
- if (!(typeof n == "object" && n && "response" in n && n.response?.status === 409) || a === x) return s(), {
52
+ if (!(typeof n == "object" && n && "response" in n && n.response?.status === 409) || o === S) return s(), {
53
53
  kind: "skipped",
54
54
  name: e.originalFileName
55
55
  };
@@ -69,171 +69,173 @@ var b = 5, x = 5, S = (e) => /\.(dial|zip)$/i.test(e.name), C = (e) => new Promi
69
69
  skippedNames: c.aborted || f ? [] : h,
70
70
  isUnauthorized: !c.aborted && f
71
71
  };
72
- }, E = ({ conversationsApi: i, filesApi: a, bucket: l, onImported: m, classifyTransferError: b = () => ({}), resolveErrorTraceId: x = async () => void 0, onSuccess: S, onWarning: C, onError: E }) => {
73
- let D = p(), O = y(async (n, r, p) => {
74
- if (!l) {
75
- E?.({
72
+ }, D = ({ conversationsApi: a, filesApi: o, bucket: u, onImported: h, classifyTransferError: x = () => ({}), resolveErrorTraceId: S = async () => void 0, onSuccess: C, onWarning: w, onError: D }) => {
73
+ let O = m(), k = b(async (n, i, m) => {
74
+ if (!u) {
75
+ D?.({
76
76
  jobId: n,
77
- code: h.MissingBucket
78
- }), D.failJob(n, h.MissingBucket);
77
+ code: g.MissingBucket
78
+ }), O.failJob(n, g.MissingBucket);
79
79
  return;
80
80
  }
81
- let g = u.Import, v = r.attachments.size, y = 0, w = () => {
82
- y += 1, D.setJobProgress(n, f({
83
- kind: g,
84
- phase: d.Transfer,
85
- completed: y,
86
- total: v
81
+ let _ = d.Import, y = i.attachments.size, b = 0, T = () => {
82
+ b += 1, O.setJobProgress(n, p({
83
+ kind: _,
84
+ phase: f.Transfer,
85
+ completed: b,
86
+ total: y
87
87
  }, {
88
- completed: Math.min(y, v),
89
- total: v,
90
- kind: _.Attachment
88
+ completed: Math.min(b, y),
89
+ total: y,
90
+ kind: v.Attachment
91
91
  }));
92
- }, O = (e) => {
93
- D.setJobProgress(n, f({
94
- kind: g,
95
- phase: d.Finalize,
92
+ }, k = (e) => {
93
+ O.setJobProgress(n, p({
94
+ kind: _,
95
+ phase: f.Finalize,
96
96
  completed: e,
97
- total: r.history.length
97
+ total: i.history.length
98
98
  }, {
99
99
  completed: e,
100
- total: r.history.length,
101
- kind: _.Conversation
100
+ total: i.history.length,
101
+ kind: v.Conversation
102
102
  }));
103
- }, k = [], A = [], j = /* @__PURE__ */ new Set(), M = !1, N, P = /* @__PURE__ */ new Date(), F = (e) => !!b(e).isUnauthorized, I;
104
- if (r.isArchive) {
105
- let t = `uploads/${e(P)}`, r = [];
103
+ }, A = [], j = [], M = /* @__PURE__ */ new Set(), N = !1, P, F = /* @__PURE__ */ new Date(), I = (e) => !!x(e).isUnauthorized, L;
104
+ if (i.isArchive) {
105
+ let t = `uploads/${e(F)}`, r = [];
106
106
  try {
107
- r = (await a.listFiles({
108
- bucket: l,
107
+ r = (await o.listFiles({
108
+ bucket: u,
109
109
  path: t
110
- }, { signal: p })).items.map((e) => e.name);
110
+ }, { signal: m })).items.map((e) => e.name);
111
111
  } catch (e) {
112
- if (p.aborted) return;
113
- if (F(e)) {
114
- E?.({
112
+ if (m.aborted) return;
113
+ if (I(e)) {
114
+ D?.({
115
115
  jobId: n,
116
- code: h.Unauthorized
117
- }), D.failJob(n, h.Unauthorized);
116
+ code: g.Unauthorized
117
+ }), O.failJob(n, g.Unauthorized);
118
118
  return;
119
119
  }
120
120
  console.error("Failed to list the upload folder for attachment name disambiguation", e);
121
121
  }
122
- I = c({
123
- date: P,
122
+ L = l({
123
+ date: F,
124
124
  existingNames: r
125
125
  });
126
126
  }
127
- D.setJobProgress(n, f({
128
- kind: g,
129
- phase: d.Prepare
130
- })), v === 0 && D.setJobProgress(n, f({
131
- kind: g,
132
- phase: d.Transfer
127
+ O.setJobProgress(n, p({
128
+ kind: _,
129
+ phase: f.Prepare
130
+ })), y === 0 && O.setJobProgress(n, p({
131
+ kind: _,
132
+ phase: f.Transfer
133
133
  }));
134
- for (let e of r.history) {
135
- if (p.aborted) return;
136
- if (M) break;
134
+ for (let e of i.history) {
135
+ if (m.aborted) return;
136
+ if (N) break;
137
137
  try {
138
138
  let t = /* @__PURE__ */ new Map();
139
- if (r.isArchive && I) {
140
- let n = await T(e, r.attachments, l, I, a, F, w, p);
141
- if (p.aborted) return;
139
+ if (i.isArchive && L) {
140
+ let n = await E(e, i.attachments, u, L, o, I, T, m);
141
+ if (m.aborted) return;
142
142
  if (n.isUnauthorized) {
143
- M = !0;
143
+ N = !0;
144
144
  break;
145
145
  }
146
- for (let e of n.skippedNames) j.add(e);
146
+ for (let e of n.skippedNames) M.add(e);
147
147
  t = n.targetMap;
148
148
  }
149
- let { conversation: n, subPath: c } = o(s(e, t), l);
150
- if (await i.saveConversation({
151
- path: c,
149
+ let { conversation: n, droppedNames: l } = r(c(e, t), u);
150
+ for (let e of l) M.add(e);
151
+ let { conversation: d, subPath: f } = s(n, u);
152
+ if (await a.saveConversation({
153
+ path: f,
152
154
  saveConversationBodyDto: { conversation: {
153
- ...n,
155
+ ...d,
154
156
  llmNamingDone: !0
155
157
  } }
156
- }, { signal: p }), p.aborted) return;
157
- k.push(n.name);
158
+ }, { signal: m }), m.aborted) return;
159
+ A.push(d.name);
158
160
  } catch (t) {
159
- if (p.aborted) return;
160
- if (F(t)) {
161
- M = !0;
161
+ if (m.aborted) return;
162
+ if (I(t)) {
163
+ N = !0;
162
164
  break;
163
165
  }
164
- A.push(e.name), N === void 0 && (N = await x(t)), console.error("Failed to import a conversation", t);
166
+ j.push(e.name), P === void 0 && (P = await S(t)), console.error("Failed to import a conversation", t);
165
167
  }
166
- O(k.length + A.length);
168
+ k(A.length + j.length);
167
169
  }
168
- if (!p.aborted) {
169
- if (M) {
170
- E?.({
170
+ if (!m.aborted) {
171
+ if (N) {
172
+ D?.({
171
173
  jobId: n,
172
- code: h.Unauthorized
173
- }), D.failJob(n, h.Unauthorized);
174
+ code: g.Unauthorized
175
+ }), O.failJob(n, g.Unauthorized);
174
176
  return;
175
177
  }
176
- if (k.length > 0) {
178
+ if (A.length > 0) {
177
179
  try {
178
- await m?.();
180
+ await h?.();
179
181
  } catch {}
180
- S?.({
182
+ C?.({
181
183
  jobId: n,
182
- titles: k
184
+ titles: A
183
185
  });
184
186
  }
185
- A.length > 0 && E?.({
187
+ j.length > 0 && D?.({
186
188
  jobId: n,
187
- code: h.Unknown,
188
- titles: A,
189
- traceId: N
190
- }), j.size > 0 && C?.({
189
+ code: g.Unknown,
190
+ titles: j,
191
+ traceId: P
192
+ }), M.size > 0 && w?.({
191
193
  jobId: n,
192
194
  code: t.AttachmentSkipped,
193
- names: [...j]
194
- }), A.length > 0 ? D.failJob(n, h.Unknown) : j.size > 0 ? D.warnJob(n, t.AttachmentSkipped, [...j]) : D.succeedJob(n);
195
+ names: [...M]
196
+ }), j.length > 0 ? O.failJob(n, g.Unknown) : M.size > 0 ? O.warnJob(n, t.AttachmentSkipped, [...M]) : O.succeedJob(n);
195
197
  }
196
198
  }, [
197
- l,
198
- b,
199
- i,
199
+ u,
200
+ x,
200
201
  a,
201
- E,
202
- m,
203
- S,
204
- C,
202
+ o,
205
203
  D,
206
- x
207
- ]), k = y(async (e) => {
204
+ h,
205
+ C,
206
+ w,
207
+ O,
208
+ S
209
+ ]), A = b(async (e) => {
208
210
  let t;
209
211
  try {
210
- t = await w(e);
212
+ t = await T(e);
211
213
  } catch (e) {
212
- E?.({
213
- jobId: v(),
214
- code: h.UnsupportedFormat
214
+ D?.({
215
+ jobId: y(),
216
+ code: g.UnsupportedFormat
215
217
  }), e instanceof n || console.error("Failed to parse import file", e);
216
218
  return;
217
219
  }
218
- let i = t.history.length > 1, a = t.history[0], o = i ? { kind: g.All } : {
219
- kind: g.Single,
220
+ let r = t.history.length > 1, a = t.history[0], o = r ? { kind: _.All } : {
221
+ kind: _.Single,
220
222
  title: a?.name ?? e.name,
221
- sourceBreadcrumb: a ? r(a) : void 0
222
- }, s = D.addJob(o, e.name);
223
- return D.startJob(s, (e) => O(s, t, e));
223
+ sourceBreadcrumb: a ? i(a) : void 0
224
+ }, s = O.addJob(o, e.name);
225
+ return O.startJob(s, (e) => k(s, t, e));
224
226
  }, [
225
- E,
226
227
  D,
227
- O
228
+ O,
229
+ k
228
230
  ]);
229
231
  return {
230
- jobs: D.jobs,
231
- importConversations: k,
232
- cancelJob: D.cancelJob,
233
- dismissJob: D.dismissJob,
234
- retryJob: D.retryJob,
235
- dismissAll: D.dismissAll
232
+ jobs: O.jobs,
233
+ importConversations: A,
234
+ cancelJob: O.cancelJob,
235
+ dismissJob: O.dismissJob,
236
+ retryJob: O.retryJob,
237
+ dismissAll: O.dismissAll
236
238
  };
237
239
  };
238
240
  //#endregion
239
- export { E as useConversationImport };
241
+ export { D as useConversationImport };
@@ -139,7 +139,8 @@ export declare interface UseConversationExportResult {
139
139
  * `.dial`/`.zip`, v5 envelope, old- or new-chat origin) once per file, then
140
140
  * re-uploads any archive attachments to `uploads/<YYYY-MM>/` —
141
141
  * disambiguating a name collision with a ` (n)` suffix instead of rejecting
142
- * it — rewrites attachment references (and renamed titles), regenerates each
142
+ * it — rewrites attachment references (and renamed titles), drops any
143
+ * reference still pointing into another user's bucket, regenerates each
143
144
  * conversation's id/path with a fresh UUID (collision-free save, no replace
144
145
  * dialog), and persists every conversation through the injected
145
146
  * `conversationsApi`. One job per imported file, not per conversation.
package/index.d.ts CHANGED
@@ -3027,7 +3027,11 @@ export declare enum PromptSource {
3027
3027
  Public = "public"
3028
3028
  }
3029
3029
 
3030
- /** DIAL Core bucket holding organisation-wide skills. */
3030
+ /**
3031
+ * DIAL Core bucket holding organisation-wide skills.
3032
+ *
3033
+ * @deprecated Use `PUBLIC_BUCKET` from `@epam/ai-dial-chat-shared`.
3034
+ */
3031
3035
  export declare const PUBLIC_SKILL_BUCKET = "public";
3032
3036
 
3033
3037
  /** The DIAL publish API surface produced by {@link createPublishApiClient}. */
@@ -4829,7 +4833,8 @@ export declare interface UseConversationHandlersResult {
4829
4833
  * `.dial`/`.zip`, v5 envelope, old- or new-chat origin) once per file, then
4830
4834
  * re-uploads any archive attachments to `uploads/<YYYY-MM>/` —
4831
4835
  * disambiguating a name collision with a ` (n)` suffix instead of rejecting
4832
- * it — rewrites attachment references (and renamed titles), regenerates each
4836
+ * it — rewrites attachment references (and renamed titles), drops any
4837
+ * reference still pointing into another user's bucket, regenerates each
4833
4838
  * conversation's id/path with a fresh UUID (collision-free save, no replace
4834
4839
  * dialog), and persists every conversation through the injected
4835
4840
  * `conversationsApi`. One job per imported file, not per conversation.
@@ -1,10 +1,11 @@
1
+ import { PUBLIC_BUCKET as e } from "@epam/ai-dial-chat-shared";
1
2
  //#region src/oauth/toolset-id.ts
2
- var e = "toolsets/", t = "public", n = (e) => e.split("/").map((e) => encodeURIComponent(e)).join("/"), r = (e) => e.split("/").map((e) => {
3
+ var t = "toolsets/", n = (e) => e.split("/").map((e) => encodeURIComponent(e)).join("/"), r = (e) => e.split("/").map((e) => {
3
4
  try {
4
5
  return decodeURIComponent(e);
5
6
  } catch {
6
7
  return e;
7
8
  }
8
- }).join("/"), i = (n) => n.startsWith(e) ? n.slice(9).split("/")[0] === t : !1;
9
+ }).join("/"), i = (n) => n.startsWith(t) ? n.slice(9).split("/")[0] === e : !1;
9
10
  //#endregion
10
11
  export { r as decodeToolsetId, n as encodeToolsetId, i as isPublicToolsetId };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-hooks",
3
3
  "description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
4
- "version": "1.2.0-dev.158",
4
+ "version": "1.2.0-dev.159",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -111,7 +111,7 @@
111
111
  }
112
112
  },
113
113
  "dependencies": {
114
- "@epam/ai-dial-chat-api-client": "1.2.0-dev.158",
114
+ "@epam/ai-dial-chat-api-client": "1.2.0-dev.159",
115
115
  "dompurify": "3.4.15",
116
116
  "fflate": "^0.8.3",
117
117
  "lru-cache": "^10.4.3",
@@ -120,22 +120,22 @@
120
120
  },
121
121
  "peerDependencies": {
122
122
  "react": "^19.2.8",
123
- "@epam/ai-dial-attachment-canvas": "1.2.0-dev.158",
124
- "@epam/ai-dial-attachment-input": "1.2.0-dev.158",
125
- "@epam/ai-dial-builder-form": "1.2.0-dev.158",
126
- "@epam/ai-dial-catalog": "1.2.0-dev.158",
127
- "@epam/ai-dial-chat-overlay": "1.2.0-dev.158",
128
- "@epam/ai-dial-chat-shared": "1.2.0-dev.158",
129
- "@epam/ai-dial-mcp-apps": "1.2.0-dev.158",
130
- "@epam/ai-dial-publish-panel": "1.2.0-dev.158",
131
- "@epam/ai-dial-quotations": "1.2.0-dev.158",
123
+ "@epam/ai-dial-attachment-canvas": "1.2.0-dev.159",
124
+ "@epam/ai-dial-attachment-input": "1.2.0-dev.159",
125
+ "@epam/ai-dial-builder-form": "1.2.0-dev.159",
126
+ "@epam/ai-dial-catalog": "1.2.0-dev.159",
127
+ "@epam/ai-dial-chat-overlay": "1.2.0-dev.159",
128
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.159",
129
+ "@epam/ai-dial-mcp-apps": "1.2.0-dev.159",
130
+ "@epam/ai-dial-publish-panel": "1.2.0-dev.159",
131
+ "@epam/ai-dial-quotations": "1.2.0-dev.159",
132
132
  "@epam/ai-dial-react-file-manager": "^0.3.0-dev.7",
133
- "@epam/ai-dial-scheduled-tasks": "1.2.0-dev.158",
134
- "@epam/ai-dial-share": "1.2.0-dev.158",
135
- "@epam/ai-dial-skill-editor": "1.2.0-dev.158",
136
- "@epam/ai-dial-source-panel": "1.2.0-dev.158",
133
+ "@epam/ai-dial-scheduled-tasks": "1.2.0-dev.159",
134
+ "@epam/ai-dial-share": "1.2.0-dev.159",
135
+ "@epam/ai-dial-skill-editor": "1.2.0-dev.159",
136
+ "@epam/ai-dial-source-panel": "1.2.0-dev.159",
137
137
  "@epam/ai-dial-ui-kit": "^0.15.0-dev.19",
138
- "@epam/ai-dial-usage-dashboard": "1.2.0-dev.158",
138
+ "@epam/ai-dial-usage-dashboard": "1.2.0-dev.159",
139
139
  "@modelcontextprotocol/sdk": "^1.29.0",
140
140
  "@epam/pdf-highlighter-kit": "^0.0.19",
141
141
  "@mcp-ui/client": "^7.1.1"
@@ -1,15 +1,16 @@
1
+ import { PUBLIC_BUCKET as e } from "@epam/ai-dial-chat-shared";
1
2
  //#region src/skill/skill-types.ts
2
- var e = /* @__PURE__ */ function(e) {
3
+ var t = /* @__PURE__ */ function(e) {
3
4
  return e.Personal = "personal", e.SharedWithMe = "sharedWithMe", e.Public = "public", e;
4
- }({}), t = "public", n = "skills/", r = 256 * 1024, i = 1e3, a = 10, o = (e) => {
5
- if (!e.startsWith(n)) return null;
6
- let t = e.slice(7), r = t.indexOf("/");
7
- if (r <= 0) return null;
8
- let i = t.slice(0, r), a = t.slice(r + 1);
5
+ }({}), n = e, r = "skills/", i = 256 * 1024, a = 1e3, o = 10, s = (e) => {
6
+ if (!e.startsWith(r)) return null;
7
+ let t = e.slice(7), n = t.indexOf("/");
8
+ if (n <= 0) return null;
9
+ let i = t.slice(0, n), a = t.slice(n + 1);
9
10
  return i === "" || a === "" ? null : {
10
11
  bucket: i,
11
12
  path: a
12
13
  };
13
14
  };
14
15
  //#endregion
15
- export { t as PUBLIC_SKILL_BUCKET, a as SKILL_LISTING_MAX_PAGES, i as SKILL_LISTING_PAGE_SIZE, r as SKILL_MANIFEST_MAX_BYTES, e as SkillSource, o as parseSkillResourceUrl };
16
+ export { n as PUBLIC_SKILL_BUCKET, o as SKILL_LISTING_MAX_PAGES, a as SKILL_LISTING_PAGE_SIZE, i as SKILL_MANIFEST_MAX_BYTES, t as SkillSource, s as parseSkillResourceUrl };