@burdenoff/microfe-botmanor 2026.1118.8 → 2026.1119.1

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.
@@ -1,591 +1,803 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
2
  import { isNative as t, nativeImpact as n, nativeNotify as r } from "../../utils/nativeBridge.js";
3
- import { BOTMANOR_PERMISSIONS as i } from "../permissions/botmanorPermissions.js";
4
- import { BotmanorPermissionGate as a } from "../permissions/useBotmanorPermissions.js";
5
- import { PageLayout as o } from "../components/PageLayout.js";
6
- import { EmptyState as s } from "../components/EmptyState.js";
7
- import { Card as c, CardContent as l, CardDescription as u, CardHeader as d, CardTitle as f } from "../components/Card.js";
8
- import { Button as p } from "../components/Button.js";
9
- import { Badge as m, StatusBadge as ee } from "../components/Badge.js";
10
- import { FormField as h, Input as g, Textarea as _ } from "../components/Input.js";
11
- import { readAgentCard as v, readEntitlements as y, useA2AAgent as b, useDeleteA2AAgent as x, useRegisterA2AAgent as te, useUpdateA2AAgent as ne, validateAgentCard as re } from "../hooks/useA2A.js";
12
- import { formatRelativeTime as S } from "../utils/formatters.js";
3
+ import { useTr as i } from "../../shared/hooks/useTr.js";
4
+ import { PageLayout as a } from "../components/PageLayout.js";
5
+ import { EmptyState as o } from "../components/EmptyState.js";
6
+ import { BOTMANOR_PERMISSIONS as s } from "../permissions/botmanorPermissions.js";
7
+ import { BotmanorPermissionGate as c } from "../permissions/useBotmanorPermissions.js";
8
+ import { ErrorState as l } from "../components/ErrorState.js";
9
+ import { Card as u, CardContent as d, CardDescription as f, CardHeader as p, CardTitle as m } from "../components/Card.js";
10
+ import { Button as h } from "../components/Button.js";
11
+ import { Badge as g, StatusBadge as ee } from "../components/Badge.js";
12
+ import { FormField as _, Input as v, Textarea as te } from "../components/Input.js";
13
+ import { A2ATrustBadge as ne } from "../components/A2ATrustBadge.js";
14
+ import { A2A_ENTITLEMENT_PERMISSIONS as y, effectiveEntryDescription as re, effectiveEntryName as ie, entitlementDraftError as ae, entitlementsAllowConnections as oe, parseAgentCardJson as se, readAgentCard as ce, readEntitlements as le, toEntitlementDrafts as b, toEntitlementsInput as ue, unmanagedEntitlements as de, useA2AAgent as fe, useDeleteA2AAgent as pe, useRegisterA2AAgent as me, useUpdateA2AAgent as he, validateRegistryForm as ge } from "../hooks/useA2A.js";
15
+ import { useAgents as _e } from "../hooks/useAgents.js";
16
+ import { confirmAction as ve } from "../utils/confirmAction.js";
17
+ import { formatDate as x, formatRelativeTime as ye } from "../utils/formatters.js";
18
+ import { cn as be } from "../utils/cn.js";
13
19
  import "../permissions/index.js";
14
- import { useEffect as ie, useMemo as C, useState as w } from "react";
15
- import { PagePurpose as T } from "@burdenoff/fe-libs/ui";
16
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
17
- import { useParams as k } from "react-router";
18
- import { ArrowLeft as A, Edit as j, ExternalLink as M, Globe as N, Key as ae, Share2 as oe, Shield as P, Trash2 as F, Zap as I } from "lucide-react";
19
- import { toast as L } from "sonner";
20
+ import { useEffect as S, useMemo as C, useState as w } from "react";
21
+ import { PagePurpose as xe } from "@burdenoff/fe-libs/ui";
22
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
23
+ import { useParams as Se } from "react-router";
24
+ import { AlertTriangle as Ce, ArrowLeft as we, Edit as Te, ExternalLink as Ee, Globe as O, Key as De, Plus as k, Share2 as Oe, Shield as ke, Trash2 as Ae, Zap as je } from "lucide-react";
25
+ import { toast as A } from "sonner";
20
26
  // src/botlit/pages/A2AAgentDetailPage.tsx
21
- var R = [
22
- "UNVERIFIED",
23
- "VERIFIED_PUBLISHER",
24
- "INTERNAL"
25
- ], z = {
27
+ var Me = "a2a-entry-form", Ne = JSON.stringify({
28
+ name: "Weather Agent",
29
+ description: "Answers questions about the weather",
30
+ url: "https://agent.example.com/a2a",
31
+ version: "1.0.0",
32
+ capabilities: {
33
+ streaming: !1,
34
+ pushNotifications: !1,
35
+ stateTransitionHistory: !1
36
+ },
37
+ authentication: { schemes: ["bearer"] },
38
+ defaultInputModes: ["text"],
39
+ defaultOutputModes: ["text"],
40
+ skills: [{
41
+ id: "forecast",
42
+ name: "Forecast",
43
+ description: "Gives a 5-day forecast"
44
+ }]
45
+ }, null, 2), j = {
26
46
  name: "",
27
47
  description: "",
28
48
  wellKnownUrl: "",
29
- trustLevel: "UNVERIFIED",
30
- agentCardJson: JSON.stringify({
31
- name: "",
32
- description: "",
33
- url: "",
34
- version: "1.0.0",
35
- capabilities: {
36
- streaming: !1,
37
- pushNotifications: !1,
38
- stateTransitionHistory: !1
39
- },
40
- authentication: { schemes: ["bearer"] },
41
- defaultInputModes: ["text"],
42
- defaultOutputModes: ["text"],
43
- skills: []
44
- }, null, 2)
45
- };
46
- function B(e) {
47
- return R.includes(e) ? e : "UNVERIFIED";
48
- }
49
- function V(e) {
49
+ agentCardJson: ""
50
+ }, M = "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)]";
51
+ function N(e) {
50
52
  return {
51
53
  name: e.name,
52
54
  description: e.description ?? "",
53
55
  wellKnownUrl: e.wellKnownUrl ?? "",
54
- trustLevel: B(e.trustLevel),
55
56
  agentCardJson: JSON.stringify(e.agentCard ?? {}, null, 2)
56
57
  };
57
58
  }
58
- function H(e) {
59
- try {
60
- let t = JSON.parse(e);
61
- return typeof t == "object" && t && !Array.isArray(t) ? t : void 0;
62
- } catch {
63
- return;
64
- }
59
+ function Pe() {
60
+ return {
61
+ permission: "task:create",
62
+ agentIds: [],
63
+ validFrom: "",
64
+ validUntil: ""
65
+ };
65
66
  }
66
- var U = ({ isNew: R = !1 }) => {
67
- let { agentId: U } = k(), { navigateTo: W } = e(), { data: G, loading: K } = b(R ? void 0 : U), [se, ce] = te(), [le, ue] = ne(), [de, fe] = x(), [q, J] = w(R), [pe, Y] = w(!1), [X, Z] = w(z);
68
- ie(() => {
69
- G && !R && Z(V(G));
70
- }, [G, R]);
71
- let Q = C(() => v(q ? H(X.agentCardJson) : G?.agentCard ?? void 0), [
72
- q,
73
- X.agentCardJson,
74
- G
75
- ]), $ = C(() => y(G?.entitlements), [G?.entitlements]);
76
- if (K && !R) return /* @__PURE__ */ D(o, {
77
- title: "Loading...",
78
- children: /* @__PURE__ */ D("div", { className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" })
67
+ var P = ({ isNew: y = !1 }) => {
68
+ let k = i(), { agentId: M } = Se(), { navigateTo: P } = e(), { data: F, loading: Ie, error: I, refetch: L } = fe(y ? void 0 : M), [Le, Re] = me(), [ze, Be] = he(), [Ve, He] = pe(), [R, z] = w(y), [Ue, We] = w(!1), [B, V] = w(j), [H, U] = w([]), [Ge, Ke] = w(() => JSON.stringify([j, []])), [qe, Je] = w(!1), [Ye, W] = w(!1), { data: G, hasMore: Xe, loadingMore: Ze, error: Qe, loadMore: $e } = _e(void 0, { enabled: R || !!F });
69
+ S(() => {
70
+ Xe && !Ze && !Qe && $e();
71
+ }, [
72
+ Xe,
73
+ Ze,
74
+ Qe,
75
+ $e
76
+ ]);
77
+ let et = C(() => new Map(G.map((e) => [e.id, e.name])), [G]), tt = (e) => {
78
+ let t = e ? N(e) : j, n = e ? b(e.entitlements) : [];
79
+ V(t), U(n), Ke(JSON.stringify([t, n])), Je(!1), W(!1), z(!0);
80
+ };
81
+ S(() => {
82
+ if (F && !y) {
83
+ let e = N(F), t = b(F.entitlements);
84
+ V(e), U(t), Ke(JSON.stringify([e, t]));
85
+ }
86
+ }, [F, y]);
87
+ let K = R && !Ye && JSON.stringify([B, H]) !== Ge;
88
+ S(() => {
89
+ if (!K) return;
90
+ let e = (e) => {
91
+ e.preventDefault(), e.returnValue = "";
92
+ };
93
+ return window.addEventListener("beforeunload", e), () => window.removeEventListener("beforeunload", e);
94
+ }, [K]);
95
+ let q = C(() => se(B.agentCardJson), [B.agentCardJson]), J = R ? q : F?.agentCard ?? void 0, Y = C(() => ce(J), [J]), X = C(() => ge(B), [B]), nt = H.map(ae), rt = Object.keys(X).length > 0 || nt.some((e) => e !== void 0), it = C(() => le(F?.entitlements), [F?.entitlements]), at = (e) => e ? k(e.key, e.fallback, e.params) : void 0, Z = (e) => qe ? at(X[e]) : void 0, Q = (e, t = !1) => {
96
+ let n = Z(e), r = `a2a-${e}`;
97
+ return {
98
+ id: r,
99
+ "aria-invalid": n ? !0 : void 0,
100
+ "aria-describedby": n ? `${r}-error` : t ? `${r}-description` : void 0
101
+ };
102
+ }, ot = (e) => {
103
+ switch (e) {
104
+ case "agent:delegate": return k("botlit.a2aRegistry.entitlements.permission.delegate", "Delegate to this agent (agent:delegate)");
105
+ case "task:create": return k("botlit.a2aRegistry.entitlements.permission.taskCreate", "Connect and send tasks (task:create)");
106
+ default: return e;
107
+ }
108
+ }, $ = async (e) => {
109
+ (!K || await ve({
110
+ title: k("botlit.a2aRegistry.discard.title", "Discard changes?"),
111
+ message: k("botlit.a2aRegistry.discard.message", "You have unsaved changes. If you leave now they will be lost."),
112
+ confirmLabel: k("botlit.a2aRegistry.discard.confirm", "Discard"),
113
+ cancelLabel: k("botlit.a2aRegistry.discard.keepEditing", "Keep editing")
114
+ })) && (W(!0), e());
115
+ };
116
+ if (Ie && !y) return /* @__PURE__ */ E(a, {
117
+ title: k("botlit.a2aRegistry.detail.loading", "Loading..."),
118
+ children: /* @__PURE__ */ E("div", {
119
+ className: "h-96 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg",
120
+ "aria-busy": "true"
121
+ })
122
+ });
123
+ if (I && !y) return /* @__PURE__ */ E(a, {
124
+ title: k("botlit.a2aRegistry.detail.errorTitle", "A2A agent"),
125
+ children: /* @__PURE__ */ E(l, {
126
+ resource: k("botlit.a2aRegistry.detail.resource", "this A2A agent"),
127
+ error: I,
128
+ onRetry: () => void L()
129
+ })
79
130
  });
80
- if (!G && !R) return /* @__PURE__ */ D(o, {
81
- title: "A2A Agent Not Found",
82
- children: /* @__PURE__ */ D(s, {
131
+ if (!F && !y) return /* @__PURE__ */ E(a, {
132
+ title: k("botlit.a2aRegistry.notFound.title", "A2A Agent Not Found"),
133
+ children: /* @__PURE__ */ E(o, {
83
134
  illustration: "empty-people",
84
- title: "A2A Agent Not Found",
85
- description: "The A2A agent doesn't exist.",
86
- action: /* @__PURE__ */ D(p, {
87
- onClick: () => W("a2a"),
88
- children: "Back to A2A Registry"
135
+ title: k("botlit.a2aRegistry.notFound.title", "A2A Agent Not Found"),
136
+ description: k("botlit.a2aRegistry.notFound.description", "This A2A agent doesn't exist in this workspace, or it was removed."),
137
+ action: /* @__PURE__ */ E(h, {
138
+ onClick: () => P("a2a"),
139
+ children: k("botlit.a2aRegistry.actions.backToRegistry", "Back to A2A Registry")
89
140
  })
90
141
  })
91
142
  });
92
- let me = (e) => {
93
- switch (e) {
94
- case "INTERNAL": return "success";
95
- case "VERIFIED_PUBLISHER": return "default";
96
- default: return "secondary";
97
- }
98
- }, he = async () => {
99
- if (!X.name.trim()) {
100
- L.error("Name is required");
143
+ let st = async (e) => {
144
+ if (e?.preventDefault(), Je(!0), rt || !q) {
145
+ let e = [
146
+ "name",
147
+ "description",
148
+ "wellKnownUrl",
149
+ "agentCardJson"
150
+ ].find((e) => X[e]);
151
+ e && document.getElementById(`a2a-${e}`)?.focus();
101
152
  return;
102
153
  }
103
- let e = H(X.agentCardJson);
104
- if (!e) {
105
- L.error("Agent card must be a valid JSON object");
106
- return;
107
- }
108
- let t = re(e);
109
- if (!t.valid) L.error(t.errors[0]);
110
- else if (R) try {
111
- let t = await se({
112
- name: X.name.trim(),
113
- description: X.description.trim() || null,
114
- wellKnownUrl: X.wellKnownUrl.trim() || null,
115
- trustLevel: X.trustLevel,
116
- agentCard: e
154
+ let t = ie(B), n = re(B) || null, r = B.wellKnownUrl.trim() || null, i = ue(H, de(F?.entitlements));
155
+ if (y) try {
156
+ let e = await Le({
157
+ name: t,
158
+ description: n,
159
+ wellKnownUrl: r,
160
+ agentCard: q,
161
+ entitlements: i
117
162
  });
118
- L.success(`Registered "${t.name}"`), W(`a2a/${t.id}`);
163
+ W(!0), A.success(k("botlit.a2aRegistry.toast.registered", "Registered \"{{name}}\"", { name: e.name })), P(`a2a/${e.id}`);
119
164
  } catch (e) {
120
- L.error(e instanceof Error ? e.message : "Failed to register A2A agent");
165
+ A.error(e instanceof Error ? e.message : k("botlit.a2aRegistry.toast.registerFailed", "Failed to register A2A agent"));
121
166
  }
122
- else if (U) try {
123
- await le({
124
- agentId: U,
167
+ else if (M) try {
168
+ await ze({
169
+ agentId: M,
125
170
  input: {
126
- name: X.name.trim(),
127
- description: X.description.trim() || null,
128
- wellKnownUrl: X.wellKnownUrl.trim() || null,
129
- trustLevel: X.trustLevel,
130
- agentCard: e
171
+ name: t,
172
+ description: n,
173
+ wellKnownUrl: r,
174
+ agentCard: q,
175
+ entitlements: i
131
176
  }
132
- }), L.success("A2A agent updated"), J(!1);
177
+ }), A.success(k("botlit.a2aRegistry.toast.updated", "A2A agent updated")), W(!0), z(!1), L();
133
178
  } catch (e) {
134
- L.error(e instanceof Error ? e.message : "Failed to update A2A agent");
179
+ A.error(e instanceof Error ? e.message : k("botlit.a2aRegistry.toast.updateFailed", "Failed to update A2A agent"));
135
180
  }
136
- }, ge = async () => {
137
- if (U) try {
138
- await de(U), t() && r("success"), L.success("A2A agent removed"), W("a2a");
181
+ }, ct = async () => {
182
+ if (M) try {
183
+ await Ve(M), t() && r("success"), A.success(k("botlit.a2aRegistry.toast.removed", "A2A agent removed")), P("a2a");
139
184
  } catch (e) {
140
- t() && r("error"), L.error(e instanceof Error ? e.message : "Failed to remove A2A agent");
185
+ t() && r("error"), A.error(e instanceof Error ? e.message : k("botlit.a2aRegistry.toast.removeFailed", "Failed to remove A2A agent"));
141
186
  }
142
- };
143
- return /* @__PURE__ */ D(o, {
144
- title: /* @__PURE__ */ O("div", {
187
+ }, lt = (e, t) => U((n) => n.map((n, r) => r === e ? {
188
+ ...n,
189
+ ...t
190
+ } : n)), ut = typeof q?.name == "string" ? q.name : "", dt = typeof q?.description == "string" ? q.description : "", ft = !!J, pt = !y && !oe(F?.entitlements);
191
+ return /* @__PURE__ */ E(a, {
192
+ title: /* @__PURE__ */ D("div", {
145
193
  className: "flex items-center gap-3",
146
194
  children: [
147
- /* @__PURE__ */ D(p, {
195
+ /* @__PURE__ */ E(h, {
148
196
  variant: "ghost",
149
197
  size: "icon",
150
- onClick: () => W("a2a"),
151
- children: /* @__PURE__ */ D(A, { size: 20 })
198
+ "aria-label": k("botlit.a2aRegistry.actions.backToRegistry", "Back to A2A Registry"),
199
+ onClick: () => void $(() => P("a2a")),
200
+ children: /* @__PURE__ */ E(we, {
201
+ size: 20,
202
+ "aria-hidden": "true"
203
+ })
152
204
  }),
153
- /* @__PURE__ */ D(oe, {
205
+ /* @__PURE__ */ E(Oe, {
154
206
  size: 24,
155
- className: "text-primary"
207
+ className: "text-primary",
208
+ "aria-hidden": "true"
156
209
  }),
157
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("div", {
158
- className: "flex items-center gap-2",
210
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("div", {
211
+ className: "flex flex-wrap items-center gap-2",
159
212
  children: [
160
- /* @__PURE__ */ D("span", { children: R ? "Register A2A Agent" : G?.name }),
161
- !R && G && /* @__PURE__ */ D(ee, { status: G.status }),
162
- !R && G && /* @__PURE__ */ D(m, {
163
- variant: me(B(G.trustLevel)),
164
- children: G.trustLevel.replace("_", " ")
165
- })
213
+ /* @__PURE__ */ E("span", { children: y ? k("botlit.a2aRegistry.register.title", "Register A2A Agent") : F?.name }),
214
+ !y && F && /* @__PURE__ */ E(ee, { status: F.status }),
215
+ !y && F && /* @__PURE__ */ E(ne, { level: F.trustLevel })
166
216
  ]
167
- }), !R && G?.description && /* @__PURE__ */ D("p", {
217
+ }), !y && F?.description && /* @__PURE__ */ E("p", {
168
218
  className: "text-sm font-normal text-text-secondary",
169
- children: G.description
219
+ children: F.description
170
220
  })] })
171
221
  ]
172
222
  }),
173
- actions: /* @__PURE__ */ D("div", {
223
+ actions: /* @__PURE__ */ E("div", {
174
224
  className: "flex gap-2",
175
- children: q ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(p, {
225
+ children: R ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(h, {
176
226
  variant: "outline",
177
- onClick: () => R ? W("a2a") : J(!1),
178
- children: "Cancel"
179
- }), /* @__PURE__ */ D(p, {
180
- onClick: he,
181
- isLoading: ce.loading || ue.loading,
182
- children: R ? "Register Agent" : "Save Changes"
183
- })] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(a, {
184
- permission: i.A2A_REGISTRY_UPDATE,
185
- children: /* @__PURE__ */ D(p, {
227
+ onClick: () => void $(() => {
228
+ y ? P("a2a") : (F && (V(N(F)), U(b(F.entitlements))), z(!1));
229
+ }),
230
+ children: k("botlit.common.cancel", "Cancel")
231
+ }), /* @__PURE__ */ E(h, {
232
+ type: "submit",
233
+ form: Me,
234
+ isLoading: Re.loading || Be.loading,
235
+ children: y ? k("botlit.a2aRegistry.actions.registerAgent", "Register Agent") : k("botlit.a2aRegistry.actions.saveChanges", "Save Changes")
236
+ })] }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(c, {
237
+ permission: s.A2A_REGISTRY_UPDATE,
238
+ children: /* @__PURE__ */ E(h, {
186
239
  variant: "outline",
187
- leftIcon: /* @__PURE__ */ D(j, { size: 16 }),
188
- onClick: () => {
189
- G && Z(V(G)), J(!0);
190
- },
191
- children: "Edit"
240
+ leftIcon: /* @__PURE__ */ E(Te, { size: 16 }),
241
+ onClick: () => tt(F),
242
+ children: k("botlit.a2aRegistry.actions.edit", "Edit")
192
243
  })
193
- }), pe ? /* @__PURE__ */ O("div", {
194
- className: "flex gap-2",
195
- children: [/* @__PURE__ */ D(p, {
196
- variant: "outline",
197
- size: "sm",
198
- onClick: () => Y(!1),
199
- children: "Cancel"
200
- }), /* @__PURE__ */ D(p, {
201
- variant: "destructive",
202
- size: "sm",
203
- onClick: () => {
204
- n("medium"), ge();
205
- },
206
- isLoading: fe.loading,
207
- children: "Confirm"
208
- })]
209
- }) : /* @__PURE__ */ D(a, {
210
- permission: i.A2A_REGISTRY_DELETE,
211
- children: /* @__PURE__ */ D(p, {
244
+ }), Ue ? /* @__PURE__ */ D("div", {
245
+ className: "flex flex-wrap items-center gap-2",
246
+ role: "group",
247
+ children: [
248
+ /* @__PURE__ */ E("span", {
249
+ className: "text-sm text-text-secondary max-w-xs",
250
+ children: k("botlit.a2aRegistry.delete.warning", "Remove \"{{name}}\"? Connections that point to it are not removed.", { name: F?.name ?? "" })
251
+ }),
252
+ /* @__PURE__ */ E(h, {
253
+ variant: "outline",
254
+ size: "sm",
255
+ onClick: () => We(!1),
256
+ children: k("botlit.common.cancel", "Cancel")
257
+ }),
258
+ /* @__PURE__ */ E(h, {
259
+ variant: "destructive",
260
+ size: "sm",
261
+ onClick: () => {
262
+ n("medium"), ct();
263
+ },
264
+ isLoading: He.loading,
265
+ children: k("botlit.a2aRegistry.delete.confirm", "Remove")
266
+ })
267
+ ]
268
+ }) : /* @__PURE__ */ E(c, {
269
+ permission: s.A2A_REGISTRY_DELETE,
270
+ children: /* @__PURE__ */ E(h, {
212
271
  variant: "destructive",
213
- leftIcon: /* @__PURE__ */ D(F, { size: 16 }),
214
- onClick: () => Y(!0),
215
- children: "Remove"
272
+ leftIcon: /* @__PURE__ */ E(Ae, { size: 16 }),
273
+ onClick: () => We(!0),
274
+ children: k("botlit.a2aRegistry.actions.remove", "Remove")
216
275
  })
217
276
  })] })
218
277
  }),
219
- children: /* @__PURE__ */ O("div", {
278
+ children: /* @__PURE__ */ D("div", {
220
279
  className: "space-y-6",
221
280
  children: [
222
- /* @__PURE__ */ D(T, {
223
- icon: /* @__PURE__ */ D(N, { size: 18 }),
224
- children: "This is one external agent registered in your A2A network. Inspect its public agent card — the skills it advertises, its provider and trust level — and decide how your own agents may delegate work to it. Keeping this entry accurate is what lets BotManor safely hand off tasks to agents outside your workspace."
281
+ /* @__PURE__ */ E(xe, {
282
+ icon: /* @__PURE__ */ E(O, { size: 18 }),
283
+ children: y ? k("botlit.a2aRegistry.register.purpose", "Register an external agent by pasting its /.well-known/agent.json card. The entry records the agent's skills and which of your agents may connect to it. It starts as Unverified, and BotManor does not yet send tasks to external agents.") : k("botlit.a2aRegistry.detail.purpose", "This is one external agent registered in your A2A network. Inspect its agent card — the skills it advertises, its provider and trust level — and set which of your agents may connect to it. BotManor does not yet send tasks to external agents.")
225
284
  }),
226
- q && /* @__PURE__ */ O(c, { children: [/* @__PURE__ */ D(d, { children: /* @__PURE__ */ D(f, { children: "Basic Information" }) }), /* @__PURE__ */ O(l, {
227
- className: "space-y-4",
228
- children: [
229
- /* @__PURE__ */ D(h, {
230
- label: "Name",
231
- required: !0,
232
- children: /* @__PURE__ */ D(g, {
233
- value: X.name,
234
- onChange: (e) => Z({
235
- ...X,
236
- name: e.target.value
237
- }),
238
- placeholder: "e.g., External Weather Agent"
239
- })
240
- }),
241
- /* @__PURE__ */ D(h, {
242
- label: "Description",
243
- children: /* @__PURE__ */ D(_, {
244
- value: X.description,
245
- onChange: (e) => Z({
246
- ...X,
247
- description: e.target.value
248
- }),
249
- placeholder: "Describe what this A2A agent does...",
250
- rows: 3
251
- })
252
- }),
253
- /* @__PURE__ */ D(h, {
254
- label: "Well-Known URL",
255
- description: "URL to fetch agent.json",
256
- children: /* @__PURE__ */ D(g, {
257
- value: X.wellKnownUrl,
258
- onChange: (e) => Z({
259
- ...X,
260
- wellKnownUrl: e.target.value
261
- }),
262
- placeholder: "https://example.com/.well-known/agent.json"
263
- })
264
- }),
265
- /* @__PURE__ */ D(h, {
266
- label: "Trust Level",
267
- children: /* @__PURE__ */ O("select", {
268
- className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
269
- value: X.trustLevel,
270
- onChange: (e) => Z({
271
- ...X,
272
- trustLevel: B(e.target.value)
273
- }),
274
- children: [
275
- /* @__PURE__ */ D("option", {
276
- value: "UNVERIFIED",
277
- children: "Unverified"
285
+ R && /* @__PURE__ */ D("form", {
286
+ id: Me,
287
+ noValidate: !0,
288
+ onSubmit: (e) => void st(e),
289
+ className: "space-y-6",
290
+ children: [/* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(p, { children: /* @__PURE__ */ E(m, { children: k("botlit.a2aRegistry.form.basicInfo", "Basic Information") }) }), /* @__PURE__ */ D(d, {
291
+ className: "space-y-4",
292
+ children: [
293
+ /* @__PURE__ */ E(_, {
294
+ label: k("botlit.a2aRegistry.form.agentCard", "Agent Card (JSON)"),
295
+ htmlFor: "a2a-agentCardJson",
296
+ required: !0,
297
+ error: Z("agentCardJson"),
298
+ description: k("botlit.a2aRegistry.form.agentCardHelp", "Paste the agent's /.well-known/agent.json document (at most 1 MiB). The preview below fills in once it parses."),
299
+ children: /* @__PURE__ */ E(te, {
300
+ ...Q("agentCardJson", !0),
301
+ value: B.agentCardJson,
302
+ onChange: (e) => V({
303
+ ...B,
304
+ agentCardJson: e.target.value
278
305
  }),
279
- /* @__PURE__ */ D("option", {
280
- value: "VERIFIED_PUBLISHER",
281
- children: "Verified Publisher"
306
+ placeholder: Ne,
307
+ maxLength: 1048576,
308
+ rows: 12,
309
+ required: !0,
310
+ className: "font-mono text-xs"
311
+ })
312
+ }),
313
+ /* @__PURE__ */ E(_, {
314
+ label: k("botlit.a2aRegistry.form.name", "Name"),
315
+ htmlFor: "a2a-name",
316
+ error: Z("name"),
317
+ description: k("botlit.a2aRegistry.form.nameHelp", "Leave empty to use the card's name, so the list and the card agree."),
318
+ children: /* @__PURE__ */ E(v, {
319
+ ...Q("name", !0),
320
+ value: B.name,
321
+ onChange: (e) => V({
322
+ ...B,
323
+ name: e.target.value
282
324
  }),
283
- /* @__PURE__ */ D("option", {
284
- value: "INTERNAL",
285
- children: "Internal"
286
- })
325
+ placeholder: ut || k("botlit.a2aRegistry.form.namePlaceholder", "e.g., External Weather Agent"),
326
+ maxLength: 255
327
+ })
328
+ }),
329
+ /* @__PURE__ */ E(_, {
330
+ label: k("botlit.a2aRegistry.form.description", "Description"),
331
+ htmlFor: "a2a-description",
332
+ error: Z("description"),
333
+ description: k("botlit.a2aRegistry.form.descriptionHelp", "Leave empty to use the card's description."),
334
+ children: /* @__PURE__ */ E(te, {
335
+ ...Q("description", !0),
336
+ value: B.description,
337
+ onChange: (e) => V({
338
+ ...B,
339
+ description: e.target.value
340
+ }),
341
+ placeholder: dt || k("botlit.a2aRegistry.form.descriptionPlaceholder", "Describe what this A2A agent does..."),
342
+ maxLength: 2e3,
343
+ rows: 3
344
+ })
345
+ }),
346
+ /* @__PURE__ */ E(_, {
347
+ label: k("botlit.a2aRegistry.form.wellKnownUrl", "Well-Known URL"),
348
+ htmlFor: "a2a-wellKnownUrl",
349
+ error: Z("wellKnownUrl"),
350
+ description: k("botlit.a2aRegistry.form.wellKnownUrlHelp", "Where the agent publishes its card (https only)."),
351
+ children: /* @__PURE__ */ E(v, {
352
+ ...Q("wellKnownUrl", !0),
353
+ type: "url",
354
+ inputMode: "url",
355
+ value: B.wellKnownUrl,
356
+ onChange: (e) => V({
357
+ ...B,
358
+ wellKnownUrl: e.target.value
359
+ }),
360
+ placeholder: "https://agent.example.com/.well-known/agent.json",
361
+ maxLength: 2048
362
+ })
363
+ }),
364
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
365
+ className: "text-sm font-medium",
366
+ children: k("botlit.a2aRegistry.form.trustLevel", "Trust Level")
367
+ }), /* @__PURE__ */ D("div", {
368
+ className: "mt-2 flex flex-wrap items-center gap-2 text-sm text-text-secondary",
369
+ children: [/* @__PURE__ */ E(ne, { level: F?.trustLevel ?? "UNVERIFIED" }), /* @__PURE__ */ E("span", { children: k("botlit.a2aRegistry.form.trustReadOnly", "Set by BotManor, not in this form. A new entry starts as Unverified; trust is raised only by verifying the agent's published card.") })]
370
+ })] })
371
+ ]
372
+ })] }), /* @__PURE__ */ E(Fe, {
373
+ drafts: H,
374
+ issues: qe ? nt : [],
375
+ agents: G,
376
+ permissionLabel: ot,
377
+ onAdd: () => U((e) => [...e, Pe()]),
378
+ onRemove: (e) => U((t) => t.filter((t, n) => n !== e)),
379
+ onChange: lt
380
+ })]
381
+ }),
382
+ ft ? /* @__PURE__ */ D(T, { children: [
383
+ /* @__PURE__ */ D(u, {
384
+ treatment: "glass",
385
+ glow: !0,
386
+ children: [/* @__PURE__ */ D(p, { children: [/* @__PURE__ */ D(m, {
387
+ className: "flex items-center gap-2",
388
+ children: [/* @__PURE__ */ E(O, {
389
+ size: 18,
390
+ "aria-hidden": "true"
391
+ }), k("botlit.a2aRegistry.card.title", "Agent Card")]
392
+ }), /* @__PURE__ */ E(f, { children: k("botlit.a2aRegistry.card.description", "Public agent metadata per A2A spec") })] }), /* @__PURE__ */ D(d, {
393
+ className: "space-y-4",
394
+ children: [!y && F?.wellKnownUrl && /* @__PURE__ */ D("div", {
395
+ className: "flex items-center gap-2 p-3 bg-bg-sunken rounded-lg",
396
+ children: [/* @__PURE__ */ E(O, {
397
+ size: 16,
398
+ className: "text-text-secondary",
399
+ "aria-hidden": "true"
400
+ }), /* @__PURE__ */ D("a", {
401
+ href: F.wellKnownUrl,
402
+ target: "_blank",
403
+ rel: "noopener noreferrer",
404
+ className: "text-sm text-primary hover:underline flex items-center gap-1 break-all",
405
+ children: [F.wellKnownUrl, /* @__PURE__ */ E(Ee, {
406
+ size: 12,
407
+ "aria-hidden": "true"
408
+ })]
409
+ })]
410
+ }), /* @__PURE__ */ D("dl", {
411
+ className: "grid grid-cols-2 md:grid-cols-4 gap-4",
412
+ children: [
413
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
414
+ className: "text-sm text-text-secondary",
415
+ children: k("botlit.a2aRegistry.card.agentUrl", "Agent URL")
416
+ }), /* @__PURE__ */ E("dd", {
417
+ className: "font-medium font-mono text-sm break-all",
418
+ children: Y.url || "—"
419
+ })] }),
420
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
421
+ className: "text-sm text-text-secondary",
422
+ children: k("botlit.a2aRegistry.card.version", "Version")
423
+ }), /* @__PURE__ */ E("dd", { children: /* @__PURE__ */ E(g, {
424
+ variant: "outline",
425
+ children: Y.version || "—"
426
+ }) })] }),
427
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
428
+ className: "text-sm text-text-secondary",
429
+ children: k("botlit.a2aRegistry.card.provider", "Provider")
430
+ }), /* @__PURE__ */ E("dd", {
431
+ className: "font-medium",
432
+ children: Y.providerOrganization || "—"
433
+ })] }),
434
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
435
+ className: "text-sm text-text-secondary",
436
+ children: k("botlit.a2aRegistry.card.documentation", "Documentation")
437
+ }), /* @__PURE__ */ E("dd", { children: Y.documentationUrl ? /* @__PURE__ */ D("a", {
438
+ href: Y.documentationUrl,
439
+ target: "_blank",
440
+ rel: "noopener noreferrer",
441
+ className: "text-primary hover:underline flex items-center gap-1",
442
+ children: [
443
+ k("botlit.a2aRegistry.card.viewDocs", "View Docs"),
444
+ " ",
445
+ /* @__PURE__ */ E(Ee, {
446
+ size: 12,
447
+ "aria-hidden": "true"
448
+ })
449
+ ]
450
+ }) : /* @__PURE__ */ E("span", {
451
+ className: "text-text-secondary",
452
+ children: "—"
453
+ }) })] })
287
454
  ]
455
+ })]
456
+ })]
457
+ }),
458
+ /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(p, { children: /* @__PURE__ */ D(m, {
459
+ className: "flex items-center gap-2",
460
+ children: [/* @__PURE__ */ E(je, {
461
+ size: 18,
462
+ "aria-hidden": "true"
463
+ }), k("botlit.a2aRegistry.capabilities.title", "Capabilities")]
464
+ }) }), /* @__PURE__ */ D(d, { children: [/* @__PURE__ */ E("div", {
465
+ className: "grid grid-cols-2 md:grid-cols-3 gap-4",
466
+ children: [
467
+ {
468
+ key: "streaming",
469
+ label: k("botlit.a2aRegistry.capabilities.streaming", "Streaming"),
470
+ value: Y.capabilities.streaming
471
+ },
472
+ {
473
+ key: "pushNotifications",
474
+ label: k("botlit.a2aRegistry.capabilities.pushNotifications", "Push Notifications"),
475
+ value: Y.capabilities.pushNotifications
476
+ },
477
+ {
478
+ key: "stateTransitionHistory",
479
+ label: k("botlit.a2aRegistry.capabilities.stateHistory", "State History"),
480
+ value: Y.capabilities.stateTransitionHistory
481
+ }
482
+ ].map((e) => /* @__PURE__ */ D("div", {
483
+ className: be("p-3 rounded-lg border", e.value ? "border-status-success-border bg-status-success-bg-subtle" : "border-border-subtle bg-bg-sunken"),
484
+ children: [/* @__PURE__ */ E("p", {
485
+ className: "font-medium",
486
+ children: e.label
487
+ }), /* @__PURE__ */ E(g, {
488
+ variant: e.value ? "success" : "secondary",
489
+ children: e.value ? k("botlit.a2aRegistry.capabilities.supported", "Supported") : k("botlit.a2aRegistry.capabilities.notSupported", "Not Supported")
490
+ })]
491
+ }, e.key))
492
+ }), /* @__PURE__ */ E("div", {
493
+ className: "mt-4 grid grid-cols-2 gap-4",
494
+ children: [{
495
+ key: "input",
496
+ label: k("botlit.a2aRegistry.capabilities.inputModes", "Input Modes"),
497
+ modes: Y.defaultInputModes
498
+ }, {
499
+ key: "output",
500
+ label: k("botlit.a2aRegistry.capabilities.outputModes", "Output Modes"),
501
+ modes: Y.defaultOutputModes
502
+ }].map((e) => /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
503
+ className: "text-sm text-text-secondary mb-2",
504
+ children: e.label
505
+ }), /* @__PURE__ */ E("div", {
506
+ className: "flex flex-wrap gap-2",
507
+ children: e.modes.length > 0 ? e.modes.map((e) => /* @__PURE__ */ E(g, {
508
+ variant: "outline",
509
+ children: e
510
+ }, e)) : /* @__PURE__ */ E("span", {
511
+ className: "text-text-secondary",
512
+ children: k("botlit.a2aRegistry.capabilities.none", "None")
288
513
  })
289
- }),
290
- /* @__PURE__ */ D(h, {
291
- label: "Agent Card (JSON)",
292
- required: !0,
293
- description: "Paste the agent's /.well-known/agent.json document",
294
- children: /* @__PURE__ */ D(_, {
295
- value: X.agentCardJson,
296
- onChange: (e) => Z({
297
- ...X,
298
- agentCardJson: e.target.value
299
- }),
300
- rows: 12,
301
- className: "font-mono text-xs"
514
+ })] }, e.key))
515
+ })] })] }),
516
+ /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(p, { children: /* @__PURE__ */ D(m, {
517
+ className: "flex items-center gap-2",
518
+ children: [/* @__PURE__ */ E(De, {
519
+ size: 18,
520
+ "aria-hidden": "true"
521
+ }), k("botlit.a2aRegistry.auth.title", "Authentication")]
522
+ }) }), /* @__PURE__ */ E(d, { children: /* @__PURE__ */ D("div", {
523
+ className: "space-y-2",
524
+ children: [/* @__PURE__ */ E("p", {
525
+ className: "text-sm text-text-secondary",
526
+ children: k("botlit.a2aRegistry.auth.schemes", "Supported Schemes")
527
+ }), /* @__PURE__ */ E("div", {
528
+ className: "flex flex-wrap gap-2",
529
+ children: Y.authenticationSchemes.length > 0 ? Y.authenticationSchemes.map((e) => /* @__PURE__ */ E(g, {
530
+ variant: "outline",
531
+ children: e
532
+ }, e)) : /* @__PURE__ */ E("span", {
533
+ className: "text-text-secondary",
534
+ children: k("botlit.a2aRegistry.auth.noneSpecified", "None specified")
302
535
  })
303
- }),
304
- !H(X.agentCardJson) && /* @__PURE__ */ D("p", {
305
- className: "text-sm text-status-error-text",
306
- children: "Agent card must be a valid JSON object."
307
- })
308
- ]
309
- })] }),
310
- /* @__PURE__ */ O(c, {
311
- treatment: "glass",
312
- glow: !0,
313
- children: [/* @__PURE__ */ O(d, { children: [/* @__PURE__ */ O(f, {
536
+ })]
537
+ }) })] }),
538
+ /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ D(p, { children: [/* @__PURE__ */ D(m, {
314
539
  className: "flex items-center gap-2",
315
- children: [/* @__PURE__ */ D(N, { size: 18 }), "Agent Card"]
316
- }), /* @__PURE__ */ D(u, { children: "Public agent metadata per A2A spec" })] }), /* @__PURE__ */ O(l, {
317
- className: "space-y-4",
318
- children: [!R && G?.wellKnownUrl && /* @__PURE__ */ O("div", {
319
- className: "flex items-center gap-2 p-3 bg-bg-sunken rounded-lg",
320
- children: [/* @__PURE__ */ D(N, {
321
- size: 16,
322
- className: "text-text-secondary"
323
- }), /* @__PURE__ */ O("a", {
324
- href: G.wellKnownUrl,
325
- target: "_blank",
326
- rel: "noopener noreferrer",
327
- className: "text-sm text-primary hover:underline flex items-center gap-1",
328
- children: [G.wellKnownUrl, /* @__PURE__ */ D(M, { size: 12 })]
329
- })]
330
- }), /* @__PURE__ */ O("div", {
331
- className: "grid grid-cols-2 md:grid-cols-4 gap-4",
540
+ children: [/* @__PURE__ */ E(je, {
541
+ size: 18,
542
+ "aria-hidden": "true"
543
+ }), k("botlit.a2aRegistry.skills.title", "Skills")]
544
+ }), /* @__PURE__ */ E(f, { children: k("botlit.a2aRegistry.skills.description", "Capabilities exposed by this agent") })] }), /* @__PURE__ */ E(d, { children: Y.skills.length > 0 ? /* @__PURE__ */ E("div", {
545
+ className: "space-y-3",
546
+ children: Y.skills.map((e) => /* @__PURE__ */ D("div", {
547
+ className: "p-4 border border-border-subtle rounded-lg",
332
548
  children: [
333
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
334
- className: "text-sm text-text-secondary",
335
- children: "Agent URL"
336
- }), /* @__PURE__ */ D("p", {
337
- className: "font-medium font-mono text-sm",
338
- children: Q.url || "—"
339
- })] }),
340
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
341
- className: "text-sm text-text-secondary",
342
- children: "Version"
343
- }), /* @__PURE__ */ D(m, {
344
- variant: "outline",
345
- children: Q.version || "—"
346
- })] }),
347
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
348
- className: "text-sm text-text-secondary",
349
- children: "Provider"
350
- }), /* @__PURE__ */ D("p", {
351
- className: "font-medium",
352
- children: Q.providerOrganization || "—"
353
- })] }),
354
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
355
- className: "text-sm text-text-secondary",
356
- children: "Documentation"
357
- }), Q.documentationUrl ? /* @__PURE__ */ O("a", {
358
- href: Q.documentationUrl,
359
- target: "_blank",
360
- rel: "noopener noreferrer",
361
- className: "text-primary hover:underline flex items-center gap-1",
362
- children: ["View Docs ", /* @__PURE__ */ D(M, { size: 12 })]
363
- }) : /* @__PURE__ */ D("p", {
364
- className: "text-text-secondary",
365
- children: "—"
366
- })] })
549
+ /* @__PURE__ */ D("div", {
550
+ className: "flex items-start justify-between gap-2",
551
+ children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h4", {
552
+ className: "font-medium",
553
+ children: e.name
554
+ }), /* @__PURE__ */ E("p", {
555
+ className: "text-sm text-text-secondary",
556
+ children: e.description
557
+ })] }), /* @__PURE__ */ E(g, {
558
+ variant: "outline",
559
+ children: e.id
560
+ })]
561
+ }),
562
+ e.tags.length > 0 && /* @__PURE__ */ E("div", {
563
+ className: "mt-2 flex flex-wrap gap-1",
564
+ children: e.tags.map((e) => /* @__PURE__ */ E(g, {
565
+ variant: "secondary",
566
+ className: "text-xs",
567
+ children: e
568
+ }, e))
569
+ }),
570
+ e.examples.length > 0 && /* @__PURE__ */ D("div", {
571
+ className: "mt-2",
572
+ children: [/* @__PURE__ */ E("p", {
573
+ className: "text-xs text-text-secondary",
574
+ children: k("botlit.a2aRegistry.skills.examples", "Examples:")
575
+ }), /* @__PURE__ */ E("ul", {
576
+ className: "text-sm text-text-secondary list-disc list-inside",
577
+ children: e.examples.map((e, t) => /* @__PURE__ */ E("li", { children: e }, t))
578
+ })]
579
+ })
367
580
  ]
368
- })]
369
- })]
370
- }),
371
- /* @__PURE__ */ O(c, { children: [/* @__PURE__ */ D(d, { children: /* @__PURE__ */ O(f, {
372
- className: "flex items-center gap-2",
373
- children: [/* @__PURE__ */ D(I, { size: 18 }), "Capabilities"]
374
- }) }), /* @__PURE__ */ O(l, { children: [/* @__PURE__ */ D("div", {
375
- className: "grid grid-cols-2 md:grid-cols-3 gap-4",
376
- children: [
377
- {
378
- key: "streaming",
379
- label: "Streaming",
380
- value: Q.capabilities.streaming
381
- },
382
- {
383
- key: "pushNotifications",
384
- label: "Push Notifications",
385
- value: Q.capabilities.pushNotifications
386
- },
387
- {
388
- key: "stateTransitionHistory",
389
- label: "State History",
390
- value: Q.capabilities.stateTransitionHistory
391
- }
392
- ].map((e) => /* @__PURE__ */ O("div", {
393
- className: `p-3 rounded-lg border ${e.value ? "border-status-success-border bg-status-success-bg-subtle" : "border-border-subtle bg-bg-sunken"}`,
394
- children: [/* @__PURE__ */ D("p", {
395
- className: "font-medium",
396
- children: e.label
397
- }), /* @__PURE__ */ D(m, {
398
- variant: e.value ? "success" : "secondary",
399
- children: e.value ? "Supported" : "Not Supported"
400
- })]
401
- }, e.key))
402
- }), /* @__PURE__ */ O("div", {
403
- className: "mt-4 grid grid-cols-2 gap-4",
404
- children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
405
- className: "text-sm text-text-secondary mb-2",
406
- children: "Input Modes"
407
- }), /* @__PURE__ */ D("div", {
408
- className: "flex flex-wrap gap-2",
409
- children: Q.defaultInputModes.length > 0 ? Q.defaultInputModes.map((e) => /* @__PURE__ */ D(m, {
410
- variant: "outline",
411
- children: e
412
- }, e)) : /* @__PURE__ */ D("span", {
413
- className: "text-text-secondary",
414
- children: "None"
415
- })
416
- })] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
417
- className: "text-sm text-text-secondary mb-2",
418
- children: "Output Modes"
419
- }), /* @__PURE__ */ D("div", {
420
- className: "flex flex-wrap gap-2",
421
- children: Q.defaultOutputModes.length > 0 ? Q.defaultOutputModes.map((e) => /* @__PURE__ */ D(m, {
422
- variant: "outline",
423
- children: e
424
- }, e)) : /* @__PURE__ */ D("span", {
425
- className: "text-text-secondary",
426
- children: "None"
427
- })
428
- })] })]
429
- })] })] }),
430
- /* @__PURE__ */ O(c, { children: [/* @__PURE__ */ D(d, { children: /* @__PURE__ */ O(f, {
431
- className: "flex items-center gap-2",
432
- children: [/* @__PURE__ */ D(ae, { size: 18 }), "Authentication"]
433
- }) }), /* @__PURE__ */ D(l, { children: /* @__PURE__ */ O("div", {
434
- className: "space-y-2",
435
- children: [/* @__PURE__ */ D("p", {
436
- className: "text-sm text-text-secondary",
437
- children: "Supported Schemes"
438
- }), /* @__PURE__ */ D("div", {
439
- className: "flex flex-wrap gap-2",
440
- children: Q.authenticationSchemes.length > 0 ? Q.authenticationSchemes.map((e) => /* @__PURE__ */ D(m, {
441
- variant: "outline",
442
- children: e
443
- }, e)) : /* @__PURE__ */ D("span", {
444
- className: "text-text-secondary",
445
- children: "None specified"
446
- })
447
- })]
448
- }) })] }),
449
- /* @__PURE__ */ O(c, { children: [/* @__PURE__ */ O(d, { children: [/* @__PURE__ */ O(f, {
581
+ }, e.id))
582
+ }) : /* @__PURE__ */ E("p", {
583
+ className: "text-text-secondary",
584
+ children: k("botlit.a2aRegistry.skills.none", "No skills defined")
585
+ }) })] })
586
+ ] }) : /* @__PURE__ */ E(u, { children: /* @__PURE__ */ E(d, {
587
+ className: "py-8 text-center text-sm text-text-secondary",
588
+ children: k("botlit.a2aRegistry.preview.empty", "Paste a valid agent card above to preview the agent's capabilities, authentication and skills.")
589
+ }) }),
590
+ !R && F && /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ D(p, { children: [/* @__PURE__ */ D(m, {
450
591
  className: "flex items-center gap-2",
451
- children: [/* @__PURE__ */ D(I, { size: 18 }), "Skills"]
452
- }), /* @__PURE__ */ D(u, { children: "Capabilities exposed by this agent" })] }), /* @__PURE__ */ D(l, { children: Q.skills.length > 0 ? /* @__PURE__ */ D("div", {
592
+ children: [/* @__PURE__ */ E(ke, {
593
+ size: 18,
594
+ "aria-hidden": "true"
595
+ }), k("botlit.a2aRegistry.entitlements.title", "Entitlements")]
596
+ }), /* @__PURE__ */ E(f, { children: k("botlit.a2aRegistry.entitlements.description", "Which of your agents may connect to this agent, and until when") })] }), /* @__PURE__ */ D(d, {
453
597
  className: "space-y-3",
454
- children: Q.skills.map((e) => /* @__PURE__ */ O("div", {
598
+ children: [pt && /* @__PURE__ */ D("div", {
599
+ role: "status",
600
+ className: "flex items-start gap-2 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3 text-sm",
601
+ children: [/* @__PURE__ */ E(Ce, {
602
+ size: 16,
603
+ className: "mt-0.5 shrink-0 text-status-warning-text",
604
+ "aria-hidden": "true"
605
+ }), /* @__PURE__ */ E("span", { children: k("botlit.a2aRegistry.entitlements.noneActive", "No active entitlement: every connection to this agent is refused. Edit the entry and add one to allow your agents to connect.") })]
606
+ }), it.map((e) => /* @__PURE__ */ E("div", {
455
607
  className: "p-4 border border-border-subtle rounded-lg",
456
- children: [
457
- /* @__PURE__ */ O("div", {
458
- className: "flex items-start justify-between",
459
- children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h4", {
608
+ children: e.recognised ? /* @__PURE__ */ D("dl", {
609
+ className: "grid grid-cols-1 md:grid-cols-3 gap-3 text-sm",
610
+ children: [
611
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
612
+ className: "text-text-secondary",
613
+ children: k("botlit.a2aRegistry.entitlements.permissionLabel", "Permission")
614
+ }), /* @__PURE__ */ E("dd", {
460
615
  className: "font-medium",
461
- children: e.name
462
- }), /* @__PURE__ */ D("p", {
463
- className: "text-sm text-text-secondary",
464
- children: e.description
465
- })] }), /* @__PURE__ */ D(m, {
466
- variant: "outline",
467
- children: e.id
468
- })]
469
- }),
470
- e.tags.length > 0 && /* @__PURE__ */ D("div", {
471
- className: "mt-2 flex flex-wrap gap-1",
472
- children: e.tags.map((e) => /* @__PURE__ */ D(m, {
473
- variant: "secondary",
474
- className: "text-xs",
475
- children: e
476
- }, e))
477
- }),
478
- e.examples.length > 0 && /* @__PURE__ */ O("div", {
479
- className: "mt-2",
480
- children: [/* @__PURE__ */ D("p", {
481
- className: "text-xs text-text-secondary",
482
- children: "Examples:"
483
- }), /* @__PURE__ */ D("ul", {
484
- className: "text-sm text-text-secondary list-disc list-inside",
485
- children: e.examples.map((e, t) => /* @__PURE__ */ D("li", { children: e }, t))
486
- })]
487
- })
488
- ]
489
- }, e.id))
490
- }) : /* @__PURE__ */ D("p", {
491
- className: "text-text-secondary",
492
- children: "No skills defined"
493
- }) })] }),
494
- /* @__PURE__ */ O(c, { children: [/* @__PURE__ */ O(d, { children: [/* @__PURE__ */ O(f, {
495
- className: "flex items-center gap-2",
496
- children: [/* @__PURE__ */ D(P, { size: 18 }), "Entitlements"]
497
- }), /* @__PURE__ */ D(u, { children: "Which apps/agents can invoke this A2A agent" })] }), /* @__PURE__ */ D(l, { children: $.length > 0 ? /* @__PURE__ */ D("div", {
498
- className: "space-y-3",
499
- children: $.map((e) => /* @__PURE__ */ O("div", {
500
- className: "p-4 border border-border-subtle rounded-lg",
501
- children: [/* @__PURE__ */ O("div", {
502
- className: "flex items-center justify-between mb-2",
503
- children: [/* @__PURE__ */ O("div", {
504
- className: "flex items-center gap-2",
505
- children: [/* @__PURE__ */ D(m, {
506
- variant: "outline",
507
- className: "capitalize",
508
- children: e.sourceType
509
- }), /* @__PURE__ */ D("span", {
510
- className: "font-mono text-sm",
511
- children: e.sourceId
512
- })]
513
- }), e.maxHops && /* @__PURE__ */ O("span", {
514
- className: "text-sm text-text-secondary",
515
- children: ["Max Hops: ", e.maxHops]
516
- })]
517
- }), /* @__PURE__ */ O("div", {
518
- className: "grid grid-cols-2 gap-4 text-sm",
519
- children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
520
- className: "text-text-secondary",
521
- children: "Allowed Skills"
522
- }), e.allowedSkills.length > 0 ? /* @__PURE__ */ D("div", {
523
- className: "flex flex-wrap gap-1 mt-1",
524
- children: e.allowedSkills.map((e) => /* @__PURE__ */ D(m, {
525
- variant: "success",
526
- className: "text-xs",
527
- children: e
528
- }, e))
529
- }) : /* @__PURE__ */ D("span", {
530
- className: "text-text-secondary",
531
- children: "All"
532
- })] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
533
- className: "text-text-secondary",
534
- children: "Disallowed Skills"
535
- }), e.disallowedSkills.length > 0 ? /* @__PURE__ */ D("div", {
536
- className: "flex flex-wrap gap-1 mt-1",
537
- children: e.disallowedSkills.map((e) => /* @__PURE__ */ D(m, {
538
- variant: "destructive",
539
- className: "text-xs",
540
- children: e
541
- }, e))
542
- }) : /* @__PURE__ */ D("span", {
543
- className: "text-text-secondary",
544
- children: "None"
545
- })] })]
546
- })]
547
- }, e.id))
548
- }) : /* @__PURE__ */ D("p", {
549
- className: "text-text-secondary",
550
- children: "No entitlements configured"
551
- }) })] }),
552
- !R && G && /* @__PURE__ */ O(c, { children: [/* @__PURE__ */ D(d, { children: /* @__PURE__ */ D(f, { children: "Metadata" }) }), /* @__PURE__ */ D(l, { children: /* @__PURE__ */ O("div", {
616
+ children: ot(e.permission)
617
+ })] }),
618
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
619
+ className: "text-text-secondary",
620
+ children: k("botlit.a2aRegistry.entitlements.agentsLabel", "Your agents")
621
+ }), /* @__PURE__ */ E("dd", { children: e.agentIds.length > 0 ? e.agentIds.map((e) => et.get(e) ?? e).join(", ") : k("botlit.a2aRegistry.entitlements.anyAgent", "Any agent in this workspace") })] }),
622
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
623
+ className: "text-text-secondary",
624
+ children: k("botlit.a2aRegistry.entitlements.validityLabel", "Valid")
625
+ }), /* @__PURE__ */ E("dd", { children: e.validFrom || e.validUntil ? k("botlit.a2aRegistry.entitlements.validRange", "{{from}} to {{until}}", {
626
+ from: e.validFrom ? x(e.validFrom) : k("botlit.a2aRegistry.entitlements.openStart", "now"),
627
+ until: e.validUntil ? x(e.validUntil) : k("botlit.a2aRegistry.entitlements.openEnd", "no end date")
628
+ }) : k("botlit.a2aRegistry.entitlements.always", "Always") })] }),
629
+ e.unenforced.length > 0 && /* @__PURE__ */ E("p", {
630
+ className: "md:col-span-3 text-xs text-text-secondary",
631
+ children: k("botlit.a2aRegistry.entitlements.unenforced", "Also stored but not enforced on A2A calls: {{fields}}", { fields: e.unenforced.join(", ") })
632
+ })
633
+ ]
634
+ }) : /* @__PURE__ */ E("p", {
635
+ className: "text-sm text-text-secondary",
636
+ children: k("botlit.a2aRegistry.entitlements.unrecognised", "A stored entitlement without a permission. The service ignores it.")
637
+ })
638
+ }, e.id))]
639
+ })] }),
640
+ !y && F && /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(p, { children: /* @__PURE__ */ E(m, { children: k("botlit.a2aRegistry.metadata.title", "Metadata") }) }), /* @__PURE__ */ E(d, { children: /* @__PURE__ */ D("dl", {
553
641
  className: "grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",
554
642
  children: [
555
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
643
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
556
644
  className: "text-text-secondary",
557
- children: "Created"
558
- }), /* @__PURE__ */ D("p", {
645
+ children: k("botlit.a2aRegistry.metadata.created", "Created")
646
+ }), /* @__PURE__ */ E("dd", {
559
647
  className: "font-medium",
560
- children: S(G.createdAt)
648
+ children: ye(F.createdAt)
561
649
  })] }),
562
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
650
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
563
651
  className: "text-text-secondary",
564
- children: "Updated"
565
- }), /* @__PURE__ */ D("p", {
652
+ children: k("botlit.a2aRegistry.metadata.updated", "Updated")
653
+ }), /* @__PURE__ */ E("dd", {
566
654
  className: "font-medium",
567
- children: S(G.updatedAt)
655
+ children: ye(F.updatedAt)
568
656
  })] }),
569
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
657
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
570
658
  className: "text-text-secondary",
571
- children: "Revision"
572
- }), /* @__PURE__ */ D("p", {
659
+ children: k("botlit.a2aRegistry.metadata.revision", "Revision")
660
+ }), /* @__PURE__ */ E("dd", {
573
661
  className: "font-medium",
574
- children: G.revision
662
+ children: F.revision
575
663
  })] }),
576
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
664
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
577
665
  className: "text-text-secondary",
578
- children: "Visibility"
579
- }), /* @__PURE__ */ D(m, {
666
+ children: k("botlit.a2aRegistry.metadata.visibility", "Visibility")
667
+ }), /* @__PURE__ */ E("dd", { children: /* @__PURE__ */ E(g, {
580
668
  variant: "outline",
581
- children: G.visibility
582
- })] })
669
+ children: k(`botlit.visibility.${F.visibility.toLowerCase()}`, F.visibility.charAt(0) + F.visibility.slice(1).toLowerCase())
670
+ }) })] })
583
671
  ]
584
672
  }) })] })
585
673
  ]
586
674
  })
587
675
  });
676
+ }, Fe = ({ drafts: e, issues: t, agents: n, permissionLabel: r, onAdd: a, onRemove: o, onChange: s }) => {
677
+ let c = i();
678
+ return /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ D(p, { children: [/* @__PURE__ */ D(m, {
679
+ className: "flex items-center gap-2",
680
+ children: [/* @__PURE__ */ E(ke, {
681
+ size: 18,
682
+ "aria-hidden": "true"
683
+ }), c("botlit.a2aRegistry.entitlements.title", "Entitlements")]
684
+ }), /* @__PURE__ */ E(f, { children: c("botlit.a2aRegistry.entitlements.editorHelp", "Without an entitlement every connection to this agent is refused. Add one to let your agents connect; limit it to some agents or to a date range if needed.") })] }), /* @__PURE__ */ D(d, {
685
+ className: "space-y-4",
686
+ children: [
687
+ e.length === 0 && /* @__PURE__ */ E("p", {
688
+ className: "text-sm text-text-secondary",
689
+ children: c("botlit.a2aRegistry.entitlements.noneYet", "No entitlements yet: connections will be refused.")
690
+ }),
691
+ e.map((e, i) => {
692
+ let a = `a2a-entitlement-${i}`, l = t[i];
693
+ return /* @__PURE__ */ D("fieldset", {
694
+ className: "space-y-3 rounded-lg border border-border-subtle p-4",
695
+ children: [
696
+ /* @__PURE__ */ E("legend", {
697
+ className: "px-1 text-sm font-medium",
698
+ children: c("botlit.a2aRegistry.entitlements.rowLegend", "Entitlement {{number}}", { number: i + 1 })
699
+ }),
700
+ /* @__PURE__ */ D("div", {
701
+ className: "grid grid-cols-1 md:grid-cols-3 gap-3",
702
+ children: [
703
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
704
+ htmlFor: `${a}-permission`,
705
+ className: "mb-1 block text-sm font-medium",
706
+ children: c("botlit.a2aRegistry.entitlements.permissionLabel", "Permission")
707
+ }), /* @__PURE__ */ E("select", {
708
+ id: `${a}-permission`,
709
+ className: M,
710
+ value: e.permission,
711
+ onChange: (e) => s(i, { permission: e.target.value }),
712
+ children: y.map((e) => /* @__PURE__ */ E("option", {
713
+ value: e,
714
+ children: r(e)
715
+ }, e))
716
+ })] }),
717
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
718
+ htmlFor: `${a}-from`,
719
+ className: "mb-1 block text-sm font-medium",
720
+ children: c("botlit.a2aRegistry.entitlements.validFrom", "Valid from (optional)")
721
+ }), /* @__PURE__ */ E(v, {
722
+ id: `${a}-from`,
723
+ type: "date",
724
+ value: e.validFrom,
725
+ onChange: (e) => s(i, { validFrom: e.target.value })
726
+ })] }),
727
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("label", {
728
+ htmlFor: `${a}-until`,
729
+ className: "mb-1 block text-sm font-medium",
730
+ children: c("botlit.a2aRegistry.entitlements.validUntil", "Valid until (optional)")
731
+ }), /* @__PURE__ */ E(v, {
732
+ id: `${a}-until`,
733
+ type: "date",
734
+ value: e.validUntil,
735
+ "aria-invalid": l ? !0 : void 0,
736
+ "aria-describedby": l ? `${a}-error` : void 0,
737
+ onChange: (e) => s(i, { validUntil: e.target.value })
738
+ })] })
739
+ ]
740
+ }),
741
+ l && /* @__PURE__ */ E("p", {
742
+ id: `${a}-error`,
743
+ role: "alert",
744
+ className: "text-xs text-status-error-text",
745
+ children: c("botlit.a2aRegistry.entitlements.validityOrder", "The end date must not be before the start date")
746
+ }),
747
+ /* @__PURE__ */ D("fieldset", { children: [
748
+ /* @__PURE__ */ E("legend", {
749
+ className: "mb-1 text-sm font-medium",
750
+ children: c("botlit.a2aRegistry.entitlements.agentsLabel", "Your agents")
751
+ }),
752
+ /* @__PURE__ */ E("p", {
753
+ className: "mb-2 text-xs text-text-secondary",
754
+ children: c("botlit.a2aRegistry.entitlements.agentsHelp", "Leave all unticked to allow any agent in this workspace.")
755
+ }),
756
+ n.length === 0 ? /* @__PURE__ */ E("p", {
757
+ className: "text-xs text-text-secondary",
758
+ children: c("botlit.a2aRegistry.entitlements.noAgents", "No agents in this workspace yet.")
759
+ }) : /* @__PURE__ */ E("div", {
760
+ className: "grid max-h-48 grid-cols-1 gap-1 overflow-y-auto md:grid-cols-2",
761
+ children: n.map((t) => {
762
+ let n = e.agentIds.includes(t.id);
763
+ return /* @__PURE__ */ D("label", {
764
+ className: "flex items-center gap-2 text-sm",
765
+ children: [/* @__PURE__ */ E("input", {
766
+ type: "checkbox",
767
+ checked: n,
768
+ onChange: () => s(i, { agentIds: n ? e.agentIds.filter((e) => e !== t.id) : [...e.agentIds, t.id] })
769
+ }), /* @__PURE__ */ E("span", {
770
+ className: "truncate",
771
+ children: t.name
772
+ })]
773
+ }, t.id);
774
+ })
775
+ })
776
+ ] }),
777
+ /* @__PURE__ */ E("div", {
778
+ className: "flex justify-end",
779
+ children: /* @__PURE__ */ E(h, {
780
+ type: "button",
781
+ variant: "ghost",
782
+ size: "sm",
783
+ leftIcon: /* @__PURE__ */ E(Ae, { size: 14 }),
784
+ onClick: () => o(i),
785
+ children: c("botlit.a2aRegistry.entitlements.remove", "Remove entitlement")
786
+ })
787
+ })
788
+ ]
789
+ }, a);
790
+ }),
791
+ /* @__PURE__ */ E(h, {
792
+ type: "button",
793
+ variant: "outline",
794
+ leftIcon: /* @__PURE__ */ E(k, { size: 16 }),
795
+ onClick: a,
796
+ children: c("botlit.a2aRegistry.entitlements.add", "Add entitlement")
797
+ })
798
+ ]
799
+ })] });
588
800
  };
589
- export { U as A2AAgentDetailPage };
801
+ export { P as A2AAgentDetailPage };
590
802
 
591
803
  //# sourceMappingURL=A2AAgentDetailPage.js.map