@burdenoff/microfe-botmanor 2026.1127.6 → 2026.1127.7
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/botlit/components/BotVersionHistoryPanel.js +136 -128
- package/dist/botlit/components/BotVersionHistoryPanel.js.map +1 -1
- package/dist/botlit/components/VersionHistoryPanel.js +129 -110
- package/dist/botlit/components/VersionHistoryPanel.js.map +1 -1
- package/dist/botlit/hooks/internal/workspaceGateway.d.ts +2 -0
- package/dist/botlit/hooks/internal/workspaceGateway.js +6 -2
- package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -1
- package/dist/botlit/hooks/useAgents.d.ts +1 -6
- package/dist/botlit/hooks/useAgents.js +89 -123
- package/dist/botlit/hooks/useAgents.js.map +1 -1
- package/dist/botlit/hooks/useBotVersions.d.ts +2 -2
- package/dist/botlit/hooks/useBotVersions.js +20 -28
- package/dist/botlit/hooks/useBotVersions.js.map +1 -1
- package/dist/botlit/pages/AgentDetailPage.js +103 -103
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/BotDetailPage.js +1 -1
- package/dist/botlit/pages/BotDetailPage.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +99 -0
- package/dist/generated/wspace-operations.js +31 -1
- package/dist/generated/wspace-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBotVersions.js","names":["VERSION_FIELDS","
|
|
1
|
+
{"version":3,"file":"useBotVersions.js","names":["VERSION_FIELDS","PUBLISH_BOT_APP_VERSION_DOCUMENT","ROLLBACK_BOT_APP_VERSION_DOCUMENT","NO_VERSIONS","sortVersionsNewestFirst","versions","a","b","useBotVersions","variables","useMemo","botId","useWorkspacePaginatedQuery","ListBotmanorAppVersionsPageDocument","data","usePublishBotVersion","useWorkspaceMutation","changelog","useRollbackBotVersion"],"sources":["../../../src/botlit/hooks/useBotVersions.ts"],"sourcesContent":["/**\n * Bot app version history (BOFF-15360)\n * @module botlit/hooks\n *\n * A bot keeps a DRAFT version that every configuration change rewrites, a\n * PUBLISHED version that is live, and HISTORICAL ones. These hooks list the\n * versions of one bot, publish its draft with a changelog and roll back to an\n * earlier version (the server records the rollback as a new published version).\n */\n\nimport { gql } from '@apollo/client';\nimport { useMemo } from 'react';\nimport {\n ListBotmanorAppVersionsPageDocument,\n type ListBotmanorAppVersionsPageQuery,\n} from '../../generated/wspace-operations';\n\nimport {\n useWorkspaceMutation,\n useWorkspacePaginatedQuery,\n type PaginatedQueryResult,\n} from './internal/workspaceGateway';\n\nexport type BotVersionStatus = 'DRAFT' | 'PUBLISHED' | 'HISTORICAL';\n\nexport interface BotVersionRecord {\n id: string;\n botAppId: string;\n version: string;\n status: BotVersionStatus | string;\n changelog?: string | null;\n createdAt?: string | null;\n publishedAt?: string | null;\n}\n\ninterface PublishBotAppVersionData {\n publishBotAppVersion?: BotVersionRecord | null;\n}\n\ninterface RollbackBotAppVersionData {\n rollbackBotAppVersion?: BotVersionRecord | null;\n}\n\nconst VERSION_FIELDS = `\n id\n botAppId\n version\n status\n changelog\n createdAt\n publishedAt\n`;\n\nconst PUBLISH_BOT_APP_VERSION_DOCUMENT = gql`\n mutation PublishBotAppVersion($botAppId: ID!, $versionId: ID!, $changelog: String) {\n publishBotAppVersion(botAppId: $botAppId, versionId: $versionId, changelog: $changelog) {\n ${VERSION_FIELDS}\n }\n }\n`;\n\nconst ROLLBACK_BOT_APP_VERSION_DOCUMENT = gql`\n mutation RollbackBotAppVersion($botAppId: ID!, $targetVersionId: ID!) {\n rollbackBotAppVersion(botAppId: $botAppId, targetVersionId: $targetVersionId) {\n ${VERSION_FIELDS}\n }\n }\n`;\n\nconst NO_VERSIONS: BotVersionRecord[] = [];\n\n/** Newest first, whatever order the server returned. */\nexport function sortVersionsNewestFirst(versions: readonly BotVersionRecord[]): BotVersionRecord[] {\n return [...versions].sort((a, b) =>\n a.createdAt && b.createdAt ? b.createdAt.localeCompare(a.createdAt) : 0\n );\n}\n\ntype BotVersionListItem =\n ListBotmanorAppVersionsPageQuery['listBotmanorAppVersionsPage']['items'][number];\n\nexport function useBotVersions(\n botId: string | undefined\n): PaginatedQueryResult<BotVersionRecord[]> {\n const variables = useMemo(() => ({ botAppId: botId }), [botId]);\n return useWorkspacePaginatedQuery<\n ListBotmanorAppVersionsPageQuery,\n BotVersionListItem,\n BotVersionRecord[]\n >({\n document: ListBotmanorAppVersionsPageDocument,\n variables,\n pageSize: 50,\n extractRows: (data) => data?.listBotmanorAppVersionsPage.items,\n extractNextOffset: (data) => data?.listBotmanorAppVersionsPage.nextOffset ?? null,\n select: sortVersionsNewestFirst,\n fallback: NO_VERSIONS,\n enabled: Boolean(botId),\n errorMessage: 'Failed to load bot versions',\n });\n}\n\nexport interface PublishBotVersionInput {\n botId: string;\n versionId: string;\n changelog?: string;\n}\n\nexport function usePublishBotVersion() {\n return useWorkspaceMutation<PublishBotAppVersionData, PublishBotVersionInput, BotVersionRecord>({\n document: PUBLISH_BOT_APP_VERSION_DOCUMENT,\n variables: ({ botId, versionId, changelog }) => ({\n botAppId: botId,\n versionId,\n changelog: changelog?.trim() || undefined,\n }),\n select: (data) => data?.publishBotAppVersion ?? undefined,\n errorMessage: 'Failed to publish the bot version',\n });\n}\n\nexport interface RollbackBotVersionInput {\n botId: string;\n targetVersionId: string;\n}\n\nexport function useRollbackBotVersion() {\n return useWorkspaceMutation<RollbackBotAppVersionData, RollbackBotVersionInput, BotVersionRecord>(\n {\n document: ROLLBACK_BOT_APP_VERSION_DOCUMENT,\n variables: ({ botId, targetVersionId }) => ({ botAppId: botId, targetVersionId }),\n select: (data) => data?.rollbackBotAppVersion ?? undefined,\n errorMessage: 'Failed to roll back the bot version',\n }\n );\n}\n"],"mappings":";;;;;AA2CA,IAAMA,IAAiB,sFAUjBC,IAAmC,CAAG;;;QAGpCD,EAAe;;;GAKjBE,IAAoC,CAAG;;;QAGrCF,EAAe;;;GAKjBG,IAAkC,CAAC;AAGzC,SAAgBC,EAAwB,GAA2D;CACjG,OAAO,CAAC,GAAGC,CAAQ,CAAC,CAAC,MAAM,GAAG,MAC5BC,EAAE,aAAaC,EAAE,YAAYA,EAAE,UAAU,cAAcD,EAAE,SAAS,IAAI,CACxE;AACF;AAKA,SAAgBE,EACd,GAC0C;CAC1C,IAAMC,IAAYC,SAAe,EAAE,UAAUC,EAAM,IAAI,CAACA,CAAK,CAAC;CAC9D,OAAOC,EAIL;EACA,UAAUC;EACV;EACA,UAAU;EACV,cAAc,MAASC,GAAM,4BAA4B;EACzD,oBAAoB,MAASA,GAAM,4BAA4B,cAAc;EAC7E,QAAQV;EACR,UAAUD;EACV,SAAS,EAAQQ;EACjB,cAAc;CAChB,CAAC;AACH;AAQA,SAAgBI,IAAuB;CACrC,OAAOC,EAAyF;EAC9F,UAAUf;EACV,YAAY,EAAE,UAAO,cAAW,oBAAiB;GAC/C,UAAUU;GACV;GACA,WAAWM,GAAW,KAAK,KAAK,KAAA;EAClC;EACA,SAAS,MAASH,GAAM,wBAAwB,KAAA;EAChD,cAAc;CAChB,CAAC;AACH;AAOA,SAAgBI,IAAwB;CACtC,OAAOF,EACL;EACE,UAAUd;EACV,YAAY,EAAE,UAAO,0BAAuB;GAAE,UAAUS;GAAO;EAAgB;EAC/E,SAAS,MAASG,GAAM,yBAAyB,KAAA;EACjD,cAAc;CAChB,CACF;AACF"}
|
|
@@ -82,7 +82,7 @@ var He = "🤖", Ue = [
|
|
|
82
82
|
confirm: !1
|
|
83
83
|
}]
|
|
84
84
|
}, A = () => {
|
|
85
|
-
let E = e(), { agentId: D, botId: O } = je(), { navigateTo: k } = Ce(),
|
|
85
|
+
let E = e(), { agentId: D, botId: O } = je(), { navigateTo: k, workspaceId: A } = Ce(), j = ne(), { data: M, loading: Ge, error: N, refetch: P } = de(D), [F, Ke] = he(), [qe, Je] = pe(), Ye = me(), [Xe] = Me(), [I, L] = De(() => Ue.find((e) => e === Xe.get("tab")) ?? "overview"), R = _e(), z = ge(), Ze = R.data, B = z.data, Qe = oe(), $e = ve(), et = fe(), V = O ? `bots/${O}/agents` : "agents";
|
|
86
86
|
if (Ge) return /* @__PURE__ */ g(t, {
|
|
87
87
|
title: E("botlit.common.loading", "Loading..."),
|
|
88
88
|
children: /* @__PURE__ */ g("div", {
|
|
@@ -92,15 +92,15 @@ var He = "🤖", Ue = [
|
|
|
92
92
|
className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg"
|
|
93
93
|
})
|
|
94
94
|
});
|
|
95
|
-
if (
|
|
95
|
+
if (N) return /* @__PURE__ */ g(t, {
|
|
96
96
|
title: E("botlit.agentDetail.errorTitle", "Agent"),
|
|
97
97
|
children: /* @__PURE__ */ g(te, {
|
|
98
98
|
resource: E("botlit.agentDetail.resource", "this agent"),
|
|
99
|
-
error:
|
|
100
|
-
onRetry: () => void
|
|
99
|
+
error: N,
|
|
100
|
+
onRetry: () => void P()
|
|
101
101
|
})
|
|
102
102
|
});
|
|
103
|
-
if (!
|
|
103
|
+
if (!M) return /* @__PURE__ */ g(t, {
|
|
104
104
|
title: E("botlit.agentDetail.notFound.title", "Agent Not Found"),
|
|
105
105
|
children: /* @__PURE__ */ g(ee, {
|
|
106
106
|
kind: "not-found",
|
|
@@ -108,13 +108,13 @@ var He = "🤖", Ue = [
|
|
|
108
108
|
title: E("botlit.agentDetail.notFound.title", "Agent Not Found"),
|
|
109
109
|
description: E("botlit.agentDetail.notFound.description", "The agent you're looking for doesn't exist."),
|
|
110
110
|
action: /* @__PURE__ */ g(c, {
|
|
111
|
-
onClick: () => k(
|
|
111
|
+
onClick: () => k(V),
|
|
112
112
|
children: E("botlit.agentDetail.notFound.backAction", "Back to Agents")
|
|
113
113
|
})
|
|
114
114
|
})
|
|
115
115
|
});
|
|
116
|
-
let
|
|
117
|
-
let t =
|
|
116
|
+
let H = M.systemPrompt || "", U = M.llmModelId || "", W = ($e.data ?? []).find((e) => e.id === U), G = W ? `${W.name} (${W.modelId})` : U || "Not configured", tt = M.temperature, nt = M.maxTokens, K = M.mcpConnectionIds ?? [], q = M.knowledgeBaseIds ?? [], J = M.workflowIds ?? [], Y = M.capabilities ?? [], X = M.maxConcurrentExecutions || 10, Z = !!Qe.data?.requireActivationApproval && (M.status === "DRAFT" || M.status === "ARCHIVED") && !M.currentVersionId, Q = new Map(Ze.map((e) => [e.id, e.name])), rt = new Map(B.map((e) => [e.id, e.name])), it = Y.includes("RAG") && !z.loading && !z.error ? q.flatMap((e) => {
|
|
117
|
+
let t = B.find((t) => t.id === e);
|
|
118
118
|
return t ? t.indexStatus === "READY" ? [] : [{
|
|
119
119
|
id: e,
|
|
120
120
|
name: t.name,
|
|
@@ -124,10 +124,10 @@ var He = "🤖", Ue = [
|
|
|
124
124
|
name: null,
|
|
125
125
|
status: "MISSING"
|
|
126
126
|
}];
|
|
127
|
-
}) : [],
|
|
128
|
-
switch (
|
|
127
|
+
}) : [], at = (e, t, n, r) => t.get(e) ?? (n.loading ? E("botlit.agentDetail.resourceLoading", "Loading…") : n.error ? E("botlit.agentDetail.resourceUnnamed", "Name unavailable") : E(r, "No longer available")), ot = (() => {
|
|
128
|
+
switch (M.status) {
|
|
129
129
|
case "ACTIVE": return null;
|
|
130
|
-
case "DRAFT": return
|
|
130
|
+
case "DRAFT": return Z ? E("botlit.agentDetail.reason.pendingApproval", "This agent is a draft. This workspace needs a reviewer to approve it before it goes live: use Request activation.") : M.currentVersionId ? E("botlit.agentDetail.reason.deactivated", "This agent was taken out of service and is a draft again. Activate it to put it back live.") : E("botlit.agentDetail.reason.neverPublished", "This agent is a draft that was never published, so it does not answer bots yet. Activate it to publish it.");
|
|
131
131
|
case "PAUSED": return E("botlit.agentDetail.reason.paused", "This agent is paused and does not answer bots or other agents. Resume it to put it back live.");
|
|
132
132
|
case "TRAINING": return E("botlit.agentDetail.reason.training", "This agent is in training and does not answer bots or other agents yet.");
|
|
133
133
|
case "ARCHIVED": return E("botlit.agentDetail.reason.archived", "This agent is archived and does not answer. Restore it to bring it back as a draft.");
|
|
@@ -165,25 +165,25 @@ var He = "🤖", Ue = [
|
|
|
165
165
|
error: E("botlit.agentDetail.restore.error", "Failed to restore agent")
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
|
-
},
|
|
168
|
+
}, st = async (e) => {
|
|
169
169
|
if (!D) return;
|
|
170
|
-
let t = $(e.key,
|
|
170
|
+
let t = $(e.key, M.name);
|
|
171
171
|
if (!(e.confirm && t.confirmTitle && t.confirmMessage && !await m({
|
|
172
172
|
title: t.confirmTitle,
|
|
173
173
|
message: t.confirmMessage,
|
|
174
174
|
confirmLabel: t.label,
|
|
175
175
|
cancelLabel: E("botlit.common.cancel", "Cancel")
|
|
176
176
|
}))) try {
|
|
177
|
-
await
|
|
177
|
+
await F({
|
|
178
178
|
agentId: D,
|
|
179
179
|
input: { status: e.to }
|
|
180
|
-
}), await
|
|
180
|
+
}), await P(), T.success(t.success);
|
|
181
181
|
} catch (e) {
|
|
182
182
|
T.error(e instanceof Error ? e.message : t.error);
|
|
183
183
|
}
|
|
184
|
-
},
|
|
184
|
+
}, ct = async () => {
|
|
185
185
|
if (!D) return;
|
|
186
|
-
let e = await Ye(D).catch(() => null), t = Te(E,
|
|
186
|
+
let e = await Ye(D).catch(() => null), t = Te(E, M.name, e);
|
|
187
187
|
if (await m({
|
|
188
188
|
title: E("botlit.agentsList.delete.title", "Delete agent?"),
|
|
189
189
|
message: t,
|
|
@@ -194,11 +194,11 @@ var He = "🤖", Ue = [
|
|
|
194
194
|
T.error(E("botlit.agentDetail.delete.error", "Failed to delete agent"));
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
T.success(E("botlit.agentDetail.delete.success", "Agent \"{{name}}\" deleted successfully", { name:
|
|
197
|
+
T.success(E("botlit.agentDetail.delete.success", "Agent \"{{name}}\" deleted successfully", { name: M.name })), k(V);
|
|
198
198
|
} catch (e) {
|
|
199
199
|
T.error(e instanceof Error ? e.message : E("botlit.agentDetail.delete.error", "Failed to delete agent"));
|
|
200
200
|
}
|
|
201
|
-
},
|
|
201
|
+
}, lt = [
|
|
202
202
|
{
|
|
203
203
|
id: "assistant",
|
|
204
204
|
label: "Assistant setup",
|
|
@@ -256,12 +256,12 @@ var He = "🤖", Ue = [
|
|
|
256
256
|
}
|
|
257
257
|
];
|
|
258
258
|
return /* @__PURE__ */ _(t, {
|
|
259
|
-
title:
|
|
259
|
+
title: M.name,
|
|
260
260
|
leading: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(c, {
|
|
261
261
|
variant: "ghost",
|
|
262
262
|
size: "icon",
|
|
263
263
|
"aria-label": E("botlit.agentDetail.back", "Back to agents"),
|
|
264
|
-
onClick: () => k(
|
|
264
|
+
onClick: () => k(V),
|
|
265
265
|
children: /* @__PURE__ */ g(Ne, {
|
|
266
266
|
size: 20,
|
|
267
267
|
"aria-hidden": "true"
|
|
@@ -269,32 +269,32 @@ var He = "🤖", Ue = [
|
|
|
269
269
|
}), /* @__PURE__ */ g("span", {
|
|
270
270
|
className: "text-3xl",
|
|
271
271
|
"aria-hidden": "true",
|
|
272
|
-
children:
|
|
272
|
+
children: M.avatar || He
|
|
273
273
|
})] }),
|
|
274
|
-
meta: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(u, { status:
|
|
274
|
+
meta: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(u, { status: M.status }), /* @__PURE__ */ g(l, {
|
|
275
275
|
variant: "outline",
|
|
276
|
-
children:
|
|
276
|
+
children: M.slug
|
|
277
277
|
})] }),
|
|
278
|
-
description:
|
|
278
|
+
description: M.description,
|
|
279
279
|
actions: /* @__PURE__ */ _("div", {
|
|
280
280
|
className: "flex gap-2",
|
|
281
281
|
children: [
|
|
282
282
|
/* @__PURE__ */ g(f, {
|
|
283
283
|
permission: d.AGENT_UPDATE,
|
|
284
|
-
children:
|
|
284
|
+
children: Z ? /* @__PURE__ */ g(c, {
|
|
285
285
|
variant: "default",
|
|
286
286
|
onClick: () => {
|
|
287
|
-
|
|
287
|
+
L("overview"), requestAnimationFrame(() => document.querySelector("[data-testid=\"agent-approval-panel\"]")?.scrollIntoView({
|
|
288
288
|
behavior: "smooth",
|
|
289
289
|
block: "start"
|
|
290
290
|
}));
|
|
291
291
|
},
|
|
292
292
|
children: E("botlit.agentApproval.requestAction", "Request activation")
|
|
293
|
-
}) : (We[
|
|
293
|
+
}) : (We[M.status] ?? []).map((e) => /* @__PURE__ */ g(c, {
|
|
294
294
|
variant: e.variant,
|
|
295
295
|
isLoading: Ke.loading,
|
|
296
|
-
onClick: () => void
|
|
297
|
-
children: $(e.key,
|
|
296
|
+
onClick: () => void st(e),
|
|
297
|
+
children: $(e.key, M.name).label
|
|
298
298
|
}, e.key))
|
|
299
299
|
}),
|
|
300
300
|
/* @__PURE__ */ g(f, {
|
|
@@ -320,20 +320,20 @@ var He = "🤖", Ue = [
|
|
|
320
320
|
variant: "destructive",
|
|
321
321
|
leftIcon: /* @__PURE__ */ g(Ve, { size: 16 }),
|
|
322
322
|
isLoading: Je.loading,
|
|
323
|
-
onClick: () => void
|
|
323
|
+
onClick: () => void ct(),
|
|
324
324
|
children: E("botlit.common.delete", "Delete")
|
|
325
325
|
})
|
|
326
326
|
})
|
|
327
327
|
]
|
|
328
328
|
}),
|
|
329
329
|
children: [
|
|
330
|
-
|
|
330
|
+
ot && /* @__PURE__ */ g("div", {
|
|
331
331
|
role: "status",
|
|
332
332
|
"data-testid": "agent-status-reason",
|
|
333
333
|
className: "mb-4 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm text-text-primary",
|
|
334
|
-
children:
|
|
334
|
+
children: ot
|
|
335
335
|
}),
|
|
336
|
-
|
|
336
|
+
it.length > 0 && /* @__PURE__ */ _("div", {
|
|
337
337
|
role: "status",
|
|
338
338
|
"data-testid": "agent-knowledge-warning",
|
|
339
339
|
className: "mb-4 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm text-text-primary",
|
|
@@ -342,7 +342,7 @@ var He = "🤖", Ue = [
|
|
|
342
342
|
children: E("botlit.agentDetail.knowledgeWarning.title", "This agent cannot answer right now: a knowledge base it uses cannot be searched.")
|
|
343
343
|
}), /* @__PURE__ */ g("ul", {
|
|
344
344
|
className: "mt-1 list-disc pl-5",
|
|
345
|
-
children:
|
|
345
|
+
children: it.map((e) => /* @__PURE__ */ g("li", { children: e.name === null ? E("botlit.agentDetail.knowledgeWarning.missing", "A knowledge base that no longer exists ({{id}}). Remove it from the agent.", { id: e.id }) : E("botlit.agentDetail.knowledgeWarning.notReady", "\"{{name}}\" is {{status}}.", {
|
|
346
346
|
name: e.name,
|
|
347
347
|
status: E(`botlit.status.${e.status.toLowerCase()}`, e.status.toLowerCase())
|
|
348
348
|
}) }, e.id))
|
|
@@ -351,18 +351,18 @@ var He = "🤖", Ue = [
|
|
|
351
351
|
/* @__PURE__ */ _("div", {
|
|
352
352
|
className: "space-y-6",
|
|
353
353
|
children: [
|
|
354
|
-
|
|
354
|
+
I === "assistant" && D && /* @__PURE__ */ _("div", {
|
|
355
355
|
className: "space-y-5",
|
|
356
356
|
children: [
|
|
357
|
-
|
|
357
|
+
j(d.AGENT_UPDATE) && /* @__PURE__ */ g(se, {
|
|
358
358
|
agentId: D,
|
|
359
|
-
onConfigured: () => void
|
|
359
|
+
onConfigured: () => void P()
|
|
360
360
|
}),
|
|
361
|
-
|
|
361
|
+
j(d.AGENT_PUBLISH) && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(le, {
|
|
362
362
|
agentId: D,
|
|
363
|
-
knowledgeBaseIds:
|
|
363
|
+
knowledgeBaseIds: q
|
|
364
364
|
}), /* @__PURE__ */ g(ce, { agentId: D })] }),
|
|
365
|
-
!
|
|
365
|
+
!j(d.AGENT_UPDATE) && !j(d.AGENT_PUBLISH) && /* @__PURE__ */ g("p", {
|
|
366
366
|
role: "status",
|
|
367
367
|
className: "text-sm text-text-secondary",
|
|
368
368
|
children: E("botlit.agentDetail.assistant.readOnly", "Assistant setup and publishing are available to members who can edit or publish agents in this workspace.")
|
|
@@ -375,13 +375,13 @@ var He = "🤖", Ue = [
|
|
|
375
375
|
}),
|
|
376
376
|
/* @__PURE__ */ g("div", {
|
|
377
377
|
className: "flex gap-1 border-b border-border-subtle overflow-x-auto",
|
|
378
|
-
children:
|
|
379
|
-
onClick: () =>
|
|
380
|
-
className: we("flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap",
|
|
378
|
+
children: lt.map((e) => /* @__PURE__ */ _("button", {
|
|
379
|
+
onClick: () => L(e.id),
|
|
380
|
+
className: we("flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors whitespace-nowrap", I === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
381
381
|
children: [e.icon, e.label]
|
|
382
382
|
}, e.id))
|
|
383
383
|
}),
|
|
384
|
-
|
|
384
|
+
I === "overview" && /* @__PURE__ */ _("div", {
|
|
385
385
|
className: "space-y-6",
|
|
386
386
|
children: [
|
|
387
387
|
/* @__PURE__ */ g(ke, {
|
|
@@ -399,14 +399,14 @@ var He = "🤖", Ue = [
|
|
|
399
399
|
label: E("botlit.agentDetail.nextSteps.prompt", "Refine the system prompt"),
|
|
400
400
|
description: E("botlit.agentDetail.nextSteps.promptDesc", "Tune its instructions and behaviour."),
|
|
401
401
|
icon: /* @__PURE__ */ g(b, { size: 16 }),
|
|
402
|
-
onClick: () =>
|
|
402
|
+
onClick: () => L("prompt")
|
|
403
403
|
},
|
|
404
404
|
{
|
|
405
405
|
id: "tools",
|
|
406
406
|
label: E("botlit.agentDetail.nextSteps.tools", "Connect tools & knowledge"),
|
|
407
407
|
description: E("botlit.agentDetail.nextSteps.toolsDesc", "Give it MCP tools and knowledge bases to work with."),
|
|
408
408
|
icon: /* @__PURE__ */ g(w, { size: 16 }),
|
|
409
|
-
onClick: () =>
|
|
409
|
+
onClick: () => L("tools")
|
|
410
410
|
},
|
|
411
411
|
{
|
|
412
412
|
id: "activate",
|
|
@@ -414,14 +414,14 @@ var He = "🤖", Ue = [
|
|
|
414
414
|
description: E("botlit.agentDetail.nextSteps.activateDesc", "Put it live so a bot can route conversations to it."),
|
|
415
415
|
icon: /* @__PURE__ */ g(C, { size: 16 }),
|
|
416
416
|
onClick: () => k(`agents/${D}/edit`),
|
|
417
|
-
done:
|
|
417
|
+
done: M.status === "ACTIVE"
|
|
418
418
|
}
|
|
419
419
|
]
|
|
420
420
|
}),
|
|
421
421
|
D && /* @__PURE__ */ g(ie, {
|
|
422
422
|
agentId: D,
|
|
423
|
-
agentStatus:
|
|
424
|
-
onChanged: () => void
|
|
423
|
+
agentStatus: M.status,
|
|
424
|
+
onChanged: () => void P()
|
|
425
425
|
}),
|
|
426
426
|
/* @__PURE__ */ g(Ee, {
|
|
427
427
|
kind: "agent",
|
|
@@ -429,7 +429,7 @@ var He = "🤖", Ue = [
|
|
|
429
429
|
}),
|
|
430
430
|
D && /* @__PURE__ */ g(ae, {
|
|
431
431
|
agentId: D,
|
|
432
|
-
onDraftChanged: () => void
|
|
432
|
+
onDraftChanged: () => void P()
|
|
433
433
|
}),
|
|
434
434
|
/* @__PURE__ */ _("div", {
|
|
435
435
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
@@ -442,69 +442,69 @@ var He = "🤖", Ue = [
|
|
|
442
442
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
443
443
|
className: "text-sm text-text-secondary",
|
|
444
444
|
children: "Status"
|
|
445
|
-
}), /* @__PURE__ */ g(u, { status:
|
|
445
|
+
}), /* @__PURE__ */ g(u, { status: M.status })] }),
|
|
446
446
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
447
447
|
className: "text-sm text-text-secondary",
|
|
448
448
|
children: "Type"
|
|
449
449
|
}), /* @__PURE__ */ g(l, {
|
|
450
450
|
variant: "outline",
|
|
451
|
-
children:
|
|
451
|
+
children: M.type
|
|
452
452
|
})] }),
|
|
453
453
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
454
454
|
className: "text-sm text-text-secondary",
|
|
455
455
|
children: "Visibility"
|
|
456
456
|
}), /* @__PURE__ */ g(l, {
|
|
457
457
|
variant: "outline",
|
|
458
|
-
children:
|
|
458
|
+
children: M.visibility
|
|
459
459
|
})] }),
|
|
460
460
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
461
461
|
className: "text-sm text-text-secondary",
|
|
462
462
|
children: "LLM Model"
|
|
463
463
|
}), /* @__PURE__ */ g("p", {
|
|
464
464
|
className: "font-medium text-sm",
|
|
465
|
-
children:
|
|
465
|
+
children: G
|
|
466
466
|
})] }),
|
|
467
467
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
468
468
|
className: "text-sm text-text-secondary",
|
|
469
469
|
children: "MCP Connections"
|
|
470
470
|
}), /* @__PURE__ */ _("p", {
|
|
471
471
|
className: "font-medium",
|
|
472
|
-
children: [
|
|
472
|
+
children: [K.length, " servers"]
|
|
473
473
|
})] }),
|
|
474
474
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
475
475
|
className: "text-sm text-text-secondary",
|
|
476
476
|
children: "Knowledge Bases"
|
|
477
477
|
}), /* @__PURE__ */ _("p", {
|
|
478
478
|
className: "font-medium",
|
|
479
|
-
children: [
|
|
479
|
+
children: [q.length, " KBs"]
|
|
480
480
|
})] }),
|
|
481
481
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
482
482
|
className: "text-sm text-text-secondary",
|
|
483
483
|
children: "Max Concurrent"
|
|
484
484
|
}), /* @__PURE__ */ g("p", {
|
|
485
485
|
className: "font-medium",
|
|
486
|
-
children:
|
|
486
|
+
children: X
|
|
487
487
|
})] }),
|
|
488
488
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
489
489
|
className: "text-sm text-text-secondary",
|
|
490
490
|
children: "Executions"
|
|
491
491
|
}), /* @__PURE__ */ g("p", {
|
|
492
492
|
className: "font-medium",
|
|
493
|
-
children:
|
|
493
|
+
children: M.executionCount ?? 0
|
|
494
494
|
})] }),
|
|
495
495
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
496
496
|
className: "text-sm text-text-secondary",
|
|
497
497
|
children: "Created"
|
|
498
498
|
}), /* @__PURE__ */ g("p", {
|
|
499
499
|
className: "font-medium",
|
|
500
|
-
children: p(
|
|
500
|
+
children: p(M.createdAt)
|
|
501
501
|
})] }),
|
|
502
502
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
503
503
|
className: "text-sm text-text-secondary",
|
|
504
504
|
children: "Updated"
|
|
505
505
|
}), /* @__PURE__ */ g("p", {
|
|
506
506
|
className: "font-medium",
|
|
507
|
-
children: p(
|
|
507
|
+
children: p(M.updatedAt)
|
|
508
508
|
})] })
|
|
509
509
|
]
|
|
510
510
|
})]
|
|
@@ -516,9 +516,9 @@ var He = "🤖", Ue = [
|
|
|
516
516
|
children: [/* @__PURE__ */ g("h3", {
|
|
517
517
|
className: "mb-4 text-lg font-semibold tracking-tight text-text-primary",
|
|
518
518
|
children: E("botlit.agentDetail.capabilities.title", "Capabilities")
|
|
519
|
-
}), /* @__PURE__ */ g("div", { children:
|
|
519
|
+
}), /* @__PURE__ */ g("div", { children: Y.length > 0 ? /* @__PURE__ */ g("div", {
|
|
520
520
|
className: "grid grid-cols-2 md:grid-cols-3 gap-4",
|
|
521
|
-
children:
|
|
521
|
+
children: Y.map((e) => /* @__PURE__ */ _("div", {
|
|
522
522
|
className: "p-3 rounded-lg border border-status-success-border bg-status-success-bg-subtle",
|
|
523
523
|
children: [/* @__PURE__ */ g("p", {
|
|
524
524
|
className: "font-medium",
|
|
@@ -537,14 +537,14 @@ var He = "🤖", Ue = [
|
|
|
537
537
|
className: "lg:col-span-3",
|
|
538
538
|
children: [/* @__PURE__ */ g(o, { children: /* @__PURE__ */ g(s, { children: E("botlit.agentDetail.tags.title", "Tags") }) }), /* @__PURE__ */ g(i, { children: /* @__PURE__ */ g(Se, {
|
|
539
539
|
entityType: "BotmanorAgent",
|
|
540
|
-
entityId:
|
|
541
|
-
tags:
|
|
542
|
-
editable:
|
|
540
|
+
entityId: M.id,
|
|
541
|
+
tags: M.tags,
|
|
542
|
+
editable: j(d.AGENT_UPDATE),
|
|
543
543
|
onSave: async (e) => {
|
|
544
|
-
await
|
|
545
|
-
agentId:
|
|
544
|
+
await F({
|
|
545
|
+
agentId: M.id,
|
|
546
546
|
input: { tags: e }
|
|
547
|
-
}), await
|
|
547
|
+
}), await P();
|
|
548
548
|
}
|
|
549
549
|
}) })]
|
|
550
550
|
})
|
|
@@ -552,23 +552,23 @@ var He = "🤖", Ue = [
|
|
|
552
552
|
})
|
|
553
553
|
]
|
|
554
554
|
}),
|
|
555
|
-
|
|
555
|
+
I === "prompt" && /* @__PURE__ */ _("div", {
|
|
556
556
|
className: "space-y-6",
|
|
557
557
|
children: [/* @__PURE__ */ _(r, { children: [/* @__PURE__ */ _(o, { children: [/* @__PURE__ */ _(s, {
|
|
558
558
|
className: "flex items-center gap-2",
|
|
559
559
|
children: [/* @__PURE__ */ g(b, { size: 18 }), E("botlit.agentDetail.prompt.title", "System Prompt")]
|
|
560
560
|
}), /* @__PURE__ */ g(a, { children: E("botlit.agentDetail.prompt.description", "The system prompt that defines this agent's behavior") })] }), /* @__PURE__ */ g(i, {
|
|
561
561
|
className: "space-y-4",
|
|
562
|
-
children:
|
|
562
|
+
children: H ? /* @__PURE__ */ g("pre", {
|
|
563
563
|
className: "p-4 bg-bg-sunken rounded-lg text-sm whitespace-pre-wrap font-mono",
|
|
564
|
-
children:
|
|
564
|
+
children: H
|
|
565
565
|
}) : /* @__PURE__ */ g("p", {
|
|
566
566
|
className: "text-text-secondary",
|
|
567
567
|
children: E("botlit.agentDetail.prompt.empty", "No system prompt configured")
|
|
568
568
|
})
|
|
569
569
|
})] }), D && /* @__PURE__ */ g(be, { agentId: D })]
|
|
570
570
|
}),
|
|
571
|
-
|
|
571
|
+
I === "llm" && /* @__PURE__ */ _("div", {
|
|
572
572
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
573
573
|
children: [/* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(o, { children: /* @__PURE__ */ _(s, {
|
|
574
574
|
className: "flex items-center gap-2",
|
|
@@ -581,7 +581,7 @@ var He = "🤖", Ue = [
|
|
|
581
581
|
children: "LLM Model"
|
|
582
582
|
}), /* @__PURE__ */ g("p", {
|
|
583
583
|
className: "font-medium",
|
|
584
|
-
children:
|
|
584
|
+
children: G
|
|
585
585
|
})] }),
|
|
586
586
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
587
587
|
className: "text-sm text-text-secondary",
|
|
@@ -609,33 +609,33 @@ var He = "🤖", Ue = [
|
|
|
609
609
|
children: "Max Concurrent Executions"
|
|
610
610
|
}), /* @__PURE__ */ g("p", {
|
|
611
611
|
className: "font-medium",
|
|
612
|
-
children:
|
|
612
|
+
children: X
|
|
613
613
|
})] }),
|
|
614
614
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
615
615
|
className: "text-sm text-text-secondary",
|
|
616
616
|
children: "Total Executions"
|
|
617
617
|
}), /* @__PURE__ */ g("p", {
|
|
618
618
|
className: "font-medium",
|
|
619
|
-
children:
|
|
619
|
+
children: M.executionCount ?? 0
|
|
620
620
|
})] }),
|
|
621
|
-
|
|
621
|
+
M.lastExecutedAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
622
622
|
className: "text-sm text-text-secondary",
|
|
623
623
|
children: "Last Executed"
|
|
624
624
|
}), /* @__PURE__ */ g("p", {
|
|
625
625
|
className: "font-medium",
|
|
626
|
-
children: p(
|
|
626
|
+
children: p(M.lastExecutedAt)
|
|
627
627
|
})] })
|
|
628
628
|
]
|
|
629
629
|
})] })]
|
|
630
630
|
}),
|
|
631
|
-
|
|
631
|
+
I === "tools" && /* @__PURE__ */ _("div", {
|
|
632
632
|
className: "space-y-6",
|
|
633
633
|
children: [/* @__PURE__ */ _(r, { children: [/* @__PURE__ */ _(o, { children: [/* @__PURE__ */ _(s, {
|
|
634
634
|
className: "flex items-center gap-2",
|
|
635
635
|
children: [/* @__PURE__ */ g(w, { size: 18 }), "MCP Server Connections"]
|
|
636
|
-
}), /* @__PURE__ */ g(a, { children: "Connected MCP servers providing tools" })] }), /* @__PURE__ */ g(i, { children:
|
|
636
|
+
}), /* @__PURE__ */ g(a, { children: "Connected MCP servers providing tools" })] }), /* @__PURE__ */ g(i, { children: K.length > 0 ? /* @__PURE__ */ g("div", {
|
|
637
637
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
638
|
-
children:
|
|
638
|
+
children: K.map((e) => /* @__PURE__ */ _("div", {
|
|
639
639
|
className: "flex items-center gap-3 p-4 border border-border-subtle rounded-lg",
|
|
640
640
|
children: [/* @__PURE__ */ g("div", {
|
|
641
641
|
className: "p-2 bg-action-primary-bg/10 rounded-lg",
|
|
@@ -645,21 +645,21 @@ var He = "🤖", Ue = [
|
|
|
645
645
|
})
|
|
646
646
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
647
647
|
className: "font-medium",
|
|
648
|
-
children:
|
|
649
|
-
}), !
|
|
648
|
+
children: at(e, Q, R, "botlit.agentDetail.tools.unavailable")
|
|
649
|
+
}), !Q.has(e) && /* @__PURE__ */ g("p", {
|
|
650
650
|
className: "text-sm text-text-secondary font-mono",
|
|
651
651
|
children: e
|
|
652
652
|
})] })]
|
|
653
653
|
}, e))
|
|
654
654
|
}) : /* @__PURE__ */ _("p", {
|
|
655
655
|
className: "text-text-secondary",
|
|
656
|
-
children: [E("botlit.agentDetail.tools.none", "No MCP servers connected."),
|
|
657
|
-
}) })] }),
|
|
656
|
+
children: [E("botlit.agentDetail.tools.none", "No MCP servers connected."), j(d.AGENT_UPDATE) && ` ${E("botlit.agentDetail.tools.attachHint", "Attach servers from Edit Agent.")}`]
|
|
657
|
+
}) })] }), J.length > 0 && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ g(o, { children: /* @__PURE__ */ _(s, {
|
|
658
658
|
className: "flex items-center gap-2",
|
|
659
659
|
children: [/* @__PURE__ */ g(S, { size: 18 }), "Workflows"]
|
|
660
660
|
}) }), /* @__PURE__ */ g(i, { children: /* @__PURE__ */ g("div", {
|
|
661
661
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
662
|
-
children:
|
|
662
|
+
children: J.map((e) => /* @__PURE__ */ g("div", {
|
|
663
663
|
className: "p-4 border border-border-subtle rounded-lg",
|
|
664
664
|
children: /* @__PURE__ */ g("p", {
|
|
665
665
|
className: "font-mono text-sm",
|
|
@@ -668,55 +668,55 @@ var He = "🤖", Ue = [
|
|
|
668
668
|
}, e))
|
|
669
669
|
}) })] })]
|
|
670
670
|
}),
|
|
671
|
-
|
|
671
|
+
I === "knowledge" && /* @__PURE__ */ _(r, { children: [/* @__PURE__ */ _(o, { children: [/* @__PURE__ */ _(s, {
|
|
672
672
|
className: "flex items-center gap-2",
|
|
673
673
|
children: [/* @__PURE__ */ g(v, { size: 18 }), "Knowledge Bases"]
|
|
674
|
-
}), /* @__PURE__ */ g(a, { children: "Connected knowledge bases for RAG" })] }), /* @__PURE__ */ g(i, { children:
|
|
674
|
+
}), /* @__PURE__ */ g(a, { children: "Connected knowledge bases for RAG" })] }), /* @__PURE__ */ g(i, { children: q.length > 0 ? /* @__PURE__ */ g("div", {
|
|
675
675
|
className: "space-y-4",
|
|
676
|
-
children:
|
|
676
|
+
children: q.map((e, t) => /* @__PURE__ */ _("div", {
|
|
677
677
|
className: "p-4 border border-border-subtle rounded-lg space-y-2",
|
|
678
678
|
children: [/* @__PURE__ */ _("div", {
|
|
679
679
|
className: "flex items-center justify-between",
|
|
680
680
|
children: [/* @__PURE__ */ g("p", {
|
|
681
681
|
className: "font-medium",
|
|
682
|
-
children:
|
|
682
|
+
children: at(e, rt, z, "botlit.agentDetail.knowledge.unavailable")
|
|
683
683
|
}), /* @__PURE__ */ _(l, {
|
|
684
684
|
variant: "outline",
|
|
685
685
|
children: ["#", t + 1]
|
|
686
686
|
})]
|
|
687
|
-
}), !
|
|
687
|
+
}), !rt.has(e) && /* @__PURE__ */ g("p", {
|
|
688
688
|
className: "font-mono text-sm",
|
|
689
689
|
children: e
|
|
690
690
|
})]
|
|
691
691
|
}, e))
|
|
692
692
|
}) : /* @__PURE__ */ _("p", {
|
|
693
693
|
className: "text-text-secondary",
|
|
694
|
-
children: [E("botlit.agentDetail.knowledge.none", "No knowledge bases connected."),
|
|
694
|
+
children: [E("botlit.agentDetail.knowledge.none", "No knowledge bases connected."), j(d.AGENT_UPDATE) && ` ${E("botlit.agentDetail.knowledge.attachHint", "Attach knowledge bases from Edit Agent.")}`]
|
|
695
695
|
}) })] }),
|
|
696
|
-
|
|
696
|
+
I === "handoff" && D && /* @__PURE__ */ g("div", {
|
|
697
697
|
className: "mx-auto w-full max-w-3xl",
|
|
698
698
|
children: /* @__PURE__ */ g(n, { agentId: D })
|
|
699
699
|
}),
|
|
700
|
-
|
|
701
|
-
|
|
700
|
+
I === "guardrails" && /* @__PURE__ */ g(xe, { subject: "agent" }),
|
|
701
|
+
I === "aiOperations" && D && /* @__PURE__ */ g(ue, {
|
|
702
702
|
filter: {
|
|
703
703
|
subjectType: "AGENT",
|
|
704
704
|
subjectId: D
|
|
705
705
|
},
|
|
706
706
|
description: E("botlit.agentDetail.aiOperationsDescription", "What the supervisor flagged for this agent — drift, evidence and the recommended action.")
|
|
707
707
|
}),
|
|
708
|
-
|
|
708
|
+
I === "a2a" && D && /* @__PURE__ */ g(ye, {
|
|
709
709
|
agentId: D,
|
|
710
|
-
agentName:
|
|
711
|
-
delegationEnabled:
|
|
710
|
+
agentName: M.name,
|
|
711
|
+
delegationEnabled: Y.includes("A2A"),
|
|
712
712
|
agents: et.data ?? []
|
|
713
713
|
}),
|
|
714
|
-
|
|
714
|
+
I === "versions" && D && /* @__PURE__ */ g(re, {
|
|
715
715
|
agentId: D,
|
|
716
|
-
draftVersionId:
|
|
717
|
-
currentVersionId:
|
|
718
|
-
onChanged: () => void
|
|
719
|
-
})
|
|
716
|
+
draftVersionId: M.draftVersionId,
|
|
717
|
+
currentVersionId: M.currentVersionId,
|
|
718
|
+
onChanged: () => void P()
|
|
719
|
+
}, `${A}:${D}`)
|
|
720
720
|
]
|
|
721
721
|
})
|
|
722
722
|
]
|