@agent-factory-platform/agent-react 0.5.0 → 0.7.0
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/README.md +6 -0
- package/dist/agent-react.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +843 -640
- package/dist/workflow.d.ts +56 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Oe = Object.defineProperty;
|
|
2
|
+
var Ee = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import { useSyncExternalStore as
|
|
9
|
-
import { jsx as a, jsxs as t, Fragment as
|
|
10
|
-
import { create as
|
|
11
|
-
import { agentV1 as
|
|
12
|
-
import { AgentSessionModel as
|
|
13
|
-
import { Card as
|
|
14
|
-
import { Wrench as
|
|
15
|
-
function
|
|
16
|
-
return
|
|
5
|
+
var Ue = (e, n, l) => n in e ? Oe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[n] = l;
|
|
6
|
+
var $ = (e, n, l) => Ue(e, typeof n != "symbol" ? n + "" : n, l), fe = (e, n, l) => n.has(e) || Ee("Cannot " + l);
|
|
7
|
+
var P = (e, n, l) => (fe(e, n, "read from private field"), l ? l.call(e) : n.get(e)), G = (e, n, l) => n.has(e) ? Ee("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(e) : n.set(e, l), Te = (e, n, l, s) => (fe(e, n, "write to private field"), s ? s.call(e, l) : n.set(e, l), l), le = (e, n, l) => (fe(e, n, "access private method"), l);
|
|
8
|
+
import { useSyncExternalStore as ve, useState as x, useEffect as We, useMemo as Fe } from "react";
|
|
9
|
+
import { jsx as a, jsxs as t, Fragment as ke } from "react/jsx-runtime";
|
|
10
|
+
import { create as v } from "@bufbuild/protobuf";
|
|
11
|
+
import { agentV1 as k, workflowV1 as se } from "@agent-factory-platform/client";
|
|
12
|
+
import { AgentSessionModel as Va } from "@agent-factory-platform/client";
|
|
13
|
+
import { Card as R, CardLabel as y, CardTitle as C, Tag as S, Button as p, AvatarBadge as Se, StateView as A, Input as z, Textarea as ce, NativeSelect as me, Switch as L } from "@agent-factory-platform/ui-kit";
|
|
14
|
+
import { Wrench as Ke, Sparkles as Ge, Check as Ve, Bot as Le, Paperclip as Ye, CircleStop as He, Send as Qe, MessageSquarePlus as Xe, ChevronRight as Ze, Trash2 as ea, PackageCheck as aa, Network as De, BookOpen as na, Brain as ta, GitFork as ia, Activity as la, GitBranch as sa, Pause as ra, Play as ca, Square as oa, RotateCcw as da } from "lucide-react";
|
|
15
|
+
function ha(e) {
|
|
16
|
+
return ve(e.subscribe, e.getSnapshot, e.getSnapshot);
|
|
17
17
|
}
|
|
18
|
-
var
|
|
19
|
-
class
|
|
18
|
+
var J, O, V, oe, U, re;
|
|
19
|
+
class Da {
|
|
20
20
|
constructor() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
G(this, U);
|
|
22
|
+
G(this, J, /* @__PURE__ */ new Map());
|
|
23
|
+
G(this, O, /* @__PURE__ */ new Map());
|
|
24
|
+
G(this, V, /* @__PURE__ */ new Set());
|
|
25
|
+
G(this, oe, 0);
|
|
26
|
+
$(this, "getSnapshot", () => P(this, oe));
|
|
27
|
+
$(this, "subscribe", (n) => (P(this, V).add(n), () => P(this, V).delete(n)));
|
|
28
28
|
}
|
|
29
|
-
register(
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
return
|
|
29
|
+
register(n, l) {
|
|
30
|
+
const s = l;
|
|
31
|
+
return P(this, J).set(n, s), le(this, U, re).call(this), () => {
|
|
32
|
+
if (P(this, J).get(n) !== s) return !1;
|
|
33
|
+
const i = P(this, J).delete(n);
|
|
34
|
+
return i && le(this, U, re).call(this), i;
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
registerData(l, s
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
if (
|
|
41
|
-
const
|
|
42
|
-
return
|
|
37
|
+
registerData(n, l, s) {
|
|
38
|
+
const i = { decode: l, renderer: s };
|
|
39
|
+
return P(this, O).set(n, i), le(this, U, re).call(this), () => {
|
|
40
|
+
if (P(this, O).get(n) !== i) return !1;
|
|
41
|
+
const c = P(this, O).delete(n);
|
|
42
|
+
return c && le(this, U, re).call(this), c;
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
render(
|
|
46
|
-
if (
|
|
47
|
-
const
|
|
48
|
-
if (!
|
|
45
|
+
render(n, l) {
|
|
46
|
+
if (n === "data") {
|
|
47
|
+
const i = l, c = P(this, O).get(i.name);
|
|
48
|
+
if (!c) return be(i.name, "unknown");
|
|
49
49
|
try {
|
|
50
|
-
const
|
|
51
|
-
return /* @__PURE__ */ a(d, { value:
|
|
50
|
+
const o = { ...i, value: c.decode(i.value) }, d = c.renderer;
|
|
51
|
+
return /* @__PURE__ */ a(d, { value: o });
|
|
52
52
|
} catch {
|
|
53
|
-
return be(
|
|
53
|
+
return be(i.name, "malformed");
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
return
|
|
56
|
+
const s = P(this, J).get(n);
|
|
57
|
+
return s ? /* @__PURE__ */ a(s, { value: l }) : null;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
J = new WeakMap(), O = new WeakMap(), V = new WeakMap(), oe = new WeakMap(), U = new WeakSet(), re = function() {
|
|
61
|
+
Te(this, oe, P(this, oe) + 1), P(this, V).forEach((n) => n());
|
|
62
62
|
};
|
|
63
|
-
function be(e,
|
|
64
|
-
return /* @__PURE__ */ t("span", { "data-agent-data-fallback":
|
|
65
|
-
|
|
63
|
+
function be(e, n) {
|
|
64
|
+
return /* @__PURE__ */ t("span", { "data-agent-data-fallback": n, children: [
|
|
65
|
+
n === "malformed" ? "Invalid" : "Unsupported",
|
|
66
66
|
" data slot: ",
|
|
67
67
|
e || "(unnamed)"
|
|
68
68
|
] });
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
},
|
|
72
|
-
function
|
|
73
|
-
|
|
74
|
-
(e == null ? void 0 : e.subscribe) ??
|
|
75
|
-
(e == null ? void 0 : e.getSnapshot) ??
|
|
76
|
-
(e == null ? void 0 : e.getSnapshot) ??
|
|
70
|
+
const ua = () => () => {
|
|
71
|
+
}, $e = () => 0;
|
|
72
|
+
function de(e) {
|
|
73
|
+
ve(
|
|
74
|
+
(e == null ? void 0 : e.subscribe) ?? ua,
|
|
75
|
+
(e == null ? void 0 : e.getSnapshot) ?? $e,
|
|
76
|
+
(e == null ? void 0 : e.getSnapshot) ?? $e
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function pa({
|
|
80
80
|
items: e,
|
|
81
|
-
label:
|
|
82
|
-
registry:
|
|
81
|
+
label: n = "Execution",
|
|
82
|
+
registry: l
|
|
83
83
|
}) {
|
|
84
|
-
return
|
|
84
|
+
return de(l), e.length ? /* @__PURE__ */ t("details", { className: "af-agent-trace", children: [
|
|
85
85
|
/* @__PURE__ */ t("summary", { children: [
|
|
86
|
-
/* @__PURE__ */ a(
|
|
87
|
-
|
|
88
|
-
/* @__PURE__ */ a(
|
|
86
|
+
/* @__PURE__ */ a(Ge, { size: 14, "aria-hidden": !0 }),
|
|
87
|
+
n,
|
|
88
|
+
/* @__PURE__ */ a(S, { size: "micro", tone: "cool", children: e.length })
|
|
89
89
|
] }),
|
|
90
|
-
/* @__PURE__ */ a("ol", { children: e.map((
|
|
90
|
+
/* @__PURE__ */ a("ol", { children: e.map((s) => /* @__PURE__ */ a("li", { "data-category": s.category, children: (l == null ? void 0 : l.render("trace-item", s)) ?? /* @__PURE__ */ t(ke, { children: [
|
|
91
91
|
/* @__PURE__ */ t("span", { children: [
|
|
92
|
-
/* @__PURE__ */ a(
|
|
93
|
-
|
|
92
|
+
/* @__PURE__ */ a(Ve, { size: 13, "aria-hidden": !0 }),
|
|
93
|
+
s.kind
|
|
94
94
|
] }),
|
|
95
|
-
/* @__PURE__ */ a("span", { children: [
|
|
96
|
-
] }) },
|
|
95
|
+
/* @__PURE__ */ a("span", { children: [s.status, s.detail].filter(Boolean).join(" · ") })
|
|
96
|
+
] }) }, s.anchorSeq.toString())) })
|
|
97
97
|
] }) : null;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function ga({
|
|
100
100
|
interaction: e,
|
|
101
|
-
onResolve:
|
|
101
|
+
onResolve: n
|
|
102
102
|
}) {
|
|
103
|
-
const [
|
|
104
|
-
|
|
103
|
+
const [l, s] = x(!1), [i, c] = x(""), o = async (u) => {
|
|
104
|
+
s(!0), c("");
|
|
105
105
|
try {
|
|
106
|
-
await
|
|
107
|
-
} catch (
|
|
108
|
-
|
|
106
|
+
await n(u);
|
|
107
|
+
} catch (m) {
|
|
108
|
+
c(m instanceof Error ? m.message : String(m));
|
|
109
109
|
} finally {
|
|
110
|
-
|
|
110
|
+
s(!1);
|
|
111
111
|
}
|
|
112
112
|
}, d = e.resolvedAt ? new Date(Number(e.resolvedAt.seconds) * 1e3).toLocaleString() : "";
|
|
113
|
-
return /* @__PURE__ */ t(
|
|
113
|
+
return /* @__PURE__ */ t(R, { as: "article", tone: "warm", className: "af-agent-action", children: [
|
|
114
114
|
/* @__PURE__ */ t("div", { children: [
|
|
115
|
-
/* @__PURE__ */ t(
|
|
116
|
-
/* @__PURE__ */ a(
|
|
115
|
+
/* @__PURE__ */ t(y, { children: [
|
|
116
|
+
/* @__PURE__ */ a(Ke, { size: 14, "aria-hidden": !0 }),
|
|
117
117
|
" Approval required"
|
|
118
118
|
] }),
|
|
119
|
-
/* @__PURE__ */ a(
|
|
119
|
+
/* @__PURE__ */ a(C, { children: e.kind }),
|
|
120
120
|
d && /* @__PURE__ */ t("p", { children: [
|
|
121
121
|
"Resolved ",
|
|
122
122
|
d
|
|
123
123
|
] })
|
|
124
124
|
] }),
|
|
125
|
-
/* @__PURE__ */ a(
|
|
125
|
+
/* @__PURE__ */ a(S, { tone: e.status === "pending" ? "warning" : "neutral", children: e.status }),
|
|
126
126
|
e.status === "pending" && /* @__PURE__ */ t("div", { className: "af-agent-action__buttons", children: [
|
|
127
127
|
/* @__PURE__ */ a(
|
|
128
|
-
|
|
128
|
+
p,
|
|
129
129
|
{
|
|
130
130
|
size: "compact",
|
|
131
|
-
disabled:
|
|
132
|
-
onClick: () => void
|
|
133
|
-
children:
|
|
131
|
+
disabled: l,
|
|
132
|
+
onClick: () => void o("confirmed"),
|
|
133
|
+
children: l ? "Resolving…" : "Confirm"
|
|
134
134
|
}
|
|
135
135
|
),
|
|
136
136
|
/* @__PURE__ */ a(
|
|
137
|
-
|
|
137
|
+
p,
|
|
138
138
|
{
|
|
139
139
|
size: "compact",
|
|
140
140
|
variant: "secondary",
|
|
141
|
-
disabled:
|
|
142
|
-
onClick: () => void
|
|
141
|
+
disabled: l,
|
|
142
|
+
onClick: () => void o("rejected"),
|
|
143
143
|
children: "Reject"
|
|
144
144
|
}
|
|
145
145
|
)
|
|
146
146
|
] }),
|
|
147
|
-
|
|
147
|
+
i && /* @__PURE__ */ a("p", { role: "alert", children: i })
|
|
148
148
|
] });
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function fa({
|
|
151
151
|
item: e
|
|
152
152
|
}) {
|
|
153
|
-
return /* @__PURE__ */ t(
|
|
153
|
+
return /* @__PURE__ */ t(R, { as: "article", children: [
|
|
154
154
|
/* @__PURE__ */ t("div", { children: [
|
|
155
|
-
/* @__PURE__ */ t(
|
|
155
|
+
/* @__PURE__ */ t(y, { children: [
|
|
156
156
|
"Tool · ",
|
|
157
157
|
e.phase
|
|
158
158
|
] }),
|
|
159
|
-
/* @__PURE__ */ a(
|
|
159
|
+
/* @__PURE__ */ a(C, { children: e.name || e.callId })
|
|
160
160
|
] }),
|
|
161
|
-
/* @__PURE__ */ a(
|
|
161
|
+
/* @__PURE__ */ a(S, { tone: e.error ? "warning" : "cool", children: e.error ? "failed" : e.phase }),
|
|
162
162
|
e.arguments !== void 0 && /* @__PURE__ */ t("details", { children: [
|
|
163
163
|
/* @__PURE__ */ a("summary", { children: "Arguments" }),
|
|
164
164
|
/* @__PURE__ */ a("pre", { children: JSON.stringify(e.arguments, null, 2) })
|
|
@@ -169,90 +169,90 @@ function ra({
|
|
|
169
169
|
] })
|
|
170
170
|
] });
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function ma({
|
|
173
173
|
items: e,
|
|
174
|
-
registry:
|
|
175
|
-
onResolveInteraction:
|
|
174
|
+
registry: n,
|
|
175
|
+
onResolveInteraction: l
|
|
176
176
|
}) {
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
(
|
|
177
|
+
de(n);
|
|
178
|
+
const s = e.filter(
|
|
179
|
+
(i) => i.slot !== "trace-item" && (i.slot !== "message-content" || i.text.length > 0)
|
|
180
180
|
);
|
|
181
|
-
return /* @__PURE__ */ a(
|
|
182
|
-
(
|
|
181
|
+
return /* @__PURE__ */ a(ke, { children: s.map(
|
|
182
|
+
(i) => i.slot === "message-content" ? /* @__PURE__ */ t(
|
|
183
183
|
"article",
|
|
184
184
|
{
|
|
185
185
|
className: "af-agent-message",
|
|
186
|
-
"data-role":
|
|
187
|
-
"data-anchor-seq":
|
|
188
|
-
"data-last-updated-seq":
|
|
186
|
+
"data-role": i.role,
|
|
187
|
+
"data-anchor-seq": i.anchorSeq.toString(),
|
|
188
|
+
"data-last-updated-seq": i.lastUpdatedSeq.toString(),
|
|
189
189
|
children: [
|
|
190
190
|
/* @__PURE__ */ a(
|
|
191
|
-
|
|
191
|
+
Se,
|
|
192
192
|
{
|
|
193
|
-
initials:
|
|
193
|
+
initials: i.role === "user" ? "You" : "AF",
|
|
194
194
|
size: 30
|
|
195
195
|
}
|
|
196
196
|
),
|
|
197
197
|
/* @__PURE__ */ t("div", { className: "af-agent-message__body", children: [
|
|
198
|
-
/* @__PURE__ */ a("strong", { children:
|
|
199
|
-
/* @__PURE__ */ a("div", { className: "af-agent-message__content", children: (
|
|
198
|
+
/* @__PURE__ */ a("strong", { children: i.role === "user" ? "You" : "Agent" }),
|
|
199
|
+
/* @__PURE__ */ a("div", { className: "af-agent-message__content", children: (n == null ? void 0 : n.render("message-content", i)) ?? i.text })
|
|
200
200
|
] })
|
|
201
201
|
]
|
|
202
202
|
},
|
|
203
|
-
`message-${
|
|
203
|
+
`message-${i.anchorSeq}`
|
|
204
204
|
) : /* @__PURE__ */ a(
|
|
205
205
|
"div",
|
|
206
206
|
{
|
|
207
207
|
className: "af-agent-surface",
|
|
208
|
-
"data-slot":
|
|
209
|
-
"data-anchor-seq":
|
|
210
|
-
"data-last-updated-seq":
|
|
211
|
-
children:
|
|
212
|
-
|
|
208
|
+
"data-slot": i.slot,
|
|
209
|
+
"data-anchor-seq": i.anchorSeq.toString(),
|
|
210
|
+
"data-last-updated-seq": i.lastUpdatedSeq.toString(),
|
|
211
|
+
children: i.slot === "tool-card" ? (n == null ? void 0 : n.render("tool-card", i)) ?? /* @__PURE__ */ a(fa, { item: i }) : i.slot === "action" ? (n == null ? void 0 : n.render("action", i)) ?? (l ? /* @__PURE__ */ a(
|
|
212
|
+
ga,
|
|
213
213
|
{
|
|
214
214
|
interaction: {
|
|
215
|
-
id:
|
|
216
|
-
kind: Me(
|
|
217
|
-
status:
|
|
215
|
+
id: i.interactionId,
|
|
216
|
+
kind: Me(i),
|
|
217
|
+
status: i.phase === "requested" ? "pending" : "resolved"
|
|
218
218
|
},
|
|
219
|
-
onResolve: (
|
|
219
|
+
onResolve: (c) => l(i.interactionId, c)
|
|
220
220
|
}
|
|
221
|
-
) : /* @__PURE__ */ t(
|
|
222
|
-
Me(
|
|
221
|
+
) : /* @__PURE__ */ t(S, { tone: "warning", children: [
|
|
222
|
+
Me(i),
|
|
223
223
|
" · ",
|
|
224
|
-
|
|
225
|
-
] })) :
|
|
224
|
+
i.phase
|
|
225
|
+
] })) : i.slot === "citation" ? (n == null ? void 0 : n.render("citation", i)) ?? /* @__PURE__ */ a(S, { children: i.resourceId }) : n ? n.render("data", i) : be(i.name, "unknown")
|
|
226
226
|
},
|
|
227
|
-
|
|
227
|
+
i.slot === "tool-card" ? `tool-${i.callId}` : i.slot === "action" ? `action-${i.interactionId}` : `${i.slot}-${i.anchorSeq}-${i.blockIndex}`
|
|
228
228
|
)
|
|
229
229
|
) });
|
|
230
230
|
}
|
|
231
231
|
function Me(e) {
|
|
232
|
-
const
|
|
233
|
-
return
|
|
232
|
+
const n = e.payload && typeof e.payload == "object" && !Array.isArray(e.payload) ? e.payload.action : void 0;
|
|
233
|
+
return n && typeof n == "object" && !Array.isArray(n) && typeof n.kind == "string" ? n.kind : e.kind;
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function ba({
|
|
236
236
|
revision: e,
|
|
237
|
-
onChange:
|
|
238
|
-
onSave:
|
|
239
|
-
saving:
|
|
240
|
-
showSave:
|
|
241
|
-
registry:
|
|
237
|
+
onChange: n,
|
|
238
|
+
onSave: l,
|
|
239
|
+
saving: s = !1,
|
|
240
|
+
showSave: i = !0,
|
|
241
|
+
registry: c
|
|
242
242
|
}) {
|
|
243
|
-
|
|
244
|
-
const
|
|
245
|
-
return
|
|
243
|
+
de(c);
|
|
244
|
+
const o = c == null ? void 0 : c.render("profile-editor", { revision: e, onChange: n });
|
|
245
|
+
return o || /* @__PURE__ */ t(
|
|
246
246
|
"form",
|
|
247
247
|
{
|
|
248
248
|
className: "af-agent-persona",
|
|
249
249
|
onSubmit: (d) => {
|
|
250
|
-
d.preventDefault(),
|
|
250
|
+
d.preventDefault(), l();
|
|
251
251
|
},
|
|
252
252
|
children: [
|
|
253
253
|
/* @__PURE__ */ t("div", { className: "af-agent-persona__intro", children: [
|
|
254
254
|
/* @__PURE__ */ a(
|
|
255
|
-
|
|
255
|
+
Se,
|
|
256
256
|
{
|
|
257
257
|
initials: e.name || "AF",
|
|
258
258
|
src: e.avatar || void 0,
|
|
@@ -260,75 +260,75 @@ function ca({
|
|
|
260
260
|
}
|
|
261
261
|
),
|
|
262
262
|
/* @__PURE__ */ t("div", { children: [
|
|
263
|
-
/* @__PURE__ */ t(
|
|
264
|
-
/* @__PURE__ */ a(
|
|
263
|
+
/* @__PURE__ */ t(y, { children: [
|
|
264
|
+
/* @__PURE__ */ a(Le, { size: 14, "aria-hidden": !0 }),
|
|
265
265
|
" Agent Profile"
|
|
266
266
|
] }),
|
|
267
|
-
/* @__PURE__ */ a(
|
|
267
|
+
/* @__PURE__ */ a(C, { children: e.name || "Untitled Agent" })
|
|
268
268
|
] })
|
|
269
269
|
] }),
|
|
270
270
|
/* @__PURE__ */ t("label", { children: [
|
|
271
271
|
/* @__PURE__ */ a("span", { children: "Name" }),
|
|
272
272
|
/* @__PURE__ */ a(
|
|
273
|
-
|
|
273
|
+
z,
|
|
274
274
|
{
|
|
275
275
|
required: !0,
|
|
276
276
|
value: e.name,
|
|
277
|
-
onChange: (d) =>
|
|
277
|
+
onChange: (d) => n({ ...e, name: d.target.value })
|
|
278
278
|
}
|
|
279
279
|
)
|
|
280
280
|
] }),
|
|
281
281
|
/* @__PURE__ */ t("label", { children: [
|
|
282
282
|
/* @__PURE__ */ a("span", { children: "Description" }),
|
|
283
283
|
/* @__PURE__ */ a(
|
|
284
|
-
|
|
284
|
+
z,
|
|
285
285
|
{
|
|
286
286
|
value: e.description,
|
|
287
|
-
onChange: (d) =>
|
|
287
|
+
onChange: (d) => n({ ...e, description: d.target.value })
|
|
288
288
|
}
|
|
289
289
|
)
|
|
290
290
|
] }),
|
|
291
291
|
/* @__PURE__ */ t("label", { children: [
|
|
292
292
|
/* @__PURE__ */ a("span", { children: "Avatar URL" }),
|
|
293
293
|
/* @__PURE__ */ a(
|
|
294
|
-
|
|
294
|
+
z,
|
|
295
295
|
{
|
|
296
296
|
type: "url",
|
|
297
297
|
value: e.avatar,
|
|
298
|
-
onChange: (d) =>
|
|
298
|
+
onChange: (d) => n({ ...e, avatar: d.target.value })
|
|
299
299
|
}
|
|
300
300
|
)
|
|
301
301
|
] }),
|
|
302
302
|
/* @__PURE__ */ t("label", { children: [
|
|
303
303
|
/* @__PURE__ */ a("span", { children: "Persona" }),
|
|
304
304
|
/* @__PURE__ */ a(
|
|
305
|
-
|
|
305
|
+
ce,
|
|
306
306
|
{
|
|
307
307
|
required: !0,
|
|
308
308
|
rows: 5,
|
|
309
309
|
value: e.persona,
|
|
310
|
-
onChange: (d) =>
|
|
310
|
+
onChange: (d) => n({ ...e, persona: d.target.value })
|
|
311
311
|
}
|
|
312
312
|
)
|
|
313
313
|
] }),
|
|
314
314
|
/* @__PURE__ */ t("label", { children: [
|
|
315
315
|
/* @__PURE__ */ a("span", { children: "Purpose" }),
|
|
316
316
|
/* @__PURE__ */ a(
|
|
317
|
-
|
|
317
|
+
ce,
|
|
318
318
|
{
|
|
319
319
|
required: !0,
|
|
320
320
|
rows: 3,
|
|
321
321
|
value: e.purpose,
|
|
322
|
-
onChange: (d) =>
|
|
322
|
+
onChange: (d) => n({ ...e, purpose: d.target.value })
|
|
323
323
|
}
|
|
324
324
|
)
|
|
325
325
|
] }),
|
|
326
|
-
|
|
326
|
+
i && /* @__PURE__ */ a(p, { type: "submit", disabled: s, children: s ? "Saving…" : "Save revision" })
|
|
327
327
|
]
|
|
328
328
|
}
|
|
329
329
|
);
|
|
330
330
|
}
|
|
331
|
-
const
|
|
331
|
+
const va = (e) => e ? `${e} warning${e === 1 ? "" : "s"}` : "Ready", ka = (e) => ({
|
|
332
332
|
capability_not_installed: "Capability is not installed",
|
|
333
333
|
capability_version_unavailable: "Capability version is unavailable",
|
|
334
334
|
mcp_disabled: "MCP server is disabled",
|
|
@@ -338,18 +338,18 @@ const da = (e) => e ? `${e} warning${e === 1 ? "" : "s"}` : "Ready", oa = (e) =>
|
|
|
338
338
|
plugin_unavailable: "Plugin is unavailable",
|
|
339
339
|
skill_provider_unavailable: "Skill provider is unavailable"
|
|
340
340
|
})[e] ?? e.replaceAll("_", " ");
|
|
341
|
-
function
|
|
341
|
+
function $a({
|
|
342
342
|
composition: e,
|
|
343
|
-
loading:
|
|
344
|
-
error:
|
|
343
|
+
loading: n = !1,
|
|
344
|
+
error: l = ""
|
|
345
345
|
}) {
|
|
346
|
-
return
|
|
347
|
-
|
|
346
|
+
return n ? /* @__PURE__ */ a(A, { size: "sm", title: "Inspecting composition…" }) : l ? /* @__PURE__ */ a(
|
|
347
|
+
A,
|
|
348
348
|
{
|
|
349
349
|
size: "sm",
|
|
350
350
|
variant: "error",
|
|
351
351
|
title: "Composition unavailable",
|
|
352
|
-
description:
|
|
352
|
+
description: l
|
|
353
353
|
}
|
|
354
354
|
) : e != null && e.items.length ? /* @__PURE__ */ t(
|
|
355
355
|
"section",
|
|
@@ -359,72 +359,72 @@ function Na({
|
|
|
359
359
|
children: [
|
|
360
360
|
/* @__PURE__ */ t("header", { children: [
|
|
361
361
|
/* @__PURE__ */ t("div", { children: [
|
|
362
|
-
/* @__PURE__ */ a(
|
|
363
|
-
/* @__PURE__ */ a(
|
|
362
|
+
/* @__PURE__ */ a(y, { children: "Effective composition" }),
|
|
363
|
+
/* @__PURE__ */ a(C, { children: e.model || "No model selected" })
|
|
364
364
|
] }),
|
|
365
|
-
/* @__PURE__ */ a(
|
|
365
|
+
/* @__PURE__ */ a(S, { tone: e.issues.length ? "warning" : "success", children: va(e.issues.length) })
|
|
366
366
|
] }),
|
|
367
367
|
e.issues.length > 0 && /* @__PURE__ */ a(
|
|
368
368
|
"ul",
|
|
369
369
|
{
|
|
370
370
|
className: "af-agent-composition__issues",
|
|
371
371
|
"aria-label": "Composition warnings",
|
|
372
|
-
children: e.issues.map((
|
|
373
|
-
/* @__PURE__ */ a("strong", { children:
|
|
372
|
+
children: e.issues.map((s) => /* @__PURE__ */ t("li", { children: [
|
|
373
|
+
/* @__PURE__ */ a("strong", { children: ka(s.code) }),
|
|
374
374
|
" ",
|
|
375
|
-
|
|
376
|
-
] }, `${
|
|
375
|
+
s.message
|
|
376
|
+
] }, `${s.code}:${s.message}`))
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
|
-
/* @__PURE__ */ a("div", { className: "af-agent-composition__items", children: e.items.map((
|
|
380
|
-
|
|
379
|
+
/* @__PURE__ */ a("div", { className: "af-agent-composition__items", children: e.items.map((s) => /* @__PURE__ */ t(
|
|
380
|
+
R,
|
|
381
381
|
{
|
|
382
382
|
as: "article",
|
|
383
383
|
children: [
|
|
384
384
|
/* @__PURE__ */ t("div", { children: [
|
|
385
|
-
/* @__PURE__ */ t(
|
|
386
|
-
|
|
385
|
+
/* @__PURE__ */ t(y, { children: [
|
|
386
|
+
s.kind,
|
|
387
387
|
" · ",
|
|
388
|
-
|
|
388
|
+
s.source
|
|
389
389
|
] }),
|
|
390
|
-
/* @__PURE__ */ a(
|
|
390
|
+
/* @__PURE__ */ a(C, { children: s.id })
|
|
391
391
|
] }),
|
|
392
392
|
/* @__PURE__ */ a(
|
|
393
|
-
|
|
393
|
+
S,
|
|
394
394
|
{
|
|
395
|
-
tone:
|
|
396
|
-
children:
|
|
395
|
+
tone: s.status === "unavailable" ? "warning" : ["allowed", "enabled", "selected"].includes(s.status) ? "success" : "neutral",
|
|
396
|
+
children: s.status
|
|
397
397
|
}
|
|
398
398
|
),
|
|
399
|
-
|
|
399
|
+
s.version && /* @__PURE__ */ t("p", { children: [
|
|
400
400
|
"Version ",
|
|
401
|
-
|
|
401
|
+
s.version
|
|
402
402
|
] }),
|
|
403
|
-
|
|
403
|
+
s.reasoningEfforts.length > 0 && /* @__PURE__ */ t("p", { children: [
|
|
404
404
|
"Reasoning: ",
|
|
405
|
-
|
|
405
|
+
s.reasoningEfforts.join(", ")
|
|
406
406
|
] }),
|
|
407
|
-
|
|
407
|
+
s.inputModalities.length > 0 && /* @__PURE__ */ t("p", { children: [
|
|
408
408
|
"Input: ",
|
|
409
|
-
|
|
409
|
+
s.inputModalities.join(", ")
|
|
410
410
|
] }),
|
|
411
|
-
|
|
411
|
+
s.permissions.length > 0 && /* @__PURE__ */ t("p", { children: [
|
|
412
412
|
"Permissions: ",
|
|
413
|
-
|
|
413
|
+
s.permissions.join(", ")
|
|
414
414
|
] }),
|
|
415
|
-
|
|
415
|
+
s.dependencies.length > 0 && /* @__PURE__ */ t("p", { children: [
|
|
416
416
|
"Dependencies: ",
|
|
417
|
-
|
|
417
|
+
s.dependencies.join(", ")
|
|
418
418
|
] }),
|
|
419
|
-
|
|
419
|
+
s.reason && /* @__PURE__ */ a("p", { role: s.status === "available" ? void 0 : "alert", children: s.reason })
|
|
420
420
|
]
|
|
421
421
|
},
|
|
422
|
-
`${
|
|
422
|
+
`${s.kind}:${s.id}:${s.version}:${s.source}`
|
|
423
423
|
)) })
|
|
424
424
|
]
|
|
425
425
|
}
|
|
426
426
|
) : /* @__PURE__ */ a(
|
|
427
|
-
|
|
427
|
+
A,
|
|
428
428
|
{
|
|
429
429
|
size: "sm",
|
|
430
430
|
title: "No deployed capabilities",
|
|
@@ -432,65 +432,65 @@ function Na({
|
|
|
432
432
|
}
|
|
433
433
|
);
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Ma({
|
|
436
436
|
revision: e,
|
|
437
|
-
composition:
|
|
438
|
-
onChange:
|
|
439
|
-
onSave:
|
|
437
|
+
composition: n,
|
|
438
|
+
onChange: l,
|
|
439
|
+
onSave: s
|
|
440
440
|
}) {
|
|
441
|
-
var
|
|
442
|
-
const [
|
|
441
|
+
var Y, F, E, H, Q, w, q, I, X, j, ye, Ce, we, Ne, _e, Pe, Ae, Ie, ze, xe;
|
|
442
|
+
const [i, c] = x(e), [o, d] = x(
|
|
443
443
|
"idle"
|
|
444
|
-
), [u,
|
|
445
|
-
(
|
|
446
|
-
)) ?? [],
|
|
447
|
-
(
|
|
448
|
-
)) ?? [], b = (
|
|
444
|
+
), [u, m] = x(""), f = (n == null ? void 0 : n.items.filter(
|
|
445
|
+
(r) => r.kind === "skill" || r.kind === "skill_pack" || r.kind === "plugin" || r.kind === "mcp"
|
|
446
|
+
)) ?? [], N = (n == null ? void 0 : n.items.filter(
|
|
447
|
+
(r) => r.kind === "model" && r.status !== "unavailable"
|
|
448
|
+
)) ?? [], b = (n == null ? void 0 : n.items.filter((r) => r.kind === "tool")) ?? [], _ = (r) => l({
|
|
449
449
|
...e,
|
|
450
450
|
runtimePolicy: {
|
|
451
|
-
...
|
|
451
|
+
...v(k.RuntimePolicySchema),
|
|
452
452
|
...e.runtimePolicy,
|
|
453
|
-
...
|
|
453
|
+
...r
|
|
454
454
|
}
|
|
455
|
-
}), M = (
|
|
456
|
-
var
|
|
457
|
-
return
|
|
455
|
+
}), M = (r, h) => {
|
|
456
|
+
var g;
|
|
457
|
+
return _({
|
|
458
458
|
limits: {
|
|
459
|
-
...
|
|
460
|
-
...(
|
|
461
|
-
[
|
|
459
|
+
...v(k.ProfileLimitsSchema),
|
|
460
|
+
...(g = e.runtimePolicy) == null ? void 0 : g.limits,
|
|
461
|
+
[r]: r === "maxTokens" ? BigInt(h || 0) : Number(h || 0)
|
|
462
462
|
}
|
|
463
463
|
});
|
|
464
|
-
},
|
|
465
|
-
if (
|
|
466
|
-
const
|
|
467
|
-
h ?
|
|
468
|
-
|
|
464
|
+
}, W = (r, h) => {
|
|
465
|
+
if (r.kind === "skill" || r.kind === "skill_pack") {
|
|
466
|
+
const g = r.kind === "skill" ? { ...e.skills } : { ...e.skillPacks };
|
|
467
|
+
h ? g[r.id] = r.version : delete g[r.id], l(
|
|
468
|
+
r.kind === "skill" ? { ...e, skills: g } : { ...e, skillPacks: g }
|
|
469
469
|
);
|
|
470
470
|
}
|
|
471
|
-
if (
|
|
472
|
-
const
|
|
473
|
-
h ?
|
|
474
|
-
version:
|
|
475
|
-
}) : delete
|
|
471
|
+
if (r.kind === "plugin" || r.kind === "mcp") {
|
|
472
|
+
const g = { ...e.plugins };
|
|
473
|
+
h ? g[r.id] = v(k.PluginConfigSchema, {
|
|
474
|
+
version: r.version
|
|
475
|
+
}) : delete g[r.id], l({ ...e, plugins: g });
|
|
476
476
|
}
|
|
477
|
-
},
|
|
478
|
-
d("pending"),
|
|
477
|
+
}, ue = async () => {
|
|
478
|
+
d("pending"), m("");
|
|
479
479
|
try {
|
|
480
|
-
const
|
|
481
|
-
|
|
482
|
-
} catch (
|
|
483
|
-
|
|
480
|
+
const r = await s(e);
|
|
481
|
+
c(r ?? e), r && l(r), d("success");
|
|
482
|
+
} catch (r) {
|
|
483
|
+
l(i), m(r instanceof Error ? r.message : String(r)), d("error");
|
|
484
484
|
}
|
|
485
485
|
};
|
|
486
486
|
return /* @__PURE__ */ t("div", { className: "af-agent-settings", children: [
|
|
487
487
|
/* @__PURE__ */ a(
|
|
488
|
-
|
|
488
|
+
ba,
|
|
489
489
|
{
|
|
490
490
|
revision: e,
|
|
491
|
-
onChange:
|
|
492
|
-
onSave: () => void
|
|
493
|
-
saving:
|
|
491
|
+
onChange: l,
|
|
492
|
+
onSave: () => void ue(),
|
|
493
|
+
saving: o === "pending",
|
|
494
494
|
showSave: !1
|
|
495
495
|
}
|
|
496
496
|
),
|
|
@@ -499,22 +499,22 @@ function Pa({
|
|
|
499
499
|
/* @__PURE__ */ t("label", { children: [
|
|
500
500
|
/* @__PURE__ */ a("span", { children: "Preferred model" }),
|
|
501
501
|
/* @__PURE__ */ a(
|
|
502
|
-
|
|
502
|
+
me,
|
|
503
503
|
{
|
|
504
504
|
label: "Model",
|
|
505
|
-
value: ((
|
|
506
|
-
options:
|
|
507
|
-
value:
|
|
508
|
-
label: `${
|
|
505
|
+
value: ((F = (Y = e.runtimePolicy) == null ? void 0 : Y.model) == null ? void 0 : F.preferred) ?? "",
|
|
506
|
+
options: N.map((r) => ({
|
|
507
|
+
value: r.id,
|
|
508
|
+
label: `${r.id} · ${r.source}`
|
|
509
509
|
})),
|
|
510
|
-
onChange: (
|
|
511
|
-
var
|
|
512
|
-
const h = new Set((
|
|
513
|
-
h.add(
|
|
510
|
+
onChange: (r) => {
|
|
511
|
+
var g, T, D;
|
|
512
|
+
const h = new Set((T = (g = e.runtimePolicy) == null ? void 0 : g.model) == null ? void 0 : T.allowed);
|
|
513
|
+
h.add(r), _({
|
|
514
514
|
model: {
|
|
515
|
-
...
|
|
516
|
-
...(
|
|
517
|
-
preferred:
|
|
515
|
+
...v(k.ModelPolicySchema),
|
|
516
|
+
...(D = e.runtimePolicy) == null ? void 0 : D.model,
|
|
517
|
+
preferred: r,
|
|
518
518
|
allowed: [...h]
|
|
519
519
|
}
|
|
520
520
|
});
|
|
@@ -527,27 +527,27 @@ function Pa({
|
|
|
527
527
|
{
|
|
528
528
|
className: "af-agent-settings__checklist",
|
|
529
529
|
"aria-label": "Allowed models",
|
|
530
|
-
children:
|
|
531
|
-
var h,
|
|
530
|
+
children: N.map((r) => {
|
|
531
|
+
var h, g, T, D;
|
|
532
532
|
return /* @__PURE__ */ a(
|
|
533
|
-
|
|
533
|
+
L,
|
|
534
534
|
{
|
|
535
|
-
label: `Allow ${
|
|
536
|
-
checked: ((
|
|
537
|
-
disabled:
|
|
538
|
-
onCheckedChange: (
|
|
539
|
-
var
|
|
540
|
-
const
|
|
541
|
-
|
|
535
|
+
label: `Allow ${r.id}`,
|
|
536
|
+
checked: ((g = (h = e.runtimePolicy) == null ? void 0 : h.model) == null ? void 0 : g.allowed.includes(r.id)) ?? !1,
|
|
537
|
+
disabled: r.id === ((D = (T = e.runtimePolicy) == null ? void 0 : T.model) == null ? void 0 : D.preferred),
|
|
538
|
+
onCheckedChange: (pe) => {
|
|
539
|
+
var Z, ee, ae;
|
|
540
|
+
const K = new Set((ee = (Z = e.runtimePolicy) == null ? void 0 : Z.model) == null ? void 0 : ee.allowed);
|
|
541
|
+
pe ? K.add(r.id) : K.delete(r.id), _({
|
|
542
542
|
model: {
|
|
543
|
-
...
|
|
544
|
-
...(
|
|
545
|
-
allowed: [...
|
|
543
|
+
...v(k.ModelPolicySchema),
|
|
544
|
+
...(ae = e.runtimePolicy) == null ? void 0 : ae.model,
|
|
545
|
+
allowed: [...K]
|
|
546
546
|
}
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
549
|
},
|
|
550
|
-
|
|
550
|
+
r.id
|
|
551
551
|
);
|
|
552
552
|
})
|
|
553
553
|
}
|
|
@@ -555,22 +555,22 @@ function Pa({
|
|
|
555
555
|
/* @__PURE__ */ t("label", { children: [
|
|
556
556
|
/* @__PURE__ */ a("span", { children: "Reasoning" }),
|
|
557
557
|
/* @__PURE__ */ a(
|
|
558
|
-
|
|
558
|
+
me,
|
|
559
559
|
{
|
|
560
560
|
label: "Reasoning",
|
|
561
|
-
value: ((
|
|
562
|
-
options: ((
|
|
563
|
-
(
|
|
564
|
-
var h,
|
|
565
|
-
return
|
|
561
|
+
value: ((E = e.runtimePolicy) == null ? void 0 : E.reasoning) ?? "medium",
|
|
562
|
+
options: ((H = N.find(
|
|
563
|
+
(r) => {
|
|
564
|
+
var h, g;
|
|
565
|
+
return r.id === ((g = (h = e.runtimePolicy) == null ? void 0 : h.model) == null ? void 0 : g.preferred);
|
|
566
566
|
}
|
|
567
|
-
)) != null &&
|
|
568
|
-
(
|
|
569
|
-
var h,
|
|
570
|
-
return
|
|
567
|
+
)) != null && H.reasoningEfforts.length ? N.find(
|
|
568
|
+
(r) => {
|
|
569
|
+
var h, g;
|
|
570
|
+
return r.id === ((g = (h = e.runtimePolicy) == null ? void 0 : h.model) == null ? void 0 : g.preferred);
|
|
571
571
|
}
|
|
572
|
-
).reasoningEfforts : ["low", "medium", "high"]).map((
|
|
573
|
-
onChange: (
|
|
572
|
+
).reasoningEfforts : ["low", "medium", "high"]).map((r) => ({ value: r, label: r })),
|
|
573
|
+
onChange: (r) => _({ reasoning: r })
|
|
574
574
|
}
|
|
575
575
|
)
|
|
576
576
|
] }),
|
|
@@ -578,39 +578,39 @@ function Pa({
|
|
|
578
578
|
/* @__PURE__ */ t("label", { children: [
|
|
579
579
|
/* @__PURE__ */ a("span", { children: "Max steps" }),
|
|
580
580
|
/* @__PURE__ */ a(
|
|
581
|
-
|
|
581
|
+
z,
|
|
582
582
|
{
|
|
583
583
|
"aria-label": "Max steps",
|
|
584
584
|
type: "number",
|
|
585
585
|
min: "1",
|
|
586
|
-
value: ((
|
|
587
|
-
onChange: (
|
|
586
|
+
value: ((w = (Q = e.runtimePolicy) == null ? void 0 : Q.limits) == null ? void 0 : w.maxSteps) || "",
|
|
587
|
+
onChange: (r) => M("maxSteps", r.target.value)
|
|
588
588
|
}
|
|
589
589
|
)
|
|
590
590
|
] }),
|
|
591
591
|
/* @__PURE__ */ t("label", { children: [
|
|
592
592
|
/* @__PURE__ */ a("span", { children: "Max tool calls" }),
|
|
593
593
|
/* @__PURE__ */ a(
|
|
594
|
-
|
|
594
|
+
z,
|
|
595
595
|
{
|
|
596
596
|
"aria-label": "Max tool calls",
|
|
597
597
|
type: "number",
|
|
598
598
|
min: "0",
|
|
599
|
-
value: ((
|
|
600
|
-
onChange: (
|
|
599
|
+
value: ((I = (q = e.runtimePolicy) == null ? void 0 : q.limits) == null ? void 0 : I.maxToolCalls) || "",
|
|
600
|
+
onChange: (r) => M("maxToolCalls", r.target.value)
|
|
601
601
|
}
|
|
602
602
|
)
|
|
603
603
|
] }),
|
|
604
604
|
/* @__PURE__ */ t("label", { children: [
|
|
605
605
|
/* @__PURE__ */ a("span", { children: "Max tokens" }),
|
|
606
606
|
/* @__PURE__ */ a(
|
|
607
|
-
|
|
607
|
+
z,
|
|
608
608
|
{
|
|
609
609
|
"aria-label": "Max tokens",
|
|
610
610
|
type: "number",
|
|
611
611
|
min: "1",
|
|
612
|
-
value: ((
|
|
613
|
-
onChange: (
|
|
612
|
+
value: ((ye = (j = (X = e.runtimePolicy) == null ? void 0 : X.limits) == null ? void 0 : j.maxTokens) == null ? void 0 : ye.toString()) ?? "",
|
|
613
|
+
onChange: (r) => M("maxTokens", r.target.value)
|
|
614
614
|
}
|
|
615
615
|
)
|
|
616
616
|
] })
|
|
@@ -619,84 +619,84 @@ function Pa({
|
|
|
619
619
|
/* @__PURE__ */ t("fieldset", { children: [
|
|
620
620
|
/* @__PURE__ */ a("legend", { children: "Tool policy" }),
|
|
621
621
|
/* @__PURE__ */ a(
|
|
622
|
-
|
|
622
|
+
L,
|
|
623
623
|
{
|
|
624
624
|
label: "Allow every deployed tool",
|
|
625
|
-
checked: ((
|
|
626
|
-
onCheckedChange: (
|
|
625
|
+
checked: ((we = (Ce = e.runtimePolicy) == null ? void 0 : Ce.tools) == null ? void 0 : we.allowAll) ?? !1,
|
|
626
|
+
onCheckedChange: (r) => {
|
|
627
627
|
var h;
|
|
628
|
-
return
|
|
628
|
+
return _({
|
|
629
629
|
tools: {
|
|
630
|
-
...
|
|
630
|
+
...v(k.ToolPolicySchema),
|
|
631
631
|
...(h = e.runtimePolicy) == null ? void 0 : h.tools,
|
|
632
|
-
allowAll:
|
|
632
|
+
allowAll: r
|
|
633
633
|
}
|
|
634
634
|
});
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
),
|
|
638
|
-
b.map((
|
|
639
|
-
var
|
|
640
|
-
const h = ((
|
|
641
|
-
|
|
638
|
+
b.map((r) => {
|
|
639
|
+
var T, D, pe, K, Z, ee, ae, Re;
|
|
640
|
+
const h = ((D = (T = e.runtimePolicy) == null ? void 0 : T.tools) == null ? void 0 : D.allowAll) || ((K = (pe = e.runtimePolicy) == null ? void 0 : pe.tools) == null ? void 0 : K.allowed.includes(r.id)), g = (ee = (Z = e.runtimePolicy) == null ? void 0 : Z.tools) == null ? void 0 : ee.requireConfirmation.includes(
|
|
641
|
+
r.id
|
|
642
642
|
);
|
|
643
643
|
return /* @__PURE__ */ t("div", { className: "af-agent-settings__tool", children: [
|
|
644
644
|
/* @__PURE__ */ a(
|
|
645
|
-
|
|
645
|
+
L,
|
|
646
646
|
{
|
|
647
|
-
label:
|
|
647
|
+
label: r.id,
|
|
648
648
|
checked: !!h,
|
|
649
|
-
disabled: (
|
|
650
|
-
onCheckedChange: (
|
|
651
|
-
var
|
|
652
|
-
const
|
|
653
|
-
(
|
|
649
|
+
disabled: (Re = (ae = e.runtimePolicy) == null ? void 0 : ae.tools) == null ? void 0 : Re.allowAll,
|
|
650
|
+
onCheckedChange: (ge) => {
|
|
651
|
+
var ne, te, ie;
|
|
652
|
+
const B = new Set(
|
|
653
|
+
(te = (ne = e.runtimePolicy) == null ? void 0 : ne.tools) == null ? void 0 : te.allowed
|
|
654
654
|
);
|
|
655
|
-
|
|
655
|
+
ge ? B.add(r.id) : B.delete(r.id), _({
|
|
656
656
|
tools: {
|
|
657
|
-
...
|
|
658
|
-
...(
|
|
659
|
-
allowed: [...
|
|
657
|
+
...v(k.ToolPolicySchema),
|
|
658
|
+
...(ie = e.runtimePolicy) == null ? void 0 : ie.tools,
|
|
659
|
+
allowed: [...B]
|
|
660
660
|
}
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
664
|
),
|
|
665
665
|
/* @__PURE__ */ a(
|
|
666
|
-
|
|
666
|
+
L,
|
|
667
667
|
{
|
|
668
668
|
label: "Require confirmation",
|
|
669
|
-
checked: !!
|
|
669
|
+
checked: !!g,
|
|
670
670
|
disabled: !h,
|
|
671
|
-
onCheckedChange: (
|
|
672
|
-
var
|
|
673
|
-
const
|
|
674
|
-
(
|
|
671
|
+
onCheckedChange: (ge) => {
|
|
672
|
+
var ne, te, ie;
|
|
673
|
+
const B = new Set(
|
|
674
|
+
(te = (ne = e.runtimePolicy) == null ? void 0 : ne.tools) == null ? void 0 : te.requireConfirmation
|
|
675
675
|
);
|
|
676
|
-
|
|
676
|
+
ge ? B.add(r.id) : B.delete(r.id), _({
|
|
677
677
|
tools: {
|
|
678
|
-
...
|
|
679
|
-
...(
|
|
680
|
-
requireConfirmation: [...
|
|
678
|
+
...v(k.ToolPolicySchema),
|
|
679
|
+
...(ie = e.runtimePolicy) == null ? void 0 : ie.tools,
|
|
680
|
+
requireConfirmation: [...B]
|
|
681
681
|
}
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
685
|
)
|
|
686
|
-
] },
|
|
686
|
+
] }, r.id);
|
|
687
687
|
})
|
|
688
688
|
] }),
|
|
689
689
|
/* @__PURE__ */ t("fieldset", { children: [
|
|
690
690
|
/* @__PURE__ */ a("legend", { children: "Capabilities" }),
|
|
691
|
-
|
|
692
|
-
|
|
691
|
+
f.length ? f.map((r) => /* @__PURE__ */ a(
|
|
692
|
+
L,
|
|
693
693
|
{
|
|
694
|
-
label: `${
|
|
695
|
-
checked:
|
|
696
|
-
disabled:
|
|
697
|
-
onCheckedChange: (h) =>
|
|
694
|
+
label: `${r.kind} · ${r.id} (${r.version})`,
|
|
695
|
+
checked: r.kind === "skill" ? r.id in e.skills : r.kind === "skill_pack" ? r.id in e.skillPacks : r.id in e.plugins,
|
|
696
|
+
disabled: r.status === "unavailable",
|
|
697
|
+
onCheckedChange: (h) => W(r, h)
|
|
698
698
|
},
|
|
699
|
-
`${
|
|
699
|
+
`${r.kind}:${r.id}`
|
|
700
700
|
)) : /* @__PURE__ */ a("p", { children: "No deployed Skills or Plugins." })
|
|
701
701
|
] }),
|
|
702
702
|
/* @__PURE__ */ t("fieldset", { children: [
|
|
@@ -704,20 +704,20 @@ function Pa({
|
|
|
704
704
|
/* @__PURE__ */ t("label", { children: [
|
|
705
705
|
/* @__PURE__ */ a("span", { children: "Memory" }),
|
|
706
706
|
/* @__PURE__ */ a(
|
|
707
|
-
|
|
707
|
+
me,
|
|
708
708
|
{
|
|
709
709
|
label: "Memory",
|
|
710
|
-
value: ((
|
|
711
|
-
options: ["disabled", "session", "subject"].map((
|
|
712
|
-
value:
|
|
713
|
-
label:
|
|
710
|
+
value: ((Ne = e.memory) == null ? void 0 : Ne.mode) ?? "disabled",
|
|
711
|
+
options: ["disabled", "session", "subject"].map((r) => ({
|
|
712
|
+
value: r,
|
|
713
|
+
label: r
|
|
714
714
|
})),
|
|
715
|
-
onChange: (
|
|
715
|
+
onChange: (r) => l({
|
|
716
716
|
...e,
|
|
717
717
|
memory: {
|
|
718
|
-
...
|
|
718
|
+
...v(k.MemoryPolicySchema),
|
|
719
719
|
...e.memory,
|
|
720
|
-
mode:
|
|
720
|
+
mode: r
|
|
721
721
|
}
|
|
722
722
|
})
|
|
723
723
|
}
|
|
@@ -726,18 +726,18 @@ function Pa({
|
|
|
726
726
|
/* @__PURE__ */ t("label", { children: [
|
|
727
727
|
/* @__PURE__ */ a("span", { children: "Memory TTL days" }),
|
|
728
728
|
/* @__PURE__ */ a(
|
|
729
|
-
|
|
729
|
+
z,
|
|
730
730
|
{
|
|
731
731
|
"aria-label": "Memory TTL days",
|
|
732
732
|
type: "number",
|
|
733
733
|
min: "0",
|
|
734
|
-
value: ((
|
|
735
|
-
onChange: (
|
|
734
|
+
value: ((Pe = (_e = e.memory) == null ? void 0 : _e.ttlDays) == null ? void 0 : Pe.toString()) ?? "",
|
|
735
|
+
onChange: (r) => l({
|
|
736
736
|
...e,
|
|
737
737
|
memory: {
|
|
738
|
-
...
|
|
738
|
+
...v(k.MemoryPolicySchema),
|
|
739
739
|
...e.memory,
|
|
740
|
-
ttlDays: BigInt(
|
|
740
|
+
ttlDays: BigInt(r.target.value || 0)
|
|
741
741
|
}
|
|
742
742
|
})
|
|
743
743
|
}
|
|
@@ -746,17 +746,17 @@ function Pa({
|
|
|
746
746
|
/* @__PURE__ */ t("label", { children: [
|
|
747
747
|
/* @__PURE__ */ a("span", { children: "Knowledge space IDs" }),
|
|
748
748
|
/* @__PURE__ */ a(
|
|
749
|
-
|
|
749
|
+
ce,
|
|
750
750
|
{
|
|
751
751
|
"aria-label": "Knowledge space IDs",
|
|
752
752
|
rows: 2,
|
|
753
|
-
value: e.knowledgeBindings.map((
|
|
753
|
+
value: e.knowledgeBindings.map((r) => r.resourceId).join(`
|
|
754
754
|
`),
|
|
755
|
-
onChange: (
|
|
755
|
+
onChange: (r) => l({
|
|
756
756
|
...e,
|
|
757
|
-
knowledgeBindings:
|
|
757
|
+
knowledgeBindings: r.target.value.split(`
|
|
758
758
|
`).map((h) => h.trim()).filter(Boolean).map(
|
|
759
|
-
(h) =>
|
|
759
|
+
(h) => v(k.KnowledgeBindingSchema, {
|
|
760
760
|
resourceId: h,
|
|
761
761
|
role: "reader"
|
|
762
762
|
})
|
|
@@ -766,16 +766,16 @@ function Pa({
|
|
|
766
766
|
)
|
|
767
767
|
] }),
|
|
768
768
|
/* @__PURE__ */ a(
|
|
769
|
-
|
|
769
|
+
L,
|
|
770
770
|
{
|
|
771
771
|
label: "Subagents",
|
|
772
|
-
checked: ((
|
|
773
|
-
onCheckedChange: (
|
|
772
|
+
checked: ((Ae = e.subagent) == null ? void 0 : Ae.enabled) ?? !1,
|
|
773
|
+
onCheckedChange: (r) => l({
|
|
774
774
|
...e,
|
|
775
775
|
subagent: {
|
|
776
|
-
...
|
|
776
|
+
...v(k.CapabilityPolicySchema),
|
|
777
777
|
...e.subagent,
|
|
778
|
-
enabled:
|
|
778
|
+
enabled: r
|
|
779
779
|
}
|
|
780
780
|
})
|
|
781
781
|
}
|
|
@@ -783,32 +783,32 @@ function Pa({
|
|
|
783
783
|
/* @__PURE__ */ t("label", { children: [
|
|
784
784
|
/* @__PURE__ */ a("span", { children: "Subagent providers" }),
|
|
785
785
|
/* @__PURE__ */ a(
|
|
786
|
-
|
|
786
|
+
z,
|
|
787
787
|
{
|
|
788
788
|
"aria-label": "Subagent providers",
|
|
789
|
-
value: ((
|
|
790
|
-
onChange: (
|
|
789
|
+
value: ((Ie = e.subagent) == null ? void 0 : Ie.providers.join(", ")) ?? "",
|
|
790
|
+
onChange: (r) => l({
|
|
791
791
|
...e,
|
|
792
792
|
subagent: {
|
|
793
|
-
...
|
|
793
|
+
...v(k.CapabilityPolicySchema),
|
|
794
794
|
...e.subagent,
|
|
795
|
-
providers:
|
|
795
|
+
providers: qe(r.target.value)
|
|
796
796
|
}
|
|
797
797
|
})
|
|
798
798
|
}
|
|
799
799
|
)
|
|
800
800
|
] }),
|
|
801
801
|
/* @__PURE__ */ a(
|
|
802
|
-
|
|
802
|
+
L,
|
|
803
803
|
{
|
|
804
804
|
label: "Collaboration",
|
|
805
|
-
checked: ((
|
|
806
|
-
onCheckedChange: (
|
|
805
|
+
checked: ((ze = e.collaboration) == null ? void 0 : ze.enabled) ?? !1,
|
|
806
|
+
onCheckedChange: (r) => l({
|
|
807
807
|
...e,
|
|
808
808
|
collaboration: {
|
|
809
|
-
...
|
|
809
|
+
...v(k.CapabilityPolicySchema),
|
|
810
810
|
...e.collaboration,
|
|
811
|
-
enabled:
|
|
811
|
+
enabled: r
|
|
812
812
|
}
|
|
813
813
|
})
|
|
814
814
|
}
|
|
@@ -816,97 +816,97 @@ function Pa({
|
|
|
816
816
|
/* @__PURE__ */ t("label", { children: [
|
|
817
817
|
/* @__PURE__ */ a("span", { children: "Collaboration providers" }),
|
|
818
818
|
/* @__PURE__ */ a(
|
|
819
|
-
|
|
819
|
+
z,
|
|
820
820
|
{
|
|
821
821
|
"aria-label": "Collaboration providers",
|
|
822
|
-
value: ((
|
|
823
|
-
onChange: (
|
|
822
|
+
value: ((xe = e.collaboration) == null ? void 0 : xe.providers.join(", ")) ?? "",
|
|
823
|
+
onChange: (r) => l({
|
|
824
824
|
...e,
|
|
825
825
|
collaboration: {
|
|
826
|
-
...
|
|
826
|
+
...v(k.CapabilityPolicySchema),
|
|
827
827
|
...e.collaboration,
|
|
828
|
-
providers:
|
|
828
|
+
providers: qe(r.target.value)
|
|
829
829
|
}
|
|
830
830
|
})
|
|
831
831
|
}
|
|
832
832
|
)
|
|
833
833
|
] }),
|
|
834
834
|
/* @__PURE__ */ a(
|
|
835
|
-
|
|
835
|
+
Sa,
|
|
836
836
|
{
|
|
837
837
|
value: e.outputPolicy,
|
|
838
|
-
onChange: (
|
|
838
|
+
onChange: (r) => l({ ...e, outputPolicy: r })
|
|
839
839
|
}
|
|
840
840
|
)
|
|
841
841
|
] }),
|
|
842
842
|
/* @__PURE__ */ t("div", { className: "af-agent-settings__save", children: [
|
|
843
843
|
/* @__PURE__ */ a(
|
|
844
|
-
|
|
844
|
+
p,
|
|
845
845
|
{
|
|
846
846
|
type: "button",
|
|
847
|
-
onClick: () => void
|
|
848
|
-
disabled:
|
|
849
|
-
children:
|
|
847
|
+
onClick: () => void ue(),
|
|
848
|
+
disabled: o === "pending",
|
|
849
|
+
children: o === "pending" ? "Saving…" : "Save Profile"
|
|
850
850
|
}
|
|
851
851
|
),
|
|
852
|
-
|
|
852
|
+
o === "success" && /* @__PURE__ */ t("span", { role: "status", children: [
|
|
853
853
|
"Saved revision ",
|
|
854
|
-
|
|
854
|
+
i.revision.toString(),
|
|
855
855
|
". Existing sessions keep their pinned revision."
|
|
856
856
|
] }),
|
|
857
|
-
|
|
857
|
+
o === "error" && /* @__PURE__ */ t("span", { role: "alert", children: [
|
|
858
858
|
"Save failed: ",
|
|
859
859
|
u
|
|
860
860
|
] })
|
|
861
861
|
] })
|
|
862
862
|
] });
|
|
863
863
|
}
|
|
864
|
-
const
|
|
864
|
+
const qe = (e) => [
|
|
865
865
|
...new Set(
|
|
866
|
-
e.split(",").map((
|
|
866
|
+
e.split(",").map((n) => n.trim()).filter(Boolean)
|
|
867
867
|
)
|
|
868
868
|
].sort();
|
|
869
|
-
function
|
|
869
|
+
function Sa({
|
|
870
870
|
value: e,
|
|
871
|
-
onChange:
|
|
871
|
+
onChange: n
|
|
872
872
|
}) {
|
|
873
|
-
const
|
|
874
|
-
return
|
|
873
|
+
const l = JSON.stringify(e ?? {}, null, 2), [s, i] = x(l), [c, o] = x("");
|
|
874
|
+
return We(() => i(l), [l]), /* @__PURE__ */ t("label", { children: [
|
|
875
875
|
/* @__PURE__ */ a("span", { children: "Output policy JSON" }),
|
|
876
876
|
/* @__PURE__ */ a(
|
|
877
|
-
|
|
877
|
+
ce,
|
|
878
878
|
{
|
|
879
879
|
"aria-label": "Output policy JSON",
|
|
880
880
|
rows: 4,
|
|
881
|
-
value:
|
|
882
|
-
onChange: (u) =>
|
|
881
|
+
value: s,
|
|
882
|
+
onChange: (u) => i(u.target.value),
|
|
883
883
|
onBlur: () => {
|
|
884
884
|
try {
|
|
885
|
-
const u = JSON.parse(
|
|
885
|
+
const u = JSON.parse(s);
|
|
886
886
|
if (!u || typeof u != "object" || Array.isArray(u))
|
|
887
887
|
throw new Error("Output policy must be a JSON object");
|
|
888
|
-
|
|
888
|
+
o(""), n(
|
|
889
889
|
u
|
|
890
890
|
);
|
|
891
891
|
} catch (u) {
|
|
892
|
-
|
|
892
|
+
o(u instanceof Error ? u.message : String(u));
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
896
|
),
|
|
897
|
-
|
|
897
|
+
c && /* @__PURE__ */ a("span", { role: "alert", children: c })
|
|
898
898
|
] });
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function qa({
|
|
901
901
|
editor: e,
|
|
902
|
-
preview:
|
|
902
|
+
preview: n
|
|
903
903
|
}) {
|
|
904
904
|
return /* @__PURE__ */ t("div", { className: "af-agent-studio", children: [
|
|
905
905
|
/* @__PURE__ */ a("section", { "aria-label": "Agent configuration", children: e }),
|
|
906
|
-
/* @__PURE__ */ a("section", { "aria-label": "Agent preview", children:
|
|
906
|
+
/* @__PURE__ */ a("section", { "aria-label": "Agent preview", children: n })
|
|
907
907
|
] });
|
|
908
908
|
}
|
|
909
|
-
const
|
|
909
|
+
const Je = {
|
|
910
910
|
assistant: "Assistant",
|
|
911
911
|
newSession: "New conversation",
|
|
912
912
|
sessions: "Conversations",
|
|
@@ -918,30 +918,30 @@ const De = {
|
|
|
918
918
|
retry: "Retry",
|
|
919
919
|
execution: "Execution",
|
|
920
920
|
explicitSkill: "Invoke skill"
|
|
921
|
-
},
|
|
922
|
-
...
|
|
921
|
+
}, he = (e) => ({
|
|
922
|
+
...Je,
|
|
923
923
|
...e
|
|
924
924
|
});
|
|
925
|
-
function
|
|
925
|
+
function ya({
|
|
926
926
|
sessions: e,
|
|
927
|
-
activeSessionId:
|
|
928
|
-
onSelect:
|
|
929
|
-
onNew:
|
|
930
|
-
onDelete:
|
|
931
|
-
labels:
|
|
927
|
+
activeSessionId: n,
|
|
928
|
+
onSelect: l,
|
|
929
|
+
onNew: s,
|
|
930
|
+
onDelete: i,
|
|
931
|
+
labels: c
|
|
932
932
|
}) {
|
|
933
|
-
const
|
|
934
|
-
return /* @__PURE__ */ t("aside", { className: "af-agent-threads", "aria-label":
|
|
933
|
+
const o = he(c);
|
|
934
|
+
return /* @__PURE__ */ t("aside", { className: "af-agent-threads", "aria-label": o.sessions, children: [
|
|
935
935
|
/* @__PURE__ */ t("div", { className: "af-agent-threads__header", children: [
|
|
936
|
-
/* @__PURE__ */ a("strong", { children:
|
|
936
|
+
/* @__PURE__ */ a("strong", { children: o.sessions }),
|
|
937
937
|
/* @__PURE__ */ a(
|
|
938
|
-
|
|
938
|
+
p,
|
|
939
939
|
{
|
|
940
940
|
size: "icon",
|
|
941
941
|
variant: "ghost",
|
|
942
|
-
onClick:
|
|
943
|
-
"aria-label":
|
|
944
|
-
children: /* @__PURE__ */ a(
|
|
942
|
+
onClick: s,
|
|
943
|
+
"aria-label": o.newSession,
|
|
944
|
+
children: /* @__PURE__ */ a(Xe, { size: 17, "aria-hidden": !0 })
|
|
945
945
|
}
|
|
946
946
|
)
|
|
947
947
|
] }),
|
|
@@ -949,28 +949,28 @@ function ua({
|
|
|
949
949
|
"div",
|
|
950
950
|
{
|
|
951
951
|
className: "af-agent-thread-row",
|
|
952
|
-
"data-active": d.id ===
|
|
952
|
+
"data-active": d.id === n || void 0,
|
|
953
953
|
children: [
|
|
954
954
|
/* @__PURE__ */ t(
|
|
955
955
|
"button",
|
|
956
956
|
{
|
|
957
957
|
type: "button",
|
|
958
958
|
className: "af-agent-thread-row__select",
|
|
959
|
-
onClick: () =>
|
|
959
|
+
onClick: () => l(d.id),
|
|
960
960
|
children: [
|
|
961
961
|
/* @__PURE__ */ a("span", { children: d.profileRevisionId }),
|
|
962
|
-
/* @__PURE__ */ a(
|
|
962
|
+
/* @__PURE__ */ a(Ze, { size: 14, "aria-hidden": !0 })
|
|
963
963
|
]
|
|
964
964
|
}
|
|
965
965
|
),
|
|
966
|
-
|
|
966
|
+
i && /* @__PURE__ */ a(
|
|
967
967
|
"button",
|
|
968
968
|
{
|
|
969
969
|
type: "button",
|
|
970
970
|
className: "af-agent-icon-button",
|
|
971
|
-
onClick: () =>
|
|
971
|
+
onClick: () => i(d.id),
|
|
972
972
|
"aria-label": `Delete ${d.id}`,
|
|
973
|
-
children: /* @__PURE__ */ a(
|
|
973
|
+
children: /* @__PURE__ */ a(ea, { size: 14, "aria-hidden": !0 })
|
|
974
974
|
}
|
|
975
975
|
)
|
|
976
976
|
]
|
|
@@ -979,54 +979,54 @@ function ua({
|
|
|
979
979
|
)) })
|
|
980
980
|
] });
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function Ca({
|
|
983
983
|
profileRevisionId: e,
|
|
984
|
-
explicitSkillSlug:
|
|
985
|
-
onExplicitSkillChange:
|
|
986
|
-
labels:
|
|
987
|
-
registry:
|
|
984
|
+
explicitSkillSlug: n,
|
|
985
|
+
onExplicitSkillChange: l,
|
|
986
|
+
labels: s,
|
|
987
|
+
registry: i
|
|
988
988
|
}) {
|
|
989
|
-
|
|
990
|
-
const
|
|
989
|
+
de(i);
|
|
990
|
+
const c = i == null ? void 0 : i.render("resource-bar", {
|
|
991
991
|
profileRevisionId: e,
|
|
992
|
-
explicitSkillSlug:
|
|
993
|
-
setExplicitSkillSlug:
|
|
992
|
+
explicitSkillSlug: n,
|
|
993
|
+
setExplicitSkillSlug: l
|
|
994
994
|
});
|
|
995
|
-
if (
|
|
996
|
-
const
|
|
995
|
+
if (c) return c;
|
|
996
|
+
const o = he(s);
|
|
997
997
|
return /* @__PURE__ */ t("div", { className: "af-agent-resources", "aria-label": "Agent resources", children: [
|
|
998
|
-
/* @__PURE__ */ a(
|
|
998
|
+
/* @__PURE__ */ a(S, { tone: "cool", children: e }),
|
|
999
999
|
/* @__PURE__ */ a(
|
|
1000
|
-
|
|
1000
|
+
z,
|
|
1001
1001
|
{
|
|
1002
|
-
"aria-label":
|
|
1003
|
-
placeholder:
|
|
1004
|
-
value:
|
|
1005
|
-
onChange: (d) =>
|
|
1002
|
+
"aria-label": o.explicitSkill,
|
|
1003
|
+
placeholder: o.explicitSkill,
|
|
1004
|
+
value: n,
|
|
1005
|
+
onChange: (d) => l(d.target.value)
|
|
1006
1006
|
}
|
|
1007
1007
|
)
|
|
1008
1008
|
] });
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function wa({
|
|
1011
1011
|
value: e,
|
|
1012
|
-
onChange:
|
|
1013
|
-
onSubmit:
|
|
1014
|
-
running:
|
|
1015
|
-
onStop:
|
|
1016
|
-
onInject:
|
|
1017
|
-
onAttachResource:
|
|
1012
|
+
onChange: n,
|
|
1013
|
+
onSubmit: l,
|
|
1014
|
+
running: s,
|
|
1015
|
+
onStop: i,
|
|
1016
|
+
onInject: c,
|
|
1017
|
+
onAttachResource: o,
|
|
1018
1018
|
resources: d = [],
|
|
1019
1019
|
onRemoveResource: u,
|
|
1020
|
-
labels:
|
|
1020
|
+
labels: m
|
|
1021
1021
|
}) {
|
|
1022
|
-
const
|
|
1022
|
+
const f = he(m);
|
|
1023
1023
|
return /* @__PURE__ */ t(
|
|
1024
1024
|
"form",
|
|
1025
1025
|
{
|
|
1026
1026
|
className: "af-agent-composer",
|
|
1027
|
-
"data-running":
|
|
1027
|
+
"data-running": s || void 0,
|
|
1028
1028
|
onSubmit: (b) => {
|
|
1029
|
-
b.preventDefault(), e.trim() &&
|
|
1029
|
+
b.preventDefault(), e.trim() && l();
|
|
1030
1030
|
},
|
|
1031
1031
|
children: [
|
|
1032
1032
|
d.length > 0 && /* @__PURE__ */ a(
|
|
@@ -1034,7 +1034,7 @@ function ga({
|
|
|
1034
1034
|
{
|
|
1035
1035
|
className: "af-agent-composer__resources",
|
|
1036
1036
|
"aria-label": "Attached resources",
|
|
1037
|
-
children: d.map((b) => /* @__PURE__ */ t(
|
|
1037
|
+
children: d.map((b) => /* @__PURE__ */ t(S, { tone: "cool", children: [
|
|
1038
1038
|
b.label,
|
|
1039
1039
|
u && /* @__PURE__ */ a(
|
|
1040
1040
|
"button",
|
|
@@ -1049,60 +1049,60 @@ function ga({
|
|
|
1049
1049
|
}
|
|
1050
1050
|
),
|
|
1051
1051
|
/* @__PURE__ */ a(
|
|
1052
|
-
|
|
1052
|
+
ce,
|
|
1053
1053
|
{
|
|
1054
1054
|
rows: 2,
|
|
1055
1055
|
variant: "bare",
|
|
1056
1056
|
value: e,
|
|
1057
|
-
onChange: (b) =>
|
|
1058
|
-
"aria-label":
|
|
1059
|
-
placeholder:
|
|
1057
|
+
onChange: (b) => n(b.target.value),
|
|
1058
|
+
"aria-label": f.composer,
|
|
1059
|
+
placeholder: s ? "Steer the active run" : f.composer,
|
|
1060
1060
|
onKeyDown: (b) => {
|
|
1061
|
-
b.key === "Enter" && !b.shiftKey && (b.preventDefault(), e.trim() &&
|
|
1061
|
+
b.key === "Enter" && !b.shiftKey && (b.preventDefault(), e.trim() && l());
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
1064
1064
|
),
|
|
1065
1065
|
/* @__PURE__ */ t("div", { className: "af-agent-composer__actions", children: [
|
|
1066
|
-
|
|
1067
|
-
|
|
1066
|
+
o && /* @__PURE__ */ a(
|
|
1067
|
+
p,
|
|
1068
1068
|
{
|
|
1069
1069
|
type: "button",
|
|
1070
1070
|
size: "icon",
|
|
1071
1071
|
variant: "ghost",
|
|
1072
|
-
onClick:
|
|
1072
|
+
onClick: o,
|
|
1073
1073
|
"aria-label": "Attach document",
|
|
1074
|
-
children: /* @__PURE__ */ a(
|
|
1074
|
+
children: /* @__PURE__ */ a(Ye, { size: 17, "aria-hidden": !0 })
|
|
1075
1075
|
}
|
|
1076
1076
|
),
|
|
1077
|
-
|
|
1078
|
-
|
|
1077
|
+
s && c && /* @__PURE__ */ a(
|
|
1078
|
+
p,
|
|
1079
1079
|
{
|
|
1080
1080
|
type: "button",
|
|
1081
1081
|
size: "compact",
|
|
1082
1082
|
variant: "ghost",
|
|
1083
1083
|
disabled: !e.trim(),
|
|
1084
|
-
onClick:
|
|
1084
|
+
onClick: c,
|
|
1085
1085
|
children: "Inject"
|
|
1086
1086
|
}
|
|
1087
1087
|
),
|
|
1088
|
-
|
|
1089
|
-
|
|
1088
|
+
s ? /* @__PURE__ */ a(
|
|
1089
|
+
p,
|
|
1090
1090
|
{
|
|
1091
1091
|
type: "button",
|
|
1092
1092
|
size: "icon",
|
|
1093
1093
|
variant: "secondary",
|
|
1094
|
-
onClick:
|
|
1095
|
-
"aria-label":
|
|
1096
|
-
children: /* @__PURE__ */ a(
|
|
1094
|
+
onClick: i,
|
|
1095
|
+
"aria-label": f.stop,
|
|
1096
|
+
children: /* @__PURE__ */ a(He, { size: 17, "aria-hidden": !0 })
|
|
1097
1097
|
}
|
|
1098
1098
|
) : /* @__PURE__ */ a(
|
|
1099
|
-
|
|
1099
|
+
p,
|
|
1100
1100
|
{
|
|
1101
1101
|
type: "submit",
|
|
1102
1102
|
size: "icon",
|
|
1103
1103
|
disabled: !e.trim(),
|
|
1104
|
-
"aria-label":
|
|
1105
|
-
children: /* @__PURE__ */ a(
|
|
1104
|
+
"aria-label": f.send,
|
|
1105
|
+
children: /* @__PURE__ */ a(Qe, { size: 17, "aria-hidden": !0 })
|
|
1106
1106
|
}
|
|
1107
1107
|
)
|
|
1108
1108
|
] })
|
|
@@ -1110,42 +1110,42 @@ function ga({
|
|
|
1110
1110
|
}
|
|
1111
1111
|
);
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function Na({
|
|
1114
1114
|
model: e,
|
|
1115
|
-
explicitSkillSlug:
|
|
1116
|
-
resources:
|
|
1117
|
-
onRemoveResource:
|
|
1118
|
-
onAttachResource:
|
|
1119
|
-
registry:
|
|
1120
|
-
header:
|
|
1115
|
+
explicitSkillSlug: n = "",
|
|
1116
|
+
resources: l = [],
|
|
1117
|
+
onRemoveResource: s,
|
|
1118
|
+
onAttachResource: i,
|
|
1119
|
+
registry: c,
|
|
1120
|
+
header: o,
|
|
1121
1121
|
labels: d,
|
|
1122
1122
|
onError: u
|
|
1123
1123
|
}) {
|
|
1124
|
-
var
|
|
1125
|
-
|
|
1126
|
-
const
|
|
1127
|
-
(
|
|
1128
|
-
),
|
|
1129
|
-
(
|
|
1130
|
-
),
|
|
1131
|
-
var
|
|
1132
|
-
const
|
|
1133
|
-
if (
|
|
1134
|
-
b(""), M(
|
|
1124
|
+
var H, Q;
|
|
1125
|
+
de(c);
|
|
1126
|
+
const m = he(d), f = ha(e), [N, b] = x(""), [_, M] = x(""), W = f.status === "submitting" || f.status === "queued" || f.status === "running" || f.status === "waiting_for_input", ue = f.projection.items.filter(
|
|
1127
|
+
(w) => w.slot === "trace-item"
|
|
1128
|
+
), Y = f.projection.items.filter(
|
|
1129
|
+
(w) => w.slot !== "trace-item" && (w.slot !== "message-content" || w.text.length > 0)
|
|
1130
|
+
), F = (w) => u == null ? void 0 : u(w instanceof Error ? w : new Error(String(w))), E = async (w, q = W ? "steer" : "followup") => {
|
|
1131
|
+
var X;
|
|
1132
|
+
const I = w.trim();
|
|
1133
|
+
if (I) {
|
|
1134
|
+
b(""), M(I);
|
|
1135
1135
|
try {
|
|
1136
|
-
|
|
1136
|
+
q === "steer" ? await e.steerText(I) : q === "inject" ? await e.injectText(I) : await e.submitContent(
|
|
1137
1137
|
[
|
|
1138
|
-
|
|
1138
|
+
v(k.ContentBlockSchema, {
|
|
1139
1139
|
block: {
|
|
1140
1140
|
case: "text",
|
|
1141
|
-
value:
|
|
1141
|
+
value: v(k.TextBlockSchema, { text: I })
|
|
1142
1142
|
}
|
|
1143
1143
|
}),
|
|
1144
|
-
...
|
|
1145
|
-
(j) =>
|
|
1144
|
+
...l.map(
|
|
1145
|
+
(j) => v(k.ContentBlockSchema, {
|
|
1146
1146
|
block: {
|
|
1147
1147
|
case: "resource",
|
|
1148
|
-
value:
|
|
1148
|
+
value: v(k.ResourceBlockSchema, {
|
|
1149
1149
|
resourceId: j.resourceId,
|
|
1150
1150
|
mediaType: j.mediaType ?? "application/vnd.agentfactory.document"
|
|
1151
1151
|
})
|
|
@@ -1153,342 +1153,545 @@ function fa({
|
|
|
1153
1153
|
})
|
|
1154
1154
|
)
|
|
1155
1155
|
],
|
|
1156
|
-
|
|
1156
|
+
n
|
|
1157
1157
|
);
|
|
1158
1158
|
} catch (j) {
|
|
1159
|
-
b(((
|
|
1159
|
+
b(((X = e.getSnapshot().retryDraft) == null ? void 0 : X.text) ?? I), F(j);
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
1162
|
};
|
|
1163
|
-
return /* @__PURE__ */ t("section", { className: "af-agent-conversation", "aria-label":
|
|
1164
|
-
|
|
1163
|
+
return /* @__PURE__ */ t("section", { className: "af-agent-conversation", "aria-label": m.assistant, children: [
|
|
1164
|
+
o && /* @__PURE__ */ a("header", { className: "af-agent-conversation__header", children: o }),
|
|
1165
1165
|
/* @__PURE__ */ t("div", { className: "af-agent-messages", "aria-live": "polite", children: [
|
|
1166
|
-
!
|
|
1167
|
-
|
|
1166
|
+
!Y.length && f.status === "idle" && /* @__PURE__ */ a(
|
|
1167
|
+
A,
|
|
1168
1168
|
{
|
|
1169
1169
|
size: "md",
|
|
1170
|
-
title:
|
|
1171
|
-
description:
|
|
1172
|
-
icon: /* @__PURE__ */ a(
|
|
1170
|
+
title: m.emptyTitle,
|
|
1171
|
+
description: m.emptyDescription,
|
|
1172
|
+
icon: /* @__PURE__ */ a(Le, { size: 24, "aria-hidden": !0 })
|
|
1173
1173
|
}
|
|
1174
1174
|
),
|
|
1175
1175
|
/* @__PURE__ */ a(
|
|
1176
|
-
|
|
1176
|
+
ma,
|
|
1177
1177
|
{
|
|
1178
|
-
items:
|
|
1179
|
-
registry:
|
|
1180
|
-
onResolveInteraction: async (
|
|
1178
|
+
items: Y,
|
|
1179
|
+
registry: c,
|
|
1180
|
+
onResolveInteraction: async (w, q) => {
|
|
1181
1181
|
try {
|
|
1182
|
-
await e.resolveInteraction(
|
|
1183
|
-
} catch (
|
|
1184
|
-
throw
|
|
1182
|
+
await e.resolveInteraction(w, q);
|
|
1183
|
+
} catch (I) {
|
|
1184
|
+
throw F(I), I;
|
|
1185
1185
|
}
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
1188
|
),
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1189
|
+
f.status !== "waiting_for_input" && W && /* @__PURE__ */ a("span", { className: "af-agent-thinking", children: "Thinking…" }),
|
|
1190
|
+
f.status === "disconnected" && /* @__PURE__ */ a(
|
|
1191
|
+
A,
|
|
1192
1192
|
{
|
|
1193
1193
|
variant: "error",
|
|
1194
1194
|
size: "sm",
|
|
1195
|
-
title: ((
|
|
1195
|
+
title: ((H = f.error) == null ? void 0 : H.message) ?? "Disconnected",
|
|
1196
1196
|
action: {
|
|
1197
|
-
label:
|
|
1198
|
-
onClick: () => void e.retry().catch(
|
|
1197
|
+
label: m.retry,
|
|
1198
|
+
onClick: () => void e.retry().catch(F)
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
1201
1201
|
),
|
|
1202
|
-
|
|
1203
|
-
|
|
1202
|
+
f.status === "failed" && /* @__PURE__ */ a(
|
|
1203
|
+
A,
|
|
1204
1204
|
{
|
|
1205
1205
|
variant: "error",
|
|
1206
1206
|
size: "sm",
|
|
1207
|
-
title: ((
|
|
1208
|
-
action: { label:
|
|
1207
|
+
title: ((Q = f.error) == null ? void 0 : Q.message) ?? "Run failed",
|
|
1208
|
+
action: { label: m.retry, onClick: () => void E(_) }
|
|
1209
1209
|
}
|
|
1210
1210
|
),
|
|
1211
|
-
|
|
1212
|
-
|
|
1211
|
+
f.status === "max_steps_reached" && /* @__PURE__ */ a(
|
|
1212
|
+
A,
|
|
1213
1213
|
{
|
|
1214
1214
|
variant: "error",
|
|
1215
1215
|
size: "sm",
|
|
1216
1216
|
title: "Maximum steps reached",
|
|
1217
|
-
action: { label:
|
|
1217
|
+
action: { label: m.retry, onClick: () => void E(_) }
|
|
1218
1218
|
}
|
|
1219
1219
|
),
|
|
1220
1220
|
/* @__PURE__ */ a(
|
|
1221
|
-
|
|
1221
|
+
pa,
|
|
1222
1222
|
{
|
|
1223
|
-
items:
|
|
1224
|
-
registry:
|
|
1225
|
-
label:
|
|
1223
|
+
items: ue,
|
|
1224
|
+
registry: c,
|
|
1225
|
+
label: m.execution
|
|
1226
1226
|
}
|
|
1227
1227
|
)
|
|
1228
1228
|
] }),
|
|
1229
|
-
(
|
|
1230
|
-
draft:
|
|
1231
|
-
running:
|
|
1232
|
-
submit: () => void
|
|
1229
|
+
(c == null ? void 0 : c.render("composer", {
|
|
1230
|
+
draft: N,
|
|
1231
|
+
running: W,
|
|
1232
|
+
submit: () => void E(N),
|
|
1233
1233
|
stop: () => void e.cancel(),
|
|
1234
1234
|
setDraft: b
|
|
1235
1235
|
})) ?? /* @__PURE__ */ a(
|
|
1236
|
-
|
|
1236
|
+
wa,
|
|
1237
1237
|
{
|
|
1238
|
-
value:
|
|
1238
|
+
value: N,
|
|
1239
1239
|
onChange: b,
|
|
1240
|
-
onSubmit: () => void
|
|
1241
|
-
running:
|
|
1240
|
+
onSubmit: () => void E(N),
|
|
1241
|
+
running: W,
|
|
1242
1242
|
onStop: () => void e.cancel(),
|
|
1243
|
-
onInject: () => void
|
|
1244
|
-
onAttachResource:
|
|
1245
|
-
resources:
|
|
1246
|
-
onRemoveResource:
|
|
1247
|
-
labels:
|
|
1243
|
+
onInject: () => void E(N, "inject"),
|
|
1244
|
+
onAttachResource: i,
|
|
1245
|
+
resources: l,
|
|
1246
|
+
onRemoveResource: s,
|
|
1247
|
+
labels: m
|
|
1248
1248
|
}
|
|
1249
1249
|
)
|
|
1250
1250
|
] });
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function ja({
|
|
1253
1253
|
model: e,
|
|
1254
|
-
title:
|
|
1255
|
-
subtitle:
|
|
1256
|
-
profileRevisionId:
|
|
1257
|
-
sessions:
|
|
1258
|
-
activeSessionId:
|
|
1259
|
-
onSelectSession:
|
|
1254
|
+
title: n = Je.assistant,
|
|
1255
|
+
subtitle: l,
|
|
1256
|
+
profileRevisionId: s,
|
|
1257
|
+
sessions: i,
|
|
1258
|
+
activeSessionId: c,
|
|
1259
|
+
onSelectSession: o,
|
|
1260
1260
|
onNewSession: d,
|
|
1261
1261
|
onDeleteSession: u,
|
|
1262
|
-
registry:
|
|
1263
|
-
labels:
|
|
1262
|
+
registry: m,
|
|
1263
|
+
labels: f
|
|
1264
1264
|
}) {
|
|
1265
|
-
const [
|
|
1266
|
-
() => /* @__PURE__ */ t(
|
|
1265
|
+
const [N, b] = x(""), _ = he(f), M = Fe(
|
|
1266
|
+
() => /* @__PURE__ */ t(ke, { children: [
|
|
1267
1267
|
/* @__PURE__ */ t("div", { className: "af-agent-title", children: [
|
|
1268
|
-
/* @__PURE__ */ a(
|
|
1268
|
+
/* @__PURE__ */ a(Se, { initials: "AF", size: 36 }),
|
|
1269
1269
|
/* @__PURE__ */ t("div", { children: [
|
|
1270
|
-
/* @__PURE__ */ a("strong", { children:
|
|
1271
|
-
|
|
1270
|
+
/* @__PURE__ */ a("strong", { children: n }),
|
|
1271
|
+
l && /* @__PURE__ */ a("span", { children: l })
|
|
1272
1272
|
] })
|
|
1273
1273
|
] }),
|
|
1274
1274
|
/* @__PURE__ */ a(
|
|
1275
|
-
|
|
1275
|
+
Ca,
|
|
1276
1276
|
{
|
|
1277
|
-
profileRevisionId:
|
|
1278
|
-
explicitSkillSlug:
|
|
1277
|
+
profileRevisionId: s,
|
|
1278
|
+
explicitSkillSlug: N,
|
|
1279
1279
|
onExplicitSkillChange: b,
|
|
1280
|
-
registry:
|
|
1281
|
-
labels:
|
|
1280
|
+
registry: m,
|
|
1281
|
+
labels: _
|
|
1282
1282
|
}
|
|
1283
1283
|
)
|
|
1284
1284
|
] }),
|
|
1285
|
-
[l, s,
|
|
1285
|
+
[n, l, s, N, m, _]
|
|
1286
1286
|
);
|
|
1287
1287
|
return /* @__PURE__ */ t("div", { className: "af-agent-chat", "data-testid": "agent-chat", children: [
|
|
1288
|
-
|
|
1289
|
-
|
|
1288
|
+
i && o && d && /* @__PURE__ */ a(
|
|
1289
|
+
ya,
|
|
1290
1290
|
{
|
|
1291
|
-
sessions:
|
|
1292
|
-
activeSessionId:
|
|
1293
|
-
onSelect:
|
|
1291
|
+
sessions: i,
|
|
1292
|
+
activeSessionId: c,
|
|
1293
|
+
onSelect: o,
|
|
1294
1294
|
onNew: d,
|
|
1295
1295
|
onDelete: u,
|
|
1296
|
-
labels:
|
|
1296
|
+
labels: _
|
|
1297
1297
|
}
|
|
1298
1298
|
),
|
|
1299
1299
|
/* @__PURE__ */ a(
|
|
1300
|
-
|
|
1300
|
+
Na,
|
|
1301
1301
|
{
|
|
1302
1302
|
model: e,
|
|
1303
|
-
explicitSkillSlug:
|
|
1304
|
-
registry:
|
|
1303
|
+
explicitSkillSlug: N,
|
|
1304
|
+
registry: m,
|
|
1305
1305
|
header: M,
|
|
1306
|
-
labels:
|
|
1306
|
+
labels: _
|
|
1307
1307
|
}
|
|
1308
1308
|
)
|
|
1309
1309
|
] });
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function Ba({ skills: e, installed: n, busy: l = "", completeness: s = "complete", onInstall: i, onUninstall: c }) {
|
|
1312
1312
|
return e.length ? /* @__PURE__ */ t("section", { className: "af-agent-manager", "aria-label": "Skill and SkillPack catalog", children: [
|
|
1313
1313
|
/* @__PURE__ */ t("header", { children: [
|
|
1314
1314
|
/* @__PURE__ */ t("div", { children: [
|
|
1315
|
-
/* @__PURE__ */ t(
|
|
1316
|
-
/* @__PURE__ */ a(
|
|
1315
|
+
/* @__PURE__ */ t(y, { children: [
|
|
1316
|
+
/* @__PURE__ */ a(aa, { size: 14, "aria-hidden": !0 }),
|
|
1317
1317
|
" Capability catalog"
|
|
1318
1318
|
] }),
|
|
1319
|
-
/* @__PURE__ */ t(
|
|
1319
|
+
/* @__PURE__ */ t(C, { children: [
|
|
1320
1320
|
e.length,
|
|
1321
1321
|
" deployed definitions"
|
|
1322
1322
|
] })
|
|
1323
1323
|
] }),
|
|
1324
|
-
/* @__PURE__ */ a(
|
|
1324
|
+
/* @__PURE__ */ a(S, { tone: s === "complete" ? "success" : "warning", children: s })
|
|
1325
1325
|
] }),
|
|
1326
|
-
/* @__PURE__ */ a("div", { className: "af-agent-manager__list", children: e.map((
|
|
1327
|
-
const d =
|
|
1328
|
-
return /* @__PURE__ */ t(
|
|
1326
|
+
/* @__PURE__ */ a("div", { className: "af-agent-manager__list", children: e.map((o) => {
|
|
1327
|
+
const d = _a(o), u = n.has(d);
|
|
1328
|
+
return /* @__PURE__ */ t(R, { as: "article", children: [
|
|
1329
1329
|
/* @__PURE__ */ t("div", { children: [
|
|
1330
|
-
/* @__PURE__ */ t(
|
|
1331
|
-
|
|
1330
|
+
/* @__PURE__ */ t(y, { children: [
|
|
1331
|
+
o.kind,
|
|
1332
1332
|
" · ",
|
|
1333
|
-
|
|
1333
|
+
o.provider
|
|
1334
1334
|
] }),
|
|
1335
|
-
/* @__PURE__ */ a(
|
|
1336
|
-
/* @__PURE__ */ a("p", { children:
|
|
1335
|
+
/* @__PURE__ */ a(C, { children: o.title || o.slug }),
|
|
1336
|
+
/* @__PURE__ */ a("p", { children: o.description || `${o.slug}@${o.version}` })
|
|
1337
1337
|
] }),
|
|
1338
1338
|
/* @__PURE__ */ t("div", { className: "af-agent-manager__actions", children: [
|
|
1339
|
-
/* @__PURE__ */ a(
|
|
1340
|
-
/* @__PURE__ */ a(
|
|
1339
|
+
/* @__PURE__ */ a(S, { tone: u ? "success" : "neutral", children: u ? "Installed" : o.trust || "Available" }),
|
|
1340
|
+
/* @__PURE__ */ a(p, { size: "compact", variant: u ? "secondary" : "primary", disabled: l === d, onClick: () => void (u ? c(o) : i(o)), children: l === d ? "Updating…" : u ? "Uninstall" : "Install" })
|
|
1341
1341
|
] })
|
|
1342
1342
|
] }, d);
|
|
1343
1343
|
}) })
|
|
1344
|
-
] }) : /* @__PURE__ */ a(
|
|
1344
|
+
] }) : /* @__PURE__ */ a(A, { size: "sm", title: "No Skills available", description: "The configured providers returned an empty catalog." });
|
|
1345
1345
|
}
|
|
1346
|
-
function
|
|
1346
|
+
function La({ memories: e, busy: n = "", onConfirm: l, onDelete: s }) {
|
|
1347
1347
|
return /* @__PURE__ */ t("section", { className: "af-agent-manager", "aria-label": "Memory center", children: [
|
|
1348
1348
|
/* @__PURE__ */ a("header", { children: /* @__PURE__ */ t("div", { children: [
|
|
1349
|
-
/* @__PURE__ */ t(
|
|
1350
|
-
/* @__PURE__ */ a(
|
|
1349
|
+
/* @__PURE__ */ t(y, { children: [
|
|
1350
|
+
/* @__PURE__ */ a(ta, { size: 14, "aria-hidden": !0 }),
|
|
1351
1351
|
" Governed memory"
|
|
1352
1352
|
] }),
|
|
1353
|
-
/* @__PURE__ */ t(
|
|
1353
|
+
/* @__PURE__ */ t(C, { children: [
|
|
1354
1354
|
e.length,
|
|
1355
1355
|
" records"
|
|
1356
1356
|
] })
|
|
1357
1357
|
] }) }),
|
|
1358
|
-
e.length ? /* @__PURE__ */ a("div", { className: "af-agent-manager__list", children: e.map((
|
|
1358
|
+
e.length ? /* @__PURE__ */ a("div", { className: "af-agent-manager__list", children: e.map((i) => /* @__PURE__ */ t(R, { as: "article", children: [
|
|
1359
1359
|
/* @__PURE__ */ t("div", { children: [
|
|
1360
|
-
/* @__PURE__ */ t(
|
|
1361
|
-
|
|
1360
|
+
/* @__PURE__ */ t(y, { children: [
|
|
1361
|
+
i.status,
|
|
1362
1362
|
" · ",
|
|
1363
|
-
|
|
1363
|
+
i.risk || "unrated"
|
|
1364
1364
|
] }),
|
|
1365
|
-
/* @__PURE__ */ a(
|
|
1365
|
+
/* @__PURE__ */ a(C, { children: i.content }),
|
|
1366
1366
|
/* @__PURE__ */ t("p", { children: [
|
|
1367
1367
|
"Source ",
|
|
1368
|
-
|
|
1368
|
+
i.sourceSessionId || "unknown",
|
|
1369
1369
|
" · event ",
|
|
1370
|
-
|
|
1370
|
+
i.sourceEventSeq.toString()
|
|
1371
1371
|
] })
|
|
1372
1372
|
] }),
|
|
1373
1373
|
/* @__PURE__ */ t("div", { className: "af-agent-manager__actions", children: [
|
|
1374
|
-
/* @__PURE__ */ a(
|
|
1375
|
-
|
|
1376
|
-
/* @__PURE__ */ a(
|
|
1374
|
+
/* @__PURE__ */ a(S, { tone: i.status === "confirmed" ? "success" : "warning", children: i.status }),
|
|
1375
|
+
i.status !== "confirmed" && /* @__PURE__ */ a(p, { size: "compact", disabled: n === i.id, onClick: () => void l(i), children: "Confirm" }),
|
|
1376
|
+
/* @__PURE__ */ a(p, { size: "compact", variant: "ghost", disabled: n === i.id, onClick: () => void s(i), children: "Delete" })
|
|
1377
1377
|
] })
|
|
1378
|
-
] },
|
|
1378
|
+
] }, i.id)) }) : /* @__PURE__ */ a(A, { size: "sm", title: "No retained memories", description: "Candidates appear here with source, risk and consent state." })
|
|
1379
1379
|
] });
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1381
|
+
function Ja({ collaboration: e, tasks: n, busy: l = !1, onCancel: s }) {
|
|
1382
1382
|
return e ? /* @__PURE__ */ t("section", { className: "af-agent-manager", "aria-label": "Collaboration tasks", children: [
|
|
1383
1383
|
/* @__PURE__ */ t("header", { children: [
|
|
1384
1384
|
/* @__PURE__ */ t("div", { children: [
|
|
1385
|
-
/* @__PURE__ */ t(
|
|
1386
|
-
/* @__PURE__ */ a(
|
|
1385
|
+
/* @__PURE__ */ t(y, { children: [
|
|
1386
|
+
/* @__PURE__ */ a(De, { size: 14, "aria-hidden": !0 }),
|
|
1387
1387
|
" Collaboration"
|
|
1388
1388
|
] }),
|
|
1389
|
-
/* @__PURE__ */ a(
|
|
1389
|
+
/* @__PURE__ */ a(C, { children: e.id })
|
|
1390
1390
|
] }),
|
|
1391
1391
|
/* @__PURE__ */ t("div", { className: "af-agent-manager__actions", children: [
|
|
1392
|
-
/* @__PURE__ */ a(
|
|
1393
|
-
|
|
1392
|
+
/* @__PURE__ */ a(S, { tone: e.status === "completed" ? "success" : "cool", children: e.status }),
|
|
1393
|
+
s && e.status !== "completed" && /* @__PURE__ */ a(p, { size: "compact", variant: "secondary", disabled: l, onClick: () => void s(), children: l ? "Cancelling…" : "Cancel" })
|
|
1394
1394
|
] })
|
|
1395
1395
|
] }),
|
|
1396
|
-
/* @__PURE__ */ a("ol", { className: "af-agent-task-tree", children:
|
|
1396
|
+
/* @__PURE__ */ a("ol", { className: "af-agent-task-tree", children: n.map((i) => /* @__PURE__ */ t("li", { children: [
|
|
1397
1397
|
/* @__PURE__ */ a("span", { "aria-hidden": !0 }),
|
|
1398
1398
|
/* @__PURE__ */ t("div", { children: [
|
|
1399
|
-
/* @__PURE__ */ a("strong", { children:
|
|
1399
|
+
/* @__PURE__ */ a("strong", { children: i.objective }),
|
|
1400
1400
|
/* @__PURE__ */ t("p", { children: [
|
|
1401
|
-
|
|
1401
|
+
i.provider,
|
|
1402
1402
|
" · ",
|
|
1403
|
-
|
|
1403
|
+
i.status,
|
|
1404
1404
|
" · attempt ",
|
|
1405
|
-
|
|
1405
|
+
i.attempts
|
|
1406
1406
|
] }),
|
|
1407
|
-
|
|
1407
|
+
i.result && /* @__PURE__ */ a("p", { children: i.result })
|
|
1408
1408
|
] }),
|
|
1409
|
-
/* @__PURE__ */ a(
|
|
1410
|
-
] },
|
|
1411
|
-
] }) : /* @__PURE__ */ a(
|
|
1409
|
+
/* @__PURE__ */ a(S, { tone: i.status === "completed" ? "success" : i.status === "failed" ? "warning" : "cool", children: i.status })
|
|
1410
|
+
] }, i.id)) })
|
|
1411
|
+
] }) : /* @__PURE__ */ a(A, { size: "sm", title: "No active collaboration", description: "Subagent and collaboration runs will expose their task tree here.", icon: /* @__PURE__ */ a(De, { size: 22, "aria-hidden": !0 }) });
|
|
1412
1412
|
}
|
|
1413
|
-
function
|
|
1413
|
+
function Oa({ documents: e, onBind: n, onAttach: l, onOpen: s }) {
|
|
1414
1414
|
return /* @__PURE__ */ t("section", { className: "af-agent-manager", "aria-label": "Agent document library", children: [
|
|
1415
1415
|
/* @__PURE__ */ a("header", { children: /* @__PURE__ */ t("div", { children: [
|
|
1416
|
-
/* @__PURE__ */ t(
|
|
1417
|
-
/* @__PURE__ */ a(
|
|
1416
|
+
/* @__PURE__ */ t(y, { children: [
|
|
1417
|
+
/* @__PURE__ */ a(na, { size: 14, "aria-hidden": !0 }),
|
|
1418
1418
|
" Agent and Docs"
|
|
1419
1419
|
] }),
|
|
1420
|
-
/* @__PURE__ */ t(
|
|
1420
|
+
/* @__PURE__ */ t(C, { children: [
|
|
1421
1421
|
e.length,
|
|
1422
1422
|
" accessible documents"
|
|
1423
1423
|
] })
|
|
1424
1424
|
] }) }),
|
|
1425
|
-
e.length ? /* @__PURE__ */ a("div", { className: "af-agent-manager__list", children: e.map((
|
|
1425
|
+
e.length ? /* @__PURE__ */ a("div", { className: "af-agent-manager__list", children: e.map((i) => /* @__PURE__ */ t(R, { as: "article", children: [
|
|
1426
1426
|
/* @__PURE__ */ t("div", { children: [
|
|
1427
|
-
/* @__PURE__ */ t(
|
|
1428
|
-
|
|
1427
|
+
/* @__PURE__ */ t(y, { children: [
|
|
1428
|
+
i.space,
|
|
1429
1429
|
" · revision ",
|
|
1430
|
-
|
|
1430
|
+
i.revision
|
|
1431
1431
|
] }),
|
|
1432
|
-
/* @__PURE__ */ a(
|
|
1433
|
-
/* @__PURE__ */ a("p", { children:
|
|
1432
|
+
/* @__PURE__ */ a(C, { children: i.title }),
|
|
1433
|
+
/* @__PURE__ */ a("p", { children: i.availability || "Ready for grounded context and document actions" })
|
|
1434
1434
|
] }),
|
|
1435
1435
|
/* @__PURE__ */ t("div", { className: "af-agent-manager__actions", children: [
|
|
1436
|
-
/* @__PURE__ */ a(
|
|
1437
|
-
/* @__PURE__ */ a(
|
|
1438
|
-
/* @__PURE__ */ a(
|
|
1439
|
-
|
|
1436
|
+
/* @__PURE__ */ a(S, { tone: i.bound ? "success" : "neutral", children: i.bound ? "Space in Profile knowledge" : "Space not bound" }),
|
|
1437
|
+
/* @__PURE__ */ a(p, { size: "compact", variant: "secondary", onClick: () => n(i), children: i.bound ? "Unbind space" : "Bind space" }),
|
|
1438
|
+
/* @__PURE__ */ a(p, { size: "compact", variant: i.attached ? "secondary" : "primary", onClick: () => l(i), children: i.attached ? "Remove from prompt" : "Use in prompt" }),
|
|
1439
|
+
s && /* @__PURE__ */ a(p, { size: "compact", variant: "ghost", onClick: () => s(i), children: "Open editor" })
|
|
1440
1440
|
] })
|
|
1441
|
-
] },
|
|
1441
|
+
] }, i.id)) }) : /* @__PURE__ */ a(A, { size: "sm", title: "No accessible documents", description: "Create or share a Docs space, then bind its knowledge to this Profile or attach one document to a prompt." })
|
|
1442
1442
|
] });
|
|
1443
1443
|
}
|
|
1444
|
-
function
|
|
1444
|
+
function Ua({ revisions: e, currentId: n, onFork: l }) {
|
|
1445
1445
|
return /* @__PURE__ */ t("section", { className: "af-agent-manager", "aria-label": "Profile revision history", children: [
|
|
1446
1446
|
/* @__PURE__ */ a("header", { children: /* @__PURE__ */ t("div", { children: [
|
|
1447
|
-
/* @__PURE__ */ t(
|
|
1448
|
-
/* @__PURE__ */ a(
|
|
1447
|
+
/* @__PURE__ */ t(y, { children: [
|
|
1448
|
+
/* @__PURE__ */ a(ia, { size: 14, "aria-hidden": !0 }),
|
|
1449
1449
|
" Revision history"
|
|
1450
1450
|
] }),
|
|
1451
|
-
/* @__PURE__ */ t(
|
|
1451
|
+
/* @__PURE__ */ t(C, { children: [
|
|
1452
1452
|
e.length,
|
|
1453
1453
|
" immutable revisions"
|
|
1454
1454
|
] })
|
|
1455
1455
|
] }) }),
|
|
1456
|
-
/* @__PURE__ */ a("ol", { className: "af-agent-revisions", children: [...e].sort((
|
|
1456
|
+
/* @__PURE__ */ a("ol", { className: "af-agent-revisions", children: [...e].sort((s, i) => Number(i.revision - s.revision)).map((s) => /* @__PURE__ */ t("li", { children: [
|
|
1457
|
+
/* @__PURE__ */ t("div", { children: [
|
|
1458
|
+
/* @__PURE__ */ t("strong", { children: [
|
|
1459
|
+
"Revision ",
|
|
1460
|
+
s.revision.toString()
|
|
1461
|
+
] }),
|
|
1462
|
+
/* @__PURE__ */ a("p", { children: s.id })
|
|
1463
|
+
] }),
|
|
1464
|
+
/* @__PURE__ */ a(S, { tone: s.id === n ? "success" : "neutral", children: s.id === n ? "Current" : "Pinned" }),
|
|
1465
|
+
l && /* @__PURE__ */ a(p, { size: "compact", variant: "ghost", onClick: () => l(s), children: "Start session" })
|
|
1466
|
+
] }, s.id)) })
|
|
1467
|
+
] });
|
|
1468
|
+
}
|
|
1469
|
+
const _a = (e) => `${e.kind}:${e.slug}@${e.version}`, je = {
|
|
1470
|
+
definitions: [],
|
|
1471
|
+
instances: [],
|
|
1472
|
+
revisions: [],
|
|
1473
|
+
runs: [],
|
|
1474
|
+
steps: [],
|
|
1475
|
+
actionFacts: [],
|
|
1476
|
+
capabilities: [],
|
|
1477
|
+
nodeSchemas: [],
|
|
1478
|
+
loading: !1
|
|
1479
|
+
};
|
|
1480
|
+
class Wa {
|
|
1481
|
+
constructor(n, l = "") {
|
|
1482
|
+
$(this, "state");
|
|
1483
|
+
$(this, "listeners", /* @__PURE__ */ new Set());
|
|
1484
|
+
$(this, "generation", 0);
|
|
1485
|
+
$(this, "getSnapshot", () => this.state);
|
|
1486
|
+
$(this, "subscribe", (n) => (this.listeners.add(n), () => this.listeners.delete(n)));
|
|
1487
|
+
this.transport = n, this.state = { ...je, scope: l };
|
|
1488
|
+
}
|
|
1489
|
+
setScope(n) {
|
|
1490
|
+
n !== this.state.scope && (this.generation += 1, this.state = { ...je, scope: n }, this.listeners.forEach((l) => l()));
|
|
1491
|
+
}
|
|
1492
|
+
async refresh() {
|
|
1493
|
+
return this.run(async () => {
|
|
1494
|
+
const [n, l, s] = await Promise.all([
|
|
1495
|
+
this.transport.getCatalog({}),
|
|
1496
|
+
this.transport.listDefinitions({}),
|
|
1497
|
+
this.transport.listInstances({})
|
|
1498
|
+
]);
|
|
1499
|
+
return { capabilities: n.capabilities, nodeSchemas: n.nodeSchemas, definitions: l.items, instances: s.items };
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1502
|
+
async openDefinition(n) {
|
|
1503
|
+
return this.run(async () => {
|
|
1504
|
+
const l = await this.transport.listRevisions({ definitionId: n });
|
|
1505
|
+
return { selectedDefinitionId: n, revisions: l.items };
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
async openInstance(n) {
|
|
1509
|
+
const l = this.state.scope;
|
|
1510
|
+
return this.run(async () => {
|
|
1511
|
+
const [s, i, c, o] = await Promise.all([
|
|
1512
|
+
this.transport.listRuns({ instanceId: n }),
|
|
1513
|
+
this.transport.listActionFacts({ instanceId: n, kind: "intent" }),
|
|
1514
|
+
this.transport.inspectInstance({ instanceId: n }),
|
|
1515
|
+
this.transport.explainInstance({ instanceId: n })
|
|
1516
|
+
]), d = l === this.state.scope && s.items[0] ? (await this.transport.listSteps({ runId: s.items[0].runId })).items : [];
|
|
1517
|
+
return {
|
|
1518
|
+
selectedInstanceId: n,
|
|
1519
|
+
runs: s.items,
|
|
1520
|
+
steps: d,
|
|
1521
|
+
actionFacts: i.items,
|
|
1522
|
+
inspection: Be(c.inspectionJson),
|
|
1523
|
+
explanation: Be(o.explanationJson)
|
|
1524
|
+
};
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1527
|
+
async control(n, l = "user requested", s) {
|
|
1528
|
+
const i = this.state.selectedInstanceId;
|
|
1529
|
+
if (!i) throw new Error("select an instance before controlling it");
|
|
1530
|
+
await this.run(async () => (await this.transport.controlInstance({ instanceId: i, action: n, reason: l, actionId: s }), {})), this.state.selectedInstanceId === i && await this.openInstance(i);
|
|
1531
|
+
}
|
|
1532
|
+
async run(n) {
|
|
1533
|
+
const l = this.generation;
|
|
1534
|
+
this.update({ loading: !0, error: void 0 });
|
|
1535
|
+
try {
|
|
1536
|
+
const s = await n();
|
|
1537
|
+
return l === this.generation && this.update({ ...s, loading: !1 }), s;
|
|
1538
|
+
} catch (s) {
|
|
1539
|
+
const i = s instanceof Error ? s : new Error(String(s));
|
|
1540
|
+
throw l === this.generation && this.update({ loading: !1, error: i }), i;
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
update(n) {
|
|
1544
|
+
this.state = { ...this.state, ...n }, this.listeners.forEach((l) => l());
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
const Pa = (e) => ve(e.subscribe, e.getSnapshot, e.getSnapshot);
|
|
1548
|
+
function Fa({ controller: e }) {
|
|
1549
|
+
const n = Pa(e), [l, s] = x(""), i = n.instances.find((c) => c.instanceId === n.selectedInstanceId);
|
|
1550
|
+
return n.error && !n.definitions.length && !n.instances.length ? /* @__PURE__ */ a(A, { title: "Workflow unavailable", description: n.error.message, action: { label: "Retry", onClick: () => void e.refresh() } }) : /* @__PURE__ */ t("section", { className: "af-agent-manager", "aria-label": "Workflow workbench", children: [
|
|
1551
|
+
/* @__PURE__ */ t("header", { children: [
|
|
1552
|
+
/* @__PURE__ */ t("div", { children: [
|
|
1553
|
+
/* @__PURE__ */ t(y, { children: [
|
|
1554
|
+
/* @__PURE__ */ a(la, { size: 14, "aria-hidden": !0 }),
|
|
1555
|
+
" Workflow runtime"
|
|
1556
|
+
] }),
|
|
1557
|
+
/* @__PURE__ */ t(C, { children: [
|
|
1558
|
+
n.instances.length,
|
|
1559
|
+
" instances · ",
|
|
1560
|
+
n.definitions.length,
|
|
1561
|
+
" definitions"
|
|
1562
|
+
] }),
|
|
1563
|
+
/* @__PURE__ */ t("p", { children: [
|
|
1564
|
+
n.capabilities.length,
|
|
1565
|
+
" capabilities · ",
|
|
1566
|
+
n.nodeSchemas.length,
|
|
1567
|
+
" authoring schemas"
|
|
1568
|
+
] })
|
|
1569
|
+
] }),
|
|
1570
|
+
/* @__PURE__ */ a(p, { size: "compact", variant: "secondary", disabled: n.loading, onClick: () => void e.refresh(), children: n.loading ? "Loading…" : "Refresh" })
|
|
1571
|
+
] }),
|
|
1572
|
+
!n.instances.length && !n.definitions.length ? /* @__PURE__ */ a(A, { size: "sm", title: "No workflows", description: "Published definitions and their runtime instances appear here." }) : /* @__PURE__ */ t("div", { className: "af-agent-manager__list", children: [
|
|
1573
|
+
n.definitions.map((c) => /* @__PURE__ */ t(R, { as: "article", children: [
|
|
1574
|
+
/* @__PURE__ */ t("div", { children: [
|
|
1575
|
+
/* @__PURE__ */ a(y, { children: "Definition · revision history" }),
|
|
1576
|
+
/* @__PURE__ */ a(C, { children: c.name || c.definitionId }),
|
|
1577
|
+
/* @__PURE__ */ a("p", { children: c.definitionId })
|
|
1578
|
+
] }),
|
|
1579
|
+
/* @__PURE__ */ t("div", { className: "af-agent-manager__actions", children: [
|
|
1580
|
+
/* @__PURE__ */ a(S, { tone: c.archived ? "warning" : "success", children: c.archived ? "Archived" : "Active" }),
|
|
1581
|
+
/* @__PURE__ */ t(p, { size: "compact", variant: "ghost", onClick: () => void e.openDefinition(c.definitionId), children: [
|
|
1582
|
+
/* @__PURE__ */ a(sa, { size: 14, "aria-hidden": !0 }),
|
|
1583
|
+
" Revisions"
|
|
1584
|
+
] })
|
|
1585
|
+
] })
|
|
1586
|
+
] }, c.definitionId)),
|
|
1587
|
+
n.instances.map((c) => /* @__PURE__ */ t(R, { as: "article", children: [
|
|
1588
|
+
/* @__PURE__ */ t("div", { children: [
|
|
1589
|
+
/* @__PURE__ */ t(y, { children: [
|
|
1590
|
+
c.status,
|
|
1591
|
+
" · revision ",
|
|
1592
|
+
c.revision.toString()
|
|
1593
|
+
] }),
|
|
1594
|
+
/* @__PURE__ */ a(C, { children: c.name || c.instanceId }),
|
|
1595
|
+
/* @__PURE__ */ t("p", { children: [
|
|
1596
|
+
c.instanceId,
|
|
1597
|
+
c.lastError ? ` · ${c.lastError}` : ""
|
|
1598
|
+
] })
|
|
1599
|
+
] }),
|
|
1600
|
+
/* @__PURE__ */ t("div", { className: "af-agent-manager__actions", children: [
|
|
1601
|
+
/* @__PURE__ */ a(S, { tone: c.status === "failed" ? "warning" : "cool", children: c.controlMode || c.status }),
|
|
1602
|
+
/* @__PURE__ */ a(p, { size: "compact", onClick: () => void e.openInstance(c.instanceId), children: "Inspect" })
|
|
1603
|
+
] })
|
|
1604
|
+
] }, c.instanceId))
|
|
1605
|
+
] }),
|
|
1606
|
+
n.revisions.length > 0 && /* @__PURE__ */ a("ol", { className: "af-agent-revisions", "aria-label": "Workflow revisions", children: n.revisions.map((c) => /* @__PURE__ */ t("li", { children: [
|
|
1457
1607
|
/* @__PURE__ */ t("div", { children: [
|
|
1458
1608
|
/* @__PURE__ */ t("strong", { children: [
|
|
1459
1609
|
"Revision ",
|
|
1460
|
-
|
|
1610
|
+
c.revision.toString()
|
|
1461
1611
|
] }),
|
|
1462
|
-
/* @__PURE__ */ a("p", { children:
|
|
1612
|
+
/* @__PURE__ */ a("p", { children: c.contentDigest }),
|
|
1613
|
+
/* @__PURE__ */ a("pre", { children: new TextDecoder().decode(c.contractJson) })
|
|
1614
|
+
] }),
|
|
1615
|
+
/* @__PURE__ */ a(S, { tone: "neutral", children: "Pinned" })
|
|
1616
|
+
] }, `${c.definitionId}:${c.revision}`)) }),
|
|
1617
|
+
i && /* @__PURE__ */ t(R, { as: "section", children: [
|
|
1618
|
+
/* @__PURE__ */ t("header", { children: [
|
|
1619
|
+
/* @__PURE__ */ a(y, { children: "Selected instance" }),
|
|
1620
|
+
/* @__PURE__ */ a(C, { children: i.name || i.instanceId })
|
|
1463
1621
|
] }),
|
|
1464
|
-
/* @__PURE__ */
|
|
1465
|
-
|
|
1466
|
-
|
|
1622
|
+
/* @__PURE__ */ t("div", { className: "af-agent-manager__actions", children: [
|
|
1623
|
+
/* @__PURE__ */ t(p, { size: "compact", variant: "secondary", onClick: () => void e.control(se.InstanceControlAction.PAUSE), children: [
|
|
1624
|
+
/* @__PURE__ */ a(ra, { size: 14, "aria-hidden": !0 }),
|
|
1625
|
+
" Pause"
|
|
1626
|
+
] }),
|
|
1627
|
+
/* @__PURE__ */ t(p, { size: "compact", variant: "secondary", onClick: () => void e.control(se.InstanceControlAction.RESUME), children: [
|
|
1628
|
+
/* @__PURE__ */ a(ca, { size: 14, "aria-hidden": !0 }),
|
|
1629
|
+
" Resume"
|
|
1630
|
+
] }),
|
|
1631
|
+
/* @__PURE__ */ t(p, { size: "compact", variant: "secondary", onClick: () => void e.control(se.InstanceControlAction.CANCEL), children: [
|
|
1632
|
+
/* @__PURE__ */ a(oa, { size: 14, "aria-hidden": !0 }),
|
|
1633
|
+
" Cancel"
|
|
1634
|
+
] }),
|
|
1635
|
+
/* @__PURE__ */ t(p, { size: "compact", variant: "ghost", onClick: () => void e.openInstance(i.instanceId), children: [
|
|
1636
|
+
/* @__PURE__ */ a(da, { size: 14, "aria-hidden": !0 }),
|
|
1637
|
+
" Reload diagnostics"
|
|
1638
|
+
] })
|
|
1639
|
+
] }),
|
|
1640
|
+
/* @__PURE__ */ t("p", { children: [
|
|
1641
|
+
n.runs.length,
|
|
1642
|
+
" runs · ",
|
|
1643
|
+
n.steps.length,
|
|
1644
|
+
" steps · ",
|
|
1645
|
+
n.actionFacts.length,
|
|
1646
|
+
" action intents"
|
|
1647
|
+
] }),
|
|
1648
|
+
/* @__PURE__ */ a("ol", { className: "af-agent-task-tree", "aria-label": "Workflow steps", children: n.steps.map((c) => /* @__PURE__ */ t("li", { children: [
|
|
1649
|
+
/* @__PURE__ */ a("span", { "aria-hidden": !0 }),
|
|
1650
|
+
/* @__PURE__ */ t("div", { children: [
|
|
1651
|
+
/* @__PURE__ */ a("strong", { children: c.nodeId }),
|
|
1652
|
+
/* @__PURE__ */ t("p", { children: [
|
|
1653
|
+
c.nodeType,
|
|
1654
|
+
" · ",
|
|
1655
|
+
c.status,
|
|
1656
|
+
c.exitReason ? ` · ${c.exitReason}` : ""
|
|
1657
|
+
] })
|
|
1658
|
+
] })
|
|
1659
|
+
] }, c.stepId)) }),
|
|
1660
|
+
/* @__PURE__ */ t("div", { className: "af-agent-manager__actions", children: [
|
|
1661
|
+
/* @__PURE__ */ a(z, { "aria-label": "Action ID", value: l, onChange: (c) => s(c.target.value), placeholder: "Action ID for retry or reconcile" }),
|
|
1662
|
+
/* @__PURE__ */ a(p, { size: "compact", disabled: !l, onClick: () => void e.control(se.InstanceControlAction.RETRY, "", l), children: "Retry action" }),
|
|
1663
|
+
/* @__PURE__ */ a(p, { size: "compact", variant: "secondary", disabled: !l, onClick: () => void e.control(se.InstanceControlAction.RECONCILE, "", l), children: "Reconcile action" })
|
|
1664
|
+
] }),
|
|
1665
|
+
n.error && /* @__PURE__ */ a("p", { role: "alert", children: n.error.message })
|
|
1666
|
+
] })
|
|
1467
1667
|
] });
|
|
1468
1668
|
}
|
|
1469
|
-
const
|
|
1669
|
+
const Be = (e) => e.length ? JSON.parse(new TextDecoder().decode(e)) : void 0;
|
|
1470
1670
|
export {
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1671
|
+
ga as AgentActionCard,
|
|
1672
|
+
Ba as AgentCapabilityCatalog,
|
|
1673
|
+
ja as AgentChat,
|
|
1674
|
+
Ja as AgentCollaborationCenter,
|
|
1675
|
+
wa as AgentComposer,
|
|
1676
|
+
$a as AgentCompositionPanel,
|
|
1677
|
+
Na as AgentConversation,
|
|
1678
|
+
Oa as AgentDocumentLibrary,
|
|
1679
|
+
pa as AgentExecutionTrace,
|
|
1680
|
+
La as AgentMemoryCenter,
|
|
1681
|
+
ba as AgentProfileEditor,
|
|
1682
|
+
Ma as AgentProfileSettings,
|
|
1683
|
+
Ca as AgentResourceBar,
|
|
1684
|
+
Ua as AgentRevisionHistory,
|
|
1685
|
+
ya as AgentSessionList,
|
|
1686
|
+
Va as AgentSessionModel,
|
|
1687
|
+
Da as AgentSlotRegistry,
|
|
1688
|
+
qa as AgentStudio,
|
|
1689
|
+
Je as DEFAULT_AGENT_UI_LABELS,
|
|
1690
|
+
Fa as WorkflowWorkbench,
|
|
1691
|
+
Wa as WorkflowWorkbenchController,
|
|
1692
|
+
_a as capabilityKey,
|
|
1693
|
+
va as compositionIssueLabel,
|
|
1492
1694
|
be as dataFallback,
|
|
1493
|
-
|
|
1695
|
+
ha as useAgentSession,
|
|
1696
|
+
Pa as useWorkflowWorkbench
|
|
1494
1697
|
};
|