@burdenoff/microfe-botmanor 2026.1120.20 → 2026.1120.22
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/A2ACardVerificationCard.d.ts +8 -0
- package/dist/botlit/components/A2ACardVerificationCard.js +123 -0
- package/dist/botlit/components/A2ACardVerificationCard.js.map +1 -0
- package/dist/botlit/components/A2ARunCollaborationPanel.d.ts +4 -0
- package/dist/botlit/components/A2ARunCollaborationPanel.js +149 -0
- package/dist/botlit/components/A2ARunCollaborationPanel.js.map +1 -0
- package/dist/botlit/components/A2AVerificationBadge.d.ts +4 -0
- package/dist/botlit/components/A2AVerificationBadge.js +37 -0
- package/dist/botlit/components/A2AVerificationBadge.js.map +1 -0
- package/dist/botlit/components/AgentA2APanel.js +85 -73
- package/dist/botlit/components/AgentA2APanel.js.map +1 -1
- package/dist/botlit/hooks/index.d.ts +2 -2
- package/dist/botlit/hooks/index.js +9 -9
- package/dist/botlit/hooks/useA2A.d.ts +36 -0
- package/dist/botlit/hooks/useA2A.js +154 -109
- package/dist/botlit/hooks/useA2A.js.map +1 -1
- package/dist/botlit/hooks/useA2APlan.d.ts +8 -0
- package/dist/botlit/hooks/useA2APlan.js +24 -0
- package/dist/botlit/hooks/useA2APlan.js.map +1 -0
- package/dist/botlit/hooks/usePromptTemplates.d.ts +26 -1
- package/dist/botlit/hooks/usePromptTemplates.js +119 -52
- package/dist/botlit/hooks/usePromptTemplates.js.map +1 -1
- package/dist/botlit/pages/A2AAgentDetailPage.js +384 -342
- package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -1
- package/dist/botlit/pages/A2ARegistryPage.js +148 -140
- package/dist/botlit/pages/A2ARegistryPage.js.map +1 -1
- package/dist/botlit/pages/ExecutionDetailPage.js +172 -170
- package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -1
- package/dist/botlit/pages/PromptTemplateDetailPage.d.ts +5 -0
- package/dist/botlit/pages/PromptTemplateDetailPage.js +837 -670
- package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -1
- package/dist/botlit/pages/PromptTemplatesPage.js +264 -245
- package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -1
- package/dist/botlit/utils/a2aRunCollaboration.d.ts +37 -0
- package/dist/botlit/utils/a2aRunCollaboration.js +42 -0
- package/dist/botlit/utils/a2aRunCollaboration.js.map +1 -0
- package/dist/botlit/utils/a2aVerificationStatus.d.ts +11 -0
- package/dist/botlit/utils/a2aVerificationStatus.js +18 -0
- package/dist/botlit/utils/a2aVerificationStatus.js.map +1 -0
- package/dist/botlit/utils/leaveGuard.js +13 -12
- package/dist/botlit/utils/leaveGuard.js.map +1 -1
- package/dist/botlit/utils/promptTemplateForm.d.ts +94 -0
- package/dist/botlit/utils/promptTemplateForm.js +108 -0
- package/dist/botlit/utils/promptTemplateForm.js.map +1 -0
- package/dist/generated/wspace-operations.d.ts +159 -0
- package/dist/generated/wspace-operations.js +186 -116
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +74 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,149 +1,161 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { useTr as e } from "../../shared/hooks/useTr.js";
|
|
2
|
+
import { BOTMANOR_PERMISSIONS as t } from "../permissions/botmanorPermissions.js";
|
|
3
|
+
import { useBotmanorCan as n } from "../permissions/useBotmanorPermissions.js";
|
|
4
|
+
import { Card as r, CardContent as i, CardDescription as a, CardHeader as o, CardTitle as s } from "./Card.js";
|
|
5
|
+
import { Button as c } from "./Button.js";
|
|
6
|
+
import { Badge as l } from "./Badge.js";
|
|
7
|
+
import { FormField as u } from "./Input.js";
|
|
8
|
+
import { useAgentA2AConnections as d, useCreateA2AConnection as f, useDeleteA2AConnection as p, useSetA2AConnectionActive as m } from "../hooks/useA2AConnections.js";
|
|
9
|
+
import { confirmAction as h } from "../utils/confirmAction.js";
|
|
10
|
+
import { useA2APlanAllowance as g } from "../hooks/useA2APlan.js";
|
|
9
11
|
import "../permissions/index.js";
|
|
10
|
-
import { useState as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { Plus as
|
|
13
|
-
import { toast as
|
|
12
|
+
import { useState as _ } from "react";
|
|
13
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
14
|
+
import { AlertTriangle as b, Plus as x, Share2 as S, Trash2 as C } from "lucide-react";
|
|
15
|
+
import { toast as w } from "sonner";
|
|
14
16
|
// src/botlit/components/AgentA2APanel.tsx
|
|
15
|
-
var
|
|
16
|
-
let
|
|
17
|
-
if (e.preventDefault(), !
|
|
17
|
+
var T = "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", E = ({ agentId: E, agentName: D, delegationEnabled: O, agents: k }) => {
|
|
18
|
+
let A = n(), j = d(E), [M, N] = f(), [P] = m(), [F] = p(), I = g(), L = e(), [R, z] = _(""), [B, V] = _(), H = (e) => k.find((t) => t.id === e)?.name ?? "Unknown agent", U = new Set(j.data.map((e) => e.targetAgentId)), W = k.filter((e) => e.id !== E && !U.has(e.id)), G = async (e) => {
|
|
19
|
+
if (e.preventDefault(), !R) V("Choose the agent to delegate to.");
|
|
18
20
|
else {
|
|
19
|
-
|
|
21
|
+
V(void 0);
|
|
20
22
|
try {
|
|
21
|
-
await
|
|
22
|
-
name: `${
|
|
23
|
-
senderAgentId:
|
|
24
|
-
targetAgentId:
|
|
25
|
-
}),
|
|
23
|
+
await M({
|
|
24
|
+
name: `${D} → ${H(R)}`.slice(0, 255),
|
|
25
|
+
senderAgentId: E,
|
|
26
|
+
targetAgentId: R
|
|
27
|
+
}), w.success(`${D} can now delegate to ${H(R)}`), z(""), await j.refetch();
|
|
26
28
|
} catch (e) {
|
|
27
|
-
|
|
29
|
+
w.error(e instanceof Error ? e.message : "Failed to connect the agents");
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
|
-
},
|
|
32
|
+
}, K = async (e) => {
|
|
31
33
|
try {
|
|
32
|
-
await
|
|
34
|
+
await P({
|
|
33
35
|
id: e.id,
|
|
34
36
|
isActive: !e.isActive
|
|
35
|
-
}), await
|
|
37
|
+
}), await j.refetch();
|
|
36
38
|
} catch (e) {
|
|
37
|
-
|
|
39
|
+
w.error(e instanceof Error ? e.message : "Failed to update the connection");
|
|
38
40
|
}
|
|
39
|
-
},
|
|
40
|
-
if (await
|
|
41
|
+
}, q = async (e) => {
|
|
42
|
+
if (await h({
|
|
41
43
|
title: "Remove connection?",
|
|
42
|
-
message: `Stop ${
|
|
44
|
+
message: `Stop ${D} delegating to ${H(e.targetAgentId)}?`,
|
|
43
45
|
confirmLabel: "Remove",
|
|
44
46
|
cancelLabel: "Cancel"
|
|
45
47
|
})) try {
|
|
46
|
-
await
|
|
48
|
+
await F(e.id), w.success("Connection removed"), await j.refetch();
|
|
47
49
|
} catch (e) {
|
|
48
|
-
|
|
50
|
+
w.error(e instanceof Error ? e.message : "Failed to remove the connection");
|
|
49
51
|
}
|
|
50
52
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y(s, {
|
|
52
54
|
className: "flex items-center gap-2",
|
|
53
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ v(S, {
|
|
54
56
|
size: 18,
|
|
55
57
|
"aria-hidden": "true"
|
|
56
58
|
}), "A2A Connections"]
|
|
57
|
-
}), /* @__PURE__ */
|
|
59
|
+
}), /* @__PURE__ */ v(a, { children: "Agents this agent can hand sub-tasks to and use the answer of." })] }), /* @__PURE__ */ y(i, {
|
|
58
60
|
className: "space-y-4",
|
|
59
61
|
children: [
|
|
60
|
-
|
|
62
|
+
I.allowance === "exhausted" && /* @__PURE__ */ y("div", {
|
|
63
|
+
role: "alert",
|
|
64
|
+
"data-testid": "a2a-plan-warning",
|
|
65
|
+
className: "flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg p-3 text-sm text-status-warning-text",
|
|
66
|
+
children: [/* @__PURE__ */ v(b, {
|
|
67
|
+
size: 16,
|
|
68
|
+
className: "mt-0.5 shrink-0",
|
|
69
|
+
"aria-hidden": "true"
|
|
70
|
+
}), /* @__PURE__ */ v("p", { children: L("botlit.a2a.planWarning.exhausted", "This workspace's plan has no agent-to-agent orchestrations left, so delegations over these connections are refused. The agent then answers on its own. Agent-to-agent collaboration is included in the Pro and Enterprise plans.") })]
|
|
71
|
+
}),
|
|
72
|
+
!O && /* @__PURE__ */ v("p", {
|
|
61
73
|
role: "status",
|
|
62
74
|
className: "text-sm text-text-secondary",
|
|
63
75
|
children: "Delegation is off: turn on the “Agent delegation” capability in Edit Agent for these connections to be used."
|
|
64
76
|
}),
|
|
65
|
-
|
|
77
|
+
A(t.A2A_CREATE) && W.length > 0 && /* @__PURE__ */ y("form", {
|
|
66
78
|
noValidate: !0,
|
|
67
|
-
onSubmit: (e) => void
|
|
79
|
+
onSubmit: (e) => void G(e),
|
|
68
80
|
className: "flex flex-wrap items-end gap-3",
|
|
69
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ v(u, {
|
|
70
82
|
label: "Delegate to",
|
|
71
83
|
htmlFor: "a2a-target",
|
|
72
|
-
error:
|
|
84
|
+
error: B,
|
|
73
85
|
className: "min-w-64 flex-1",
|
|
74
|
-
children: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ y("select", {
|
|
75
87
|
id: "a2a-target",
|
|
76
|
-
className:
|
|
77
|
-
value:
|
|
78
|
-
onChange: (e) =>
|
|
79
|
-
children: [/* @__PURE__ */
|
|
88
|
+
className: T,
|
|
89
|
+
value: R,
|
|
90
|
+
onChange: (e) => z(e.target.value),
|
|
91
|
+
children: [/* @__PURE__ */ v("option", {
|
|
80
92
|
value: "",
|
|
81
93
|
children: "Choose an agent"
|
|
82
|
-
}),
|
|
94
|
+
}), W.map((e) => /* @__PURE__ */ v("option", {
|
|
83
95
|
value: e.id,
|
|
84
96
|
children: e.name
|
|
85
97
|
}, e.id))]
|
|
86
98
|
})
|
|
87
|
-
}), /* @__PURE__ */
|
|
99
|
+
}), /* @__PURE__ */ v(c, {
|
|
88
100
|
type: "submit",
|
|
89
|
-
leftIcon: /* @__PURE__ */
|
|
90
|
-
isLoading:
|
|
101
|
+
leftIcon: /* @__PURE__ */ v(x, { size: 16 }),
|
|
102
|
+
isLoading: N.loading,
|
|
91
103
|
children: "Connect"
|
|
92
104
|
})]
|
|
93
105
|
}),
|
|
94
|
-
|
|
106
|
+
j.loading && j.data.length === 0 ? /* @__PURE__ */ v("p", {
|
|
95
107
|
role: "status",
|
|
96
108
|
className: "text-sm text-text-secondary",
|
|
97
109
|
children: "Loading connections…"
|
|
98
|
-
}) :
|
|
110
|
+
}) : j.error ? /* @__PURE__ */ y("div", {
|
|
99
111
|
role: "alert",
|
|
100
112
|
className: "space-y-2",
|
|
101
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ v("p", {
|
|
102
114
|
className: "text-sm",
|
|
103
|
-
children:
|
|
104
|
-
}), /* @__PURE__ */
|
|
115
|
+
children: j.error.message
|
|
116
|
+
}), /* @__PURE__ */ v(c, {
|
|
105
117
|
size: "sm",
|
|
106
118
|
variant: "outline",
|
|
107
|
-
onClick: () => void
|
|
119
|
+
onClick: () => void j.refetch(),
|
|
108
120
|
children: "Retry"
|
|
109
121
|
})]
|
|
110
|
-
}) :
|
|
122
|
+
}) : j.data.length === 0 ? /* @__PURE__ */ v("p", {
|
|
111
123
|
className: "text-sm text-text-secondary",
|
|
112
124
|
children: "This agent does not delegate to any agent."
|
|
113
|
-
}) : /* @__PURE__ */
|
|
125
|
+
}) : /* @__PURE__ */ v("ul", {
|
|
114
126
|
className: "space-y-2",
|
|
115
|
-
children:
|
|
127
|
+
children: j.data.map((e) => /* @__PURE__ */ y("li", {
|
|
116
128
|
className: "flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border-subtle p-3",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ y("div", {
|
|
118
130
|
className: "flex items-center gap-2",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ v("span", {
|
|
120
132
|
className: "font-medium",
|
|
121
|
-
children:
|
|
122
|
-
}), /* @__PURE__ */
|
|
123
|
-
variant:
|
|
124
|
-
children:
|
|
133
|
+
children: H(e.targetAgentId)
|
|
134
|
+
}), /* @__PURE__ */ v(l, {
|
|
135
|
+
variant: e.isActive ? "success" : "secondary",
|
|
136
|
+
children: e.isActive ? "Active" : "Paused"
|
|
125
137
|
})]
|
|
126
|
-
}), /* @__PURE__ */
|
|
138
|
+
}), /* @__PURE__ */ y("div", {
|
|
127
139
|
className: "flex gap-2",
|
|
128
|
-
children: [
|
|
140
|
+
children: [A(t.A2A_UPDATE) && /* @__PURE__ */ v(c, {
|
|
129
141
|
size: "sm",
|
|
130
142
|
variant: "outline",
|
|
131
|
-
onClick: () => void
|
|
132
|
-
children:
|
|
133
|
-
}),
|
|
143
|
+
onClick: () => void K(e),
|
|
144
|
+
children: e.isActive ? "Pause" : "Resume"
|
|
145
|
+
}), A(t.A2A_DELETE) && /* @__PURE__ */ v(c, {
|
|
134
146
|
size: "sm",
|
|
135
147
|
variant: "outline",
|
|
136
|
-
leftIcon: /* @__PURE__ */
|
|
137
|
-
"aria-label": `Remove connection to ${
|
|
138
|
-
onClick: () => void
|
|
148
|
+
leftIcon: /* @__PURE__ */ v(C, { size: 14 }),
|
|
149
|
+
"aria-label": `Remove connection to ${H(e.targetAgentId)}`,
|
|
150
|
+
onClick: () => void q(e),
|
|
139
151
|
children: "Remove"
|
|
140
152
|
})]
|
|
141
153
|
})]
|
|
142
|
-
},
|
|
154
|
+
}, e.id))
|
|
143
155
|
})
|
|
144
156
|
]
|
|
145
157
|
})] });
|
|
146
158
|
};
|
|
147
|
-
export {
|
|
159
|
+
export { E as AgentA2APanel };
|
|
148
160
|
|
|
149
161
|
//# sourceMappingURL=AgentA2APanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentA2APanel.js","names":["SELECT_CLASS","AgentA2APanel","can","useBotmanorCan","connections","useAgentA2AConnections","agentId","create","createState","useCreateA2AConnection","setActive","useSetA2AConnectionActive","remove","useDeleteA2AConnection","targetId","setTargetId","useState","targetError","setTargetError","nameOf","agents","agent","id","connectedIds","connection","candidates","add","event","agentName","toast","error","toggle","disconnect","confirmAction","Card","CardHeader","CardTitle","Share2","CardDescription","CardContent","delegationEnabled","BOTMANOR_PERMISSIONS","FormField","Button","Plus","Badge","Trash2"],"sources":["../../../src/botlit/components/AgentA2APanel.tsx"],"sourcesContent":["/**\n * Agent-to-agent connections of one agent (BOFF-15360)\n * @module botlit/components\n *\n * The agent's A2A tab: the agents it may delegate to. Delegation only happens\n * when the agent has the \"Agent delegation\" capability, so the panel says so\n * when it is off. Connections can be added, paused/resumed and removed.\n */\n\nimport { useState, type FC, type FormEvent } from 'react';\nimport { Plus, Share2, Trash2 } from 'lucide-react';\nimport { toast } from 'sonner';\n\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from './Card';\nimport { Button } from './Button';\nimport { Badge } from './Badge';\nimport { FormField } from './Input';\nimport {\n useAgentA2AConnections,\n useCreateA2AConnection,\n useDeleteA2AConnection,\n useSetA2AConnectionActive,\n type A2AConnectionRecord,\n} from '../hooks/useA2AConnections';\nimport { confirmAction } from '../utils/confirmAction';\nimport { BOTMANOR_PERMISSIONS, useBotmanorCan } from '../permissions';\n\nconst SELECT_CLASS =\n 'h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]';\n\ninterface AgentOption {\n id: string;\n name: string;\n}\n\ninterface AgentA2APanelProps {\n agentId: string;\n agentName: string;\n delegationEnabled: boolean;\n agents: readonly AgentOption[];\n}\n\nexport const AgentA2APanel: FC<AgentA2APanelProps> = ({\n agentId,\n agentName,\n delegationEnabled,\n agents,\n}) => {\n const can = useBotmanorCan();\n const connections = useAgentA2AConnections(agentId);\n const [create, createState] = useCreateA2AConnection();\n const [setActive] = useSetA2AConnectionActive();\n const [remove] = useDeleteA2AConnection();\n const [targetId, setTargetId] = useState('');\n const [targetError, setTargetError] = useState<string | undefined>();\n\n const nameOf = (id: string) => agents.find((agent) => agent.id === id)?.name ?? 'Unknown agent';\n const connectedIds = new Set(connections.data.map((connection) => connection.targetAgentId));\n const candidates = agents.filter((agent) => agent.id !== agentId && !connectedIds.has(agent.id));\n\n const add = async (event: FormEvent) => {\n event.preventDefault();\n if (!targetId) {\n setTargetError('Choose the agent to delegate to.');\n return;\n }\n setTargetError(undefined);\n try {\n await create({\n name: `${agentName} → ${nameOf(targetId)}`.slice(0, 255),\n senderAgentId: agentId,\n targetAgentId: targetId,\n });\n toast.success(`${agentName} can now delegate to ${nameOf(targetId)}`);\n setTargetId('');\n await connections.refetch();\n } catch (error: unknown) {\n toast.error(error instanceof Error ? error.message : 'Failed to connect the agents');\n }\n };\n\n const toggle = async (connection: A2AConnectionRecord) => {\n try {\n await setActive({ id: connection.id, isActive: !connection.isActive });\n await connections.refetch();\n } catch (error: unknown) {\n toast.error(error instanceof Error ? error.message : 'Failed to update the connection');\n }\n };\n\n const disconnect = async (connection: A2AConnectionRecord) => {\n const confirmed = await confirmAction({\n title: 'Remove connection?',\n message: `Stop ${agentName} delegating to ${nameOf(connection.targetAgentId)}?`,\n confirmLabel: 'Remove',\n cancelLabel: 'Cancel',\n });\n if (!confirmed) return;\n try {\n await remove(connection.id);\n toast.success('Connection removed');\n await connections.refetch();\n } catch (error: unknown) {\n toast.error(error instanceof Error ? error.message : 'Failed to remove the connection');\n }\n };\n\n return (\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <Share2 size={18} aria-hidden=\"true\" />\n A2A Connections\n </CardTitle>\n <CardDescription>\n Agents this agent can hand sub-tasks to and use the answer of.\n </CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {!delegationEnabled && (\n <p role=\"status\" className=\"text-sm text-text-secondary\">\n Delegation is off: turn on the “Agent delegation” capability in Edit Agent for these\n connections to be used.\n </p>\n )}\n {can(BOTMANOR_PERMISSIONS.A2A_CREATE) && candidates.length > 0 && (\n <form\n noValidate\n onSubmit={(event) => void add(event)}\n className=\"flex flex-wrap items-end gap-3\"\n >\n <FormField\n label=\"Delegate to\"\n htmlFor=\"a2a-target\"\n error={targetError}\n className=\"min-w-64 flex-1\"\n >\n <select\n id=\"a2a-target\"\n className={SELECT_CLASS}\n value={targetId}\n onChange={(event) => setTargetId(event.target.value)}\n >\n <option value=\"\">Choose an agent</option>\n {candidates.map((agent) => (\n <option key={agent.id} value={agent.id}>\n {agent.name}\n </option>\n ))}\n </select>\n </FormField>\n <Button type=\"submit\" leftIcon={<Plus size={16} />} isLoading={createState.loading}>\n Connect\n </Button>\n </form>\n )}\n {connections.loading && connections.data.length === 0 ? (\n <p role=\"status\" className=\"text-sm text-text-secondary\">\n Loading connections…\n </p>\n ) : connections.error ? (\n <div role=\"alert\" className=\"space-y-2\">\n <p className=\"text-sm\">{connections.error.message}</p>\n <Button size=\"sm\" variant=\"outline\" onClick={() => void connections.refetch()}>\n Retry\n </Button>\n </div>\n ) : connections.data.length === 0 ? (\n <p className=\"text-sm text-text-secondary\">This agent does not delegate to any agent.</p>\n ) : (\n <ul className=\"space-y-2\">\n {connections.data.map((connection) => (\n <li\n key={connection.id}\n className=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border-subtle p-3\"\n >\n <div className=\"flex items-center gap-2\">\n <span className=\"font-medium\">{nameOf(connection.targetAgentId)}</span>\n <Badge variant={connection.isActive ? 'success' : 'secondary'}>\n {connection.isActive ? 'Active' : 'Paused'}\n </Badge>\n </div>\n <div className=\"flex gap-2\">\n {can(BOTMANOR_PERMISSIONS.A2A_UPDATE) && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => void toggle(connection)}>\n {connection.isActive ? 'Pause' : 'Resume'}\n </Button>\n )}\n {can(BOTMANOR_PERMISSIONS.A2A_DELETE) && (\n <Button\n size=\"sm\"\n variant=\"outline\"\n leftIcon={<Trash2 size={14} />}\n aria-label={`Remove connection to ${nameOf(connection.targetAgentId)}`}\n onClick={() => void disconnect(connection)}\n >\n Remove\n </Button>\n )}\n </div>\n </li>\n ))}\n </ul>\n )}\n </CardContent>\n </Card>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AA2BA,IAAMA,IACJ,+KAcWC,KAAyC,EACpD,YACA,cACA,sBACA,gBACI;CACJ,IAAMC,IAAMC,EAAe,GACrBC,IAAcC,EAAuBC,CAAO,GAC5C,CAACC,GAAQC,KAAeC,EAAuB,GAC/C,CAACC,KAAaC,EAA0B,GACxC,CAACC,KAAUC,EAAuB,GAClC,CAACC,GAAUC,KAAeC,EAAS,EAAE,GACrC,CAACC,GAAaC,KAAkBF,EAA6B,GAE7DG,KAAU,MAAeC,EAAO,MAAM,MAAUC,EAAM,OAAOC,CAAE,CAAC,EAAE,QAAQ,iBAC1EC,IAAe,IAAI,IAAInB,EAAY,KAAK,KAAK,MAAeoB,EAAW,aAAa,CAAC,GACrFC,IAAaL,EAAO,QAAQ,MAAUC,EAAM,OAAOf,KAAW,CAACiB,EAAa,IAAIF,EAAM,EAAE,CAAC,GAEzFK,IAAM,OAAO,MAAqB;EAEtC,IADAC,EAAM,eAAe,GACjB,CAACb,GACH,EAAe,kCAAkC;OAGnD;KAAe,KAAA,CAAS;GACxB,IAAI;IAQF,AAPA,MAAMP,EAAO;KACX,MAAM,GAAGqB,EAAU,KAAKT,EAAOL,CAAQ,IAAI,MAAM,GAAG,GAAG;KACvD,eAAeR;KACf,e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AAe,UAAAe,EAAOK,EAAW,aAAa;MAAQ,CAAA,GACtE,kBAACqB,GAAD;OAAO,SAASrB,EAAW,WAAW,YAAY;OAC/C,UAAAA,EAAW,WAAW,WAAW;MAC7B,CAAA,CACJ;KACL,CAAA,GAAA,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACGtB,EAAIuC,EAAqB,UAAU,KAClC,kBAACE,GAAD;OAAQ,MAAK;OAAK,SAAQ;OAAU,eAAe,KAAKZ,EAAOP,CAAU;OACtE,UAAAA,EAAW,WAAW,UAAU;MAC3B,CAAA,GAETtB,EAAIuC,EAAqB,UAAU,KAClC,kBAACE,GAAD;OACE,MAAK;OACL,SAAQ;OACR,UAAU,kBAACG,GAAD,EAAQ,MAAM,GAAK,CAAA;OAC7B,cAAY,wBAAwB3B,EAAOK,EAAW,aAAa;OACnE,eAAe,KAAKQ,EAAWR,CAAU;OAC1C,UAAA;MAEO,CAAA,CAEP;KACH,CAAA,CAAA;IA3BG,GAAAA,EAAW,EA2Bd,CACL;GACC,CAAA;EAEK;CACT,CAAA,CAAA,EAAA,CAAA;AAEV"}
|
|
1
|
+
{"version":3,"file":"AgentA2APanel.js","names":["SELECT_CLASS","AgentA2APanel","can","useBotmanorCan","connections","useAgentA2AConnections","agentId","create","createState","useCreateA2AConnection","setActive","useSetA2AConnectionActive","remove","useDeleteA2AConnection","plan","useA2APlanAllowance","t","useTr","targetId","setTargetId","useState","targetError","setTargetError","nameOf","agents","agent","id","connectedIds","connection","candidates","add","event","agentName","toast","error","toggle","disconnect","confirmAction","Card","CardHeader","CardTitle","Share2","CardDescription","CardContent","AlertTriangle","delegationEnabled","BOTMANOR_PERMISSIONS","FormField","Button","Plus","Badge","Trash2"],"sources":["../../../src/botlit/components/AgentA2APanel.tsx"],"sourcesContent":["/**\n * Agent-to-agent connections of one agent (BOFF-15360)\n * @module botlit/components\n *\n * The agent's A2A tab: the agents it may delegate to. Delegation only happens\n * when the agent has the \"Agent delegation\" capability, so the panel says so\n * when it is off. Connections can be added, paused/resumed and removed.\n */\n\nimport { useState, type FC, type FormEvent } from 'react';\nimport { AlertTriangle, Plus, Share2, Trash2 } from 'lucide-react';\nimport { toast } from 'sonner';\nimport { useTr } from '../../shared/hooks/useTr';\n\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from './Card';\nimport { Button } from './Button';\nimport { Badge } from './Badge';\nimport { FormField } from './Input';\nimport {\n useAgentA2AConnections,\n useCreateA2AConnection,\n useDeleteA2AConnection,\n useSetA2AConnectionActive,\n type A2AConnectionRecord,\n} from '../hooks/useA2AConnections';\nimport { confirmAction } from '../utils/confirmAction';\nimport { useA2APlanAllowance } from '../hooks/useA2APlan';\nimport { BOTMANOR_PERMISSIONS, useBotmanorCan } from '../permissions';\n\nconst SELECT_CLASS =\n 'h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]';\n\ninterface AgentOption {\n id: string;\n name: string;\n}\n\ninterface AgentA2APanelProps {\n agentId: string;\n agentName: string;\n delegationEnabled: boolean;\n agents: readonly AgentOption[];\n}\n\nexport const AgentA2APanel: FC<AgentA2APanelProps> = ({\n agentId,\n agentName,\n delegationEnabled,\n agents,\n}) => {\n const can = useBotmanorCan();\n const connections = useAgentA2AConnections(agentId);\n const [create, createState] = useCreateA2AConnection();\n const [setActive] = useSetA2AConnectionActive();\n const [remove] = useDeleteA2AConnection();\n const plan = useA2APlanAllowance();\n const t = useTr();\n const [targetId, setTargetId] = useState('');\n const [targetError, setTargetError] = useState<string | undefined>();\n\n const nameOf = (id: string) => agents.find((agent) => agent.id === id)?.name ?? 'Unknown agent';\n const connectedIds = new Set(connections.data.map((connection) => connection.targetAgentId));\n const candidates = agents.filter((agent) => agent.id !== agentId && !connectedIds.has(agent.id));\n\n const add = async (event: FormEvent) => {\n event.preventDefault();\n if (!targetId) {\n setTargetError('Choose the agent to delegate to.');\n return;\n }\n setTargetError(undefined);\n try {\n await create({\n name: `${agentName} → ${nameOf(targetId)}`.slice(0, 255),\n senderAgentId: agentId,\n targetAgentId: targetId,\n });\n toast.success(`${agentName} can now delegate to ${nameOf(targetId)}`);\n setTargetId('');\n await connections.refetch();\n } catch (error: unknown) {\n toast.error(error instanceof Error ? error.message : 'Failed to connect the agents');\n }\n };\n\n const toggle = async (connection: A2AConnectionRecord) => {\n try {\n await setActive({ id: connection.id, isActive: !connection.isActive });\n await connections.refetch();\n } catch (error: unknown) {\n toast.error(error instanceof Error ? error.message : 'Failed to update the connection');\n }\n };\n\n const disconnect = async (connection: A2AConnectionRecord) => {\n const confirmed = await confirmAction({\n title: 'Remove connection?',\n message: `Stop ${agentName} delegating to ${nameOf(connection.targetAgentId)}?`,\n confirmLabel: 'Remove',\n cancelLabel: 'Cancel',\n });\n if (!confirmed) return;\n try {\n await remove(connection.id);\n toast.success('Connection removed');\n await connections.refetch();\n } catch (error: unknown) {\n toast.error(error instanceof Error ? error.message : 'Failed to remove the connection');\n }\n };\n\n return (\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <Share2 size={18} aria-hidden=\"true\" />\n A2A Connections\n </CardTitle>\n <CardDescription>\n Agents this agent can hand sub-tasks to and use the answer of.\n </CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {plan.allowance === 'exhausted' && (\n <div\n role=\"alert\"\n data-testid=\"a2a-plan-warning\"\n className=\"flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg p-3 text-sm text-status-warning-text\"\n >\n <AlertTriangle size={16} className=\"mt-0.5 shrink-0\" aria-hidden=\"true\" />\n <p>\n {t(\n 'botlit.a2a.planWarning.exhausted',\n \"This workspace's plan has no agent-to-agent orchestrations left, so delegations over these connections are refused. The agent then answers on its own. Agent-to-agent collaboration is included in the Pro and Enterprise plans.\"\n )}\n </p>\n </div>\n )}\n {!delegationEnabled && (\n <p role=\"status\" className=\"text-sm text-text-secondary\">\n Delegation is off: turn on the “Agent delegation” capability in Edit Agent for these\n connections to be used.\n </p>\n )}\n {can(BOTMANOR_PERMISSIONS.A2A_CREATE) && candidates.length > 0 && (\n <form\n noValidate\n onSubmit={(event) => void add(event)}\n className=\"flex flex-wrap items-end gap-3\"\n >\n <FormField\n label=\"Delegate to\"\n htmlFor=\"a2a-target\"\n error={targetError}\n className=\"min-w-64 flex-1\"\n >\n <select\n id=\"a2a-target\"\n className={SELECT_CLASS}\n value={targetId}\n onChange={(event) => setTargetId(event.target.value)}\n >\n <option value=\"\">Choose an agent</option>\n {candidates.map((agent) => (\n <option key={agent.id} value={agent.id}>\n {agent.name}\n </option>\n ))}\n </select>\n </FormField>\n <Button type=\"submit\" leftIcon={<Plus size={16} />} isLoading={createState.loading}>\n Connect\n </Button>\n </form>\n )}\n {connections.loading && connections.data.length === 0 ? (\n <p role=\"status\" className=\"text-sm text-text-secondary\">\n Loading connections…\n </p>\n ) : connections.error ? (\n <div role=\"alert\" className=\"space-y-2\">\n <p className=\"text-sm\">{connections.error.message}</p>\n <Button size=\"sm\" variant=\"outline\" onClick={() => void connections.refetch()}>\n Retry\n </Button>\n </div>\n ) : connections.data.length === 0 ? (\n <p className=\"text-sm text-text-secondary\">This agent does not delegate to any agent.</p>\n ) : (\n <ul className=\"space-y-2\">\n {connections.data.map((connection) => (\n <li\n key={connection.id}\n className=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border-subtle p-3\"\n >\n <div className=\"flex items-center gap-2\">\n <span className=\"font-medium\">{nameOf(connection.targetAgentId)}</span>\n <Badge variant={connection.isActive ? 'success' : 'secondary'}>\n {connection.isActive ? 'Active' : 'Paused'}\n </Badge>\n </div>\n <div className=\"flex gap-2\">\n {can(BOTMANOR_PERMISSIONS.A2A_UPDATE) && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => void toggle(connection)}>\n {connection.isActive ? 'Pause' : 'Resume'}\n </Button>\n )}\n {can(BOTMANOR_PERMISSIONS.A2A_DELETE) && (\n <Button\n size=\"sm\"\n variant=\"outline\"\n leftIcon={<Trash2 size={14} />}\n aria-label={`Remove connection to ${nameOf(connection.targetAgentId)}`}\n onClick={() => void disconnect(connection)}\n >\n Remove\n </Button>\n )}\n </div>\n </li>\n ))}\n </ul>\n )}\n </CardContent>\n </Card>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AA6BA,IAAMA,IACJ,+KAcWC,KAAyC,EACpD,YACA,cACA,sBACA,gBACI;CACJ,IAAMC,IAAMC,EAAe,GACrBC,IAAcC,EAAuBC,CAAO,GAC5C,CAACC,GAAQC,KAAeC,EAAuB,GAC/C,CAACC,KAAaC,EAA0B,GACxC,CAACC,KAAUC,EAAuB,GAClCC,IAAOC,EAAoB,GAC3BC,IAAIC,EAAM,GACV,CAACC,GAAUC,KAAeC,EAAS,EAAE,GACrC,CAACC,GAAaC,KAAkBF,EAA6B,GAE7DG,KAAU,MAAeC,EAAO,MAAM,MAAUC,EAAM,OAAOC,CAAE,CAAC,EAAE,QAAQ,iBAC1EC,IAAe,IAAI,IAAIvB,EAAY,KAAK,KAAK,MAAewB,EAAW,aAAa,CAAC,GACrFC,IAAaL,EAAO,QAAQ,MAAUC,EAAM,OAAOnB,KAAW,CAACqB,EAAa,IAAIF,EAAM,EAAE,CAAC,GAEzFK,IAAM,OAAO,MAAqB;EAEtC,IADAC,EAAM,eAAe,GACjB,CAACb,GACH,EAAe,kCAAkC;OAGnD;KAAe,KAAA,CAAS;GACxB,IAAI;IAQF,AAPA,MAAMX,EAAO;KACX,MAAM,GAAGyB,EAAU,KAAKT,EAAOL,CAAQ,IAAI,MAAM,GAAG,GAAG;KACvD,eAAeZ;KACf,eAAeY;IACjB,CAAC,GACDe,EAAM,QAAQ,GAAGD,EAAU,uBAAuBT,EAAOL,CAAQ,GAAG,GACpEC,EAAY,EAAE,GACd,MAAMf,EAAY,QAAQ;GAC5B,SAAS8B,GAAgB;IACvB,EAAM,MAAMA,aAAiB,QAAQA,EAAM,UAAU,8BAA8B;GACrF;EAZwB;CAa1B,GAEMC,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U;OAAe,UAAAmB,EAAOK,EAAW,aAAa;MAAQ,CAAA,GACtE,kBAACsB,GAAD;OAAO,SAAStB,EAAW,WAAW,YAAY;OAC/C,UAAAA,EAAW,WAAW,WAAW;MAC7B,CAAA,CACJ;KACL,CAAA,GAAA,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACG1B,EAAI4C,EAAqB,UAAU,KAClC,kBAACE,GAAD;OAAQ,MAAK;OAAK,SAAQ;OAAU,eAAe,KAAKb,EAAOP,CAAU;OACtE,UAAAA,EAAW,WAAW,UAAU;MAC3B,CAAA,GAET1B,EAAI4C,EAAqB,UAAU,KAClC,kBAACE,GAAD;OACE,MAAK;OACL,SAAQ;OACR,UAAU,kBAACG,GAAD,EAAQ,MAAM,GAAK,CAAA;OAC7B,cAAY,wBAAwB5B,EAAOK,EAAW,aAAa;OACnE,eAAe,KAAKQ,EAAWR,CAAU;OAC1C,UAAA;MAEO,CAAA,CAEP;KACH,CAAA,CAAA;IA3BG,GAAAA,EAAW,EA2Bd,CACL;GACC,CAAA;EAEK;CACT,CAAA,CAAA,EAAA,CAAA;AAEV"}
|
|
@@ -10,7 +10,7 @@ export { useRetrievalProfiles, useRetrievalProfile, useCreateRetrievalProfile, u
|
|
|
10
10
|
export type { RetrievalProfileRecord } from './useRetrievalProfiles';
|
|
11
11
|
export { useMCPServers, useMCPServer, useMCPResources, useMCPTools, useCreateMCPServer, useUpdateMCPServer, useUpdateMCPTool, useDeleteMCPServer, useTestMCPConnection, isMCPServerHealthy, isMCPServerUnhealthy, mcpServerEndpoint, mcpServerDescription, mcpServerKeys, } from './useMCPServers';
|
|
12
12
|
export type { MCPServerRecord, MCPToolRecord, MCPResourceRecord } from './useMCPServers';
|
|
13
|
-
export { useA2AAgents, useA2AAgent, useRegisterA2AAgent, useUpdateA2AAgent, useDeleteA2AAgent, useValidateA2AAgent, validateAgentCard, a2aAgentSkillCount, a2aKeys, } from './useA2A';
|
|
13
|
+
export { useA2AAgents, useA2AAgent, useRegisterA2AAgent, useUpdateA2AAgent, useDeleteA2AAgent, useValidateA2AAgent, useVerifyA2AAgent, useA2AAgentUsage, validateAgentCard, a2aAgentSkillCount, a2aKeys, } from './useA2A';
|
|
14
14
|
export type { A2AAgentRecord } from './useA2A';
|
|
15
15
|
export { useChannelConnectors, useAllChannelConnectors, useChannelConnector, useCreateChannelConnector, useUpdateChannelConnector, useDeleteChannelConnector, useFindChannelConnector, useChannelRoutes, useAllChannelRoutes, useChannelOverview, useBotChannelRoutes, useChannelRoute, useCreateChannelRoute, useUpdateChannelRoute, useDeleteChannelRoute, routeMetadataString, channelKeys, } from './useChannels';
|
|
16
16
|
export type { ChannelConnectorRecord, ChannelRouteRecord, ChannelOverview, ChannelRouteListFilter, } from './useChannels';
|
|
@@ -22,7 +22,7 @@ export { useRetentionStatus, useApplyRetention } from './useRetention';
|
|
|
22
22
|
export type { RetentionRunRecord, RetentionStatusRecord } from './useRetention';
|
|
23
23
|
export { useSkills, useSkill, useCreateSkill, useUpdateSkill, useDeleteSkill, skillKeys, } from './useSkills';
|
|
24
24
|
export type { SkillRecord } from './useSkills';
|
|
25
|
-
export { usePromptTemplates, usePromptTemplate, useCreatePromptTemplate, useUpdatePromptTemplate, useDeletePromptTemplate, useRenderPromptTemplate, promptTemplateVariables, promptTemplateKeys, } from './usePromptTemplates';
|
|
25
|
+
export { usePromptTemplates, usePagedPromptTemplates, usePromptTemplate, useDuplicatePromptTemplate, useLoadPromptTemplateUsage, useCreatePromptTemplate, useUpdatePromptTemplate, useDeletePromptTemplate, useRenderPromptTemplate, promptTemplateVariables, promptTemplateKeys, } from './usePromptTemplates';
|
|
26
26
|
export type { PromptTemplateRecord } from './usePromptTemplates';
|
|
27
27
|
export { useAgentBindings, useSetAgentBindings, useTestPromptTemplate, useSavePromptTemplateVersion, usePromptTemplateVersions, } from './useAgentBindings';
|
|
28
28
|
export type { AgentBindingsRecord, PromptTemplateTestRecord, PromptTemplateVersionRecord, } from './useAgentBindings';
|
|
@@ -9,13 +9,13 @@ import { PLATFORM_CREDENTIALS as M, connectorPlatform as N, useActiveOrganizatio
|
|
|
9
9
|
import { useCreatePolicy as R, useDeletePolicy as z, usePolicies as B, usePolicy as V, useUpdatePolicy as H } from "./usePolicies.js";
|
|
10
10
|
import { useApplyRetention as U, useRetentionStatus as W } from "./useRetention.js";
|
|
11
11
|
import { useCreateSkill as G, useDeleteSkill as K, useSkill as q, useSkills as J, useUpdateSkill as Y } from "./useSkills.js";
|
|
12
|
-
import { promptTemplateVariables as X, useCreatePromptTemplate as Z, useDeletePromptTemplate as Q,
|
|
13
|
-
import { useAgentBindings as
|
|
14
|
-
import { useExecutionSummary as
|
|
15
|
-
import { buildBucketTree as
|
|
16
|
-
import { storePackageDescription as
|
|
12
|
+
import { promptTemplateVariables as X, useCreatePromptTemplate as Z, useDeletePromptTemplate as Q, useDuplicatePromptTemplate as $, useLoadPromptTemplateUsage as ee, usePagedPromptTemplates as te, usePromptTemplate as ne, usePromptTemplates as re, useRenderPromptTemplate as ie, useUpdatePromptTemplate as ae } from "./usePromptTemplates.js";
|
|
13
|
+
import { useAgentBindings as oe, usePromptTemplateVersions as se, useSavePromptTemplateVersion as ce, useSetAgentBindings as le, useTestPromptTemplate as ue } from "./useAgentBindings.js";
|
|
14
|
+
import { useExecutionSummary as de, useExecutions as fe } from "./useExecutions.js";
|
|
15
|
+
import { buildBucketTree as pe, searchTreeRows as me, useAllBuckets as he, useBucket as ge, useBucketBranch as _e, useBucketContents as ve, useBucketCount as ye, useBucketSearch as be, useBuckets as xe, useChildBuckets as Se, useCreateBucket as Ce, useDeleteBucket as we, useUpdateBucket as Te } from "./useBuckets.js";
|
|
16
|
+
import { storePackageDescription as Ee, storePackageName as De, useInstallPackage as Oe, useInstalledPackageCount as ke, useInstalledPackages as Ae, useStorePackage as je, useStorePackageCount as Me, useStorePackages as Ne, useUninstallPackage as Pe, useUpdateInstalledPackage as Fe } from "./useStore.js";
|
|
17
17
|
import "./useLLMProviders.js";
|
|
18
|
-
import { useGlobalChannels as
|
|
19
|
-
import { useConfigureSupervisor as
|
|
20
|
-
import { isActiveHandoff as
|
|
21
|
-
export { M as PLATFORM_CREDENTIALS, h as a2aAgentSkillCount,
|
|
18
|
+
import { useGlobalChannels as Ie, useInitiateSlackConnect as Le, useLinkIntegrationConnection as Re, useMyUserPlatformConnection as ze, useRevokeSlackConnection as Be, useToggleSlackNotifications as Ve } from "./useUserPlatformConnection.js";
|
|
19
|
+
import { useConfigureSupervisor as He, useRunSupervisorNow as Ue, useSupervisorConfig as We, useSupervisorRuns as Ge } from "./useAiOperations.js";
|
|
20
|
+
import { isActiveHandoff as Ke, useAcceptHandoff as qe, useAssignHandoff as Je, useHandoffConfig as Ye, useHandoffQueue as Xe, useHandoffTranscript as Ze, useRejectHandoff as Qe, useReleaseHandoff as $e, useReplyToHandoff as et, useResolveHandoff as tt, useUpsertHandoffConfig as nt } from "./useHandoffs.js";
|
|
21
|
+
export { M as PLATFORM_CREDENTIALS, h as a2aAgentSkillCount, pe as buildBucketTree, N as connectorPlatform, Ke as isActiveHandoff, i as isMCPServerHealthy, a as mcpServerDescription, o as mcpServerEndpoint, X as promptTemplateVariables, _ as routeMetadataString, me as searchTreeRows, Ee as storePackageDescription, De as storePackageName, g as useA2AAgents, qe as useAcceptHandoff, P as useActiveOrganizationId, oe as useAgentBindings, n as useAgents, e as useAllBots, he as useAllBuckets, v as useAllChannelConnectors, y as useAllChannelRoutes, U as useApplyRetention, Je as useAssignHandoff, b as useBotChannelRoutes, t as useBots, ge as useBucket, _e as useBucketBranch, ve as useBucketContents, ye as useBucketCount, be as useBucketSearch, xe as useBuckets, x as useChannelConnector, S as useChannelConnectors, C as useChannelOverview, w as useChannelRoutes, Se as useChildBuckets, He as useConfigureSupervisor, Ce as useCreateBucket, T as useCreateChannelConnector, E as useCreateChannelRoute, s as useCreateMCPServer, R as useCreatePolicy, Z as useCreatePromptTemplate, G as useCreateSkill, we as useDeleteBucket, D as useDeleteChannelConnector, O as useDeleteChannelRoute, c as useDeleteMCPServer, z as useDeletePolicy, Q as useDeletePromptTemplate, K as useDeleteSkill, $ as useDuplicatePromptTemplate, de as useExecutionSummary, fe as useExecutions, k as useFindChannelConnector, Ie as useGlobalChannels, Ye as useHandoffConfig, Xe as useHandoffQueue, Ze as useHandoffTranscript, F as useInboundChannel, Le as useInitiateSlackConnect, Oe as useInstallPackage, ke as useInstalledPackageCount, Ae as useInstalledPackages, Re as useLinkIntegrationConnection, ee as useLoadPromptTemplateUsage, l as useMCPResources, u as useMCPServer, d as useMCPTools, ze as useMyUserPlatformConnection, te as usePagedPromptTemplates, B as usePolicies, V as usePolicy, ne as usePromptTemplate, se as usePromptTemplateVersions, re as usePromptTemplates, I as useProvisionChannel, Qe as useRejectHandoff, $e as useReleaseHandoff, ie as useRenderPromptTemplate, et as useReplyToHandoff, tt as useResolveHandoff, W as useRetentionStatus, r as useRetrievalProfiles, Be as useRevokeSlackConnection, Ue as useRunSupervisorNow, ce as useSavePromptTemplateVersion, le as useSetAgentBindings, q as useSkill, J as useSkills, je as useStorePackage, Me as useStorePackageCount, Ne as useStorePackages, We as useSupervisorConfig, Ge as useSupervisorRuns, f as useTestMCPConnection, ue as useTestPromptTemplate, Ve as useToggleSlackNotifications, Pe as useUninstallPackage, Te as useUpdateBucket, A as useUpdateChannelConnector, j as useUpdateChannelRoute, Fe as useUpdateInstalledPackage, p as useUpdateMCPServer, m as useUpdateMCPTool, H as useUpdatePolicy, ae as useUpdatePromptTemplate, Y as useUpdateSkill, nt as useUpsertHandoffConfig, L as validateCredentials };
|
|
@@ -25,6 +25,15 @@ export interface A2AAgentRecord {
|
|
|
25
25
|
metadata?: Record<string, unknown> | null;
|
|
26
26
|
revision: number;
|
|
27
27
|
tags: string[];
|
|
28
|
+
/** BOFF-15360 — the outcome of the last check of the published card. */
|
|
29
|
+
verificationStatus: string;
|
|
30
|
+
/** Why the last check failed (fetch, schema, origin or signature). */
|
|
31
|
+
verificationError?: string | null;
|
|
32
|
+
verifiedAt?: string | null;
|
|
33
|
+
/** The card's JWS signature verified against the publisher's keys. */
|
|
34
|
+
cardSigned: boolean;
|
|
35
|
+
/** The trust level the registrant asked for; verification caps what it gets. */
|
|
36
|
+
requestedTrustLevel: string;
|
|
28
37
|
createdAt: string;
|
|
29
38
|
updatedAt: string;
|
|
30
39
|
createdById: string;
|
|
@@ -112,6 +121,11 @@ export interface A2AEntitlementDraft {
|
|
|
112
121
|
/** The original JSON row, so fields the editor does not show survive a save. */
|
|
113
122
|
original?: Record<string, unknown>;
|
|
114
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* BOFF-15360 — the endpoint a card names first: `url` (A2A 0.x), else the
|
|
126
|
+
* first of `supportedInterfaces` (A2A 1.0), else 0.3 `additionalInterfaces`.
|
|
127
|
+
*/
|
|
128
|
+
export declare function preferredCardEndpoint(card: Record<string, unknown> | undefined): string;
|
|
115
129
|
/** Reads the renderable view of an A2A agent card out of its JSON document. */
|
|
116
130
|
export declare function readAgentCard(card: Record<string, unknown> | undefined): A2AAgentCardView;
|
|
117
131
|
/** Reads the entitlement rows out of the `entitlements` JSON column. */
|
|
@@ -191,6 +205,13 @@ export declare function useA2AAgent(agentId: string | undefined): QueryResult<A2
|
|
|
191
205
|
export declare function useRegisterA2AAgent(): readonly [(input: RegisterA2AAgentVariables) => Promise<A2AAgentRecord>, import('./internal/workspaceGateway').MutationState<A2AAgentRecord>];
|
|
192
206
|
export declare function useUpdateA2AAgent(): readonly [(input: UpdateA2AAgentVariables) => Promise<A2AAgentRecord>, import('./internal/workspaceGateway').MutationState<A2AAgentRecord>];
|
|
193
207
|
export declare function useDeleteA2AAgent(): readonly [(input: string) => Promise<boolean>, import('./internal/workspaceGateway').MutationState<boolean>];
|
|
208
|
+
/**
|
|
209
|
+
* BOFF-15360 — fetch the entry's published card again through the service
|
|
210
|
+
* (SSRF guard, schema, endpoint origin, signature) and re-derive its trust.
|
|
211
|
+
* A failed check is a result, not an error: the entry comes back FAILED with
|
|
212
|
+
* the reason in `verificationError`.
|
|
213
|
+
*/
|
|
214
|
+
export declare function useVerifyA2AAgent(): readonly [(input: string) => Promise<A2AAgentRecord>, import('./internal/workspaceGateway').MutationState<A2AAgentRecord>];
|
|
194
215
|
/**
|
|
195
216
|
* Validates an agent card locally before registration. There is no server-side
|
|
196
217
|
* validation operation, so this deliberately reports only what can be checked
|
|
@@ -200,3 +221,18 @@ export declare function useValidateA2AAgent(): readonly [(card: Record<string, u
|
|
|
200
221
|
readonly loading: false;
|
|
201
222
|
readonly error: undefined;
|
|
202
223
|
}];
|
|
224
|
+
export interface A2AAgentUsage {
|
|
225
|
+
connectionCount: number;
|
|
226
|
+
connections: {
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
senderAgentId: string;
|
|
230
|
+
senderAgentName?: string | null;
|
|
231
|
+
isActive: boolean;
|
|
232
|
+
}[];
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* BOFF-12511 — the A2A connections that target a registry entry, for the
|
|
236
|
+
* delete confirmation. Deleting the entry removes them.
|
|
237
|
+
*/
|
|
238
|
+
export declare function useA2AAgentUsage(agentId: string | undefined, enabled: boolean): QueryResult<A2AAgentUsage>;
|