@epam/ai-dial-toolset-editor 1.2.5 → 1.3.0-dev.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ToolsetEditor/ToolsetEditor.d.ts.map +1 -1
- package/constants/toolsets.d.ts +1 -3
- package/constants/toolsets.d.ts.map +1 -1
- package/index.css +2 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +223 -224
- package/models/toolset-editor-props.d.ts +2 -0
- package/models/toolset-editor-props.d.ts.map +1 -1
- package/package.json +5 -5
- package/utils/toolsets.d.ts +2 -12
- package/utils/toolsets.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolsetEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsetEditor/ToolsetEditor.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AA4C5E,uKAAuK;AACvK,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ToolsetEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsetEditor/ToolsetEditor.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AA4C5E,uKAAuK;AACvK,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAkdhD,CAAC"}
|
package/constants/toolsets.d.ts
CHANGED
|
@@ -7,9 +7,7 @@ export declare enum ToolsetTransportType {
|
|
|
7
7
|
/** Server-sent events MCP transport. */
|
|
8
8
|
Sse = "SSE"
|
|
9
9
|
}
|
|
10
|
-
/** Default display
|
|
11
|
-
export declare const DEFAULT_TOOLSET_NAME = "New toolset";
|
|
12
|
-
/** Default display version seeded into a new toolset form. */
|
|
10
|
+
/** Default display version seeded into a new toolset form; the shared deployment default. */
|
|
13
11
|
export declare const DEFAULT_TOOLSET_VERSION = "1.0.0";
|
|
14
12
|
/** Metadata checks for a toolset: the version must be SemVer 2.0.0, as DIAL Admin requires. */
|
|
15
13
|
export declare const TOOLSET_METADATA_VALIDATION_OPTIONS: DeploymentCreationFormValidationOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/constants/toolsets.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/constants/toolsets.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,uCAAuC,EAC7C,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,oBAAY,oBAAoB;IAC9B,qCAAqC;IACrC,IAAI,SAAS;IACb,wCAAwC;IACxC,GAAG,QAAQ;CACZ;AAED,6FAA6F;AAC7F,eAAO,MAAM,uBAAuB,UAA6B,CAAC;AAElE,+FAA+F;AAC/F,eAAO,MAAM,mCAAmC,EAAE,uCACE,CAAC;AAErD,kGAAkG;AAClG,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAIhE,CAAC"}
|
package/index.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
.
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.block{display:block}.flex{display:flex}.inline{display:inline}.max-w-\[1060px\]{max-width:1060px}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-tertiary{border-color:var(--stroke-tertiary,#e0e6f0)}.px-2{padding-inline:.5rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-start{text-align:start}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}@media (min-width:1280px){.desktop\:not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}
|
package/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type { AuthSectionLabels } from './models/auth-section-props';
|
|
|
7
7
|
export { ToolsetOAuthLoginStatus } from './models/toolset-oauth-login';
|
|
8
8
|
export type { ToolsetOAuthLoginHandler, ToolsetOAuthLoginRequest, ToolsetOAuthLoginResult, } from './models/toolset-oauth-login';
|
|
9
9
|
export type { DeploymentGeneralFormData, ToolsetAuthActions, ToolsetAuthFormData, ToolsetFormData, ToolsetFormErrors, ToolsetLoginRequest, ToolsetLogoutRequest, } from './models/toolset-form';
|
|
10
|
-
export { AUTH_TYPE_ICONS,
|
|
11
|
-
export { getDefaultToolsetForm,
|
|
10
|
+
export { AUTH_TYPE_ICONS, DEFAULT_TOOLSET_VERSION, ToolsetTransportType, } from './constants/toolsets';
|
|
11
|
+
export { getDefaultToolsetForm, isToolsetAuthValid, isToolsetFormValid, isValidEndpointUrl, normalizeReturnedEndpointUrl, } from './utils/toolsets';
|
|
12
12
|
export { TOOLSET_EDITOR_CLASS } from './constants/public-class-names';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ToolsetAuthTypes as
|
|
3
|
-
import { CopyButton as
|
|
4
|
-
import { memo as b, useCallback as x, useEffect as S, useMemo as C, useRef as
|
|
5
|
-
import { IconBrandOauth as
|
|
1
|
+
import { DEFAULT_DEPLOYMENT_VERSION as e, DeploymentCreationFieldErrorCode as t, EntityEditor as n, MetadataField as r, MetadataForm as i, SEMVER_VERSION_PATTERN as a, useMetadataForm as o, validateDeploymentCreationFields as s } from "@epam/ai-dial-builder-form";
|
|
2
|
+
import { ToolsetAuthTypes as c, ToolsetCredentialsLevel as l, WithLogin as u, dialFileToAttachment as d, getApiErrorDetails as f } from "@epam/ai-dial-chat-hooks";
|
|
3
|
+
import { CopyButton as p, ENTITY_DESCRIPTION_MAX_LENGTH as m, ENTITY_NAME_MAX_LENGTH as h, TAG_INPUT_TAG_CLASS_NAME as g, TextRefinementField as _, mergeClasses as v, useCodeCopy as y, useTextRefinement as ee } from "@epam/ai-dial-chat-shared";
|
|
4
|
+
import { memo as b, useCallback as x, useEffect as S, useMemo as C, useRef as w, useState as T } from "react";
|
|
5
|
+
import { IconBrandOauth as te, IconKey as ne, IconLockOff as re, IconLogin as E, IconLogout as ie } from "@tabler/icons-react";
|
|
6
6
|
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
7
|
-
import { ConfirmationPopup as
|
|
7
|
+
import { ConfirmationPopup as ae, ConfirmationPopupVariant as oe, DIAL_ICON_SIZE as k, DIAL_KIT_ICON_STROKE as A, Input as j, NeutralButton as M, PasswordInput as N, Radio as P, RadioGroup as F, SegmentedControl as I, Select as L, TagInput as se } from "@epam/ai-dial-ui-kit";
|
|
8
8
|
//#region src/constants/public-class-names.ts
|
|
9
|
-
var
|
|
9
|
+
var ce = {
|
|
10
10
|
metadataSection: "dial-toolset-editor-metadata-section",
|
|
11
11
|
setupSection: "dial-toolset-editor-setup-section"
|
|
12
12
|
}, R = /* @__PURE__ */ function(e) {
|
|
13
13
|
return e.Http = "HTTP", e.Sse = "SSE", e;
|
|
14
|
-
}({}), z =
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
let r = 1;
|
|
22
|
-
for (; n.has(`${e} ${r}`);) r += 1;
|
|
23
|
-
return `${e} ${r}`;
|
|
24
|
-
}, le = () => ({
|
|
25
|
-
authenticationType: s.None,
|
|
26
|
-
withLogin: l.WithoutLogin,
|
|
14
|
+
}({}), z = e, le = { validateVersionPattern: a }, B = {
|
|
15
|
+
[c.OAuth]: te,
|
|
16
|
+
[c.ApiKey]: ne,
|
|
17
|
+
[c.None]: re
|
|
18
|
+
}, ue = () => ({
|
|
19
|
+
authenticationType: c.None,
|
|
20
|
+
withLogin: u.WithoutLogin,
|
|
27
21
|
isLoggedIn: !1
|
|
28
|
-
}),
|
|
29
|
-
name:
|
|
30
|
-
version:
|
|
22
|
+
}), V = () => ({
|
|
23
|
+
name: "",
|
|
24
|
+
version: z,
|
|
31
25
|
iconUrl: "",
|
|
32
26
|
description: "",
|
|
33
27
|
topics: [],
|
|
@@ -35,49 +29,49 @@ var se = {
|
|
|
35
29
|
endpoint: "",
|
|
36
30
|
protocol: R.Http,
|
|
37
31
|
allowedTools: [],
|
|
38
|
-
auth:
|
|
39
|
-
}),
|
|
32
|
+
auth: ue()
|
|
33
|
+
}), H = (e) => {
|
|
40
34
|
if (!/^https?:\/\//.test(e) || e.endsWith(".") || e.endsWith("//")) return !1;
|
|
41
35
|
try {
|
|
42
36
|
return !!new URL(e);
|
|
43
37
|
} catch {
|
|
44
38
|
return !1;
|
|
45
39
|
}
|
|
46
|
-
},
|
|
40
|
+
}, U = (e) => H(e.trim()), de = (e) => e.replace(/^(https?):\/([^/])/, "$1://$2"), W = (e) => {
|
|
47
41
|
let t = e?.trim() ?? "";
|
|
48
|
-
if (!t ||
|
|
42
|
+
if (!t || H(t)) return t;
|
|
49
43
|
let n = [t];
|
|
50
44
|
try {
|
|
51
45
|
let e = decodeURIComponent(t);
|
|
52
46
|
e !== t && n.push(e);
|
|
53
47
|
} catch {}
|
|
54
48
|
for (let e of n) {
|
|
55
|
-
let t =
|
|
56
|
-
if (
|
|
49
|
+
let t = de(e);
|
|
50
|
+
if (H(t)) return t;
|
|
57
51
|
}
|
|
58
52
|
return t;
|
|
59
|
-
},
|
|
53
|
+
}, G = (e) => !e?.trim() || U(e), K = (e, t = !1) => e.isLoggedIn ? !0 : e.authenticationType === c.ApiKey ? e.keyHeader?.trim() ? e.withLogin === u.WithoutLogin ? !0 : !!(e.keyHeader?.trim() && e.apiKey?.trim()) : !1 : e.authenticationType === c.OAuth && e.withLogin === u.WithConfig ? !!e.clientId?.trim() && (t || !!e.clientSecret?.trim()) && G(e.authorizationEndpoint) && G(e.tokenEndpoint) : !0, fe = (e, t = !1) => Object.keys(s(e, le)).length === 0 && U(e.endpoint) && K(e.auth, t), pe = new Set([
|
|
60
54
|
"name",
|
|
61
55
|
"description",
|
|
62
56
|
"iconUrl",
|
|
63
57
|
"version",
|
|
64
58
|
"topics",
|
|
65
59
|
"otherLocales"
|
|
66
|
-
]),
|
|
60
|
+
]), me = (e) => ({
|
|
67
61
|
name: e.name,
|
|
68
62
|
description: e.description,
|
|
69
63
|
iconUrl: e.iconUrl,
|
|
70
64
|
version: e.version,
|
|
71
65
|
topics: e.topics,
|
|
72
66
|
otherLocales: e.otherLocales
|
|
73
|
-
}),
|
|
67
|
+
}), he = (e) => {
|
|
74
68
|
let t = {}, n = {};
|
|
75
|
-
for (let [r, i] of Object.entries(e)) (
|
|
69
|
+
for (let [r, i] of Object.entries(e)) (pe.has(r) ? t : n)[r] = i;
|
|
76
70
|
return {
|
|
77
71
|
metadata: t,
|
|
78
72
|
setup: n
|
|
79
73
|
};
|
|
80
|
-
},
|
|
74
|
+
}, q = {
|
|
81
75
|
name: {
|
|
82
76
|
label: "Name",
|
|
83
77
|
placeholder: "Enter name"
|
|
@@ -116,27 +110,27 @@ var se = {
|
|
|
116
110
|
saveLabel: "Save"
|
|
117
111
|
},
|
|
118
112
|
ariaLabel: "General"
|
|
119
|
-
},
|
|
113
|
+
}, ge = ({ form: e, errors: t, bucket: n, FileManagerModal: r, resolveIconUrl: a, allowedMimeTypes: o, maxFileSizeBytes: s, availableLocaleOptions: c, onChange: l, onNameBlur: u, onVersionBlur: f, renderDescription: p, labels: m }) => {
|
|
120
114
|
let h = x((e) => {
|
|
121
115
|
let [t] = e.files;
|
|
122
|
-
return (t ?
|
|
116
|
+
return (t ? d(t, n, { resolvePreviewUrl: a }) : null)?.url;
|
|
123
117
|
}, [n, a]);
|
|
124
|
-
return /* @__PURE__ */ D(
|
|
118
|
+
return /* @__PURE__ */ D(i, {
|
|
125
119
|
values: e,
|
|
126
120
|
errors: t,
|
|
127
121
|
onChange: l,
|
|
128
|
-
onNameBlur:
|
|
122
|
+
onNameBlur: u,
|
|
129
123
|
onVersionBlur: f,
|
|
130
124
|
avatarPicker: C(() => ({
|
|
131
125
|
bucket: n,
|
|
132
|
-
FileManagerModal:
|
|
126
|
+
FileManagerModal: r,
|
|
133
127
|
resolveIconUrl: a,
|
|
134
128
|
resolveAttachedIconUrl: h,
|
|
135
129
|
allowedMimeTypes: o,
|
|
136
130
|
maxFileSizeBytes: s
|
|
137
131
|
}), [
|
|
138
132
|
n,
|
|
139
|
-
|
|
133
|
+
r,
|
|
140
134
|
a,
|
|
141
135
|
h,
|
|
142
136
|
o,
|
|
@@ -145,92 +139,92 @@ var se = {
|
|
|
145
139
|
availableLocaleOptions: c,
|
|
146
140
|
renderDescription: p,
|
|
147
141
|
labels: C(() => ({
|
|
148
|
-
form: m?.form ??
|
|
142
|
+
form: m?.form ?? q,
|
|
149
143
|
avatarPicker: m?.avatarPicker
|
|
150
144
|
}), [m?.form, m?.avatarPicker])
|
|
151
145
|
});
|
|
152
|
-
},
|
|
146
|
+
}, J = /* @__PURE__ */ function(e) {
|
|
153
147
|
return e.Success = "success", e.Cancelled = "cancelled", e.PopupBlocked = "popup-blocked", e.InvalidConfig = "invalid-config", e.Failed = "failed", e;
|
|
154
|
-
}({}),
|
|
155
|
-
let [v, y] =
|
|
156
|
-
|
|
148
|
+
}({}), _e = (e) => e === c.None ? u.WithoutLogin : u.WithLogin, Y = (e, t) => e === c.None ? t?.typeNone ?? "Open access" : e === c.OAuth ? t?.typeOAuth ?? "OAuth" : t?.typeApiKey ?? "API Key", ve = ({ auth: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, endpoint: a, authActions: o, onOAuthLogin: s, onNotifySuccess: d, onNotifyError: p, onAuthChange: m, onEnsureSaved: h, labels: _ }) => {
|
|
149
|
+
let [v, y] = T(!1), [ee, b] = T(!1), x = e.isLoggedIn || n || v, S = U(a) && K(e, i) && !x, C = (t) => {
|
|
150
|
+
x || t === e.authenticationType || m({
|
|
157
151
|
authenticationType: t,
|
|
158
|
-
withLogin:
|
|
152
|
+
withLogin: _e(t)
|
|
159
153
|
});
|
|
160
|
-
},
|
|
154
|
+
}, w = (e) => {
|
|
161
155
|
m({ withLogin: e });
|
|
162
156
|
}, te = (e) => {
|
|
163
157
|
switch (e.auth != null && m(e.auth), e.status) {
|
|
164
|
-
case
|
|
165
|
-
m({ isLoggedIn: !0 }),
|
|
158
|
+
case J.Success:
|
|
159
|
+
m({ isLoggedIn: !0 }), d(_?.loginSuccessMessage ?? "Successfully logged in.");
|
|
166
160
|
return;
|
|
167
|
-
case
|
|
161
|
+
case J.PopupBlocked:
|
|
168
162
|
p(_?.errorPopupBlocked ?? "The login popup was blocked by your browser. Please allow popups for this site and try again.");
|
|
169
163
|
return;
|
|
170
|
-
case
|
|
164
|
+
case J.InvalidConfig:
|
|
171
165
|
p(_?.errorOAuthConfigMissing ?? "The OAuth provider did not return a valid client configuration. Please check the endpoint or contact your administrator.");
|
|
172
166
|
return;
|
|
173
|
-
case
|
|
167
|
+
case J.Failed:
|
|
174
168
|
p(_?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", e.traceId);
|
|
175
169
|
return;
|
|
176
|
-
case
|
|
170
|
+
case J.Cancelled: return;
|
|
177
171
|
}
|
|
178
172
|
}, ne = async () => {
|
|
179
|
-
if (!
|
|
180
|
-
if (e.authenticationType ===
|
|
173
|
+
if (!S) return;
|
|
174
|
+
if (e.authenticationType === c.OAuth) {
|
|
181
175
|
y(!0);
|
|
182
176
|
try {
|
|
183
|
-
te(await
|
|
177
|
+
te(await s({
|
|
184
178
|
auth: e,
|
|
185
|
-
ensureSaved:
|
|
179
|
+
ensureSaved: h
|
|
186
180
|
}));
|
|
187
181
|
} finally {
|
|
188
182
|
y(!1);
|
|
189
183
|
}
|
|
190
184
|
return;
|
|
191
185
|
}
|
|
192
|
-
let t = await
|
|
186
|
+
let t = await h();
|
|
193
187
|
if (t) {
|
|
194
188
|
y(!0);
|
|
195
189
|
try {
|
|
196
190
|
let n = {
|
|
197
191
|
url: t,
|
|
198
|
-
credentialsLevel:
|
|
192
|
+
credentialsLevel: l.User,
|
|
199
193
|
authenticationType: e.authenticationType,
|
|
200
194
|
apiKey: e.apiKey?.trim()
|
|
201
195
|
};
|
|
202
|
-
await o.login(t, n), m({ isLoggedIn: !0 }),
|
|
196
|
+
await o.login(t, n), m({ isLoggedIn: !0 }), d(_?.loginSuccessMessage ?? "Successfully logged in.");
|
|
203
197
|
} catch (e) {
|
|
204
|
-
let { traceId: t } = await
|
|
198
|
+
let { traceId: t } = await f(e);
|
|
205
199
|
p(_?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
|
|
206
200
|
} finally {
|
|
207
201
|
y(!1);
|
|
208
202
|
}
|
|
209
203
|
}
|
|
210
|
-
},
|
|
204
|
+
}, re = async () => {
|
|
211
205
|
y(!0);
|
|
212
206
|
try {
|
|
213
207
|
let t = {
|
|
214
208
|
url: r,
|
|
215
|
-
credentialsLevel:
|
|
209
|
+
credentialsLevel: l.User,
|
|
216
210
|
authenticationType: e.authenticationType
|
|
217
211
|
};
|
|
218
|
-
await o.logout(r, t), m({ isLoggedIn: !1 }),
|
|
212
|
+
await o.logout(r, t), m({ isLoggedIn: !1 }), b(!1), d(_?.logoutSuccessMessage ?? "Successfully logged out.");
|
|
219
213
|
} catch (e) {
|
|
220
|
-
let { traceId: t } = await
|
|
214
|
+
let { traceId: t } = await f(e);
|
|
221
215
|
p(_?.errorLogoutFailed ?? "Failed to log out. Please try again.", t);
|
|
222
216
|
} finally {
|
|
223
217
|
y(!1);
|
|
224
218
|
}
|
|
225
|
-
},
|
|
219
|
+
}, F = () => e.isLoggedIn ? /* @__PURE__ */ D("div", {
|
|
226
220
|
className: "flex",
|
|
227
221
|
children: /* @__PURE__ */ D(M, {
|
|
228
222
|
label: _?.logOutLabel ?? "Log out",
|
|
229
|
-
iconBefore: /* @__PURE__ */ D(
|
|
223
|
+
iconBefore: /* @__PURE__ */ D(ie, {
|
|
230
224
|
size: k.MD,
|
|
231
225
|
stroke: A
|
|
232
226
|
}),
|
|
233
|
-
onClick: () =>
|
|
227
|
+
onClick: () => b(!0),
|
|
234
228
|
disabled: n || v
|
|
235
229
|
})
|
|
236
230
|
}) : /* @__PURE__ */ D("div", {
|
|
@@ -242,7 +236,7 @@ var se = {
|
|
|
242
236
|
stroke: A
|
|
243
237
|
}),
|
|
244
238
|
onClick: ne,
|
|
245
|
-
disabled: !
|
|
239
|
+
disabled: !S
|
|
246
240
|
})
|
|
247
241
|
});
|
|
248
242
|
return /* @__PURE__ */ O("section", {
|
|
@@ -255,14 +249,14 @@ var se = {
|
|
|
255
249
|
/* @__PURE__ */ D(I, {
|
|
256
250
|
"aria-label": _?.sectionTitle ?? "Authentication",
|
|
257
251
|
value: e.authenticationType,
|
|
258
|
-
onChange: (e) =>
|
|
252
|
+
onChange: (e) => C(e),
|
|
259
253
|
segmentClassName: "px-2",
|
|
260
254
|
items: [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
255
|
+
c.None,
|
|
256
|
+
c.OAuth,
|
|
257
|
+
c.ApiKey
|
|
264
258
|
].map((t) => {
|
|
265
|
-
let n =
|
|
259
|
+
let n = B[t];
|
|
266
260
|
return {
|
|
267
261
|
value: t,
|
|
268
262
|
label: /* @__PURE__ */ O("div", {
|
|
@@ -274,18 +268,18 @@ var se = {
|
|
|
274
268
|
"aria-hidden": !0
|
|
275
269
|
}), /* @__PURE__ */ D("span", {
|
|
276
270
|
className: "sr-only desktop:not-sr-only",
|
|
277
|
-
children:
|
|
271
|
+
children: Y(t, _)
|
|
278
272
|
})]
|
|
279
273
|
}),
|
|
280
|
-
disabled:
|
|
274
|
+
disabled: x && e.authenticationType !== t
|
|
281
275
|
};
|
|
282
276
|
})
|
|
283
277
|
}),
|
|
284
|
-
e.authenticationType ===
|
|
278
|
+
e.authenticationType === c.None && /* @__PURE__ */ D("p", {
|
|
285
279
|
className: "dial-small-text pt-2 text-secondary",
|
|
286
280
|
children: _?.openAccessDescription ?? "Open endpoint, no credentials"
|
|
287
281
|
}),
|
|
288
|
-
e.authenticationType ===
|
|
282
|
+
e.authenticationType === c.OAuth && /* @__PURE__ */ O("div", {
|
|
289
283
|
className: "flex flex-col gap-3 pt-2",
|
|
290
284
|
children: [
|
|
291
285
|
/* @__PURE__ */ O("div", {
|
|
@@ -293,22 +287,22 @@ var se = {
|
|
|
293
287
|
children: [/* @__PURE__ */ D(P, {
|
|
294
288
|
name: "oauth-login-mode",
|
|
295
289
|
id: "oauth-with-login",
|
|
296
|
-
value:
|
|
290
|
+
value: u.WithLogin,
|
|
297
291
|
labelProps: { label: _?.withLoginOAuthLabel ?? "Standard login" },
|
|
298
|
-
isSelected: e.withLogin ===
|
|
299
|
-
disabled:
|
|
300
|
-
onChange:
|
|
292
|
+
isSelected: e.withLogin === u.WithLogin,
|
|
293
|
+
disabled: x,
|
|
294
|
+
onChange: w
|
|
301
295
|
}), /* @__PURE__ */ D(P, {
|
|
302
296
|
name: "oauth-login-mode",
|
|
303
297
|
id: "oauth-with-config",
|
|
304
|
-
value:
|
|
298
|
+
value: u.WithConfig,
|
|
305
299
|
labelProps: { label: _?.withConfigOAuthLabel ?? "Custom login" },
|
|
306
|
-
isSelected: e.withLogin ===
|
|
307
|
-
disabled:
|
|
308
|
-
onChange:
|
|
300
|
+
isSelected: e.withLogin === u.WithConfig,
|
|
301
|
+
disabled: x,
|
|
302
|
+
onChange: w
|
|
309
303
|
})]
|
|
310
304
|
}),
|
|
311
|
-
e.withLogin ===
|
|
305
|
+
e.withLogin === u.WithConfig && /* @__PURE__ */ O("div", {
|
|
312
306
|
className: "flex flex-col gap-3",
|
|
313
307
|
children: [
|
|
314
308
|
/* @__PURE__ */ D(j, {
|
|
@@ -322,7 +316,7 @@ var se = {
|
|
|
322
316
|
placeholder: _?.clientIdPlaceholder ?? "Enter client ID",
|
|
323
317
|
error: t.clientId || void 0,
|
|
324
318
|
invalid: !!t.clientId,
|
|
325
|
-
disabled:
|
|
319
|
+
disabled: x
|
|
326
320
|
}),
|
|
327
321
|
/* @__PURE__ */ D(N, {
|
|
328
322
|
id: "toolset-client-secret",
|
|
@@ -337,7 +331,7 @@ var se = {
|
|
|
337
331
|
hidePasswordLabel: _?.hideClientSecretLabel ?? "Hide client secret",
|
|
338
332
|
error: t.clientSecret || void 0,
|
|
339
333
|
invalid: !!t.clientSecret,
|
|
340
|
-
disabled:
|
|
334
|
+
disabled: x
|
|
341
335
|
}),
|
|
342
336
|
/* @__PURE__ */ D(j, {
|
|
343
337
|
id: "toolset-authorization-endpoint",
|
|
@@ -347,7 +341,7 @@ var se = {
|
|
|
347
341
|
placeholder: _?.authorizationEndpointPlaceholder ?? "Enter authorization endpoint",
|
|
348
342
|
error: t.authorizationEndpoint || void 0,
|
|
349
343
|
invalid: !!t.authorizationEndpoint,
|
|
350
|
-
disabled:
|
|
344
|
+
disabled: x
|
|
351
345
|
}),
|
|
352
346
|
/* @__PURE__ */ D(j, {
|
|
353
347
|
id: "toolset-token-endpoint",
|
|
@@ -357,23 +351,23 @@ var se = {
|
|
|
357
351
|
placeholder: _?.tokenEndpointPlaceholder ?? "Enter token endpoint",
|
|
358
352
|
error: t.tokenEndpoint || void 0,
|
|
359
353
|
invalid: !!t.tokenEndpoint,
|
|
360
|
-
disabled:
|
|
354
|
+
disabled: x
|
|
361
355
|
}),
|
|
362
|
-
/* @__PURE__ */ D(
|
|
356
|
+
/* @__PURE__ */ D(se, {
|
|
363
357
|
id: "toolset-scopes",
|
|
364
358
|
labelProps: { label: _?.scopesLabel ?? "Scopes" },
|
|
365
359
|
placeholder: _?.scopesPlaceholder ?? "Enter scopes",
|
|
366
360
|
value: e.scopes ?? [],
|
|
367
361
|
onChange: (e) => m({ scopes: e }),
|
|
368
|
-
disabled:
|
|
369
|
-
tagClassName:
|
|
362
|
+
disabled: x,
|
|
363
|
+
tagClassName: g
|
|
370
364
|
})
|
|
371
365
|
]
|
|
372
366
|
}),
|
|
373
|
-
|
|
367
|
+
F()
|
|
374
368
|
]
|
|
375
369
|
}),
|
|
376
|
-
e.authenticationType ===
|
|
370
|
+
e.authenticationType === c.ApiKey && /* @__PURE__ */ O("div", {
|
|
377
371
|
className: "flex flex-col gap-3 pt-2",
|
|
378
372
|
children: [
|
|
379
373
|
/* @__PURE__ */ O("div", {
|
|
@@ -381,19 +375,19 @@ var se = {
|
|
|
381
375
|
children: [/* @__PURE__ */ D(P, {
|
|
382
376
|
name: "apikey-login-mode",
|
|
383
377
|
id: "apikey-with-login",
|
|
384
|
-
value:
|
|
378
|
+
value: u.WithLogin,
|
|
385
379
|
labelProps: { label: _?.withLoginLabel ?? "With login" },
|
|
386
|
-
isSelected: e.withLogin ===
|
|
387
|
-
disabled:
|
|
388
|
-
onChange:
|
|
380
|
+
isSelected: e.withLogin === u.WithLogin,
|
|
381
|
+
disabled: x,
|
|
382
|
+
onChange: w
|
|
389
383
|
}), /* @__PURE__ */ D(P, {
|
|
390
384
|
name: "apikey-login-mode",
|
|
391
385
|
id: "apikey-without-login",
|
|
392
|
-
value:
|
|
386
|
+
value: u.WithoutLogin,
|
|
393
387
|
labelProps: { label: _?.withoutLoginLabel ?? "Without login" },
|
|
394
|
-
isSelected: e.withLogin ===
|
|
395
|
-
disabled:
|
|
396
|
-
onChange:
|
|
388
|
+
isSelected: e.withLogin === u.WithoutLogin,
|
|
389
|
+
disabled: x,
|
|
390
|
+
onChange: w
|
|
397
391
|
})]
|
|
398
392
|
}),
|
|
399
393
|
/* @__PURE__ */ O("div", {
|
|
@@ -409,8 +403,8 @@ var se = {
|
|
|
409
403
|
placeholder: _?.keyHeaderPlaceholder ?? "Enter API key parameter name",
|
|
410
404
|
error: t.keyHeader || void 0,
|
|
411
405
|
invalid: !!t.keyHeader,
|
|
412
|
-
disabled:
|
|
413
|
-
}), e.withLogin ===
|
|
406
|
+
disabled: x
|
|
407
|
+
}), e.withLogin === u.WithLogin && /* @__PURE__ */ D(N, {
|
|
414
408
|
id: "toolset-api-key",
|
|
415
409
|
value: e.apiKey ?? "",
|
|
416
410
|
onChange: (e) => m({ apiKey: e ?? "" }),
|
|
@@ -423,31 +417,31 @@ var se = {
|
|
|
423
417
|
hidePasswordLabel: _?.hideApiKeyLabel ?? "Hide API key",
|
|
424
418
|
error: t.apiKey || void 0,
|
|
425
419
|
invalid: !!t.apiKey,
|
|
426
|
-
disabled:
|
|
420
|
+
disabled: x
|
|
427
421
|
})]
|
|
428
422
|
}),
|
|
429
|
-
e.withLogin !==
|
|
423
|
+
e.withLogin !== u.WithoutLogin && F()
|
|
430
424
|
]
|
|
431
425
|
}),
|
|
432
|
-
|
|
433
|
-
open:
|
|
426
|
+
ee && /* @__PURE__ */ D(ae, {
|
|
427
|
+
open: ee,
|
|
434
428
|
header: _?.logoutConfirmTitle ?? "Log out?",
|
|
435
429
|
description: _?.logoutConfirmDescription ?? "Are you sure you want to log out? You will need to re-enter your credentials to use this toolset again.",
|
|
436
430
|
confirmLabel: _?.logOutLabel ?? "Log out",
|
|
437
431
|
cancelLabel: _?.cancelLabel ?? "Cancel",
|
|
438
|
-
variant:
|
|
432
|
+
variant: oe.Danger,
|
|
439
433
|
isLoading: v,
|
|
440
434
|
disableConfirmButton: v,
|
|
441
|
-
onConfirm:
|
|
442
|
-
onCancel: () =>
|
|
443
|
-
onClose: () =>
|
|
435
|
+
onConfirm: re,
|
|
436
|
+
onCancel: () => b(!1),
|
|
437
|
+
onClose: () => b(!1)
|
|
444
438
|
})
|
|
445
439
|
]
|
|
446
440
|
});
|
|
447
|
-
},
|
|
448
|
-
let { isCopied: r, copy: i } =
|
|
441
|
+
}, X = b(({ url: e, className: t, labels: n }) => {
|
|
442
|
+
let { isCopied: r, copy: i } = y(e), a = n?.copiedLabel ?? "Copied!";
|
|
449
443
|
return /* @__PURE__ */ O("div", {
|
|
450
|
-
className:
|
|
444
|
+
className: v("flex flex-col gap-3", t),
|
|
451
445
|
children: [
|
|
452
446
|
/* @__PURE__ */ O("div", {
|
|
453
447
|
className: "flex flex-col gap-1",
|
|
@@ -459,7 +453,7 @@ var se = {
|
|
|
459
453
|
children: n?.description ?? "Copy endpoint URL to easily integrate toolset into your workflows"
|
|
460
454
|
})]
|
|
461
455
|
}),
|
|
462
|
-
/* @__PURE__ */ D("div", { children: /* @__PURE__ */ D(
|
|
456
|
+
/* @__PURE__ */ D("div", { children: /* @__PURE__ */ D(p, {
|
|
463
457
|
copiedLabel: a,
|
|
464
458
|
copyLabel: n?.copyLabel ?? "Copy URL",
|
|
465
459
|
isCopied: r,
|
|
@@ -473,8 +467,8 @@ var se = {
|
|
|
473
467
|
})
|
|
474
468
|
]
|
|
475
469
|
});
|
|
476
|
-
}),
|
|
477
|
-
let [
|
|
470
|
+
}), ye = ({ form: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, connectUrl: a, listToolNames: o, authActions: s, onOAuthLogin: c, onNotifySuccess: l, onNotifyError: u, onChange: d, onAuthChange: f, onEnsureSaved: p, labels: m }) => {
|
|
471
|
+
let [h, _] = T(null), v = !!a && !!r, y = C(() => [{
|
|
478
472
|
value: R.Http,
|
|
479
473
|
label: "HTTP"
|
|
480
474
|
}, {
|
|
@@ -482,7 +476,7 @@ var se = {
|
|
|
482
476
|
label: "SSE"
|
|
483
477
|
}], []);
|
|
484
478
|
return S(() => {
|
|
485
|
-
if (!r || !o || !
|
|
479
|
+
if (!r || !o || !K(e.auth, i)) {
|
|
486
480
|
_(null);
|
|
487
481
|
return;
|
|
488
482
|
}
|
|
@@ -531,28 +525,28 @@ var se = {
|
|
|
531
525
|
d({ protocol: e });
|
|
532
526
|
}
|
|
533
527
|
}),
|
|
534
|
-
|
|
528
|
+
h ? /* @__PURE__ */ D(L, {
|
|
535
529
|
id: "toolset-allowed-tools",
|
|
536
530
|
multiple: !0,
|
|
537
531
|
searchable: !0,
|
|
538
532
|
selectAll: !0,
|
|
539
533
|
labelProps: { label: m?.allowedToolsLabel ?? "Allowed tools" },
|
|
540
534
|
placeholder: m?.allowedToolsSelectPlaceholder ?? "Select allowed tools",
|
|
541
|
-
options:
|
|
535
|
+
options: h.map((e) => ({
|
|
542
536
|
value: e,
|
|
543
537
|
label: e
|
|
544
538
|
})),
|
|
545
539
|
value: e.allowedTools,
|
|
546
540
|
onChange: (e) => d({ allowedTools: e })
|
|
547
|
-
}) : /* @__PURE__ */ D(
|
|
541
|
+
}) : /* @__PURE__ */ D(se, {
|
|
548
542
|
id: "toolset-allowed-tools",
|
|
549
543
|
labelProps: { label: m?.allowedToolsLabel ?? "Allowed tools" },
|
|
550
544
|
placeholder: m?.allowedToolsPlaceholder ?? "Add tools, comma separated",
|
|
551
545
|
value: e.allowedTools,
|
|
552
546
|
onChange: (e) => d({ allowedTools: e }),
|
|
553
|
-
tagClassName:
|
|
547
|
+
tagClassName: g
|
|
554
548
|
}),
|
|
555
|
-
/* @__PURE__ */ D(
|
|
549
|
+
/* @__PURE__ */ D(ve, {
|
|
556
550
|
auth: e.auth,
|
|
557
551
|
errors: t,
|
|
558
552
|
isSaving: n,
|
|
@@ -567,59 +561,63 @@ var se = {
|
|
|
567
561
|
onEnsureSaved: p,
|
|
568
562
|
labels: m?.auth
|
|
569
563
|
}),
|
|
570
|
-
v && /* @__PURE__ */ D(
|
|
564
|
+
v && /* @__PURE__ */ D(X, {
|
|
571
565
|
url: a ?? "",
|
|
572
566
|
labels: m?.connect,
|
|
573
567
|
className: "border-t border-tertiary pt-4"
|
|
574
568
|
})
|
|
575
569
|
]
|
|
576
570
|
});
|
|
577
|
-
},
|
|
571
|
+
}, be = [
|
|
578
572
|
"keyHeader",
|
|
579
573
|
"apiKey",
|
|
580
574
|
"clientId",
|
|
581
575
|
"clientSecret",
|
|
582
576
|
"authorizationEndpoint",
|
|
583
577
|
"tokenEndpoint"
|
|
584
|
-
],
|
|
578
|
+
], xe = ["endpoint", ...be], Z = new Set(xe), Se = (e) => {
|
|
585
579
|
let t = {};
|
|
586
|
-
for (let n of Object.keys(e))
|
|
580
|
+
for (let n of Object.keys(e)) Z.has(n) && (t[n] = !0);
|
|
587
581
|
return t;
|
|
588
|
-
},
|
|
589
|
-
let N = !!i, [P, F] =
|
|
590
|
-
initialForm:
|
|
582
|
+
}, Q = ({ initialForm: e, toolsetId: i, onPersist: a, onPostSaveLogin: s, onToolsetsChanged: l, onSaveSuccess: d, onSaveComplete: p, onBack: g, onDirtyChange: v, buildMcpUrl: y, listToolNames: b, authActions: te, onOAuthLogin: ne, onNotifySuccess: re, onNotifyError: E, bucket: ie, FileManagerModal: O, resolveIconUrl: ae, allowedMimeTypes: oe, maxFileSizeBytes: k, availableLocaleOptions: A, onRefineDescription: j, labels: M }) => {
|
|
583
|
+
let N = !!i, [P, F] = T(""), I = i || P, [L, se] = T({
|
|
584
|
+
initialForm: e,
|
|
591
585
|
key: 0
|
|
592
|
-
});
|
|
593
|
-
L.initialForm !==
|
|
594
|
-
initialForm:
|
|
586
|
+
}), [R, z] = T(e);
|
|
587
|
+
L.initialForm !== e && (se({
|
|
588
|
+
initialForm: e,
|
|
595
589
|
key: L.key + 1
|
|
596
|
-
});
|
|
597
|
-
let { values:
|
|
598
|
-
initialValues: C(() =>
|
|
599
|
-
validationOptions:
|
|
590
|
+
}), z(e));
|
|
591
|
+
let { values: B, setValues: ue, markTouched: V, visibleErrorCodes: H, attemptSubmit: de } = o({
|
|
592
|
+
initialValues: C(() => me(e), [e]),
|
|
593
|
+
validationOptions: le,
|
|
600
594
|
reseedKey: L.key
|
|
601
|
-
}), [
|
|
602
|
-
...
|
|
603
|
-
...
|
|
604
|
-
}), [
|
|
595
|
+
}), [W, G] = T(e), K = C(() => ({
|
|
596
|
+
...W,
|
|
597
|
+
...B
|
|
598
|
+
}), [W, B]), pe = C(() => JSON.stringify(K) !== JSON.stringify(R), [K, R]);
|
|
605
599
|
S(() => {
|
|
606
|
-
|
|
607
|
-
}, [
|
|
600
|
+
v?.(pe);
|
|
601
|
+
}, [pe, v]);
|
|
602
|
+
let [q, J] = T(!1), [_e, Y] = T({}), [ve, X] = T({}), Z = w(null);
|
|
603
|
+
S(() => {
|
|
604
|
+
G(e), Z.current = e, Y({}), X({}), F("");
|
|
605
|
+
}, [e]);
|
|
608
606
|
let Q = x((e) => {
|
|
609
|
-
let { metadata: t, setup:
|
|
610
|
-
Object.keys(t).length > 0 && (
|
|
607
|
+
let { metadata: t, setup: n } = he(e);
|
|
608
|
+
Object.keys(t).length > 0 && (ue(t), "name" in t && V(r.Name), "version" in t && V(r.Version)), Object.keys(n).length !== 0 && (G((e) => ({
|
|
611
609
|
...e,
|
|
612
|
-
...
|
|
610
|
+
...n
|
|
613
611
|
})), X((e) => ({
|
|
614
612
|
...e,
|
|
615
|
-
...
|
|
613
|
+
...Se(n)
|
|
616
614
|
})), Y((e) => {
|
|
617
615
|
let t = { ...e };
|
|
618
|
-
for (let e of Object.keys(
|
|
616
|
+
for (let e of Object.keys(n)) delete t[e];
|
|
619
617
|
return t;
|
|
620
618
|
}));
|
|
621
|
-
}, [
|
|
622
|
-
|
|
619
|
+
}, [ue, V]), Ce = x((e) => {
|
|
620
|
+
G((t) => ({
|
|
623
621
|
...t,
|
|
624
622
|
auth: {
|
|
625
623
|
...t.auth,
|
|
@@ -627,104 +625,105 @@ var se = {
|
|
|
627
625
|
}
|
|
628
626
|
})), X((t) => ({
|
|
629
627
|
...t,
|
|
630
|
-
...
|
|
628
|
+
...Se(e)
|
|
631
629
|
})), Y((t) => {
|
|
632
630
|
let n = { ...t };
|
|
633
|
-
if ("authenticationType" in e || "withLogin" in e || "isLoggedIn" in e) for (let e of
|
|
631
|
+
if ("authenticationType" in e || "withLogin" in e || "isLoggedIn" in e) for (let e of be) delete n[e];
|
|
634
632
|
else for (let t of Object.keys(e)) delete n[t];
|
|
635
633
|
return n;
|
|
636
|
-
}), "isLoggedIn" in e &&
|
|
637
|
-
}, [
|
|
638
|
-
if (I && Z.current != null && JSON.stringify(Z.current) === JSON.stringify(
|
|
639
|
-
|
|
634
|
+
}), "isLoggedIn" in e && l();
|
|
635
|
+
}, [l]), we = x(async () => {
|
|
636
|
+
if (I && Z.current != null && JSON.stringify(Z.current) === JSON.stringify(K)) return I;
|
|
637
|
+
J(!0);
|
|
640
638
|
try {
|
|
641
|
-
let e = await
|
|
642
|
-
return e ? (I || F(e), Z.current =
|
|
639
|
+
let e = await a(K, I);
|
|
640
|
+
return e ? (I || F(e), Z.current = K, z(K), v?.(!1), await l(), e) : null;
|
|
643
641
|
} catch {
|
|
644
642
|
return null;
|
|
645
643
|
} finally {
|
|
646
|
-
|
|
644
|
+
J(!1);
|
|
647
645
|
}
|
|
648
646
|
}, [
|
|
649
|
-
|
|
647
|
+
K,
|
|
650
648
|
I,
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
649
|
+
a,
|
|
650
|
+
l,
|
|
651
|
+
v
|
|
652
|
+
]), Te = x(async () => await we() ?? !1, [we]), $ = x((e) => {
|
|
654
653
|
let t = M?.validation, n = {};
|
|
655
|
-
return e.endpoint.trim() ?
|
|
656
|
-
}, [M, N]),
|
|
657
|
-
let e =
|
|
654
|
+
return e.endpoint.trim() ? U(e.endpoint) || (n.endpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL") : n.endpoint = t?.endpointRequired ?? "Endpoint is required", e.auth.isLoggedIn || (e.auth.authenticationType === c.ApiKey && (e.auth.keyHeader?.trim() || (n.keyHeader = t?.keyHeaderRequired ?? "Key name is required"), e.auth.withLogin === u.WithLogin && !e.auth.apiKey?.trim() && (n.apiKey = t?.apiKeyRequired ?? "API key is required")), e.auth.authenticationType === c.OAuth && e.auth.withLogin === u.WithConfig && (e.auth.clientId?.trim() || (n.clientId = t?.clientIdRequired ?? "Client ID is required"), !N && !e.auth.clientSecret?.trim() && (n.clientSecret = t?.clientSecretRequired ?? "Client secret is required"), e.auth.authorizationEndpoint?.trim() && !U(e.auth.authorizationEndpoint) && (n.authorizationEndpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL"), e.auth.tokenEndpoint?.trim() && !U(e.auth.tokenEndpoint) && (n.tokenEndpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL"))), n;
|
|
655
|
+
}, [M, N]), Ee = x(async () => {
|
|
656
|
+
let e = de(), t = $(K);
|
|
658
657
|
if (!e || Object.keys(t).length > 0) {
|
|
659
658
|
Y(t);
|
|
660
659
|
return;
|
|
661
660
|
}
|
|
662
|
-
Y({}),
|
|
661
|
+
Y({}), J(!0);
|
|
663
662
|
try {
|
|
664
|
-
let e = await
|
|
663
|
+
let e = await a(K, I);
|
|
665
664
|
if (!e) return;
|
|
666
|
-
await
|
|
665
|
+
z(K), await l(), d(K);
|
|
667
666
|
try {
|
|
668
|
-
await
|
|
667
|
+
await s(e, K.auth), p();
|
|
669
668
|
} catch (e) {
|
|
670
|
-
let { traceId: t } = await
|
|
669
|
+
let { traceId: t } = await f(e);
|
|
671
670
|
E(M?.settings?.auth?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
|
|
672
671
|
}
|
|
673
672
|
} catch {} finally {
|
|
674
|
-
|
|
673
|
+
J(!1);
|
|
675
674
|
}
|
|
676
675
|
}, [
|
|
677
|
-
|
|
678
|
-
|
|
676
|
+
de,
|
|
677
|
+
K,
|
|
679
678
|
$,
|
|
680
679
|
I,
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
680
|
+
a,
|
|
681
|
+
l,
|
|
682
|
+
d,
|
|
683
|
+
p,
|
|
684
|
+
s,
|
|
686
685
|
E,
|
|
687
686
|
M
|
|
688
|
-
]),
|
|
689
|
-
value:
|
|
687
|
+
]), De = ee({
|
|
688
|
+
value: B.description,
|
|
690
689
|
onChange: (e) => Q({ description: e }),
|
|
691
690
|
onRefine: j,
|
|
692
|
-
disabled:
|
|
691
|
+
disabled: q,
|
|
693
692
|
resetKey: L.key
|
|
694
|
-
}),
|
|
693
|
+
}), Oe = j ? (e, t) => /* @__PURE__ */ D(_, {
|
|
695
694
|
isEnabled: !0,
|
|
696
695
|
fieldId: t,
|
|
697
696
|
label: M?.general?.form?.description.label ?? "Description",
|
|
698
697
|
labels: M?.refinement,
|
|
699
|
-
refinement:
|
|
700
|
-
disabled:
|
|
698
|
+
refinement: De,
|
|
699
|
+
disabled: De.isPending || q,
|
|
701
700
|
children: e
|
|
702
|
-
}) : void 0,
|
|
703
|
-
let
|
|
704
|
-
for (let e of
|
|
705
|
-
if (!
|
|
701
|
+
}) : void 0, ke = C(() => !fe(K, N), [K, N]), Ae = C(() => {
|
|
702
|
+
let e = M?.validation, n = $(K), r = { ..._e };
|
|
703
|
+
for (let e of xe) {
|
|
704
|
+
if (!ve[e]) continue;
|
|
706
705
|
let t = n[e];
|
|
707
706
|
t ? r[e] = t : delete r[e];
|
|
708
707
|
}
|
|
709
|
-
return
|
|
708
|
+
return H.name === t.Required ? r.name = e?.nameRequired ?? "Name is required" : H.name === t.TooLong ? r.name = e?.nameTooLong ?? `Use ${h} characters or fewer.` : H.name === t.ControlCharacters && (r.name = e?.nameControlCharacters ?? "Remove line breaks, tabs and other control characters."), H.description === t.TooLong && (r.description = e?.descriptionTooLong ?? `Use ${m} characters or fewer.`), H.version === t.InvalidFormat && (r.version = e?.versionInvalid ?? "Version must follow semantic versioning (e.g., 1.0.0)"), r;
|
|
710
709
|
}, [
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
710
|
+
ve,
|
|
711
|
+
_e,
|
|
712
|
+
K,
|
|
714
713
|
M,
|
|
715
|
-
|
|
714
|
+
H,
|
|
716
715
|
$
|
|
717
|
-
]),
|
|
718
|
-
return /* @__PURE__ */ D(
|
|
716
|
+
]), je = y && I ? y(I) : void 0;
|
|
717
|
+
return /* @__PURE__ */ D(n, {
|
|
719
718
|
title: N ? M?.layout?.editTitle ?? "Edit toolset" : M?.layout?.createTitle ?? "Create toolset",
|
|
720
|
-
onBack:
|
|
721
|
-
onCancel:
|
|
722
|
-
onSubmit:
|
|
719
|
+
onBack: g,
|
|
720
|
+
onCancel: g,
|
|
721
|
+
onSubmit: Ee,
|
|
723
722
|
submitLabel: N ? M?.layout?.saveLabel ?? "Save" : M?.layout?.createLabel ?? "Create",
|
|
724
|
-
isSubmitting:
|
|
725
|
-
isSubmitDisabled:
|
|
726
|
-
metadataSectionClassName:
|
|
727
|
-
setupSectionClassName:
|
|
723
|
+
isSubmitting: q,
|
|
724
|
+
isSubmitDisabled: ke || De.isPending,
|
|
725
|
+
metadataSectionClassName: ce.metadataSection,
|
|
726
|
+
setupSectionClassName: ce.setupSection,
|
|
728
727
|
labels: {
|
|
729
728
|
backAriaLabel: M?.layout?.backAriaLabel ?? "Back to catalog",
|
|
730
729
|
savingStatusLabel: M?.layout?.savingStatusLabel ?? "Saving",
|
|
@@ -732,37 +731,37 @@ var se = {
|
|
|
732
731
|
setupTitle: M?.layout?.setupSectionTitle ?? "Setup",
|
|
733
732
|
cancelLabel: M?.layout?.cancelLabel ?? "Cancel"
|
|
734
733
|
},
|
|
735
|
-
metadata: /* @__PURE__ */ D(
|
|
736
|
-
form:
|
|
737
|
-
errors:
|
|
738
|
-
bucket:
|
|
734
|
+
metadata: /* @__PURE__ */ D(ge, {
|
|
735
|
+
form: K,
|
|
736
|
+
errors: Ae,
|
|
737
|
+
bucket: ie,
|
|
739
738
|
FileManagerModal: O,
|
|
740
|
-
resolveIconUrl:
|
|
741
|
-
allowedMimeTypes:
|
|
739
|
+
resolveIconUrl: ae,
|
|
740
|
+
allowedMimeTypes: oe,
|
|
742
741
|
maxFileSizeBytes: k,
|
|
743
742
|
availableLocaleOptions: A,
|
|
744
743
|
onChange: Q,
|
|
745
|
-
renderDescription:
|
|
744
|
+
renderDescription: Oe,
|
|
746
745
|
labels: M?.general
|
|
747
746
|
}),
|
|
748
|
-
setup: /* @__PURE__ */ D(
|
|
749
|
-
form:
|
|
750
|
-
errors:
|
|
751
|
-
isSaving:
|
|
747
|
+
setup: /* @__PURE__ */ D(ye, {
|
|
748
|
+
form: K,
|
|
749
|
+
errors: Ae,
|
|
750
|
+
isSaving: q,
|
|
752
751
|
toolsetId: I,
|
|
753
752
|
isEditMode: N,
|
|
754
|
-
connectUrl:
|
|
753
|
+
connectUrl: je,
|
|
755
754
|
listToolNames: b,
|
|
756
|
-
authActions:
|
|
757
|
-
onOAuthLogin:
|
|
758
|
-
onNotifySuccess:
|
|
755
|
+
authActions: te,
|
|
756
|
+
onOAuthLogin: ne,
|
|
757
|
+
onNotifySuccess: re,
|
|
759
758
|
onNotifyError: E,
|
|
760
759
|
onChange: Q,
|
|
761
|
-
onAuthChange:
|
|
762
|
-
onEnsureSaved:
|
|
760
|
+
onAuthChange: Ce,
|
|
761
|
+
onEnsureSaved: Te,
|
|
763
762
|
labels: M?.settings
|
|
764
763
|
})
|
|
765
764
|
});
|
|
766
765
|
};
|
|
767
766
|
//#endregion
|
|
768
|
-
export {
|
|
767
|
+
export { B as AUTH_TYPE_ICONS, z as DEFAULT_TOOLSET_VERSION, ge as GeneralForm, ce as TOOLSET_EDITOR_CLASS, Q as ToolsetEditor, J as ToolsetOAuthLoginStatus, R as ToolsetTransportType, V as getDefaultToolsetForm, K as isToolsetAuthValid, fe as isToolsetFormValid, U as isValidEndpointUrl, W as normalizeReturnedEndpointUrl };
|
|
@@ -105,6 +105,8 @@ export interface ToolsetEditorProps {
|
|
|
105
105
|
onSaveComplete: () => void;
|
|
106
106
|
/** Called for the Cancel button and the header back action. */
|
|
107
107
|
onBack: () => void;
|
|
108
|
+
/** Called with whether the form differs from the values it was seeded with or last persisted, on mount and whenever that changes; `false` right after a Log In draft persist. */
|
|
109
|
+
onDirtyChange?: (isDirty: boolean) => void;
|
|
108
110
|
/**
|
|
109
111
|
* Builds the MCP endpoint URL shown in the Connect section for a toolset
|
|
110
112
|
* id. Omit when the host has no external core URL configured — the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolset-editor-props.d.ts","sourceRoot":"","sources":["../../src/models/toolset-editor-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,kCAAkC,EACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC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,CAAC,CAAC;IACzD,gFAAgF;IAChF,WAAW,EAAE,kBAAkB,CAAC;IAChC,mEAAmE;IACnE,YAAY,EAAE,wBAAwB,CAAC;IACvC,2DAA2D;IAC3D,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,gFAAgF;IAChF,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,gBAAgB,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;IACnE,sEAAsE;IACtE,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,4CAA4C;IAC5C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,sBAAsB,EAAE,kCAAkC,EAAE,CAAC;IAC7D,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,sBAAsB,CAAC;IAC7C,wEAAwE;IACxE,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-toolset-editor",
|
|
3
3
|
"description": "Host-agnostic form for authoring and editing a DIAL MCP toolset",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0-dev.102",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tabler/icons-react": "^3.44.0",
|
|
21
|
-
"@epam/ai-dial-builder-form": "1.
|
|
21
|
+
"@epam/ai-dial-builder-form": "1.3.0-dev.102"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@epam/ai-dial-chat-hooks": "1.
|
|
25
|
-
"@epam/ai-dial-chat-shared": "1.
|
|
26
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
24
|
+
"@epam/ai-dial-chat-hooks": "1.3.0-dev.102",
|
|
25
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.102",
|
|
26
|
+
"@epam/ai-dial-ui-kit": "^0.16.0-dev.16",
|
|
27
27
|
"react": "^19.2.8"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
package/utils/toolsets.d.ts
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import { DeploymentCreationFormValues } from '../../../builder-form/src/index.ts';
|
|
2
2
|
import { ToolsetAuthFormData, ToolsetFormData } from '../models/toolset-form';
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
* name, appending a numeric suffix when the default name is taken.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getStorageSafeUniqueToolsetName: ({ defaultName, existingNames, }: {
|
|
8
|
-
/** Candidate name to make unique. Defaults to `DEFAULT_TOOLSET_NAME`. */
|
|
9
|
-
defaultName?: string;
|
|
10
|
-
/** Names already taken by the user's toolsets. */
|
|
11
|
-
existingNames: string[];
|
|
12
|
-
}) => string;
|
|
13
|
-
/** Returns the form state a brand-new toolset editor opens with. */
|
|
14
|
-
export declare const getDefaultToolsetForm: (existingNames?: string[]) => ToolsetFormData;
|
|
3
|
+
/** Returns the form state a brand-new toolset editor opens with: an empty name and the default version. */
|
|
4
|
+
export declare const getDefaultToolsetForm: () => ToolsetFormData;
|
|
15
5
|
/** Validates a toolset endpoint URL (http(s), parseable, no trailing `.`/`//`). */
|
|
16
6
|
export declare const isValidEndpointUrl: (value: string) => boolean;
|
|
17
7
|
/**
|
package/utils/toolsets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/utils/toolsets.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/utils/toolsets.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,4BAA4B,CAAC;AAOpC,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAQhC,2GAA2G;AAC3G,eAAO,MAAM,qBAAqB,QAAO,eAWvC,CAAC;AAmBH,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,OACR,CAAC;AAK5C;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,QAAQ,MAAM,KAAG,MAkB7D,CAAC;AAKF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,mBAAmB,EACzB,oBAAkB,KACjB,OAmBF,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,GAC7B,MAAM,eAAe,EACrB,oBAAkB,KACjB,OAKwC,CAAC;AAW5C,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,GAC9B,MAAM,eAAe,KACpB,4BAOD,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,GAChC,OAAO,OAAO,CAAC,eAAe,CAAC,KAC9B;IACD,QAAQ,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAChD,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAWjC,CAAC"}
|