@agent-factory-platform/agent-react 0.3.0 → 0.5.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/dist/index.d.ts +2 -1
- package/dist/index.js +477 -475
- package/dist/profile.d.ts +27 -0
- package/dist/projection.d.ts +18 -0
- package/dist/ui.d.ts +4 -42
- package/dist/use-agent-slot-registry.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "./styles.css";
|
|
2
2
|
export { useAgentSession } from "./hooks";
|
|
3
3
|
export { AgentSlotRegistry, dataFallback, type AgentDataDecoder, type AgentSlot, type AgentSlotProps, type AgentSlotValues, type DecodedAgentDataProjection } from "./registry";
|
|
4
|
-
export { AgentActionCard, AgentChat, AgentComposer,
|
|
4
|
+
export { AgentActionCard, AgentChat, AgentComposer, AgentConversation, AgentExecutionTrace, AgentResourceBar, AgentSessionList, DEFAULT_AGENT_UI_LABELS, type AgentInputResource, type AgentUiLabels } from "./ui";
|
|
5
|
+
export { AgentCompositionPanel, AgentProfileEditor, AgentProfileSettings, AgentStudio, compositionIssueLabel } from "./profile";
|
|
5
6
|
export { AgentCapabilityCatalog, AgentCollaborationCenter, AgentDocumentLibrary, AgentMemoryCenter, AgentRevisionHistory, capabilityKey, type AgentDocumentResource } from "./management";
|
|
6
7
|
export { AgentSessionModel, type AgentProjectionItem, type AgentSessionProjection, type AgentSessionState, type AgentSessionTransport } from "@agent-factory-platform/client";
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var Be = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Te = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
5
|
var Le = (e, l, s) => l in e ? Be(e, l, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[l] = s;
|
|
6
|
-
var pe = (e, l, s) => Le(e, typeof l != "symbol" ? l + "" : l, s), ge = (e, l, s) => l.has(e) ||
|
|
7
|
-
var _ = (e, l, s) => (ge(e, l, "read from private field"), s ? s.call(e) : l.get(e)), K = (e, l, s) => l.has(e) ?
|
|
8
|
-
import { useSyncExternalStore as
|
|
6
|
+
var pe = (e, l, s) => Le(e, typeof l != "symbol" ? l + "" : l, s), ge = (e, l, s) => l.has(e) || Te("Cannot " + s);
|
|
7
|
+
var _ = (e, l, s) => (ge(e, l, "read from private field"), s ? s.call(e) : l.get(e)), K = (e, l, s) => l.has(e) ? Te("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(e) : l.set(e, s), Re = (e, l, s, r) => (ge(e, l, "write to private field"), r ? r.call(e, s) : l.set(e, s), s), te = (e, l, s) => (ge(e, l, "access private method"), s);
|
|
8
|
+
import { useSyncExternalStore as je, useState as T, useEffect as Oe, useMemo as Ue } from "react";
|
|
9
9
|
import { jsx as a, jsxs as t, Fragment as me } from "react/jsx-runtime";
|
|
10
10
|
import { create as m } from "@bufbuild/protobuf";
|
|
11
11
|
import { agentV1 as v } from "@agent-factory-platform/client";
|
|
12
|
-
import { AgentSessionModel as
|
|
13
|
-
import { Card as V, CardLabel as N, CardTitle as P, Tag as y, Button as S, AvatarBadge as ve,
|
|
14
|
-
import { Wrench as Je,
|
|
12
|
+
import { AgentSessionModel as ja } from "@agent-factory-platform/client";
|
|
13
|
+
import { Card as V, CardLabel as N, CardTitle as P, Tag as y, Button as S, AvatarBadge as ve, StateView as z, Input as x, Textarea as re, NativeSelect as fe, Switch as D } from "@agent-factory-platform/ui-kit";
|
|
14
|
+
import { Wrench as Je, Sparkles as Fe, Check as Ke, Bot as qe, Paperclip as Ge, CircleStop as Ve, Send as He, MessageSquarePlus as Ye, ChevronRight as We, Trash2 as Qe, PackageCheck as Xe, Network as $e, BookOpen as Ze, Brain as ea, GitFork as aa } from "lucide-react";
|
|
15
15
|
function na(e) {
|
|
16
|
-
return
|
|
16
|
+
return je(e.subscribe, e.getSnapshot, e.getSnapshot);
|
|
17
17
|
}
|
|
18
18
|
var B, L, G, se, O, ie;
|
|
19
19
|
class _a {
|
|
@@ -58,7 +58,7 @@ class _a {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
B = new WeakMap(), L = new WeakMap(), G = new WeakMap(), se = new WeakMap(), O = new WeakSet(), ie = function() {
|
|
61
|
-
|
|
61
|
+
Re(this, se, _(this, se) + 1), _(this, G).forEach((l) => l());
|
|
62
62
|
};
|
|
63
63
|
function be(e, l) {
|
|
64
64
|
return /* @__PURE__ */ t("span", { "data-agent-data-fallback": l, children: [
|
|
@@ -67,136 +67,36 @@ function be(e, l) {
|
|
|
67
67
|
e || "(unnamed)"
|
|
68
68
|
] });
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
emptyTitle: "How can I help?",
|
|
75
|
-
emptyDescription: "Ask a question in this profile-pinned session.",
|
|
76
|
-
composer: "Message the assistant",
|
|
77
|
-
send: "Send",
|
|
78
|
-
stop: "Stop",
|
|
79
|
-
retry: "Retry",
|
|
80
|
-
execution: "Execution",
|
|
81
|
-
explicitSkill: "Invoke skill"
|
|
82
|
-
}, ce = (e) => ({
|
|
83
|
-
...Se,
|
|
84
|
-
...e
|
|
85
|
-
}), la = () => () => {
|
|
86
|
-
}, Me = () => 0;
|
|
87
|
-
function de(e) {
|
|
88
|
-
qe(
|
|
70
|
+
const la = () => () => {
|
|
71
|
+
}, Ie = () => 0;
|
|
72
|
+
function ce(e) {
|
|
73
|
+
je(
|
|
89
74
|
(e == null ? void 0 : e.subscribe) ?? la,
|
|
90
|
-
(e == null ? void 0 : e.getSnapshot) ??
|
|
91
|
-
(e == null ? void 0 : e.getSnapshot) ??
|
|
75
|
+
(e == null ? void 0 : e.getSnapshot) ?? Ie,
|
|
76
|
+
(e == null ? void 0 : e.getSnapshot) ?? Ie
|
|
92
77
|
);
|
|
93
78
|
}
|
|
94
79
|
function ta({
|
|
95
|
-
sessions: e,
|
|
96
|
-
activeSessionId: l,
|
|
97
|
-
onSelect: s,
|
|
98
|
-
onNew: r,
|
|
99
|
-
onDelete: n,
|
|
100
|
-
labels: o
|
|
101
|
-
}) {
|
|
102
|
-
const c = ce(o);
|
|
103
|
-
return /* @__PURE__ */ t("aside", { className: "af-agent-threads", "aria-label": c.sessions, children: [
|
|
104
|
-
/* @__PURE__ */ t("div", { className: "af-agent-threads__header", children: [
|
|
105
|
-
/* @__PURE__ */ a("strong", { children: c.sessions }),
|
|
106
|
-
/* @__PURE__ */ a(
|
|
107
|
-
S,
|
|
108
|
-
{
|
|
109
|
-
size: "icon",
|
|
110
|
-
variant: "ghost",
|
|
111
|
-
onClick: r,
|
|
112
|
-
"aria-label": c.newSession,
|
|
113
|
-
children: /* @__PURE__ */ a(Ye, { size: 17, "aria-hidden": !0 })
|
|
114
|
-
}
|
|
115
|
-
)
|
|
116
|
-
] }),
|
|
117
|
-
/* @__PURE__ */ a("div", { className: "af-agent-threads__list", children: e.map((d) => /* @__PURE__ */ t(
|
|
118
|
-
"div",
|
|
119
|
-
{
|
|
120
|
-
className: "af-agent-thread-row",
|
|
121
|
-
"data-active": d.id === l || void 0,
|
|
122
|
-
children: [
|
|
123
|
-
/* @__PURE__ */ t(
|
|
124
|
-
"button",
|
|
125
|
-
{
|
|
126
|
-
type: "button",
|
|
127
|
-
className: "af-agent-thread-row__select",
|
|
128
|
-
onClick: () => s(d.id),
|
|
129
|
-
children: [
|
|
130
|
-
/* @__PURE__ */ a("span", { children: d.profileRevisionId }),
|
|
131
|
-
/* @__PURE__ */ a(We, { size: 14, "aria-hidden": !0 })
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
),
|
|
135
|
-
n && /* @__PURE__ */ a(
|
|
136
|
-
"button",
|
|
137
|
-
{
|
|
138
|
-
type: "button",
|
|
139
|
-
className: "af-agent-icon-button",
|
|
140
|
-
onClick: () => n(d.id),
|
|
141
|
-
"aria-label": `Delete ${d.id}`,
|
|
142
|
-
children: /* @__PURE__ */ a(Qe, { size: 14, "aria-hidden": !0 })
|
|
143
|
-
}
|
|
144
|
-
)
|
|
145
|
-
]
|
|
146
|
-
},
|
|
147
|
-
d.id
|
|
148
|
-
)) })
|
|
149
|
-
] });
|
|
150
|
-
}
|
|
151
|
-
function ia({
|
|
152
|
-
profileRevisionId: e,
|
|
153
|
-
explicitSkillSlug: l,
|
|
154
|
-
onExplicitSkillChange: s,
|
|
155
|
-
labels: r,
|
|
156
|
-
registry: n
|
|
157
|
-
}) {
|
|
158
|
-
de(n);
|
|
159
|
-
const o = n == null ? void 0 : n.render("resource-bar", {
|
|
160
|
-
profileRevisionId: e,
|
|
161
|
-
explicitSkillSlug: l,
|
|
162
|
-
setExplicitSkillSlug: s
|
|
163
|
-
});
|
|
164
|
-
if (o) return o;
|
|
165
|
-
const c = ce(r);
|
|
166
|
-
return /* @__PURE__ */ t("div", { className: "af-agent-resources", "aria-label": "Agent resources", children: [
|
|
167
|
-
/* @__PURE__ */ a(y, { tone: "cool", children: e }),
|
|
168
|
-
/* @__PURE__ */ a(
|
|
169
|
-
x,
|
|
170
|
-
{
|
|
171
|
-
"aria-label": c.explicitSkill,
|
|
172
|
-
placeholder: c.explicitSkill,
|
|
173
|
-
value: l,
|
|
174
|
-
onChange: (d) => s(d.target.value)
|
|
175
|
-
}
|
|
176
|
-
)
|
|
177
|
-
] });
|
|
178
|
-
}
|
|
179
|
-
function ra({
|
|
180
80
|
items: e,
|
|
181
|
-
label: l =
|
|
81
|
+
label: l = "Execution",
|
|
182
82
|
registry: s
|
|
183
83
|
}) {
|
|
184
|
-
return
|
|
84
|
+
return ce(s), e.length ? /* @__PURE__ */ t("details", { className: "af-agent-trace", children: [
|
|
185
85
|
/* @__PURE__ */ t("summary", { children: [
|
|
186
|
-
/* @__PURE__ */ a(
|
|
86
|
+
/* @__PURE__ */ a(Fe, { size: 14, "aria-hidden": !0 }),
|
|
187
87
|
l,
|
|
188
88
|
/* @__PURE__ */ a(y, { size: "micro", tone: "cool", children: e.length })
|
|
189
89
|
] }),
|
|
190
90
|
/* @__PURE__ */ a("ol", { children: e.map((r) => /* @__PURE__ */ a("li", { "data-category": r.category, children: (s == null ? void 0 : s.render("trace-item", r)) ?? /* @__PURE__ */ t(me, { children: [
|
|
191
91
|
/* @__PURE__ */ t("span", { children: [
|
|
192
|
-
/* @__PURE__ */ a(
|
|
92
|
+
/* @__PURE__ */ a(Ke, { size: 13, "aria-hidden": !0 }),
|
|
193
93
|
r.kind
|
|
194
94
|
] }),
|
|
195
95
|
/* @__PURE__ */ a("span", { children: [r.status, r.detail].filter(Boolean).join(" · ") })
|
|
196
96
|
] }) }, r.anchorSeq.toString())) })
|
|
197
97
|
] }) : null;
|
|
198
98
|
}
|
|
199
|
-
function
|
|
99
|
+
function ia({
|
|
200
100
|
interaction: e,
|
|
201
101
|
onResolve: l
|
|
202
102
|
}) {
|
|
@@ -247,110 +147,7 @@ function sa({
|
|
|
247
147
|
n && /* @__PURE__ */ a("p", { role: "alert", children: n })
|
|
248
148
|
] });
|
|
249
149
|
}
|
|
250
|
-
function
|
|
251
|
-
value: e,
|
|
252
|
-
onChange: l,
|
|
253
|
-
onSubmit: s,
|
|
254
|
-
running: r,
|
|
255
|
-
onStop: n,
|
|
256
|
-
onInject: o,
|
|
257
|
-
onAttachResource: c,
|
|
258
|
-
resources: d = [],
|
|
259
|
-
onRemoveResource: u,
|
|
260
|
-
labels: f
|
|
261
|
-
}) {
|
|
262
|
-
const g = ce(f);
|
|
263
|
-
return /* @__PURE__ */ t(
|
|
264
|
-
"form",
|
|
265
|
-
{
|
|
266
|
-
className: "af-agent-composer",
|
|
267
|
-
"data-running": r || void 0,
|
|
268
|
-
onSubmit: (b) => {
|
|
269
|
-
b.preventDefault(), e.trim() && s();
|
|
270
|
-
},
|
|
271
|
-
children: [
|
|
272
|
-
d.length > 0 && /* @__PURE__ */ a(
|
|
273
|
-
"div",
|
|
274
|
-
{
|
|
275
|
-
className: "af-agent-composer__resources",
|
|
276
|
-
"aria-label": "Attached resources",
|
|
277
|
-
children: d.map((b) => /* @__PURE__ */ t(y, { tone: "cool", children: [
|
|
278
|
-
b.label,
|
|
279
|
-
u && /* @__PURE__ */ a(
|
|
280
|
-
"button",
|
|
281
|
-
{
|
|
282
|
-
type: "button",
|
|
283
|
-
"aria-label": `Remove ${b.label}`,
|
|
284
|
-
onClick: () => u(b.resourceId),
|
|
285
|
-
children: "×"
|
|
286
|
-
}
|
|
287
|
-
)
|
|
288
|
-
] }, b.resourceId))
|
|
289
|
-
}
|
|
290
|
-
),
|
|
291
|
-
/* @__PURE__ */ a(
|
|
292
|
-
re,
|
|
293
|
-
{
|
|
294
|
-
rows: 2,
|
|
295
|
-
variant: "bare",
|
|
296
|
-
value: e,
|
|
297
|
-
onChange: (b) => l(b.target.value),
|
|
298
|
-
"aria-label": g.composer,
|
|
299
|
-
placeholder: r ? "Steer the active run" : g.composer,
|
|
300
|
-
onKeyDown: (b) => {
|
|
301
|
-
b.key === "Enter" && !b.shiftKey && (b.preventDefault(), e.trim() && s());
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
),
|
|
305
|
-
/* @__PURE__ */ t("div", { className: "af-agent-composer__actions", children: [
|
|
306
|
-
c && /* @__PURE__ */ a(
|
|
307
|
-
S,
|
|
308
|
-
{
|
|
309
|
-
type: "button",
|
|
310
|
-
size: "icon",
|
|
311
|
-
variant: "ghost",
|
|
312
|
-
onClick: c,
|
|
313
|
-
"aria-label": "Attach document",
|
|
314
|
-
children: /* @__PURE__ */ a(Fe, { size: 17, "aria-hidden": !0 })
|
|
315
|
-
}
|
|
316
|
-
),
|
|
317
|
-
r && o && /* @__PURE__ */ a(
|
|
318
|
-
S,
|
|
319
|
-
{
|
|
320
|
-
type: "button",
|
|
321
|
-
size: "compact",
|
|
322
|
-
variant: "ghost",
|
|
323
|
-
disabled: !e.trim(),
|
|
324
|
-
onClick: o,
|
|
325
|
-
children: "Inject"
|
|
326
|
-
}
|
|
327
|
-
),
|
|
328
|
-
r ? /* @__PURE__ */ a(
|
|
329
|
-
S,
|
|
330
|
-
{
|
|
331
|
-
type: "button",
|
|
332
|
-
size: "icon",
|
|
333
|
-
variant: "secondary",
|
|
334
|
-
onClick: n,
|
|
335
|
-
"aria-label": g.stop,
|
|
336
|
-
children: /* @__PURE__ */ a(Ke, { size: 17, "aria-hidden": !0 })
|
|
337
|
-
}
|
|
338
|
-
) : /* @__PURE__ */ a(
|
|
339
|
-
S,
|
|
340
|
-
{
|
|
341
|
-
type: "submit",
|
|
342
|
-
size: "icon",
|
|
343
|
-
disabled: !e.trim(),
|
|
344
|
-
"aria-label": g.send,
|
|
345
|
-
children: /* @__PURE__ */ a(Ge, { size: 17, "aria-hidden": !0 })
|
|
346
|
-
}
|
|
347
|
-
)
|
|
348
|
-
] })
|
|
349
|
-
]
|
|
350
|
-
}
|
|
351
|
-
);
|
|
352
|
-
}
|
|
353
|
-
function da({
|
|
150
|
+
function ra({
|
|
354
151
|
item: e
|
|
355
152
|
}) {
|
|
356
153
|
return /* @__PURE__ */ t(V, { as: "article", children: [
|
|
@@ -372,12 +169,12 @@ function da({
|
|
|
372
169
|
] })
|
|
373
170
|
] });
|
|
374
171
|
}
|
|
375
|
-
function
|
|
172
|
+
function sa({
|
|
376
173
|
items: e,
|
|
377
174
|
registry: l,
|
|
378
175
|
onResolveInteraction: s
|
|
379
176
|
}) {
|
|
380
|
-
|
|
177
|
+
ce(l);
|
|
381
178
|
const r = e.filter(
|
|
382
179
|
(n) => n.slot !== "trace-item" && (n.slot !== "message-content" || n.text.length > 0)
|
|
383
180
|
);
|
|
@@ -411,18 +208,18 @@ function oa({
|
|
|
411
208
|
"data-slot": n.slot,
|
|
412
209
|
"data-anchor-seq": n.anchorSeq.toString(),
|
|
413
210
|
"data-last-updated-seq": n.lastUpdatedSeq.toString(),
|
|
414
|
-
children: n.slot === "tool-card" ? (l == null ? void 0 : l.render("tool-card", n)) ?? /* @__PURE__ */ a(
|
|
415
|
-
|
|
211
|
+
children: n.slot === "tool-card" ? (l == null ? void 0 : l.render("tool-card", n)) ?? /* @__PURE__ */ a(ra, { item: n }) : n.slot === "action" ? (l == null ? void 0 : l.render("action", n)) ?? (s ? /* @__PURE__ */ a(
|
|
212
|
+
ia,
|
|
416
213
|
{
|
|
417
214
|
interaction: {
|
|
418
215
|
id: n.interactionId,
|
|
419
|
-
kind:
|
|
216
|
+
kind: Me(n),
|
|
420
217
|
status: n.phase === "requested" ? "pending" : "resolved"
|
|
421
218
|
},
|
|
422
219
|
onResolve: (o) => s(n.interactionId, o)
|
|
423
220
|
}
|
|
424
221
|
) : /* @__PURE__ */ t(y, { tone: "warning", children: [
|
|
425
|
-
|
|
222
|
+
Me(n),
|
|
426
223
|
" · ",
|
|
427
224
|
n.phase
|
|
428
225
|
] })) : n.slot === "citation" ? (l == null ? void 0 : l.render("citation", n)) ?? /* @__PURE__ */ a(y, { children: n.resourceId }) : l ? l.render("data", n) : be(n.name, "unknown")
|
|
@@ -431,217 +228,19 @@ function oa({
|
|
|
431
228
|
)
|
|
432
229
|
) });
|
|
433
230
|
}
|
|
434
|
-
function
|
|
231
|
+
function Me(e) {
|
|
435
232
|
const l = e.payload && typeof e.payload == "object" && !Array.isArray(e.payload) ? e.payload.action : void 0;
|
|
436
233
|
return l && typeof l == "object" && !Array.isArray(l) && typeof l.kind == "string" ? l.kind : e.kind;
|
|
437
234
|
}
|
|
438
|
-
function
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
registry: o
|
|
445
|
-
header: c,
|
|
446
|
-
labels: d,
|
|
447
|
-
onError: u
|
|
235
|
+
function ca({
|
|
236
|
+
revision: e,
|
|
237
|
+
onChange: l,
|
|
238
|
+
onSave: s,
|
|
239
|
+
saving: r = !1,
|
|
240
|
+
showSave: n = !0,
|
|
241
|
+
registry: o
|
|
448
242
|
}) {
|
|
449
|
-
|
|
450
|
-
de(o);
|
|
451
|
-
const f = ce(d), g = na(e), [C, b] = T(""), [w, M] = T(""), U = g.status === "submitting" || g.status === "queued" || g.status === "running" || g.status === "waiting_for_input", oe = g.projection.items.filter(
|
|
452
|
-
(k) => k.slot === "trace-item"
|
|
453
|
-
), H = g.projection.items.filter(
|
|
454
|
-
(k) => k.slot !== "trace-item" && (k.slot !== "message-content" || k.text.length > 0)
|
|
455
|
-
), J = (k) => u == null ? void 0 : u(k instanceof Error ? k : new Error(String(k))), R = async (k, j = U ? "steer" : "followup") => {
|
|
456
|
-
var Q;
|
|
457
|
-
const A = k.trim();
|
|
458
|
-
if (A) {
|
|
459
|
-
b(""), M(A);
|
|
460
|
-
try {
|
|
461
|
-
j === "steer" ? await e.steerText(A) : j === "inject" ? await e.injectText(A) : await e.submitContent(
|
|
462
|
-
[
|
|
463
|
-
m(v.ContentBlockSchema, {
|
|
464
|
-
block: {
|
|
465
|
-
case: "text",
|
|
466
|
-
value: m(v.TextBlockSchema, { text: A })
|
|
467
|
-
}
|
|
468
|
-
}),
|
|
469
|
-
...s.map(
|
|
470
|
-
(E) => m(v.ContentBlockSchema, {
|
|
471
|
-
block: {
|
|
472
|
-
case: "resource",
|
|
473
|
-
value: m(v.ResourceBlockSchema, {
|
|
474
|
-
resourceId: E.resourceId,
|
|
475
|
-
mediaType: E.mediaType ?? "application/vnd.agentfactory.document"
|
|
476
|
-
})
|
|
477
|
-
}
|
|
478
|
-
})
|
|
479
|
-
)
|
|
480
|
-
],
|
|
481
|
-
l
|
|
482
|
-
);
|
|
483
|
-
} catch (E) {
|
|
484
|
-
b(((Q = e.getSnapshot().retryDraft) == null ? void 0 : Q.text) ?? A), J(E);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
return /* @__PURE__ */ t("section", { className: "af-agent-conversation", "aria-label": f.assistant, children: [
|
|
489
|
-
c && /* @__PURE__ */ a("header", { className: "af-agent-conversation__header", children: c }),
|
|
490
|
-
/* @__PURE__ */ t("div", { className: "af-agent-messages", "aria-live": "polite", children: [
|
|
491
|
-
!H.length && g.status === "idle" && /* @__PURE__ */ a(
|
|
492
|
-
z,
|
|
493
|
-
{
|
|
494
|
-
size: "md",
|
|
495
|
-
title: f.emptyTitle,
|
|
496
|
-
description: f.emptyDescription,
|
|
497
|
-
icon: /* @__PURE__ */ a(De, { size: 24, "aria-hidden": !0 })
|
|
498
|
-
}
|
|
499
|
-
),
|
|
500
|
-
/* @__PURE__ */ a(
|
|
501
|
-
oa,
|
|
502
|
-
{
|
|
503
|
-
items: H,
|
|
504
|
-
registry: o,
|
|
505
|
-
onResolveInteraction: async (k, j) => {
|
|
506
|
-
try {
|
|
507
|
-
await e.resolveInteraction(k, j);
|
|
508
|
-
} catch (A) {
|
|
509
|
-
throw J(A), A;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
),
|
|
514
|
-
g.status !== "waiting_for_input" && U && /* @__PURE__ */ a("span", { className: "af-agent-thinking", children: "Thinking…" }),
|
|
515
|
-
g.status === "disconnected" && /* @__PURE__ */ a(
|
|
516
|
-
z,
|
|
517
|
-
{
|
|
518
|
-
variant: "error",
|
|
519
|
-
size: "sm",
|
|
520
|
-
title: ((Y = g.error) == null ? void 0 : Y.message) ?? "Disconnected",
|
|
521
|
-
action: {
|
|
522
|
-
label: f.retry,
|
|
523
|
-
onClick: () => void e.retry().catch(J)
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
),
|
|
527
|
-
g.status === "failed" && /* @__PURE__ */ a(
|
|
528
|
-
z,
|
|
529
|
-
{
|
|
530
|
-
variant: "error",
|
|
531
|
-
size: "sm",
|
|
532
|
-
title: ((W = g.error) == null ? void 0 : W.message) ?? "Run failed",
|
|
533
|
-
action: { label: f.retry, onClick: () => void R(w) }
|
|
534
|
-
}
|
|
535
|
-
),
|
|
536
|
-
g.status === "max_steps_reached" && /* @__PURE__ */ a(
|
|
537
|
-
z,
|
|
538
|
-
{
|
|
539
|
-
variant: "error",
|
|
540
|
-
size: "sm",
|
|
541
|
-
title: "Maximum steps reached",
|
|
542
|
-
action: { label: f.retry, onClick: () => void R(w) }
|
|
543
|
-
}
|
|
544
|
-
),
|
|
545
|
-
/* @__PURE__ */ a(
|
|
546
|
-
ra,
|
|
547
|
-
{
|
|
548
|
-
items: oe,
|
|
549
|
-
registry: o,
|
|
550
|
-
label: f.execution
|
|
551
|
-
}
|
|
552
|
-
)
|
|
553
|
-
] }),
|
|
554
|
-
(o == null ? void 0 : o.render("composer", {
|
|
555
|
-
draft: C,
|
|
556
|
-
running: U,
|
|
557
|
-
submit: () => void R(C),
|
|
558
|
-
stop: () => void e.cancel(),
|
|
559
|
-
setDraft: b
|
|
560
|
-
})) ?? /* @__PURE__ */ a(
|
|
561
|
-
ca,
|
|
562
|
-
{
|
|
563
|
-
value: C,
|
|
564
|
-
onChange: b,
|
|
565
|
-
onSubmit: () => void R(C),
|
|
566
|
-
running: U,
|
|
567
|
-
onStop: () => void e.cancel(),
|
|
568
|
-
onInject: () => void R(C, "inject"),
|
|
569
|
-
onAttachResource: n,
|
|
570
|
-
resources: s,
|
|
571
|
-
onRemoveResource: r,
|
|
572
|
-
labels: f
|
|
573
|
-
}
|
|
574
|
-
)
|
|
575
|
-
] });
|
|
576
|
-
}
|
|
577
|
-
function Na({
|
|
578
|
-
model: e,
|
|
579
|
-
title: l = Se.assistant,
|
|
580
|
-
subtitle: s,
|
|
581
|
-
profileRevisionId: r,
|
|
582
|
-
sessions: n,
|
|
583
|
-
activeSessionId: o,
|
|
584
|
-
onSelectSession: c,
|
|
585
|
-
onNewSession: d,
|
|
586
|
-
onDeleteSession: u,
|
|
587
|
-
registry: f,
|
|
588
|
-
labels: g
|
|
589
|
-
}) {
|
|
590
|
-
const [C, b] = T(""), w = ce(g), M = Oe(
|
|
591
|
-
() => /* @__PURE__ */ t(me, { children: [
|
|
592
|
-
/* @__PURE__ */ t("div", { className: "af-agent-title", children: [
|
|
593
|
-
/* @__PURE__ */ a(ve, { initials: "AF", size: 36 }),
|
|
594
|
-
/* @__PURE__ */ t("div", { children: [
|
|
595
|
-
/* @__PURE__ */ a("strong", { children: l }),
|
|
596
|
-
s && /* @__PURE__ */ a("span", { children: s })
|
|
597
|
-
] })
|
|
598
|
-
] }),
|
|
599
|
-
/* @__PURE__ */ a(
|
|
600
|
-
ia,
|
|
601
|
-
{
|
|
602
|
-
profileRevisionId: r,
|
|
603
|
-
explicitSkillSlug: C,
|
|
604
|
-
onExplicitSkillChange: b,
|
|
605
|
-
registry: f,
|
|
606
|
-
labels: w
|
|
607
|
-
}
|
|
608
|
-
)
|
|
609
|
-
] }),
|
|
610
|
-
[l, s, r, C, f, w]
|
|
611
|
-
);
|
|
612
|
-
return /* @__PURE__ */ t("div", { className: "af-agent-chat", "data-testid": "agent-chat", children: [
|
|
613
|
-
n && c && d && /* @__PURE__ */ a(
|
|
614
|
-
ta,
|
|
615
|
-
{
|
|
616
|
-
sessions: n,
|
|
617
|
-
activeSessionId: o,
|
|
618
|
-
onSelect: c,
|
|
619
|
-
onNew: d,
|
|
620
|
-
onDelete: u,
|
|
621
|
-
labels: w
|
|
622
|
-
}
|
|
623
|
-
),
|
|
624
|
-
/* @__PURE__ */ a(
|
|
625
|
-
ha,
|
|
626
|
-
{
|
|
627
|
-
model: e,
|
|
628
|
-
explicitSkillSlug: C,
|
|
629
|
-
registry: f,
|
|
630
|
-
header: M,
|
|
631
|
-
labels: w
|
|
632
|
-
}
|
|
633
|
-
)
|
|
634
|
-
] });
|
|
635
|
-
}
|
|
636
|
-
function ua({
|
|
637
|
-
revision: e,
|
|
638
|
-
onChange: l,
|
|
639
|
-
onSave: s,
|
|
640
|
-
saving: r = !1,
|
|
641
|
-
showSave: n = !0,
|
|
642
|
-
registry: o
|
|
643
|
-
}) {
|
|
644
|
-
de(o);
|
|
243
|
+
ce(o);
|
|
645
244
|
const c = o == null ? void 0 : o.render("profile-editor", { revision: e, onChange: l });
|
|
646
245
|
return c || /* @__PURE__ */ t(
|
|
647
246
|
"form",
|
|
@@ -662,7 +261,7 @@ function ua({
|
|
|
662
261
|
),
|
|
663
262
|
/* @__PURE__ */ t("div", { children: [
|
|
664
263
|
/* @__PURE__ */ t(N, { children: [
|
|
665
|
-
/* @__PURE__ */ a(
|
|
264
|
+
/* @__PURE__ */ a(qe, { size: 14, "aria-hidden": !0 }),
|
|
666
265
|
" Agent Profile"
|
|
667
266
|
] }),
|
|
668
267
|
/* @__PURE__ */ a(P, { children: e.name || "Untitled Agent" })
|
|
@@ -729,7 +328,7 @@ function ua({
|
|
|
729
328
|
}
|
|
730
329
|
);
|
|
731
330
|
}
|
|
732
|
-
const
|
|
331
|
+
const da = (e) => e ? `${e} warning${e === 1 ? "" : "s"}` : "Ready", oa = (e) => ({
|
|
733
332
|
capability_not_installed: "Capability is not installed",
|
|
734
333
|
capability_version_unavailable: "Capability version is unavailable",
|
|
735
334
|
mcp_disabled: "MCP server is disabled",
|
|
@@ -739,7 +338,7 @@ const pa = (e) => e ? `${e} warning${e === 1 ? "" : "s"}` : "Ready", ga = (e) =>
|
|
|
739
338
|
plugin_unavailable: "Plugin is unavailable",
|
|
740
339
|
skill_provider_unavailable: "Skill provider is unavailable"
|
|
741
340
|
})[e] ?? e.replaceAll("_", " ");
|
|
742
|
-
function
|
|
341
|
+
function Na({
|
|
743
342
|
composition: e,
|
|
744
343
|
loading: l = !1,
|
|
745
344
|
error: s = ""
|
|
@@ -763,7 +362,7 @@ function Pa({
|
|
|
763
362
|
/* @__PURE__ */ a(N, { children: "Effective composition" }),
|
|
764
363
|
/* @__PURE__ */ a(P, { children: e.model || "No model selected" })
|
|
765
364
|
] }),
|
|
766
|
-
/* @__PURE__ */ a(y, { tone: e.issues.length ? "warning" : "success", children:
|
|
365
|
+
/* @__PURE__ */ a(y, { tone: e.issues.length ? "warning" : "success", children: da(e.issues.length) })
|
|
767
366
|
] }),
|
|
768
367
|
e.issues.length > 0 && /* @__PURE__ */ a(
|
|
769
368
|
"ul",
|
|
@@ -771,7 +370,7 @@ function Pa({
|
|
|
771
370
|
className: "af-agent-composition__issues",
|
|
772
371
|
"aria-label": "Composition warnings",
|
|
773
372
|
children: e.issues.map((r) => /* @__PURE__ */ t("li", { children: [
|
|
774
|
-
/* @__PURE__ */ a("strong", { children:
|
|
373
|
+
/* @__PURE__ */ a("strong", { children: oa(r.code) }),
|
|
775
374
|
" ",
|
|
776
375
|
r.message
|
|
777
376
|
] }, `${r.code}:${r.message}`))
|
|
@@ -833,13 +432,13 @@ function Pa({
|
|
|
833
432
|
}
|
|
834
433
|
);
|
|
835
434
|
}
|
|
836
|
-
function
|
|
435
|
+
function Pa({
|
|
837
436
|
revision: e,
|
|
838
437
|
composition: l,
|
|
839
438
|
onChange: s,
|
|
840
439
|
onSave: r
|
|
841
440
|
}) {
|
|
842
|
-
var H, J, R, Y, W, k,
|
|
441
|
+
var H, J, R, Y, W, k, E, A, Q, j, Se, ke, ye, Ce, we, _e, Ne, Pe, Ae, ze;
|
|
843
442
|
const [n, o] = T(e), [c, d] = T(
|
|
844
443
|
"idle"
|
|
845
444
|
), [u, f] = T(""), g = (l == null ? void 0 : l.items.filter(
|
|
@@ -886,7 +485,7 @@ function Aa({
|
|
|
886
485
|
};
|
|
887
486
|
return /* @__PURE__ */ t("div", { className: "af-agent-settings", children: [
|
|
888
487
|
/* @__PURE__ */ a(
|
|
889
|
-
|
|
488
|
+
ca,
|
|
890
489
|
{
|
|
891
490
|
revision: e,
|
|
892
491
|
onChange: s,
|
|
@@ -997,7 +596,7 @@ function Aa({
|
|
|
997
596
|
"aria-label": "Max tool calls",
|
|
998
597
|
type: "number",
|
|
999
598
|
min: "0",
|
|
1000
|
-
value: ((A = (
|
|
599
|
+
value: ((A = (E = e.runtimePolicy) == null ? void 0 : E.limits) == null ? void 0 : A.maxToolCalls) || "",
|
|
1001
600
|
onChange: (i) => M("maxToolCalls", i.target.value)
|
|
1002
601
|
}
|
|
1003
602
|
)
|
|
@@ -1010,7 +609,7 @@ function Aa({
|
|
|
1010
609
|
"aria-label": "Max tokens",
|
|
1011
610
|
type: "number",
|
|
1012
611
|
min: "1",
|
|
1013
|
-
value: ((
|
|
612
|
+
value: ((Se = (j = (Q = e.runtimePolicy) == null ? void 0 : Q.limits) == null ? void 0 : j.maxTokens) == null ? void 0 : Se.toString()) ?? "",
|
|
1014
613
|
onChange: (i) => M("maxTokens", i.target.value)
|
|
1015
614
|
}
|
|
1016
615
|
)
|
|
@@ -1023,7 +622,7 @@ function Aa({
|
|
|
1023
622
|
D,
|
|
1024
623
|
{
|
|
1025
624
|
label: "Allow every deployed tool",
|
|
1026
|
-
checked: ((
|
|
625
|
+
checked: ((ye = (ke = e.runtimePolicy) == null ? void 0 : ke.tools) == null ? void 0 : ye.allowAll) ?? !1,
|
|
1027
626
|
onCheckedChange: (i) => {
|
|
1028
627
|
var h;
|
|
1029
628
|
return w({
|
|
@@ -1037,7 +636,7 @@ function Aa({
|
|
|
1037
636
|
}
|
|
1038
637
|
),
|
|
1039
638
|
b.map((i) => {
|
|
1040
|
-
var $, I, he, F, X, Z, ee,
|
|
639
|
+
var $, I, he, F, X, Z, ee, xe;
|
|
1041
640
|
const h = ((I = ($ = e.runtimePolicy) == null ? void 0 : $.tools) == null ? void 0 : I.allowAll) || ((F = (he = e.runtimePolicy) == null ? void 0 : he.tools) == null ? void 0 : F.allowed.includes(i.id)), p = (Z = (X = e.runtimePolicy) == null ? void 0 : X.tools) == null ? void 0 : Z.requireConfirmation.includes(
|
|
1042
641
|
i.id
|
|
1043
642
|
);
|
|
@@ -1047,7 +646,7 @@ function Aa({
|
|
|
1047
646
|
{
|
|
1048
647
|
label: i.id,
|
|
1049
648
|
checked: !!h,
|
|
1050
|
-
disabled: (
|
|
649
|
+
disabled: (xe = (ee = e.runtimePolicy) == null ? void 0 : ee.tools) == null ? void 0 : xe.allowAll,
|
|
1051
650
|
onCheckedChange: (ue) => {
|
|
1052
651
|
var ae, ne, le;
|
|
1053
652
|
const q = new Set(
|
|
@@ -1108,7 +707,7 @@ function Aa({
|
|
|
1108
707
|
fe,
|
|
1109
708
|
{
|
|
1110
709
|
label: "Memory",
|
|
1111
|
-
value: ((
|
|
710
|
+
value: ((Ce = e.memory) == null ? void 0 : Ce.mode) ?? "disabled",
|
|
1112
711
|
options: ["disabled", "session", "subject"].map((i) => ({
|
|
1113
712
|
value: i,
|
|
1114
713
|
label: i
|
|
@@ -1132,7 +731,7 @@ function Aa({
|
|
|
1132
731
|
"aria-label": "Memory TTL days",
|
|
1133
732
|
type: "number",
|
|
1134
733
|
min: "0",
|
|
1135
|
-
value: ((
|
|
734
|
+
value: ((_e = (we = e.memory) == null ? void 0 : we.ttlDays) == null ? void 0 : _e.toString()) ?? "",
|
|
1136
735
|
onChange: (i) => s({
|
|
1137
736
|
...e,
|
|
1138
737
|
memory: {
|
|
@@ -1170,7 +769,7 @@ function Aa({
|
|
|
1170
769
|
D,
|
|
1171
770
|
{
|
|
1172
771
|
label: "Subagents",
|
|
1173
|
-
checked: ((
|
|
772
|
+
checked: ((Ne = e.subagent) == null ? void 0 : Ne.enabled) ?? !1,
|
|
1174
773
|
onCheckedChange: (i) => s({
|
|
1175
774
|
...e,
|
|
1176
775
|
subagent: {
|
|
@@ -1187,7 +786,7 @@ function Aa({
|
|
|
1187
786
|
x,
|
|
1188
787
|
{
|
|
1189
788
|
"aria-label": "Subagent providers",
|
|
1190
|
-
value: ((
|
|
789
|
+
value: ((Pe = e.subagent) == null ? void 0 : Pe.providers.join(", ")) ?? "",
|
|
1191
790
|
onChange: (i) => s({
|
|
1192
791
|
...e,
|
|
1193
792
|
subagent: {
|
|
@@ -1203,7 +802,7 @@ function Aa({
|
|
|
1203
802
|
D,
|
|
1204
803
|
{
|
|
1205
804
|
label: "Collaboration",
|
|
1206
|
-
checked: ((
|
|
805
|
+
checked: ((Ae = e.collaboration) == null ? void 0 : Ae.enabled) ?? !1,
|
|
1207
806
|
onCheckedChange: (i) => s({
|
|
1208
807
|
...e,
|
|
1209
808
|
collaboration: {
|
|
@@ -1220,7 +819,7 @@ function Aa({
|
|
|
1220
819
|
x,
|
|
1221
820
|
{
|
|
1222
821
|
"aria-label": "Collaboration providers",
|
|
1223
|
-
value: ((
|
|
822
|
+
value: ((ze = e.collaboration) == null ? void 0 : ze.providers.join(", ")) ?? "",
|
|
1224
823
|
onChange: (i) => s({
|
|
1225
824
|
...e,
|
|
1226
825
|
collaboration: {
|
|
@@ -1233,7 +832,7 @@ function Aa({
|
|
|
1233
832
|
)
|
|
1234
833
|
] }),
|
|
1235
834
|
/* @__PURE__ */ a(
|
|
1236
|
-
|
|
835
|
+
ha,
|
|
1237
836
|
{
|
|
1238
837
|
value: e.outputPolicy,
|
|
1239
838
|
onChange: (i) => s({ ...e, outputPolicy: i })
|
|
@@ -1267,12 +866,12 @@ const Ee = (e) => [
|
|
|
1267
866
|
e.split(",").map((l) => l.trim()).filter(Boolean)
|
|
1268
867
|
)
|
|
1269
868
|
].sort();
|
|
1270
|
-
function
|
|
869
|
+
function ha({
|
|
1271
870
|
value: e,
|
|
1272
871
|
onChange: l
|
|
1273
872
|
}) {
|
|
1274
873
|
const s = JSON.stringify(e ?? {}, null, 2), [r, n] = T(s), [o, c] = T("");
|
|
1275
|
-
return
|
|
874
|
+
return Oe(() => n(s), [s]), /* @__PURE__ */ t("label", { children: [
|
|
1276
875
|
/* @__PURE__ */ a("span", { children: "Output policy JSON" }),
|
|
1277
876
|
/* @__PURE__ */ a(
|
|
1278
877
|
re,
|
|
@@ -1298,7 +897,7 @@ function fa({
|
|
|
1298
897
|
o && /* @__PURE__ */ a("span", { role: "alert", children: o })
|
|
1299
898
|
] });
|
|
1300
899
|
}
|
|
1301
|
-
function
|
|
900
|
+
function Aa({
|
|
1302
901
|
editor: e,
|
|
1303
902
|
preview: l
|
|
1304
903
|
}) {
|
|
@@ -1307,6 +906,408 @@ function za({
|
|
|
1307
906
|
/* @__PURE__ */ a("section", { "aria-label": "Agent preview", children: l })
|
|
1308
907
|
] });
|
|
1309
908
|
}
|
|
909
|
+
const De = {
|
|
910
|
+
assistant: "Assistant",
|
|
911
|
+
newSession: "New conversation",
|
|
912
|
+
sessions: "Conversations",
|
|
913
|
+
emptyTitle: "How can I help?",
|
|
914
|
+
emptyDescription: "Ask a question in this profile-pinned session.",
|
|
915
|
+
composer: "Message the assistant",
|
|
916
|
+
send: "Send",
|
|
917
|
+
stop: "Stop",
|
|
918
|
+
retry: "Retry",
|
|
919
|
+
execution: "Execution",
|
|
920
|
+
explicitSkill: "Invoke skill"
|
|
921
|
+
}, de = (e) => ({
|
|
922
|
+
...De,
|
|
923
|
+
...e
|
|
924
|
+
});
|
|
925
|
+
function ua({
|
|
926
|
+
sessions: e,
|
|
927
|
+
activeSessionId: l,
|
|
928
|
+
onSelect: s,
|
|
929
|
+
onNew: r,
|
|
930
|
+
onDelete: n,
|
|
931
|
+
labels: o
|
|
932
|
+
}) {
|
|
933
|
+
const c = de(o);
|
|
934
|
+
return /* @__PURE__ */ t("aside", { className: "af-agent-threads", "aria-label": c.sessions, children: [
|
|
935
|
+
/* @__PURE__ */ t("div", { className: "af-agent-threads__header", children: [
|
|
936
|
+
/* @__PURE__ */ a("strong", { children: c.sessions }),
|
|
937
|
+
/* @__PURE__ */ a(
|
|
938
|
+
S,
|
|
939
|
+
{
|
|
940
|
+
size: "icon",
|
|
941
|
+
variant: "ghost",
|
|
942
|
+
onClick: r,
|
|
943
|
+
"aria-label": c.newSession,
|
|
944
|
+
children: /* @__PURE__ */ a(Ye, { size: 17, "aria-hidden": !0 })
|
|
945
|
+
}
|
|
946
|
+
)
|
|
947
|
+
] }),
|
|
948
|
+
/* @__PURE__ */ a("div", { className: "af-agent-threads__list", children: e.map((d) => /* @__PURE__ */ t(
|
|
949
|
+
"div",
|
|
950
|
+
{
|
|
951
|
+
className: "af-agent-thread-row",
|
|
952
|
+
"data-active": d.id === l || void 0,
|
|
953
|
+
children: [
|
|
954
|
+
/* @__PURE__ */ t(
|
|
955
|
+
"button",
|
|
956
|
+
{
|
|
957
|
+
type: "button",
|
|
958
|
+
className: "af-agent-thread-row__select",
|
|
959
|
+
onClick: () => s(d.id),
|
|
960
|
+
children: [
|
|
961
|
+
/* @__PURE__ */ a("span", { children: d.profileRevisionId }),
|
|
962
|
+
/* @__PURE__ */ a(We, { size: 14, "aria-hidden": !0 })
|
|
963
|
+
]
|
|
964
|
+
}
|
|
965
|
+
),
|
|
966
|
+
n && /* @__PURE__ */ a(
|
|
967
|
+
"button",
|
|
968
|
+
{
|
|
969
|
+
type: "button",
|
|
970
|
+
className: "af-agent-icon-button",
|
|
971
|
+
onClick: () => n(d.id),
|
|
972
|
+
"aria-label": `Delete ${d.id}`,
|
|
973
|
+
children: /* @__PURE__ */ a(Qe, { size: 14, "aria-hidden": !0 })
|
|
974
|
+
}
|
|
975
|
+
)
|
|
976
|
+
]
|
|
977
|
+
},
|
|
978
|
+
d.id
|
|
979
|
+
)) })
|
|
980
|
+
] });
|
|
981
|
+
}
|
|
982
|
+
function pa({
|
|
983
|
+
profileRevisionId: e,
|
|
984
|
+
explicitSkillSlug: l,
|
|
985
|
+
onExplicitSkillChange: s,
|
|
986
|
+
labels: r,
|
|
987
|
+
registry: n
|
|
988
|
+
}) {
|
|
989
|
+
ce(n);
|
|
990
|
+
const o = n == null ? void 0 : n.render("resource-bar", {
|
|
991
|
+
profileRevisionId: e,
|
|
992
|
+
explicitSkillSlug: l,
|
|
993
|
+
setExplicitSkillSlug: s
|
|
994
|
+
});
|
|
995
|
+
if (o) return o;
|
|
996
|
+
const c = de(r);
|
|
997
|
+
return /* @__PURE__ */ t("div", { className: "af-agent-resources", "aria-label": "Agent resources", children: [
|
|
998
|
+
/* @__PURE__ */ a(y, { tone: "cool", children: e }),
|
|
999
|
+
/* @__PURE__ */ a(
|
|
1000
|
+
x,
|
|
1001
|
+
{
|
|
1002
|
+
"aria-label": c.explicitSkill,
|
|
1003
|
+
placeholder: c.explicitSkill,
|
|
1004
|
+
value: l,
|
|
1005
|
+
onChange: (d) => s(d.target.value)
|
|
1006
|
+
}
|
|
1007
|
+
)
|
|
1008
|
+
] });
|
|
1009
|
+
}
|
|
1010
|
+
function ga({
|
|
1011
|
+
value: e,
|
|
1012
|
+
onChange: l,
|
|
1013
|
+
onSubmit: s,
|
|
1014
|
+
running: r,
|
|
1015
|
+
onStop: n,
|
|
1016
|
+
onInject: o,
|
|
1017
|
+
onAttachResource: c,
|
|
1018
|
+
resources: d = [],
|
|
1019
|
+
onRemoveResource: u,
|
|
1020
|
+
labels: f
|
|
1021
|
+
}) {
|
|
1022
|
+
const g = de(f);
|
|
1023
|
+
return /* @__PURE__ */ t(
|
|
1024
|
+
"form",
|
|
1025
|
+
{
|
|
1026
|
+
className: "af-agent-composer",
|
|
1027
|
+
"data-running": r || void 0,
|
|
1028
|
+
onSubmit: (b) => {
|
|
1029
|
+
b.preventDefault(), e.trim() && s();
|
|
1030
|
+
},
|
|
1031
|
+
children: [
|
|
1032
|
+
d.length > 0 && /* @__PURE__ */ a(
|
|
1033
|
+
"div",
|
|
1034
|
+
{
|
|
1035
|
+
className: "af-agent-composer__resources",
|
|
1036
|
+
"aria-label": "Attached resources",
|
|
1037
|
+
children: d.map((b) => /* @__PURE__ */ t(y, { tone: "cool", children: [
|
|
1038
|
+
b.label,
|
|
1039
|
+
u && /* @__PURE__ */ a(
|
|
1040
|
+
"button",
|
|
1041
|
+
{
|
|
1042
|
+
type: "button",
|
|
1043
|
+
"aria-label": `Remove ${b.label}`,
|
|
1044
|
+
onClick: () => u(b.resourceId),
|
|
1045
|
+
children: "×"
|
|
1046
|
+
}
|
|
1047
|
+
)
|
|
1048
|
+
] }, b.resourceId))
|
|
1049
|
+
}
|
|
1050
|
+
),
|
|
1051
|
+
/* @__PURE__ */ a(
|
|
1052
|
+
re,
|
|
1053
|
+
{
|
|
1054
|
+
rows: 2,
|
|
1055
|
+
variant: "bare",
|
|
1056
|
+
value: e,
|
|
1057
|
+
onChange: (b) => l(b.target.value),
|
|
1058
|
+
"aria-label": g.composer,
|
|
1059
|
+
placeholder: r ? "Steer the active run" : g.composer,
|
|
1060
|
+
onKeyDown: (b) => {
|
|
1061
|
+
b.key === "Enter" && !b.shiftKey && (b.preventDefault(), e.trim() && s());
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
),
|
|
1065
|
+
/* @__PURE__ */ t("div", { className: "af-agent-composer__actions", children: [
|
|
1066
|
+
c && /* @__PURE__ */ a(
|
|
1067
|
+
S,
|
|
1068
|
+
{
|
|
1069
|
+
type: "button",
|
|
1070
|
+
size: "icon",
|
|
1071
|
+
variant: "ghost",
|
|
1072
|
+
onClick: c,
|
|
1073
|
+
"aria-label": "Attach document",
|
|
1074
|
+
children: /* @__PURE__ */ a(Ge, { size: 17, "aria-hidden": !0 })
|
|
1075
|
+
}
|
|
1076
|
+
),
|
|
1077
|
+
r && o && /* @__PURE__ */ a(
|
|
1078
|
+
S,
|
|
1079
|
+
{
|
|
1080
|
+
type: "button",
|
|
1081
|
+
size: "compact",
|
|
1082
|
+
variant: "ghost",
|
|
1083
|
+
disabled: !e.trim(),
|
|
1084
|
+
onClick: o,
|
|
1085
|
+
children: "Inject"
|
|
1086
|
+
}
|
|
1087
|
+
),
|
|
1088
|
+
r ? /* @__PURE__ */ a(
|
|
1089
|
+
S,
|
|
1090
|
+
{
|
|
1091
|
+
type: "button",
|
|
1092
|
+
size: "icon",
|
|
1093
|
+
variant: "secondary",
|
|
1094
|
+
onClick: n,
|
|
1095
|
+
"aria-label": g.stop,
|
|
1096
|
+
children: /* @__PURE__ */ a(Ve, { size: 17, "aria-hidden": !0 })
|
|
1097
|
+
}
|
|
1098
|
+
) : /* @__PURE__ */ a(
|
|
1099
|
+
S,
|
|
1100
|
+
{
|
|
1101
|
+
type: "submit",
|
|
1102
|
+
size: "icon",
|
|
1103
|
+
disabled: !e.trim(),
|
|
1104
|
+
"aria-label": g.send,
|
|
1105
|
+
children: /* @__PURE__ */ a(He, { size: 17, "aria-hidden": !0 })
|
|
1106
|
+
}
|
|
1107
|
+
)
|
|
1108
|
+
] })
|
|
1109
|
+
]
|
|
1110
|
+
}
|
|
1111
|
+
);
|
|
1112
|
+
}
|
|
1113
|
+
function fa({
|
|
1114
|
+
model: e,
|
|
1115
|
+
explicitSkillSlug: l = "",
|
|
1116
|
+
resources: s = [],
|
|
1117
|
+
onRemoveResource: r,
|
|
1118
|
+
onAttachResource: n,
|
|
1119
|
+
registry: o,
|
|
1120
|
+
header: c,
|
|
1121
|
+
labels: d,
|
|
1122
|
+
onError: u
|
|
1123
|
+
}) {
|
|
1124
|
+
var Y, W;
|
|
1125
|
+
ce(o);
|
|
1126
|
+
const f = de(d), g = na(e), [C, b] = T(""), [w, M] = T(""), U = g.status === "submitting" || g.status === "queued" || g.status === "running" || g.status === "waiting_for_input", oe = g.projection.items.filter(
|
|
1127
|
+
(k) => k.slot === "trace-item"
|
|
1128
|
+
), H = g.projection.items.filter(
|
|
1129
|
+
(k) => k.slot !== "trace-item" && (k.slot !== "message-content" || k.text.length > 0)
|
|
1130
|
+
), J = (k) => u == null ? void 0 : u(k instanceof Error ? k : new Error(String(k))), R = async (k, E = U ? "steer" : "followup") => {
|
|
1131
|
+
var Q;
|
|
1132
|
+
const A = k.trim();
|
|
1133
|
+
if (A) {
|
|
1134
|
+
b(""), M(A);
|
|
1135
|
+
try {
|
|
1136
|
+
E === "steer" ? await e.steerText(A) : E === "inject" ? await e.injectText(A) : await e.submitContent(
|
|
1137
|
+
[
|
|
1138
|
+
m(v.ContentBlockSchema, {
|
|
1139
|
+
block: {
|
|
1140
|
+
case: "text",
|
|
1141
|
+
value: m(v.TextBlockSchema, { text: A })
|
|
1142
|
+
}
|
|
1143
|
+
}),
|
|
1144
|
+
...s.map(
|
|
1145
|
+
(j) => m(v.ContentBlockSchema, {
|
|
1146
|
+
block: {
|
|
1147
|
+
case: "resource",
|
|
1148
|
+
value: m(v.ResourceBlockSchema, {
|
|
1149
|
+
resourceId: j.resourceId,
|
|
1150
|
+
mediaType: j.mediaType ?? "application/vnd.agentfactory.document"
|
|
1151
|
+
})
|
|
1152
|
+
}
|
|
1153
|
+
})
|
|
1154
|
+
)
|
|
1155
|
+
],
|
|
1156
|
+
l
|
|
1157
|
+
);
|
|
1158
|
+
} catch (j) {
|
|
1159
|
+
b(((Q = e.getSnapshot().retryDraft) == null ? void 0 : Q.text) ?? A), J(j);
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
return /* @__PURE__ */ t("section", { className: "af-agent-conversation", "aria-label": f.assistant, children: [
|
|
1164
|
+
c && /* @__PURE__ */ a("header", { className: "af-agent-conversation__header", children: c }),
|
|
1165
|
+
/* @__PURE__ */ t("div", { className: "af-agent-messages", "aria-live": "polite", children: [
|
|
1166
|
+
!H.length && g.status === "idle" && /* @__PURE__ */ a(
|
|
1167
|
+
z,
|
|
1168
|
+
{
|
|
1169
|
+
size: "md",
|
|
1170
|
+
title: f.emptyTitle,
|
|
1171
|
+
description: f.emptyDescription,
|
|
1172
|
+
icon: /* @__PURE__ */ a(qe, { size: 24, "aria-hidden": !0 })
|
|
1173
|
+
}
|
|
1174
|
+
),
|
|
1175
|
+
/* @__PURE__ */ a(
|
|
1176
|
+
sa,
|
|
1177
|
+
{
|
|
1178
|
+
items: H,
|
|
1179
|
+
registry: o,
|
|
1180
|
+
onResolveInteraction: async (k, E) => {
|
|
1181
|
+
try {
|
|
1182
|
+
await e.resolveInteraction(k, E);
|
|
1183
|
+
} catch (A) {
|
|
1184
|
+
throw J(A), A;
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
),
|
|
1189
|
+
g.status !== "waiting_for_input" && U && /* @__PURE__ */ a("span", { className: "af-agent-thinking", children: "Thinking…" }),
|
|
1190
|
+
g.status === "disconnected" && /* @__PURE__ */ a(
|
|
1191
|
+
z,
|
|
1192
|
+
{
|
|
1193
|
+
variant: "error",
|
|
1194
|
+
size: "sm",
|
|
1195
|
+
title: ((Y = g.error) == null ? void 0 : Y.message) ?? "Disconnected",
|
|
1196
|
+
action: {
|
|
1197
|
+
label: f.retry,
|
|
1198
|
+
onClick: () => void e.retry().catch(J)
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
),
|
|
1202
|
+
g.status === "failed" && /* @__PURE__ */ a(
|
|
1203
|
+
z,
|
|
1204
|
+
{
|
|
1205
|
+
variant: "error",
|
|
1206
|
+
size: "sm",
|
|
1207
|
+
title: ((W = g.error) == null ? void 0 : W.message) ?? "Run failed",
|
|
1208
|
+
action: { label: f.retry, onClick: () => void R(w) }
|
|
1209
|
+
}
|
|
1210
|
+
),
|
|
1211
|
+
g.status === "max_steps_reached" && /* @__PURE__ */ a(
|
|
1212
|
+
z,
|
|
1213
|
+
{
|
|
1214
|
+
variant: "error",
|
|
1215
|
+
size: "sm",
|
|
1216
|
+
title: "Maximum steps reached",
|
|
1217
|
+
action: { label: f.retry, onClick: () => void R(w) }
|
|
1218
|
+
}
|
|
1219
|
+
),
|
|
1220
|
+
/* @__PURE__ */ a(
|
|
1221
|
+
ta,
|
|
1222
|
+
{
|
|
1223
|
+
items: oe,
|
|
1224
|
+
registry: o,
|
|
1225
|
+
label: f.execution
|
|
1226
|
+
}
|
|
1227
|
+
)
|
|
1228
|
+
] }),
|
|
1229
|
+
(o == null ? void 0 : o.render("composer", {
|
|
1230
|
+
draft: C,
|
|
1231
|
+
running: U,
|
|
1232
|
+
submit: () => void R(C),
|
|
1233
|
+
stop: () => void e.cancel(),
|
|
1234
|
+
setDraft: b
|
|
1235
|
+
})) ?? /* @__PURE__ */ a(
|
|
1236
|
+
ga,
|
|
1237
|
+
{
|
|
1238
|
+
value: C,
|
|
1239
|
+
onChange: b,
|
|
1240
|
+
onSubmit: () => void R(C),
|
|
1241
|
+
running: U,
|
|
1242
|
+
onStop: () => void e.cancel(),
|
|
1243
|
+
onInject: () => void R(C, "inject"),
|
|
1244
|
+
onAttachResource: n,
|
|
1245
|
+
resources: s,
|
|
1246
|
+
onRemoveResource: r,
|
|
1247
|
+
labels: f
|
|
1248
|
+
}
|
|
1249
|
+
)
|
|
1250
|
+
] });
|
|
1251
|
+
}
|
|
1252
|
+
function za({
|
|
1253
|
+
model: e,
|
|
1254
|
+
title: l = De.assistant,
|
|
1255
|
+
subtitle: s,
|
|
1256
|
+
profileRevisionId: r,
|
|
1257
|
+
sessions: n,
|
|
1258
|
+
activeSessionId: o,
|
|
1259
|
+
onSelectSession: c,
|
|
1260
|
+
onNewSession: d,
|
|
1261
|
+
onDeleteSession: u,
|
|
1262
|
+
registry: f,
|
|
1263
|
+
labels: g
|
|
1264
|
+
}) {
|
|
1265
|
+
const [C, b] = T(""), w = de(g), M = Ue(
|
|
1266
|
+
() => /* @__PURE__ */ t(me, { children: [
|
|
1267
|
+
/* @__PURE__ */ t("div", { className: "af-agent-title", children: [
|
|
1268
|
+
/* @__PURE__ */ a(ve, { initials: "AF", size: 36 }),
|
|
1269
|
+
/* @__PURE__ */ t("div", { children: [
|
|
1270
|
+
/* @__PURE__ */ a("strong", { children: l }),
|
|
1271
|
+
s && /* @__PURE__ */ a("span", { children: s })
|
|
1272
|
+
] })
|
|
1273
|
+
] }),
|
|
1274
|
+
/* @__PURE__ */ a(
|
|
1275
|
+
pa,
|
|
1276
|
+
{
|
|
1277
|
+
profileRevisionId: r,
|
|
1278
|
+
explicitSkillSlug: C,
|
|
1279
|
+
onExplicitSkillChange: b,
|
|
1280
|
+
registry: f,
|
|
1281
|
+
labels: w
|
|
1282
|
+
}
|
|
1283
|
+
)
|
|
1284
|
+
] }),
|
|
1285
|
+
[l, s, r, C, f, w]
|
|
1286
|
+
);
|
|
1287
|
+
return /* @__PURE__ */ t("div", { className: "af-agent-chat", "data-testid": "agent-chat", children: [
|
|
1288
|
+
n && c && d && /* @__PURE__ */ a(
|
|
1289
|
+
ua,
|
|
1290
|
+
{
|
|
1291
|
+
sessions: n,
|
|
1292
|
+
activeSessionId: o,
|
|
1293
|
+
onSelect: c,
|
|
1294
|
+
onNew: d,
|
|
1295
|
+
onDelete: u,
|
|
1296
|
+
labels: w
|
|
1297
|
+
}
|
|
1298
|
+
),
|
|
1299
|
+
/* @__PURE__ */ a(
|
|
1300
|
+
fa,
|
|
1301
|
+
{
|
|
1302
|
+
model: e,
|
|
1303
|
+
explicitSkillSlug: C,
|
|
1304
|
+
registry: f,
|
|
1305
|
+
header: M,
|
|
1306
|
+
labels: w
|
|
1307
|
+
}
|
|
1308
|
+
)
|
|
1309
|
+
] });
|
|
1310
|
+
}
|
|
1310
1311
|
function xa({ skills: e, installed: l, busy: s = "", completeness: r = "complete", onInstall: n, onUninstall: o }) {
|
|
1311
1312
|
return e.length ? /* @__PURE__ */ t("section", { className: "af-agent-manager", "aria-label": "Skill and SkillPack catalog", children: [
|
|
1312
1313
|
/* @__PURE__ */ t("header", { children: [
|
|
@@ -1382,7 +1383,7 @@ function Ra({ collaboration: e, tasks: l, busy: s = !1, onCancel: r }) {
|
|
|
1382
1383
|
/* @__PURE__ */ t("header", { children: [
|
|
1383
1384
|
/* @__PURE__ */ t("div", { children: [
|
|
1384
1385
|
/* @__PURE__ */ t(N, { children: [
|
|
1385
|
-
/* @__PURE__ */ a(
|
|
1386
|
+
/* @__PURE__ */ a($e, { size: 14, "aria-hidden": !0 }),
|
|
1386
1387
|
" Collaboration"
|
|
1387
1388
|
] }),
|
|
1388
1389
|
/* @__PURE__ */ a(P, { children: e.id })
|
|
@@ -1407,7 +1408,7 @@ function Ra({ collaboration: e, tasks: l, busy: s = !1, onCancel: r }) {
|
|
|
1407
1408
|
] }),
|
|
1408
1409
|
/* @__PURE__ */ a(y, { tone: n.status === "completed" ? "success" : n.status === "failed" ? "warning" : "cool", children: n.status })
|
|
1409
1410
|
] }, n.id)) })
|
|
1410
|
-
] }) : /* @__PURE__ */ a(z, { size: "sm", title: "No active collaboration", description: "Subagent and collaboration runs will expose their task tree here.", icon: /* @__PURE__ */ a(
|
|
1411
|
+
] }) : /* @__PURE__ */ a(z, { size: "sm", title: "No active collaboration", description: "Subagent and collaboration runs will expose their task tree here.", icon: /* @__PURE__ */ a($e, { size: 22, "aria-hidden": !0 }) });
|
|
1411
1412
|
}
|
|
1412
1413
|
function $a({ documents: e, onBind: l, onAttach: s, onOpen: r }) {
|
|
1413
1414
|
return /* @__PURE__ */ t("section", { className: "af-agent-manager", "aria-label": "Agent document library", children: [
|
|
@@ -1467,26 +1468,27 @@ function Ia({ revisions: e, currentId: l, onFork: s }) {
|
|
|
1467
1468
|
}
|
|
1468
1469
|
const ba = (e) => `${e.kind}:${e.slug}@${e.version}`;
|
|
1469
1470
|
export {
|
|
1470
|
-
|
|
1471
|
+
ia as AgentActionCard,
|
|
1471
1472
|
xa as AgentCapabilityCatalog,
|
|
1472
|
-
|
|
1473
|
+
za as AgentChat,
|
|
1473
1474
|
Ra as AgentCollaborationCenter,
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1475
|
+
ga as AgentComposer,
|
|
1476
|
+
Na as AgentCompositionPanel,
|
|
1477
|
+
fa as AgentConversation,
|
|
1477
1478
|
$a as AgentDocumentLibrary,
|
|
1478
|
-
|
|
1479
|
+
ta as AgentExecutionTrace,
|
|
1479
1480
|
Ta as AgentMemoryCenter,
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1481
|
+
ca as AgentProfileEditor,
|
|
1482
|
+
Pa as AgentProfileSettings,
|
|
1483
|
+
pa as AgentResourceBar,
|
|
1483
1484
|
Ia as AgentRevisionHistory,
|
|
1484
|
-
|
|
1485
|
-
|
|
1485
|
+
ua as AgentSessionList,
|
|
1486
|
+
ja as AgentSessionModel,
|
|
1486
1487
|
_a as AgentSlotRegistry,
|
|
1487
|
-
|
|
1488
|
-
|
|
1488
|
+
Aa as AgentStudio,
|
|
1489
|
+
De as DEFAULT_AGENT_UI_LABELS,
|
|
1489
1490
|
ba as capabilityKey,
|
|
1491
|
+
da as compositionIssueLabel,
|
|
1490
1492
|
be as dataFallback,
|
|
1491
1493
|
na as useAgentSession
|
|
1492
1494
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { agentV1, type AgentDataSlots } from "@agent-factory-platform/client";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import type { AgentSlotRegistry } from "./registry";
|
|
4
|
+
export declare function AgentProfileEditor<Slots extends AgentDataSlots = AgentDataSlots>({ revision, onChange, onSave, saving, showSave, registry, }: {
|
|
5
|
+
revision: agentV1.AgentProfileRevision;
|
|
6
|
+
onChange: (revision: agentV1.AgentProfileRevision) => void;
|
|
7
|
+
onSave: () => void;
|
|
8
|
+
saving?: boolean;
|
|
9
|
+
showSave?: boolean;
|
|
10
|
+
registry?: AgentSlotRegistry<Slots>;
|
|
11
|
+
}): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element;
|
|
12
|
+
export declare const compositionIssueLabel: (count: number) => string;
|
|
13
|
+
export declare function AgentCompositionPanel({ composition, loading, error, }: {
|
|
14
|
+
composition?: agentV1.ProfileComposition;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
error?: string;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare function AgentProfileSettings({ revision, composition, onChange, onSave, }: {
|
|
19
|
+
revision: agentV1.AgentProfileRevision;
|
|
20
|
+
composition?: agentV1.ProfileComposition;
|
|
21
|
+
onChange: (revision: agentV1.AgentProfileRevision) => void;
|
|
22
|
+
onSave: (revision: agentV1.AgentProfileRevision) => Promise<agentV1.AgentProfileRevision | void>;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
export declare function AgentStudio({ editor, preview, }: {
|
|
25
|
+
editor: ReactNode;
|
|
26
|
+
preview: ReactNode;
|
|
27
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { agentV1, type AgentDataSlots, type AgentProjectionItem } from "@agent-factory-platform/client";
|
|
2
|
+
import { type AgentSlotRegistry } from "./registry";
|
|
3
|
+
export declare function AgentExecutionTrace<Slots extends AgentDataSlots = AgentDataSlots>({ items, label, registry, }: {
|
|
4
|
+
items: readonly Extract<AgentProjectionItem, {
|
|
5
|
+
slot: "trace-item";
|
|
6
|
+
}>[];
|
|
7
|
+
label?: string;
|
|
8
|
+
registry?: AgentSlotRegistry<Slots>;
|
|
9
|
+
}): import("react").JSX.Element | null;
|
|
10
|
+
export declare function AgentActionCard({ interaction, onResolve, }: {
|
|
11
|
+
interaction: Pick<agentV1.Interaction, "id" | "kind" | "status"> & Partial<Pick<agentV1.Interaction, "resolvedAt">>;
|
|
12
|
+
onResolve: (resolution: "confirmed" | "rejected") => void | Promise<void>;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export declare function AgentProjectionNodes<Slots extends AgentDataSlots = AgentDataSlots>({ items, registry, onResolveInteraction, }: {
|
|
15
|
+
items: readonly AgentProjectionItem<Slots>[];
|
|
16
|
+
registry?: AgentSlotRegistry<Slots>;
|
|
17
|
+
onResolveInteraction?: (interactionId: string, resolution: "confirmed" | "rejected") => void | Promise<void>;
|
|
18
|
+
}): import("react").JSX.Element;
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { agentV1, type AgentDataSlots, type
|
|
1
|
+
import { agentV1, type AgentDataSlots, type AgentSessionModel } from "@agent-factory-platform/client";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import type { AgentSlotRegistry } from "./registry";
|
|
4
|
+
export { AgentActionCard, AgentExecutionTrace, AgentProjectionNodes } from "./projection";
|
|
5
|
+
export { compositionIssueLabel } from "./profile";
|
|
4
6
|
export interface AgentUiLabels {
|
|
5
7
|
assistant: string;
|
|
6
8
|
newSession: string;
|
|
@@ -30,17 +32,6 @@ export declare function AgentResourceBar<Slots extends AgentDataSlots = AgentDat
|
|
|
30
32
|
labels?: Partial<AgentUiLabels>;
|
|
31
33
|
registry?: AgentSlotRegistry<Slots>;
|
|
32
34
|
}): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element;
|
|
33
|
-
export declare function AgentExecutionTrace<Slots extends AgentDataSlots = AgentDataSlots>({ items, label, registry, }: {
|
|
34
|
-
items: readonly Extract<AgentProjectionItem, {
|
|
35
|
-
slot: "trace-item";
|
|
36
|
-
}>[];
|
|
37
|
-
label?: string;
|
|
38
|
-
registry?: AgentSlotRegistry<Slots>;
|
|
39
|
-
}): import("react").JSX.Element | null;
|
|
40
|
-
export declare function AgentActionCard({ interaction, onResolve, }: {
|
|
41
|
-
interaction: Pick<agentV1.Interaction, "id" | "kind" | "status"> & Partial<Pick<agentV1.Interaction, "resolvedAt">>;
|
|
42
|
-
onResolve: (resolution: "confirmed" | "rejected") => void | Promise<void>;
|
|
43
|
-
}): import("react").JSX.Element;
|
|
44
35
|
export interface AgentInputResource {
|
|
45
36
|
resourceId: string;
|
|
46
37
|
label: string;
|
|
@@ -58,11 +49,6 @@ export declare function AgentComposer({ value, onChange, onSubmit, running, onSt
|
|
|
58
49
|
onRemoveResource?: (resourceId: string) => void;
|
|
59
50
|
labels?: Partial<AgentUiLabels>;
|
|
60
51
|
}): import("react").JSX.Element;
|
|
61
|
-
export declare function AgentProjectionNodes<Slots extends AgentDataSlots = AgentDataSlots>({ items, registry, onResolveInteraction, }: {
|
|
62
|
-
items: readonly AgentProjectionItem<Slots>[];
|
|
63
|
-
registry?: AgentSlotRegistry<Slots>;
|
|
64
|
-
onResolveInteraction?: (interactionId: string, resolution: "confirmed" | "rejected") => void | Promise<void>;
|
|
65
|
-
}): import("react").JSX.Element;
|
|
66
52
|
export declare function AgentConversation<Slots extends AgentDataSlots = AgentDataSlots>({ model, explicitSkillSlug, resources, onRemoveResource, onAttachResource, registry, header, labels: overrides, onError, }: {
|
|
67
53
|
model: AgentSessionModel<Slots>;
|
|
68
54
|
explicitSkillSlug?: string;
|
|
@@ -87,27 +73,3 @@ export declare function AgentChat<Slots extends AgentDataSlots = AgentDataSlots>
|
|
|
87
73
|
registry?: AgentSlotRegistry<Slots>;
|
|
88
74
|
labels?: Partial<AgentUiLabels>;
|
|
89
75
|
}): import("react").JSX.Element;
|
|
90
|
-
export declare function AgentProfileEditor<Slots extends AgentDataSlots = AgentDataSlots>({ revision, onChange, onSave, saving, showSave, registry, }: {
|
|
91
|
-
revision: agentV1.AgentProfileRevision;
|
|
92
|
-
onChange: (revision: agentV1.AgentProfileRevision) => void;
|
|
93
|
-
onSave: () => void;
|
|
94
|
-
saving?: boolean;
|
|
95
|
-
showSave?: boolean;
|
|
96
|
-
registry?: AgentSlotRegistry<Slots>;
|
|
97
|
-
}): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element;
|
|
98
|
-
export declare const compositionIssueLabel: (count: number) => string;
|
|
99
|
-
export declare function AgentCompositionPanel({ composition, loading, error, }: {
|
|
100
|
-
composition?: agentV1.ProfileComposition;
|
|
101
|
-
loading?: boolean;
|
|
102
|
-
error?: string;
|
|
103
|
-
}): import("react").JSX.Element;
|
|
104
|
-
export declare function AgentProfileSettings({ revision, composition, onChange, onSave, }: {
|
|
105
|
-
revision: agentV1.AgentProfileRevision;
|
|
106
|
-
composition?: agentV1.ProfileComposition;
|
|
107
|
-
onChange: (revision: agentV1.AgentProfileRevision) => void;
|
|
108
|
-
onSave: (revision: agentV1.AgentProfileRevision) => Promise<agentV1.AgentProfileRevision | void>;
|
|
109
|
-
}): import("react").JSX.Element;
|
|
110
|
-
export declare function AgentStudio({ editor, preview, }: {
|
|
111
|
-
editor: ReactNode;
|
|
112
|
-
preview: ReactNode;
|
|
113
|
-
}): import("react").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-factory-platform/agent-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Agent runtime bindings and themeable React conversation surfaces.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"react": "^19.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@agent-factory-platform/client": "0.
|
|
33
|
-
"@agent-factory-platform/ui-kit": "0.
|
|
32
|
+
"@agent-factory-platform/client": "0.5.0",
|
|
33
|
+
"@agent-factory-platform/ui-kit": "0.5.0",
|
|
34
34
|
"@bufbuild/protobuf": "^2.2.3",
|
|
35
35
|
"lucide-react": "^1.23.0"
|
|
36
36
|
},
|