@wso2/am-core-ui 0.0.19 → 0.0.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.
- package/dist/CatalogKindListing-DvUuZEpc.js +137 -0
- package/dist/{CodeBlock-mB_Loq7I.js → CodeBlock-B2Ecl916.js} +1 -1
- package/dist/EnvironmentCard-CIXhDhlZ.js +319 -0
- package/dist/{EnvironmentSelector-B7Bl93s2.js → EnvironmentSelector-D8S6nO9u.js} +1 -1
- package/dist/IsolationTierIndicator-cf90kgjL.js +81 -0
- package/dist/LabelChips-7rA7_yre.js +139 -0
- package/dist/PolicyListSection-D6aVSKwP.js +1143 -0
- package/dist/{ResourceListShell-Cx6mdeqv.js → ResourceListShell-DFisKftq.js} +1 -1
- package/dist/{SwaggerSpecViewer-BvkhoKsi.js → SwaggerSpecViewer-DzjR6U6W.js} +1 -1
- package/dist/{debounce-BV83M53b.js → debounce-D17ObVdG.js} +1 -1
- package/dist/{format-BEZZRyE2.js → format-wlHhWjGo.js} +1 -1
- package/dist/{formatDistanceToNow-TErllcH8.js → formatDistanceToNow-DyjnT7l9.js} +11 -11
- package/dist/{gatewayScripts-D8O45W8u.js → gatewayScripts-D4ZDEDPS.js} +1 -1
- package/dist/{index-sr-mWz4T.js → index-3K-zqdp-.js} +32 -32
- package/dist/{index-KRsV2L4V.js → index-6liAPSDn.js} +160 -160
- package/dist/{index-B52h3RHg.js → index-B3ASENUJ.js} +109 -109
- package/dist/index-B7Pf4oPq.js +3069 -0
- package/dist/index-BNO3FhZK.js +2304 -0
- package/dist/index-BUZSfCl5.js +335 -0
- package/dist/index-BXiG1r_o.js +1409 -0
- package/dist/{index-_0Pj_ZtW.js → index-BYy7Iaam.js} +40 -40
- package/dist/{index-BfjzUWDa.js → index-BbB_yx4V.js} +103 -103
- package/dist/index-BjWJ95lH.js +2728 -0
- package/dist/{index-B_Z0MwXk.js → index-ByEInFlf.js} +10916 -9520
- package/dist/index-C8WIhzyz.js +123 -0
- package/dist/index-CnzvaT6b.js +2368 -0
- package/dist/index-CrnCf-hJ.js +763 -0
- package/dist/{index-CgCWbWzN.js → index-Cvsho9xg.js} +381 -377
- package/dist/{index-UqDmyMSA.js → index-CxnAo1_c.js} +21 -21
- package/dist/{index-BnV-PkwM.js → index-Cz7-AZwE.js} +2 -2
- package/dist/{index-BP5drcF2.js → index-DBdRFjxm.js} +232 -233
- package/dist/{index-BZ4vxviI.js → index-DFsSvmMZ.js} +5 -5
- package/dist/index-DslzOSGN.js +2549 -0
- package/dist/{index-DD4qF7gq.js → index-DvpYvchM.js} +101 -100
- package/dist/index.d.ts +784 -163
- package/dist/index.js +532 -454
- package/dist/js-yaml-CvhD-clg.js +1335 -0
- package/dist/{llmProviderPayload-CzihkdNa.js → llmProviderPayload-BPzWDy7n.js} +2 -2
- package/package.json +1 -1
- package/dist/CatalogKindListing-DtFI2YMG.js +0 -118
- package/dist/EnvironmentCard-09h1XRxx.js +0 -310
- package/dist/PolicyListSection-o4k9e8XO.js +0 -2475
- package/dist/index-CGDYgUCH.js +0 -711
- package/dist/index-COt7nJIf.js +0 -2286
- package/dist/index-CWZjOy1h.js +0 -2247
- package/dist/index-CezvogTQ.js +0 -116
- package/dist/index-CjCkcuuI.js +0 -322
- package/dist/index-CjXvuf9m.js +0 -1354
- package/dist/index-DeQ-9KTC.js +0 -737
- package/dist/index-Df6OBy4E.js +0 -3041
- package/dist/index-PUuASE1F.js +0 -2507
package/dist/index-DeQ-9KTC.js
DELETED
|
@@ -1,737 +0,0 @@
|
|
|
1
|
-
import { Trash as Be, Plus as oe, Package as Ne, Edit as ue, ExternalLink as ge } from "@wso2/oxygen-ui-icons-react";
|
|
2
|
-
import { jsx as e, jsxs as o, Fragment as ce } from "react/jsx-runtime";
|
|
3
|
-
import Me, { useState as H, useEffect as le, useMemo as M, useCallback as te } from "react";
|
|
4
|
-
import { Box as O, Typography as y, Switch as pe, Stack as U, FormControlLabel as fe, IconButton as Te, Button as G, ListingTable as r, Skeleton as R, Chip as ke, Form as w, Select as Se, MenuItem as J, CircularProgress as $e, Alert as q, Divider as ie, Menu as _e } from "@wso2/oxygen-ui";
|
|
5
|
-
import { useNavigate as he, useLocation as Ie, useParams as ee, generatePath as T, Link as we, Route as Y, Routes as Ae, Navigate as De, useSearchParams as Oe } from "react-router-dom";
|
|
6
|
-
import { t as X, aG as Ue, i as Ge, u as me, g as $, G as xe, cd as He, j as Fe, P as Q, n as je, D as Ke, m as Le, ce as Pe, aI as Ve, cf as Ye, cg as qe, J as Xe, F as Ze } from "./index-B_Z0MwXk.js";
|
|
7
|
-
import { c as ae } from "react/compiler-runtime";
|
|
8
|
-
import "@tanstack/react-query";
|
|
9
|
-
import { S as ze } from "./SwaggerSpecViewer-BvkhoKsi.js";
|
|
10
|
-
import { f as Je } from "./formatDistanceToNow-TErllcH8.js";
|
|
11
|
-
import { C as Qe } from "./CatalogKindListing-DtFI2YMG.js";
|
|
12
|
-
const en = /^[A-Za-z_][A-Za-z0-9_]*$/, ye = 64, ve = (t, n) => {
|
|
13
|
-
const i = t.trim();
|
|
14
|
-
return i ? i.length > ye ? `Key must be at most ${ye} characters.` : en.test(i) ? (n.get(i) ?? 0) > 1 ? "Key must be unique." : null : "Key must start with a letter or underscore, and contain only letters, numbers, or underscores." : "Key is required.";
|
|
15
|
-
}, nn = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2)}`, re = (t = {}) => ({
|
|
16
|
-
id: nn(),
|
|
17
|
-
key: "",
|
|
18
|
-
isSecret: !1,
|
|
19
|
-
isMandatory: !1,
|
|
20
|
-
defaultValue: "",
|
|
21
|
-
...t
|
|
22
|
-
}), tn = (t) => {
|
|
23
|
-
const n = ae(41), {
|
|
24
|
-
row: i,
|
|
25
|
-
keyError: l,
|
|
26
|
-
readonlyKey: a,
|
|
27
|
-
canRemove: m,
|
|
28
|
-
onUpdate: d,
|
|
29
|
-
onRemove: f
|
|
30
|
-
} = t;
|
|
31
|
-
let g;
|
|
32
|
-
n[0] === Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
33
|
-
width: 180
|
|
34
|
-
}, n[0] = g) : g = n[0];
|
|
35
|
-
let c;
|
|
36
|
-
n[1] !== l || n[2] !== d || n[3] !== a || n[4] !== i.key ? (c = /* @__PURE__ */ e(O, { sx: g, children: a ? /* @__PURE__ */ e(y, { variant: "body2", fontWeight: 600, children: i.key }) : /* @__PURE__ */ o(ce, { children: [
|
|
37
|
-
/* @__PURE__ */ e(X, { placeholder: "Key", value: i.key, onChange: (z) => d("key", z.target.value.replace(/\s/g, "_")), fullWidth: !0, size: "small", error: !!l }),
|
|
38
|
-
l && /* @__PURE__ */ e(y, { variant: "caption", color: "error.main", children: l })
|
|
39
|
-
] }) }), n[1] = l, n[2] = d, n[3] = a, n[4] = i.key, n[5] = c) : c = n[5];
|
|
40
|
-
let h;
|
|
41
|
-
n[6] === Symbol.for("react.memo_cache_sentinel") ? (h = {
|
|
42
|
-
width: 180
|
|
43
|
-
}, n[6] = h) : h = n[6];
|
|
44
|
-
const v = i.defaultValue ?? "";
|
|
45
|
-
let b;
|
|
46
|
-
n[7] !== d ? (b = (z) => d("defaultValue", z.target.value), n[7] = d, n[8] = b) : b = n[8];
|
|
47
|
-
let L;
|
|
48
|
-
n[9] !== v || n[10] !== b ? (L = /* @__PURE__ */ e(O, { sx: h, children: /* @__PURE__ */ e(X, { placeholder: "Default value", value: v, onChange: b, fullWidth: !0, size: "small" }) }), n[9] = v, n[10] = b, n[11] = L) : L = n[11];
|
|
49
|
-
const K = i.isMandatory ?? !1;
|
|
50
|
-
let I;
|
|
51
|
-
n[12] !== d ? (I = (z, B) => d("isMandatory", B), n[12] = d, n[13] = I) : I = n[13];
|
|
52
|
-
let j;
|
|
53
|
-
n[14] !== K || n[15] !== I ? (j = /* @__PURE__ */ e(pe, { size: "small", checked: K, onChange: I }), n[14] = K, n[15] = I, n[16] = j) : j = n[16];
|
|
54
|
-
let N;
|
|
55
|
-
n[17] === Symbol.for("react.memo_cache_sentinel") ? (N = {
|
|
56
|
-
mr: 0,
|
|
57
|
-
minWidth: 105
|
|
58
|
-
}, n[17] = N) : N = n[17];
|
|
59
|
-
let A;
|
|
60
|
-
n[18] !== j ? (A = /* @__PURE__ */ e(fe, { control: j, label: "Mandatory", sx: N }), n[18] = j, n[19] = A) : A = n[19];
|
|
61
|
-
let p;
|
|
62
|
-
n[20] !== d ? (p = (z, B) => d("isSecret", B), n[20] = d, n[21] = p) : p = n[21];
|
|
63
|
-
let C;
|
|
64
|
-
n[22] !== i.isSecret || n[23] !== p ? (C = /* @__PURE__ */ e(pe, { size: "small", checked: i.isSecret, onChange: p }), n[22] = i.isSecret, n[23] = p, n[24] = C) : C = n[24];
|
|
65
|
-
let D;
|
|
66
|
-
n[25] === Symbol.for("react.memo_cache_sentinel") ? (D = {
|
|
67
|
-
mr: 0,
|
|
68
|
-
minWidth: 80
|
|
69
|
-
}, n[25] = D) : D = n[25];
|
|
70
|
-
let S;
|
|
71
|
-
n[26] !== C ? (S = /* @__PURE__ */ e(fe, { control: C, label: "Secret", sx: D }), n[26] = C, n[27] = S) : S = n[27];
|
|
72
|
-
let P;
|
|
73
|
-
n[28] !== m || n[29] !== f || n[30] !== a ? (P = !a && /* @__PURE__ */ e(Te, { size: "small", onClick: f, disabled: !m, "aria-label": "Remove row", color: "error", children: /* @__PURE__ */ e(Be, { size: 16 }) }), n[28] = m, n[29] = f, n[30] = a, n[31] = P) : P = n[31];
|
|
74
|
-
let V;
|
|
75
|
-
n[32] !== A || n[33] !== S || n[34] !== P ? (V = /* @__PURE__ */ o(O, { display: "flex", flexDirection: "row", flexGrow: 1, alignItems: "start", pl: 2, pt: 0.5, gap: 1, children: [
|
|
76
|
-
A,
|
|
77
|
-
S,
|
|
78
|
-
P
|
|
79
|
-
] }), n[32] = A, n[33] = S, n[34] = P, n[35] = V) : V = n[35];
|
|
80
|
-
let W;
|
|
81
|
-
return n[36] !== i.id || n[37] !== V || n[38] !== c || n[39] !== L ? (W = /* @__PURE__ */ o(U, { direction: "row", spacing: 1, alignItems: "top", justifyContent: "flex-start", children: [
|
|
82
|
-
c,
|
|
83
|
-
L,
|
|
84
|
-
V
|
|
85
|
-
] }, i.id), n[36] = i.id, n[37] = V, n[38] = c, n[39] = L, n[40] = W) : W = n[40], W;
|
|
86
|
-
}, Re = (t) => {
|
|
87
|
-
const n = ae(25), {
|
|
88
|
-
rows: i,
|
|
89
|
-
onChange: l,
|
|
90
|
-
readonlyKey: a
|
|
91
|
-
} = t;
|
|
92
|
-
let m, d, f, g, c, h;
|
|
93
|
-
if (n[0] !== l || n[1] !== a || n[2] !== i) {
|
|
94
|
-
const K = i.map(rn).reduce(an, /* @__PURE__ */ new Map());
|
|
95
|
-
f = !a && i.some((p) => ve(p.key, K) !== null);
|
|
96
|
-
let I;
|
|
97
|
-
n[9] !== l || n[10] !== i ? (I = (p, C, D) => {
|
|
98
|
-
const S = [...i];
|
|
99
|
-
S[p] = {
|
|
100
|
-
...S[p],
|
|
101
|
-
[C]: D
|
|
102
|
-
}, l(S);
|
|
103
|
-
}, n[9] = l, n[10] = i, n[11] = I) : I = n[11];
|
|
104
|
-
const j = I;
|
|
105
|
-
d = () => {
|
|
106
|
-
f || l([...i, re()]);
|
|
107
|
-
};
|
|
108
|
-
let N;
|
|
109
|
-
n[12] !== l || n[13] !== i ? (N = (p) => l(i.filter((C, D) => D !== p)), n[12] = l, n[13] = i, n[14] = N) : N = n[14];
|
|
110
|
-
const A = N;
|
|
111
|
-
m = U, g = 1, c = 1, h = i.map((p, C) => /* @__PURE__ */ e(tn, { row: p, keyError: a ? null : ve(p.key, K), readonlyKey: a, canRemove: i.length > 1, onUpdate: (D, S) => j(C, D, S), onRemove: () => A(C) }, p.id)), n[0] = l, n[1] = a, n[2] = i, n[3] = m, n[4] = d, n[5] = f, n[6] = g, n[7] = c, n[8] = h;
|
|
112
|
-
} else
|
|
113
|
-
m = n[3], d = n[4], f = n[5], g = n[6], c = n[7], h = n[8];
|
|
114
|
-
let v;
|
|
115
|
-
n[15] !== d || n[16] !== f || n[17] !== a ? (v = !a && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(G, { size: "small", variant: "outlined", startIcon: /* @__PURE__ */ e(oe, {}), onClick: d, disabled: f, children: "Add Runtime Key" }) }), n[15] = d, n[16] = f, n[17] = a, n[18] = v) : v = n[18];
|
|
116
|
-
let b;
|
|
117
|
-
return n[19] !== m || n[20] !== g || n[21] !== c || n[22] !== h || n[23] !== v ? (b = /* @__PURE__ */ o(m, { spacing: g, pt: c, children: [
|
|
118
|
-
h,
|
|
119
|
-
v
|
|
120
|
-
] }), n[19] = m, n[20] = g, n[21] = c, n[22] = h, n[23] = v, n[24] = b) : b = n[24], b;
|
|
121
|
-
};
|
|
122
|
-
function rn(t) {
|
|
123
|
-
return t.key.trim();
|
|
124
|
-
}
|
|
125
|
-
function an(t, n) {
|
|
126
|
-
return n && t.set(n, (t.get(n) ?? 0) + 1), t;
|
|
127
|
-
}
|
|
128
|
-
const de = () => {
|
|
129
|
-
const t = he(), n = Ie(), {
|
|
130
|
-
orgId: i,
|
|
131
|
-
projectId: l,
|
|
132
|
-
agentId: a
|
|
133
|
-
} = ee(), {
|
|
134
|
-
data: m,
|
|
135
|
-
isLoading: d
|
|
136
|
-
} = Ue({
|
|
137
|
-
orgName: i,
|
|
138
|
-
kindName: a
|
|
139
|
-
}), {
|
|
140
|
-
data: f
|
|
141
|
-
} = Ge({
|
|
142
|
-
orgName: i,
|
|
143
|
-
projName: l,
|
|
144
|
-
agentName: a
|
|
145
|
-
}), {
|
|
146
|
-
data: g
|
|
147
|
-
} = me({
|
|
148
|
-
orgName: i,
|
|
149
|
-
kindName: a
|
|
150
|
-
}), c = T($.children.org.children.projects.children.agents.children.publish.path, {
|
|
151
|
-
orgId: i ?? "",
|
|
152
|
-
projectId: l ?? "",
|
|
153
|
-
agentId: a ?? ""
|
|
154
|
-
}), h = T($.children.org.children.projects.children.agents.children.publish.children.createNewVersion.path, {
|
|
155
|
-
orgId: i ?? "",
|
|
156
|
-
projectId: l ?? "",
|
|
157
|
-
agentId: a ?? ""
|
|
158
|
-
}), v = n.pathname.endsWith("/create-new-version"), [b, L] = H(""), [K, I] = H(""), [j, N] = H(""), [A, p] = H(""), [C, D] = H([re()]), {
|
|
159
|
-
addConfirmation: S
|
|
160
|
-
} = xe();
|
|
161
|
-
le(() => {
|
|
162
|
-
v && g ? (N(g.displayName ?? ""), p(g.description ?? "")) : !g && f && (N(f.displayName ?? ""), p(f.description ?? ""));
|
|
163
|
-
}, [v, g, f]);
|
|
164
|
-
const {
|
|
165
|
-
mutateAsync: P,
|
|
166
|
-
isPending: V
|
|
167
|
-
} = He(), W = M(() => b.trim() !== "" || K !== "" || j.trim() !== "" || A.trim() !== "" || C.some((u) => u.key.trim() !== ""), [b, K, j, A, C]), z = te(() => {
|
|
168
|
-
L(""), I(""), N(""), p(""), D([re()]);
|
|
169
|
-
}, []), B = te(() => {
|
|
170
|
-
W ? S({
|
|
171
|
-
title: "Discard Changes?",
|
|
172
|
-
description: "You have unsaved changes. Are you sure you want to close without saving?",
|
|
173
|
-
confirmButtonText: "Discard",
|
|
174
|
-
confirmButtonColor: "error",
|
|
175
|
-
onConfirm: () => {
|
|
176
|
-
z(), t(c);
|
|
177
|
-
}
|
|
178
|
-
}) : t(c);
|
|
179
|
-
}, [W, S, z, t, c]), Z = te(async () => {
|
|
180
|
-
const u = C.filter((_) => _.key.trim() !== "").map((_) => ({
|
|
181
|
-
name: _.key.trim(),
|
|
182
|
-
isSecret: _.isSecret,
|
|
183
|
-
isMandatory: _.isMandatory ?? !1,
|
|
184
|
-
defaultValue: _.defaultValue?.trim() || null
|
|
185
|
-
}));
|
|
186
|
-
await P({
|
|
187
|
-
params: {
|
|
188
|
-
orgName: i,
|
|
189
|
-
projName: l,
|
|
190
|
-
agentName: a
|
|
191
|
-
},
|
|
192
|
-
body: {
|
|
193
|
-
kindName: a ?? "",
|
|
194
|
-
kindDisplayName: j.trim() || void 0,
|
|
195
|
-
kindDescription: A.trim() || void 0,
|
|
196
|
-
version: b.trim(),
|
|
197
|
-
buildName: K,
|
|
198
|
-
configSchema: u
|
|
199
|
-
}
|
|
200
|
-
}), z(), t(c);
|
|
201
|
-
}, [i, l, a, b, K, j, A, C, P, z, t, c]), {
|
|
202
|
-
data: F,
|
|
203
|
-
isLoading: s
|
|
204
|
-
} = Fe({
|
|
205
|
-
orgName: i,
|
|
206
|
-
projName: l,
|
|
207
|
-
agentName: a
|
|
208
|
-
}), x = M(() => (F?.builds ?? []).filter((u) => u.status === "Completed" || u.status === "Succeeded"), [F]), E = M(() => (m ?? []).slice().sort((u, _) => new Date(_.createdAt).getTime() - new Date(u.createdAt).getTime()), [m]), k = M(() => E[0]?.version, [E]), ne = (u) => {
|
|
209
|
-
t(T($.children.org.children.projects.children.agents.children.publish.children.versionDetails.path, {
|
|
210
|
-
orgId: i ?? "",
|
|
211
|
-
projectId: l ?? "",
|
|
212
|
-
agentId: a ?? "",
|
|
213
|
-
versionId: u
|
|
214
|
-
}));
|
|
215
|
-
};
|
|
216
|
-
return /* @__PURE__ */ o(ce, { children: [
|
|
217
|
-
/* @__PURE__ */ e(Q, { title: "Publish", description: "Manage and publish versions of this Agent Kind to the catalog.", disableIcon: !0, actions: /* @__PURE__ */ e(G, { variant: "contained", component: we, to: h, startIcon: /* @__PURE__ */ e(oe, {}), color: "primary", children: "Create Version" }), children: /* @__PURE__ */ e(r.Container, { children: d ? /* @__PURE__ */ o(O, { sx: {
|
|
218
|
-
m: 2
|
|
219
|
-
}, children: [
|
|
220
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 48, sx: {
|
|
221
|
-
mb: 1
|
|
222
|
-
} }),
|
|
223
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 48, sx: {
|
|
224
|
-
mb: 1
|
|
225
|
-
} }),
|
|
226
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 48, sx: {
|
|
227
|
-
mb: 1
|
|
228
|
-
} }),
|
|
229
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 48 })
|
|
230
|
-
] }) : E.length === 0 ? /* @__PURE__ */ e(r.EmptyState, { illustration: /* @__PURE__ */ e(Ne, { size: 64 }), title: "No versions published yet", description: "Publish a build as a version to make this Agent Kind available in the catalog." }) : /* @__PURE__ */ o(r, { children: [
|
|
231
|
-
/* @__PURE__ */ e(r.Head, { children: /* @__PURE__ */ o(r.Row, { children: [
|
|
232
|
-
/* @__PURE__ */ e(r.Cell, { width: "20%", children: "Version" }),
|
|
233
|
-
/* @__PURE__ */ e(r.Cell, { width: "18%", children: "Release Date" }),
|
|
234
|
-
/* @__PURE__ */ e(r.Cell, { children: "Build Name" })
|
|
235
|
-
] }) }),
|
|
236
|
-
/* @__PURE__ */ e(r.Body, { children: E.map((u) => /* @__PURE__ */ o(r.Row, { hover: !0, clickable: !0, onClick: () => ne(u.version), children: [
|
|
237
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ o(y, { variant: "body2", fontWeight: 600, children: [
|
|
238
|
-
u.version,
|
|
239
|
-
u.version === k && /* @__PURE__ */ e(ke, { label: "Latest", size: "small", color: "primary", sx: {
|
|
240
|
-
ml: 1,
|
|
241
|
-
height: 18,
|
|
242
|
-
fontSize: "0.65rem"
|
|
243
|
-
} })
|
|
244
|
-
] }) }),
|
|
245
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: new Date(u.createdAt).toLocaleDateString(void 0, {
|
|
246
|
-
year: "numeric",
|
|
247
|
-
month: "short",
|
|
248
|
-
day: "numeric"
|
|
249
|
-
}) }) }),
|
|
250
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: u.buildName ?? "—" }) })
|
|
251
|
-
] }, u.version)) })
|
|
252
|
-
] }) }) }),
|
|
253
|
-
/* @__PURE__ */ o(je, { open: v, onClose: B, minWidth: 700, maxWidth: 700, children: [
|
|
254
|
-
/* @__PURE__ */ e(Ke, { title: "Create New Version", icon: /* @__PURE__ */ e(oe, { size: 24 }), onClose: B }),
|
|
255
|
-
/* @__PURE__ */ e(Le, { children: /* @__PURE__ */ o(w.Stack, { spacing: 3, children: [
|
|
256
|
-
!g && /* @__PURE__ */ o(w.Section, { children: [
|
|
257
|
-
/* @__PURE__ */ e(w.Subheader, { children: "Kind Details" }),
|
|
258
|
-
/* @__PURE__ */ o(w.Stack, { spacing: 2, children: [
|
|
259
|
-
/* @__PURE__ */ e(w.ElementWrapper, { label: "Display Name", name: "kindDisplayName", children: /* @__PURE__ */ e(X, { id: "kindDisplayName", placeholder: "e.g. My Agent Kind", value: j, onChange: (u) => N(u.target.value), fullWidth: !0, size: "small" }) }),
|
|
260
|
-
/* @__PURE__ */ e(w.ElementWrapper, { label: "Description", name: "kindDescription", children: /* @__PURE__ */ e(X, { id: "kindDescription", placeholder: "Describe this Agent Kind", value: A, onChange: (u) => p(u.target.value), fullWidth: !0, size: "small", multiline: !0, rows: 2 }) })
|
|
261
|
-
] })
|
|
262
|
-
] }),
|
|
263
|
-
/* @__PURE__ */ o(w.Section, { children: [
|
|
264
|
-
/* @__PURE__ */ e(w.Subheader, { children: "Version Details" }),
|
|
265
|
-
/* @__PURE__ */ o(w.Stack, { spacing: 2, children: [
|
|
266
|
-
/* @__PURE__ */ e(w.ElementWrapper, { label: "Version Name", name: "versionName", children: /* @__PURE__ */ e(X, { id: "versionName", placeholder: "e.g. 1.2.0", value: b, onChange: (u) => L(u.target.value), fullWidth: !0, size: "small" }) }),
|
|
267
|
-
/* @__PURE__ */ e(w.ElementWrapper, { label: "Build", name: "selectedBuildName", children: /* @__PURE__ */ o(Se, { id: "selectedBuildName", fullWidth: !0, size: "small", displayEmpty: !0, value: K, onChange: (u) => I(u.target.value), disabled: s, renderValue: (u) => {
|
|
268
|
-
if (!u) return /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: "Select a build" });
|
|
269
|
-
const _ = x.find((Ee) => Ee.buildName === u);
|
|
270
|
-
return _ ? _.buildName : u;
|
|
271
|
-
}, endAdornment: s ? /* @__PURE__ */ e($e, { size: 16, sx: {
|
|
272
|
-
mr: 3
|
|
273
|
-
} }) : void 0, children: [
|
|
274
|
-
x.length === 0 && !s && /* @__PURE__ */ e(J, { disabled: !0, value: "", children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: "No succeeded builds available" }) }),
|
|
275
|
-
x.map((u) => /* @__PURE__ */ e(J, { value: u.buildName, children: /* @__PURE__ */ o(O, { children: [
|
|
276
|
-
/* @__PURE__ */ e(y, { variant: "body2", fontWeight: 500, children: u.buildName }),
|
|
277
|
-
/* @__PURE__ */ o(y, { variant: "caption", color: "text.secondary", children: [
|
|
278
|
-
u.buildParameters.branch,
|
|
279
|
-
u.buildParameters.commitId ? ` · ${u.buildParameters.commitId.slice(0, 7)}` : "",
|
|
280
|
-
" · ",
|
|
281
|
-
new Date(u.startedAt).toLocaleDateString(void 0, {
|
|
282
|
-
year: "numeric",
|
|
283
|
-
month: "short",
|
|
284
|
-
day: "numeric"
|
|
285
|
-
})
|
|
286
|
-
] })
|
|
287
|
-
] }) }, u.buildName))
|
|
288
|
-
] }) })
|
|
289
|
-
] })
|
|
290
|
-
] }),
|
|
291
|
-
/* @__PURE__ */ o(w.Section, { children: [
|
|
292
|
-
/* @__PURE__ */ e(w.Subheader, { children: "Runtime Configuration" }),
|
|
293
|
-
/* @__PURE__ */ e(Re, { rows: C, onChange: D })
|
|
294
|
-
] }),
|
|
295
|
-
/* @__PURE__ */ o(O, { display: "flex", justifyContent: "flex-end", gap: 1, children: [
|
|
296
|
-
/* @__PURE__ */ e(G, { variant: "outlined", color: "inherit", onClick: B, disabled: V, children: "Cancel" }),
|
|
297
|
-
/* @__PURE__ */ e(G, { variant: "contained", color: "primary", onClick: Z, disabled: V || !b.trim() || !K, children: V ? "Creating..." : "Create Version" })
|
|
298
|
-
] })
|
|
299
|
-
] }) })
|
|
300
|
-
] })
|
|
301
|
-
] });
|
|
302
|
-
}, se = (t, n) => {
|
|
303
|
-
if (t === n)
|
|
304
|
-
return !0;
|
|
305
|
-
if (t === null || n === null || typeof t != "object" || typeof n != "object")
|
|
306
|
-
return !1;
|
|
307
|
-
if (Array.isArray(t) && Array.isArray(n))
|
|
308
|
-
return t.length !== n.length ? !1 : t.every((d, f) => se(d, n[f]));
|
|
309
|
-
if (Array.isArray(t) || Array.isArray(n))
|
|
310
|
-
return !1;
|
|
311
|
-
const i = t, l = n, a = Object.keys(i), m = Object.keys(l);
|
|
312
|
-
return a.length !== m.length ? !1 : a.every((d) => se(i[d], l[d]));
|
|
313
|
-
}, be = () => {
|
|
314
|
-
const t = he(), n = Ie(), {
|
|
315
|
-
orgId: i,
|
|
316
|
-
projectId: l,
|
|
317
|
-
agentId: a,
|
|
318
|
-
versionId: m
|
|
319
|
-
} = ee(), d = T($.children.org.children.projects.children.agents.children.publish.children.versionDetails.path, {
|
|
320
|
-
orgId: i ?? "",
|
|
321
|
-
projectId: l ?? "",
|
|
322
|
-
agentId: a ?? "",
|
|
323
|
-
versionId: m ?? ""
|
|
324
|
-
}), f = T($.children.org.children.projects.children.agents.children.publish.path, {
|
|
325
|
-
orgId: i ?? "",
|
|
326
|
-
projectId: l ?? "",
|
|
327
|
-
agentId: a ?? ""
|
|
328
|
-
}), g = n.pathname.endsWith("/edit"), {
|
|
329
|
-
data: c
|
|
330
|
-
} = me({
|
|
331
|
-
orgName: i,
|
|
332
|
-
kindName: a
|
|
333
|
-
}), {
|
|
334
|
-
data: h,
|
|
335
|
-
isLoading: v
|
|
336
|
-
} = Pe({
|
|
337
|
-
orgName: i,
|
|
338
|
-
kindName: a,
|
|
339
|
-
versionTag: m
|
|
340
|
-
}), {
|
|
341
|
-
data: b,
|
|
342
|
-
isLoading: L
|
|
343
|
-
} = Ve({
|
|
344
|
-
orgName: i,
|
|
345
|
-
projName: l,
|
|
346
|
-
agentName: a
|
|
347
|
-
}, {
|
|
348
|
-
environment: "default"
|
|
349
|
-
}), K = M(() => Object.keys(b ?? {})[0] ?? "", [b]), I = M(() => b?.[K]?.schema?.content, [b, K]), j = M(() => h ? new Date(h.createdAt).toLocaleDateString("en-US", {
|
|
350
|
-
year: "numeric",
|
|
351
|
-
month: "long",
|
|
352
|
-
day: "numeric"
|
|
353
|
-
}) : void 0, [h]), [N, A] = H(""), [p, C] = H("");
|
|
354
|
-
le(() => {
|
|
355
|
-
c && (A(c.displayName), C(c.description ?? ""));
|
|
356
|
-
}, [c]);
|
|
357
|
-
const [D, S] = H([]);
|
|
358
|
-
le(() => {
|
|
359
|
-
h && S(h.configSchema.map((k) => ({
|
|
360
|
-
...re({
|
|
361
|
-
key: k.name,
|
|
362
|
-
isSecret: k.isSecret,
|
|
363
|
-
isMandatory: k.isMandatory,
|
|
364
|
-
defaultValue: k.defaultValue ?? ""
|
|
365
|
-
})
|
|
366
|
-
})));
|
|
367
|
-
}, [h]);
|
|
368
|
-
const P = M(() => h?.configSchema.map((k) => ({
|
|
369
|
-
...re({
|
|
370
|
-
key: k.name,
|
|
371
|
-
defaultValue: k.defaultValue ?? ""
|
|
372
|
-
})
|
|
373
|
-
})) ?? [], [h]), V = c?.displayName ?? "", W = c?.description ?? "", z = !se(
|
|
374
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
375
|
-
D.map(({
|
|
376
|
-
id: k,
|
|
377
|
-
...ne
|
|
378
|
-
}) => ne),
|
|
379
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
380
|
-
P.map(({
|
|
381
|
-
id: k,
|
|
382
|
-
...ne
|
|
383
|
-
}) => ne)
|
|
384
|
-
), B = N !== V || p !== W || z, {
|
|
385
|
-
mutateAsync: Z,
|
|
386
|
-
isPending: F
|
|
387
|
-
} = Ye(), {
|
|
388
|
-
addConfirmation: s
|
|
389
|
-
} = xe(), x = te(() => {
|
|
390
|
-
B ? s({
|
|
391
|
-
title: "Discard Changes?",
|
|
392
|
-
description: "You have unsaved changes. Are you sure you want to close without saving?",
|
|
393
|
-
confirmButtonText: "Discard",
|
|
394
|
-
confirmButtonColor: "error",
|
|
395
|
-
onConfirm: () => {
|
|
396
|
-
A(V), C(W), S(P.map((k) => ({
|
|
397
|
-
...k
|
|
398
|
-
}))), t(d);
|
|
399
|
-
}
|
|
400
|
-
}) : t(d);
|
|
401
|
-
}, [B, s, V, W, P, t, d]), E = te(async () => {
|
|
402
|
-
a && i && (await Z({
|
|
403
|
-
params: {
|
|
404
|
-
orgName: i,
|
|
405
|
-
kindName: a
|
|
406
|
-
},
|
|
407
|
-
body: {
|
|
408
|
-
displayName: N.trim(),
|
|
409
|
-
description: p.trim() || void 0
|
|
410
|
-
}
|
|
411
|
-
}), t(d));
|
|
412
|
-
}, [i, a, N, p, Z, t, d]);
|
|
413
|
-
return /* @__PURE__ */ o(ce, { children: [
|
|
414
|
-
/* @__PURE__ */ e(Q, { title: `${N || a} ${m}`, description: h ? `Build Id: ${h.buildName ?? "—"}` : "", disableIcon: !0, backHref: f, backLabel: "Back to Publish", actions: /* @__PURE__ */ e(G, { variant: "outlined", startIcon: /* @__PURE__ */ e(ue, {}), onClick: () => t(d + "/edit"), children: "Edit" }), children: v ? /* @__PURE__ */ o(O, { sx: {
|
|
415
|
-
p: 2
|
|
416
|
-
}, children: [
|
|
417
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 32, sx: {
|
|
418
|
-
mb: 2,
|
|
419
|
-
maxWidth: 320
|
|
420
|
-
} }),
|
|
421
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 48, sx: {
|
|
422
|
-
mb: 1
|
|
423
|
-
} }),
|
|
424
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 48, sx: {
|
|
425
|
-
mb: 1
|
|
426
|
-
} }),
|
|
427
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 48 })
|
|
428
|
-
] }) : h ? /* @__PURE__ */ o(U, { spacing: 3, children: [
|
|
429
|
-
/* @__PURE__ */ o(U, { direction: "row", spacing: 1, alignItems: "center", flexWrap: "wrap", children: [
|
|
430
|
-
h.agentSubType && /* @__PURE__ */ e(ke, { label: h.agentSubType, size: "small", variant: "outlined" }),
|
|
431
|
-
j && /* @__PURE__ */ o(y, { variant: "body2", color: "text.secondary", children: [
|
|
432
|
-
"Published on ",
|
|
433
|
-
j
|
|
434
|
-
] })
|
|
435
|
-
] }),
|
|
436
|
-
/* @__PURE__ */ e(ie, {}),
|
|
437
|
-
/* @__PURE__ */ o(U, { spacing: 1.5, children: [
|
|
438
|
-
/* @__PURE__ */ e(y, { variant: "subtitle1", fontWeight: 600, children: "Configuration Schema" }),
|
|
439
|
-
h.configSchema.length > 0 ? /* @__PURE__ */ e(r.Container, { children: /* @__PURE__ */ o(r, { children: [
|
|
440
|
-
/* @__PURE__ */ e(r.Head, { children: /* @__PURE__ */ o(r.Row, { children: [
|
|
441
|
-
/* @__PURE__ */ e(r.Cell, { width: "25%", children: "Name" }),
|
|
442
|
-
/* @__PURE__ */ e(r.Cell, { width: "30%", children: "Description" }),
|
|
443
|
-
/* @__PURE__ */ e(r.Cell, { width: "15%", children: "Mandatory" }),
|
|
444
|
-
/* @__PURE__ */ e(r.Cell, { width: "15%", children: "Secret" }),
|
|
445
|
-
/* @__PURE__ */ e(r.Cell, { width: "15%", children: "Default Value" })
|
|
446
|
-
] }) }),
|
|
447
|
-
/* @__PURE__ */ e(r.Body, { children: h.configSchema.map((k) => /* @__PURE__ */ o(r.Row, { children: [
|
|
448
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", fontWeight: 500, children: k.name }) }),
|
|
449
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: k.description ?? "—" }) }),
|
|
450
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: k.isMandatory ? "Yes" : "No" }) }),
|
|
451
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: k.isSecret ? "Yes" : "No" }) }),
|
|
452
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: k.defaultValue ?? "—" }) })
|
|
453
|
-
] }, k.name)) })
|
|
454
|
-
] }) }) : /* @__PURE__ */ e(q, { severity: "info", children: "No configuration schema defined for this version." })
|
|
455
|
-
] }),
|
|
456
|
-
/* @__PURE__ */ e(ie, {}),
|
|
457
|
-
/* @__PURE__ */ o(U, { spacing: 1.5, children: [
|
|
458
|
-
/* @__PURE__ */ e(y, { variant: "subtitle1", fontWeight: 600, children: "API Specification" }),
|
|
459
|
-
L ? /* @__PURE__ */ e(R, { variant: "rounded", height: 300 }) : I ? /* @__PURE__ */ e(ze, { spec: I, docExpansion: "list", hideInfoSection: !0, hideServers: !0, hideAuthorizeButton: !0 }) : /* @__PURE__ */ e(q, { severity: "info", children: "No API specification available for this version." })
|
|
460
|
-
] })
|
|
461
|
-
] }) : /* @__PURE__ */ e(q, { severity: "error", children: "Version not found." }) }),
|
|
462
|
-
/* @__PURE__ */ o(je, { open: g, onClose: x, minWidth: 700, maxWidth: 700, children: [
|
|
463
|
-
/* @__PURE__ */ e(Ke, { title: "Edit Agent Kind", icon: /* @__PURE__ */ e(ue, { size: 24 }), onClose: x }),
|
|
464
|
-
/* @__PURE__ */ e(Le, { children: /* @__PURE__ */ o(w.Stack, { spacing: 3, children: [
|
|
465
|
-
/* @__PURE__ */ o(w.Section, { children: [
|
|
466
|
-
/* @__PURE__ */ e(w.Subheader, { children: "Kind Details" }),
|
|
467
|
-
/* @__PURE__ */ o(w.Stack, { spacing: 2, children: [
|
|
468
|
-
/* @__PURE__ */ e(w.ElementWrapper, { label: "Display Name", name: "displayName", children: /* @__PURE__ */ e(X, { id: "displayName", value: N, onChange: (k) => A(k.target.value), fullWidth: !0, size: "small" }) }),
|
|
469
|
-
/* @__PURE__ */ e(w.ElementWrapper, { label: "Description", name: "description", children: /* @__PURE__ */ e(X, { id: "description", value: p, onChange: (k) => C(k.target.value), fullWidth: !0, size: "small", multiline: !0, rows: 3 }) })
|
|
470
|
-
] })
|
|
471
|
-
] }),
|
|
472
|
-
D.length > 0 && /* @__PURE__ */ o(w.Section, { children: [
|
|
473
|
-
/* @__PURE__ */ e(w.Subheader, { children: "Configuration Schema" }),
|
|
474
|
-
/* @__PURE__ */ e(Re, { rows: D, onChange: S, readonlyKey: !0 })
|
|
475
|
-
] }),
|
|
476
|
-
/* @__PURE__ */ o(O, { display: "flex", justifyContent: "flex-end", gap: 1, children: [
|
|
477
|
-
/* @__PURE__ */ e(G, { variant: "outlined", color: "inherit", onClick: x, disabled: F, children: "Cancel" }),
|
|
478
|
-
/* @__PURE__ */ e(G, { variant: "contained", color: "primary", onClick: E, disabled: F || !N.trim(), children: F ? "Saving..." : "Save Changes" })
|
|
479
|
-
] })
|
|
480
|
-
] }) })
|
|
481
|
-
] })
|
|
482
|
-
] });
|
|
483
|
-
}, Ce = () => {
|
|
484
|
-
const t = ae(10), {
|
|
485
|
-
orgId: n,
|
|
486
|
-
projectId: i,
|
|
487
|
-
agentId: l
|
|
488
|
-
} = ee();
|
|
489
|
-
let a;
|
|
490
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ e(Y, { index: !0, element: /* @__PURE__ */ e(de, {}) }), t[0] = a) : a = t[0];
|
|
491
|
-
let m;
|
|
492
|
-
t[1] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ e(Y, { path: "create-new-version", element: /* @__PURE__ */ e(de, {}) }), t[1] = m) : m = t[1];
|
|
493
|
-
let d;
|
|
494
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ e(Y, { path: "version-details/:versionId", element: /* @__PURE__ */ e(be, {}) }), t[2] = d) : d = t[2];
|
|
495
|
-
let f;
|
|
496
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ e(Y, { path: "version-details/:versionId/edit", element: /* @__PURE__ */ e(be, {}) }), t[3] = f) : f = t[3];
|
|
497
|
-
const g = n ?? "", c = i ?? "", h = l ?? "";
|
|
498
|
-
let v;
|
|
499
|
-
t[4] !== g || t[5] !== c || t[6] !== h ? (v = T($.children.org.children.projects.children.agents.children.publish.path, {
|
|
500
|
-
orgId: g,
|
|
501
|
-
projectId: c,
|
|
502
|
-
agentId: h
|
|
503
|
-
}), t[4] = g, t[5] = c, t[6] = h, t[7] = v) : v = t[7];
|
|
504
|
-
let b;
|
|
505
|
-
return t[8] !== v ? (b = /* @__PURE__ */ o(Ae, { children: [
|
|
506
|
-
a,
|
|
507
|
-
m,
|
|
508
|
-
d,
|
|
509
|
-
f,
|
|
510
|
-
/* @__PURE__ */ e(Y, { path: "*", element: /* @__PURE__ */ e(De, { to: v }) })
|
|
511
|
-
] }), t[8] = v, t[9] = b) : b = t[9], b;
|
|
512
|
-
}, We = () => {
|
|
513
|
-
const t = he(), {
|
|
514
|
-
kindId: n,
|
|
515
|
-
orgId: i
|
|
516
|
-
} = ee(), {
|
|
517
|
-
data: l,
|
|
518
|
-
isLoading: a
|
|
519
|
-
} = me({
|
|
520
|
-
orgName: i,
|
|
521
|
-
kindName: n ?? ""
|
|
522
|
-
}), m = M(() => [...l?.versions ?? []].sort((s, x) => new Date(x.createdAt).getTime() - new Date(s.createdAt).getTime()), [l]), [d, f] = Oe(), g = m[0]?.version ?? "", c = d.get("version") ?? g, h = m.find((s) => s.version === c) ?? m[0], {
|
|
523
|
-
data: v,
|
|
524
|
-
isLoading: b
|
|
525
|
-
} = Pe({
|
|
526
|
-
orgName: i ?? "",
|
|
527
|
-
kindName: n ?? "",
|
|
528
|
-
versionTag: c
|
|
529
|
-
}), {
|
|
530
|
-
data: L,
|
|
531
|
-
isFetching: K
|
|
532
|
-
} = Ve({
|
|
533
|
-
orgName: i ?? "",
|
|
534
|
-
projName: v?.sourceProjectName,
|
|
535
|
-
agentName: v?.sourceAgentName
|
|
536
|
-
}, {
|
|
537
|
-
environment: "default"
|
|
538
|
-
}), {
|
|
539
|
-
data: I,
|
|
540
|
-
isLoading: j
|
|
541
|
-
} = qe({
|
|
542
|
-
orgName: i ?? "",
|
|
543
|
-
kindName: n ?? ""
|
|
544
|
-
}), {
|
|
545
|
-
data: N,
|
|
546
|
-
isLoading: A
|
|
547
|
-
} = Xe({
|
|
548
|
-
orgName: i
|
|
549
|
-
}), [p, C] = H(null), D = M(() => Object.keys(L ?? {})[0] ?? "", [L]), S = M(() => L?.[D]?.schema?.content, [L, D]), P = T($.children.org.children.catalog.path, {
|
|
550
|
-
orgId: i ?? ""
|
|
551
|
-
}), V = M(() => [...N?.projects ?? []].sort((s, x) => (s.displayName || s.name).localeCompare(x.displayName || x.name)), [N]), W = (s) => {
|
|
552
|
-
C(s.currentTarget);
|
|
553
|
-
}, z = () => {
|
|
554
|
-
C(null);
|
|
555
|
-
}, B = (s) => {
|
|
556
|
-
const x = T($.children.org.children.projects.children.newAgent.children.create.children.catalog.children.withKind.path, {
|
|
557
|
-
orgId: i ?? "",
|
|
558
|
-
projectId: s,
|
|
559
|
-
kindId: n ?? ""
|
|
560
|
-
}), E = c ? `${x}?version=${encodeURIComponent(c)}` : x;
|
|
561
|
-
z(), t(E);
|
|
562
|
-
}, Z = m.length > 1 && /* @__PURE__ */ e(Se, { size: "small", value: c, onChange: (s) => f((x) => {
|
|
563
|
-
const E = new URLSearchParams(x);
|
|
564
|
-
return E.set("version", s.target.value), E;
|
|
565
|
-
}), sx: {
|
|
566
|
-
minWidth: 120
|
|
567
|
-
}, children: m.map((s) => /* @__PURE__ */ o(J, { value: s.version, children: [
|
|
568
|
-
"v",
|
|
569
|
-
s.version
|
|
570
|
-
] }, s.version)) });
|
|
571
|
-
if (a)
|
|
572
|
-
return /* @__PURE__ */ e(Q, { title: n ?? "Agent Kind Details", backHref: P, backLabel: "Back to Agent Catalog", disableIcon: !0, children: /* @__PURE__ */ o(O, { sx: {
|
|
573
|
-
p: 2
|
|
574
|
-
}, children: [
|
|
575
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 32, sx: {
|
|
576
|
-
mb: 2,
|
|
577
|
-
maxWidth: 320
|
|
578
|
-
} }),
|
|
579
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 48, sx: {
|
|
580
|
-
mb: 1
|
|
581
|
-
} }),
|
|
582
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 48, sx: {
|
|
583
|
-
mb: 1
|
|
584
|
-
} }),
|
|
585
|
-
/* @__PURE__ */ e(R, { variant: "rounded", height: 200 })
|
|
586
|
-
] }) });
|
|
587
|
-
if (!l)
|
|
588
|
-
return /* @__PURE__ */ e(Q, { title: "Agent Kind Details", backHref: P, backLabel: "Back to Agent Catalog", disableIcon: !0, children: /* @__PURE__ */ o(q, { severity: "error", children: [
|
|
589
|
-
'Agent kind "',
|
|
590
|
-
n,
|
|
591
|
-
'" was not found.'
|
|
592
|
-
] }) });
|
|
593
|
-
const F = h ? `Released on ${new Date(h.createdAt).toLocaleDateString(void 0, {
|
|
594
|
-
year: "numeric",
|
|
595
|
-
month: "long",
|
|
596
|
-
day: "numeric"
|
|
597
|
-
})}` : void 0;
|
|
598
|
-
return /* @__PURE__ */ e(Q, { title: l.displayName, description: F ?? "View details of this Agent Kind.", backHref: P, backLabel: "Back to Agent Catalog", titleTail: v?.sourceProjectName && v?.sourceAgentName ? /* @__PURE__ */ e(G, { size: "small", startIcon: /* @__PURE__ */ e(ge, { size: 14 }), variant: "outlined", component: we, to: T($.children.org.children.projects.children.agents.path, {
|
|
599
|
-
orgId: i,
|
|
600
|
-
projectId: v.sourceProjectName,
|
|
601
|
-
agentId: v.sourceAgentName
|
|
602
|
-
}), target: "_blank", rel: "noopener noreferrer", children: "View Source Agent" }) : void 0, actions: [Z || void 0, /* @__PURE__ */ o(Me.Fragment, { children: [
|
|
603
|
-
/* @__PURE__ */ e(G, { startIcon: /* @__PURE__ */ e(oe, {}), variant: "contained", color: "primary", onClick: W, "aria-controls": p ? "add-instance-menu" : void 0, "aria-haspopup": "true", "aria-expanded": !!p, children: "Add Instance" }),
|
|
604
|
-
/* @__PURE__ */ e(_e, { id: "add-instance-menu", anchorEl: p, open: !!p, onClose: z, anchorOrigin: {
|
|
605
|
-
vertical: "bottom",
|
|
606
|
-
horizontal: "right"
|
|
607
|
-
}, transformOrigin: {
|
|
608
|
-
vertical: "top",
|
|
609
|
-
horizontal: "right"
|
|
610
|
-
}, children: A ? /* @__PURE__ */ e(J, { disabled: !0, children: "Loading projects..." }) : V.length > 0 ? V.map((s) => /* @__PURE__ */ e(J, { onClick: () => B(s.name), children: s.displayName || s.name }, s.name)) : /* @__PURE__ */ e(J, { disabled: !0, children: "No projects found" }) })
|
|
611
|
-
] }, "add-instance-action")], disableIcon: !0, children: /* @__PURE__ */ o(U, { spacing: 3, children: [
|
|
612
|
-
l.description && /* @__PURE__ */ o(O, { children: [
|
|
613
|
-
/* @__PURE__ */ e(y, { variant: "overline", color: "text.secondary", children: "Description" }),
|
|
614
|
-
/* @__PURE__ */ e(y, { variant: "body1", children: l.description })
|
|
615
|
-
] }),
|
|
616
|
-
/* @__PURE__ */ e(ie, {}),
|
|
617
|
-
/* @__PURE__ */ o(U, { spacing: 1.5, children: [
|
|
618
|
-
/* @__PURE__ */ e(y, { variant: "overline", color: "text.secondary", children: "Configuration Schema" }),
|
|
619
|
-
h && h.configSchema.length > 0 ? /* @__PURE__ */ e(r.Container, { children: /* @__PURE__ */ o(r, { children: [
|
|
620
|
-
/* @__PURE__ */ e(r.Head, { children: /* @__PURE__ */ o(r.Row, { children: [
|
|
621
|
-
/* @__PURE__ */ e(r.Cell, { width: "25%", children: "Name" }),
|
|
622
|
-
/* @__PURE__ */ e(r.Cell, { width: "35%", children: "Description" }),
|
|
623
|
-
/* @__PURE__ */ e(r.Cell, { width: "15%", children: "Mandatory" }),
|
|
624
|
-
/* @__PURE__ */ e(r.Cell, { width: "15%", children: "Secret" }),
|
|
625
|
-
/* @__PURE__ */ e(r.Cell, { width: "10%", children: "Default" })
|
|
626
|
-
] }) }),
|
|
627
|
-
/* @__PURE__ */ e(r.Body, { children: h.configSchema.map((s) => /* @__PURE__ */ o(r.Row, { children: [
|
|
628
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", fontWeight: 500, children: s.name }) }),
|
|
629
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: s.description ?? "—" }) }),
|
|
630
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: s.isMandatory ? "Yes" : "No" }) }),
|
|
631
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: s.isSecret ? "Yes" : "No" }) }),
|
|
632
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: s.defaultValue ?? "—" }) })
|
|
633
|
-
] }, s.name)) })
|
|
634
|
-
] }) }) : /* @__PURE__ */ e(q, { severity: "info", children: "No configuration schema defined for this version." })
|
|
635
|
-
] }),
|
|
636
|
-
/* @__PURE__ */ e(ie, {}),
|
|
637
|
-
/* @__PURE__ */ o(U, { spacing: 1.5, children: [
|
|
638
|
-
/* @__PURE__ */ e(y, { variant: "overline", color: "text.secondary", children: "Usage" }),
|
|
639
|
-
j ? /* @__PURE__ */ e(R, { variant: "rounded", height: 120 }) : I && I.length > 0 ? /* @__PURE__ */ e(r.Container, { children: /* @__PURE__ */ o(r, { children: [
|
|
640
|
-
/* @__PURE__ */ e(r.Head, { children: /* @__PURE__ */ o(r.Row, { children: [
|
|
641
|
-
/* @__PURE__ */ e(r.Cell, { children: "Agent" }),
|
|
642
|
-
/* @__PURE__ */ e(r.Cell, { children: "Project" }),
|
|
643
|
-
/* @__PURE__ */ e(r.Cell, { children: "Created" }),
|
|
644
|
-
/* @__PURE__ */ e(r.Cell, {})
|
|
645
|
-
] }) }),
|
|
646
|
-
/* @__PURE__ */ e(r.Body, { children: I.map((s) => {
|
|
647
|
-
const x = T($.children.org.children.projects.children.agents.path, {
|
|
648
|
-
orgId: i ?? "",
|
|
649
|
-
projectId: s.projectName,
|
|
650
|
-
agentId: s.name
|
|
651
|
-
});
|
|
652
|
-
return /* @__PURE__ */ o(r.Row, { onClick: () => window.open(x, "_blank", "noopener,noreferrer"), sx: {
|
|
653
|
-
cursor: "pointer",
|
|
654
|
-
"&:hover": {
|
|
655
|
-
bgcolor: "action.hover"
|
|
656
|
-
}
|
|
657
|
-
}, children: [
|
|
658
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", fontWeight: 500, children: s.displayName || s.name }) }),
|
|
659
|
-
/* @__PURE__ */ e(r.Cell, { children: /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: s.projectName }) }),
|
|
660
|
-
/* @__PURE__ */ e(r.Cell, { children: s.createdAt ? /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: Je(new Date(s.createdAt), {
|
|
661
|
-
addSuffix: !0
|
|
662
|
-
}) }) : /* @__PURE__ */ e(y, { variant: "body2", color: "text.secondary", children: "—" }) }),
|
|
663
|
-
/* @__PURE__ */ e(r.Cell, { align: "right", children: /* @__PURE__ */ e(G, { size: "small", variant: "text", endIcon: /* @__PURE__ */ e(ge, { size: 16 }), onClick: (E) => {
|
|
664
|
-
E.stopPropagation(), window.open(x, "_blank", "noopener,noreferrer");
|
|
665
|
-
}, children: "View Agent" }) })
|
|
666
|
-
] }, `${s.projectName}/${s.name}`);
|
|
667
|
-
}) })
|
|
668
|
-
] }) }) : /* @__PURE__ */ e(q, { severity: "info", children: "No agents are currently using this kind." })
|
|
669
|
-
] }),
|
|
670
|
-
/* @__PURE__ */ e(ie, {}),
|
|
671
|
-
/* @__PURE__ */ o(U, { spacing: 1.5, children: [
|
|
672
|
-
/* @__PURE__ */ e(y, { variant: "overline", color: "text.secondary", children: "API Specification" }),
|
|
673
|
-
b || K ? /* @__PURE__ */ e(R, { variant: "rounded", height: 300 }) : S ? /* @__PURE__ */ e(ze, { spec: S, docExpansion: "list", hideInfoSection: !0, hideServers: !0, hideAuthorizeButton: !0 }) : /* @__PURE__ */ e(q, { severity: "info", children: "No API specification available for this version." })
|
|
674
|
-
] })
|
|
675
|
-
] }) });
|
|
676
|
-
}, on = () => {
|
|
677
|
-
const t = ae(10), {
|
|
678
|
-
orgId: n
|
|
679
|
-
} = ee(), i = n ?? "";
|
|
680
|
-
let l;
|
|
681
|
-
t[0] !== i ? (l = {
|
|
682
|
-
orgName: i
|
|
683
|
-
}, t[0] = i, t[1] = l) : l = t[1];
|
|
684
|
-
const {
|
|
685
|
-
data: a,
|
|
686
|
-
isLoading: m
|
|
687
|
-
} = Ze(l);
|
|
688
|
-
let d;
|
|
689
|
-
t[2] !== n ? (d = (h) => T($.children.org.children.catalog.children.kindDetails.path, {
|
|
690
|
-
orgId: n ?? "",
|
|
691
|
-
kindId: h.name
|
|
692
|
-
}), t[2] = n, t[3] = d) : d = t[3];
|
|
693
|
-
const f = d;
|
|
694
|
-
let g;
|
|
695
|
-
t[4] !== a?.kinds ? (g = a?.kinds ?? [], t[4] = a?.kinds, t[5] = g) : g = t[5];
|
|
696
|
-
let c;
|
|
697
|
-
return t[6] !== f || t[7] !== m || t[8] !== g ? (c = /* @__PURE__ */ e(Q, { title: "Agent Catalog", disableIcon: !0, children: /* @__PURE__ */ e(Qe, { items: g, isLoading: m, getViewPath: f }) }), t[6] = f, t[7] = m, t[8] = g, t[9] = c) : c = t[9], c;
|
|
698
|
-
}, ln = () => {
|
|
699
|
-
const t = ae(6), {
|
|
700
|
-
orgId: n
|
|
701
|
-
} = ee();
|
|
702
|
-
let i;
|
|
703
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ e(Y, { index: !0, element: /* @__PURE__ */ e(on, {}) }), t[0] = i) : i = t[0];
|
|
704
|
-
let l;
|
|
705
|
-
t[1] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ e(Y, { path: "kind/:kindId", element: /* @__PURE__ */ e(We, {}) }), t[1] = l) : l = t[1];
|
|
706
|
-
let a;
|
|
707
|
-
t[2] !== n ? (a = T($.children.org.children.catalog.path, {
|
|
708
|
-
orgId: n
|
|
709
|
-
}), t[2] = n, t[3] = a) : a = t[3];
|
|
710
|
-
let m;
|
|
711
|
-
return t[4] !== a ? (m = /* @__PURE__ */ o(Ae, { children: [
|
|
712
|
-
i,
|
|
713
|
-
l,
|
|
714
|
-
/* @__PURE__ */ e(Y, { path: "*", element: /* @__PURE__ */ e(De, { to: a }) })
|
|
715
|
-
] }), t[4] = a, t[5] = m) : m = t[5], m;
|
|
716
|
-
}, bn = {
|
|
717
|
-
title: "Agent Kind",
|
|
718
|
-
description: "Agent Kind pages",
|
|
719
|
-
icon: Ne,
|
|
720
|
-
path: "/agent-kind",
|
|
721
|
-
component: Ce,
|
|
722
|
-
levels: {
|
|
723
|
-
component: de,
|
|
724
|
-
organization: ln,
|
|
725
|
-
kindDetails: We,
|
|
726
|
-
publishOrganization: Ce
|
|
727
|
-
}
|
|
728
|
-
};
|
|
729
|
-
export {
|
|
730
|
-
We as CatalogKindDetails,
|
|
731
|
-
Qe as CatalogKindListing,
|
|
732
|
-
ln as CatalogOrganization,
|
|
733
|
-
Ce as PublishComponent,
|
|
734
|
-
be as PublishVersionDetails,
|
|
735
|
-
de as PublishedList,
|
|
736
|
-
bn as metaData
|
|
737
|
-
};
|