@lumea-labs/orchestrator 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/orchestrator-document.d.ts +2 -2
- package/dist/orchestrator-document.js +2 -1
- package/dist/plan-detail.d.ts +6 -6
- package/dist/plan-detail.js +214 -156
- package/dist/plan-graph.d.ts +2 -2
- package/dist/plan-graph.js +178 -119
- package/dist/plan-node-detail.d.ts +4 -4
- package/dist/plan-node-detail.js +177 -125
- package/dist/plan-task-detail.d.ts +2 -2
- package/dist/plan-task-detail.js +282 -172
- package/dist/run-kanban-filter-menu.d.ts +3 -2
- package/dist/run-kanban-filter-menu.js +96 -77
- package/dist/run-kanban.d.ts +3 -3
- package/dist/run-kanban.js +93 -79
- package/dist/swarm-agent-badge.d.ts +2 -2
- package/dist/swarm-agent-badge.js +21 -18
- package/dist/swarm-run-activity.d.ts +2 -2
- package/dist/swarm-run-activity.js +150 -95
- package/dist/swarm-run-card.d.ts +2 -2
- package/dist/swarm-run-card.js +76 -55
- package/dist/swarm-run-detail.d.ts +2 -2
- package/dist/swarm-run-detail.js +415 -310
- package/dist/swarm-run-list.d.ts +2 -2
- package/dist/swarm-run-list.js +37 -27
- package/dist/swarm-run-row.d.ts +2 -2
- package/dist/swarm-run-row.js +82 -72
- package/dist/swarm-skeletons.d.ts +3 -3
- package/dist/swarm-skeletons.js +65 -16
- package/dist/swarm-status-bar.d.ts +2 -2
- package/dist/swarm-status-bar.js +62 -44
- package/dist/swarm-status-pill.d.ts +2 -2
- package/dist/swarm-status-pill.js +14 -11
- package/dist/swarm-timeline.d.ts +2 -2
- package/dist/swarm-timeline.js +284 -225
- package/dist/task-workspace-sidebar.d.ts +2 -2
- package/dist/task-workspace-sidebar.js +145 -113
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useState } from "react";
|
|
3
4
|
import {
|
|
4
5
|
AlertTriangle,
|
|
@@ -103,72 +104,88 @@ function SwarmRunActivityStream({
|
|
|
103
104
|
}) {
|
|
104
105
|
const [expanded, setExpanded] = useState(false);
|
|
105
106
|
if (events.length === 0) {
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ jsx(
|
|
107
108
|
"div",
|
|
108
109
|
{
|
|
109
110
|
className: [
|
|
110
111
|
"px-4 py-6 text-center font-mono text-[11px] uppercase tracking-[0.16em] text-p-ink-3",
|
|
111
112
|
className || ""
|
|
112
|
-
].join(" ")
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
].join(" "),
|
|
114
|
+
children: emptyLabel
|
|
115
|
+
}
|
|
115
116
|
);
|
|
116
117
|
}
|
|
117
118
|
const peekable = events.length > peek;
|
|
118
119
|
const visible = !peekable || expanded ? events : events.slice(events.length - peek);
|
|
119
120
|
const hidden = events.length - visible.length;
|
|
120
|
-
return /* @__PURE__ */
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
type: "button",
|
|
124
|
-
onClick: () => setExpanded(true),
|
|
125
|
-
className: "mb-2 inline-flex w-full items-center justify-center gap-1 rounded-md border border-dashed border-p-line bg-p-bg/40 py-1.5 font-mono text-[10.5px] font-bold uppercase tracking-[0.16em] text-p-ink-3 transition-colors cursor-pointer hover:border-p-ink-3 hover:text-p-ink"
|
|
126
|
-
},
|
|
127
|
-
/* @__PURE__ */ React.createElement(ChevronUp, { className: "size-3" }),
|
|
128
|
-
"show ",
|
|
129
|
-
hidden,
|
|
130
|
-
" earlier event",
|
|
131
|
-
hidden === 1 ? "" : "s"
|
|
132
|
-
) : null, /* @__PURE__ */ React.createElement("ol", { className: "flex flex-col divide-y divide-p-line/60" }, visible.map((ev) => {
|
|
133
|
-
const custom = renderEvent?.(ev);
|
|
134
|
-
if (custom !== void 0) {
|
|
135
|
-
return /* @__PURE__ */ React.createElement("li", { key: ev.id, className: "py-3" }, custom);
|
|
136
|
-
}
|
|
137
|
-
return /* @__PURE__ */ React.createElement(
|
|
138
|
-
"li",
|
|
121
|
+
return /* @__PURE__ */ jsxs("div", { className: className || "", children: [
|
|
122
|
+
peekable && !expanded ? /* @__PURE__ */ jsxs(
|
|
123
|
+
"button",
|
|
139
124
|
{
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
125
|
+
type: "button",
|
|
126
|
+
onClick: () => setExpanded(true),
|
|
127
|
+
className: "mb-2 inline-flex w-full items-center justify-center gap-1 rounded-md border border-dashed border-p-line bg-p-bg/40 py-1.5 font-mono text-[10.5px] font-bold uppercase tracking-[0.16em] text-p-ink-3 transition-colors cursor-pointer hover:border-p-ink-3 hover:text-p-ink",
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ jsx(ChevronUp, { className: "size-3" }),
|
|
130
|
+
"show ",
|
|
131
|
+
hidden,
|
|
132
|
+
" earlier event",
|
|
133
|
+
hidden === 1 ? "" : "s"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
) : null,
|
|
137
|
+
/* @__PURE__ */ jsx("ol", { className: "flex flex-col divide-y divide-p-line/60", children: visible.map((ev) => {
|
|
138
|
+
const custom = renderEvent?.(ev);
|
|
139
|
+
if (custom !== void 0) {
|
|
140
|
+
return /* @__PURE__ */ jsx("li", { className: "py-3", children: custom }, ev.id);
|
|
141
|
+
}
|
|
142
|
+
return /* @__PURE__ */ jsxs(
|
|
143
|
+
"li",
|
|
147
144
|
{
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
145
|
+
className: "grid grid-cols-[80px_24px_minmax(0,1fr)] items-start gap-3 py-3",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsx(TimeGutter, { ts: ev.ts }),
|
|
148
|
+
/* @__PURE__ */ jsx(KindGlyph, { kind: ev.kind }),
|
|
149
|
+
/* @__PURE__ */ jsx(
|
|
150
|
+
EventBody,
|
|
151
|
+
{
|
|
152
|
+
event: ev,
|
|
153
|
+
agents,
|
|
154
|
+
renderToolCall,
|
|
155
|
+
renderMarkdown
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
ev.id
|
|
161
|
+
);
|
|
162
|
+
}) }),
|
|
163
|
+
peekable && expanded ? /* @__PURE__ */ jsxs(
|
|
164
|
+
"button",
|
|
165
|
+
{
|
|
166
|
+
type: "button",
|
|
167
|
+
onClick: () => setExpanded(false),
|
|
168
|
+
className: "mt-2 inline-flex w-full items-center justify-center gap-1 rounded-md border border-dashed border-p-line bg-p-bg/40 py-1.5 font-mono text-[10.5px] font-bold uppercase tracking-[0.16em] text-p-ink-3 transition-colors cursor-pointer hover:border-p-ink-3 hover:text-p-ink",
|
|
169
|
+
children: [
|
|
170
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "size-3" }),
|
|
171
|
+
"show less"
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
) : null
|
|
175
|
+
] });
|
|
165
176
|
}
|
|
166
177
|
function TimeGutter({ ts }) {
|
|
167
178
|
const t = new Date(ts);
|
|
168
179
|
const hh = String(t.getHours()).padStart(2, "0");
|
|
169
180
|
const mm = String(t.getMinutes()).padStart(2, "0");
|
|
170
181
|
const ss = String(t.getSeconds()).padStart(2, "0");
|
|
171
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ jsxs("span", { className: "pt-0.5 font-mono text-[10.5px] uppercase tracking-[0.16em] text-p-ink-3 tabular-nums", children: [
|
|
183
|
+
hh,
|
|
184
|
+
":",
|
|
185
|
+
mm,
|
|
186
|
+
":",
|
|
187
|
+
ss
|
|
188
|
+
] });
|
|
172
189
|
}
|
|
173
190
|
const KIND_TONE = {
|
|
174
191
|
phase: "text-[#2B44FF]",
|
|
@@ -185,16 +202,16 @@ const KIND_TONE = {
|
|
|
185
202
|
};
|
|
186
203
|
function KindGlyph({ kind }) {
|
|
187
204
|
const Icon = kind === "phase" ? RotateCcw : kind === "thought" ? Quote : kind === "tool_call" ? Wrench : kind === "ask_user" ? MessageSquareMore : kind === "user_input" ? ArrowDown : kind === "output" ? ArrowUp : kind === "artifact" ? FileText : kind === "error" ? AlertTriangle : kind === "retry" ? RotateCcw : kind === "checkpoint" ? CheckCircle2 : Scale;
|
|
188
|
-
return /* @__PURE__ */
|
|
205
|
+
return /* @__PURE__ */ jsx(
|
|
189
206
|
"span",
|
|
190
207
|
{
|
|
191
208
|
"aria-hidden": true,
|
|
192
209
|
className: [
|
|
193
210
|
"mt-1 grid size-5 place-items-center rounded-full border border-p-line bg-p-surface",
|
|
194
211
|
KIND_TONE[kind]
|
|
195
|
-
].join(" ")
|
|
196
|
-
|
|
197
|
-
|
|
212
|
+
].join(" "),
|
|
213
|
+
children: /* @__PURE__ */ jsx(Icon, { className: "size-3" })
|
|
214
|
+
}
|
|
198
215
|
);
|
|
199
216
|
}
|
|
200
217
|
function EventBody({
|
|
@@ -204,31 +221,40 @@ function EventBody({
|
|
|
204
221
|
renderMarkdown
|
|
205
222
|
}) {
|
|
206
223
|
const agent = event.agentName ? agents?.find((a) => a.name === event.agentName) : void 0;
|
|
207
|
-
return /* @__PURE__ */
|
|
208
|
-
"
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
224
|
+
return /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex flex-col gap-1.5", children: [
|
|
225
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
226
|
+
/* @__PURE__ */ jsx(
|
|
227
|
+
"span",
|
|
228
|
+
{
|
|
229
|
+
className: [
|
|
230
|
+
"font-mono text-[10px] font-bold uppercase tracking-[0.18em]",
|
|
231
|
+
KIND_TONE[event.kind]
|
|
232
|
+
].join(" "),
|
|
233
|
+
children: event.kind.replace(/_/g, " ")
|
|
234
|
+
}
|
|
235
|
+
),
|
|
236
|
+
agent ? /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 font-mono text-[10px] uppercase tracking-[0.14em] text-p-ink-3", children: [
|
|
237
|
+
/* @__PURE__ */ jsx(
|
|
238
|
+
"span",
|
|
239
|
+
{
|
|
240
|
+
"aria-hidden": true,
|
|
241
|
+
className: "grid size-3.5 shrink-0 place-items-center rounded-[3px] font-display text-[8.5px] font-bold text-white",
|
|
242
|
+
style: { background: agent.color || "#999" },
|
|
243
|
+
children: agent.glyph || (agent.displayName ?? agent.name).charAt(0).toUpperCase()
|
|
244
|
+
}
|
|
245
|
+
),
|
|
246
|
+
agent.displayName ?? agent.name
|
|
247
|
+
] }) : null
|
|
248
|
+
] }),
|
|
249
|
+
/* @__PURE__ */ jsx(
|
|
250
|
+
EventContent,
|
|
251
|
+
{
|
|
252
|
+
event,
|
|
253
|
+
renderToolCall,
|
|
254
|
+
renderMarkdown
|
|
255
|
+
}
|
|
256
|
+
)
|
|
257
|
+
] });
|
|
232
258
|
}
|
|
233
259
|
function EventContent({
|
|
234
260
|
event,
|
|
@@ -237,29 +263,56 @@ function EventContent({
|
|
|
237
263
|
}) {
|
|
238
264
|
switch (event.kind) {
|
|
239
265
|
case "phase":
|
|
240
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ jsxs("p", { className: "font-mono text-[11.5px] uppercase tracking-[0.14em] text-p-ink-2", children: [
|
|
267
|
+
"\u2192 ",
|
|
268
|
+
event.phase
|
|
269
|
+
] });
|
|
241
270
|
case "thought":
|
|
242
|
-
return /* @__PURE__ */
|
|
271
|
+
return /* @__PURE__ */ jsx("p", { className: "font-body text-[13px] italic leading-[1.55] text-p-ink-3", children: event.text });
|
|
243
272
|
case "tool_call":
|
|
244
|
-
if (renderToolCall) return /* @__PURE__ */
|
|
245
|
-
return /* @__PURE__ */
|
|
273
|
+
if (renderToolCall) return /* @__PURE__ */ jsx(Fragment, { children: renderToolCall(event.tool) });
|
|
274
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-p-line bg-p-bg px-2.5 py-1.5", children: [
|
|
275
|
+
/* @__PURE__ */ jsx("code", { className: "font-mono text-[11.5px] font-semibold text-p-ink", children: event.tool.name }),
|
|
276
|
+
event.tool.summary ? /* @__PURE__ */ jsx("span", { className: "ml-2 truncate font-mono text-[11px] text-p-ink-3", children: event.tool.summary }) : null
|
|
277
|
+
] });
|
|
246
278
|
case "ask_user":
|
|
247
|
-
return /* @__PURE__ */
|
|
279
|
+
return /* @__PURE__ */ jsx("p", { className: "rounded-md border border-p-accent/40 bg-p-accent-light/40 px-3 py-2 font-body text-[13px] leading-[1.55] text-p-ink", children: event.question });
|
|
248
280
|
case "user_input":
|
|
249
|
-
return renderMarkdown ? /* @__PURE__ */
|
|
281
|
+
return renderMarkdown ? /* @__PURE__ */ jsx("div", { children: renderMarkdown(event.text) }) : /* @__PURE__ */ jsx("p", { className: "font-body text-[13px] leading-[1.55] text-p-ink", children: event.text });
|
|
250
282
|
case "output":
|
|
251
|
-
return renderMarkdown ? /* @__PURE__ */
|
|
283
|
+
return renderMarkdown ? /* @__PURE__ */ jsx("div", { children: renderMarkdown(event.text) }) : /* @__PURE__ */ jsx("pre", { className: "m-0 whitespace-pre-wrap break-words font-body text-[13px] leading-[1.55] text-p-ink-2", children: event.text });
|
|
252
284
|
case "artifact":
|
|
253
|
-
return /* @__PURE__ */
|
|
285
|
+
return /* @__PURE__ */ jsx(ArtifactRow, { artifact: event.artifact });
|
|
254
286
|
case "error":
|
|
255
|
-
return /* @__PURE__ */
|
|
287
|
+
return /* @__PURE__ */ jsx("pre", { className: "m-0 whitespace-pre-wrap break-words font-mono text-[11.5px] leading-relaxed text-[#E63946]", children: event.message });
|
|
256
288
|
case "retry":
|
|
257
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ jsxs("p", { className: "font-mono text-[11.5px] uppercase tracking-[0.14em] text-p-ink-2", children: [
|
|
290
|
+
"attempt ",
|
|
291
|
+
event.attempt,
|
|
292
|
+
event.reason ? ` \xB7 ${event.reason}` : null
|
|
293
|
+
] });
|
|
258
294
|
case "checkpoint":
|
|
259
|
-
return /* @__PURE__ */
|
|
295
|
+
return /* @__PURE__ */ jsxs("div", { className: "font-mono text-[11.5px] uppercase tracking-[0.14em] text-p-ink-2", children: [
|
|
296
|
+
/* @__PURE__ */ jsx("span", { className: "font-bold", children: event.name }),
|
|
297
|
+
/* @__PURE__ */ jsxs("span", { className: "ml-2 text-p-ink-3", children: [
|
|
298
|
+
"\xB7 ",
|
|
299
|
+
event.verdict
|
|
300
|
+
] }),
|
|
301
|
+
event.message ? /* @__PURE__ */ jsx("p", { className: "mt-1 normal-case font-body text-[13px] tracking-normal text-p-ink-3", children: event.message }) : null
|
|
302
|
+
] });
|
|
260
303
|
case "score": {
|
|
261
304
|
const scale = event.scale ?? { min: 1, max: 5 };
|
|
262
|
-
return /* @__PURE__ */
|
|
305
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2 font-mono text-[11.5px] uppercase tracking-[0.14em]", children: [
|
|
306
|
+
/* @__PURE__ */ jsx("span", { className: "text-p-ink-2", children: event.criterion }),
|
|
307
|
+
/* @__PURE__ */ jsxs("span", { className: "font-display text-[16px] font-bold tabular-nums text-p-ink", children: [
|
|
308
|
+
event.value,
|
|
309
|
+
/* @__PURE__ */ jsxs("span", { className: "text-p-ink-3", children: [
|
|
310
|
+
"/",
|
|
311
|
+
scale.max
|
|
312
|
+
] })
|
|
313
|
+
] }),
|
|
314
|
+
event.reasoning ? /* @__PURE__ */ jsx("span", { className: "ml-2 normal-case tracking-normal text-p-ink-3", children: event.reasoning }) : null
|
|
315
|
+
] });
|
|
263
316
|
}
|
|
264
317
|
}
|
|
265
318
|
}
|
|
@@ -269,18 +322,20 @@ function ArtifactRow({
|
|
|
269
322
|
const Icon = artifact.kind === "url" ? ExternalLink : artifact.kind === "image" ? ImageIcon : artifact.kind === "data" ? Hash : artifact.kind === "note" ? StickyNote : FileText;
|
|
270
323
|
const interactive = !!artifact.url;
|
|
271
324
|
const Wrapper = interactive ? "a" : "div";
|
|
272
|
-
return /* @__PURE__ */
|
|
325
|
+
return /* @__PURE__ */ jsxs(
|
|
273
326
|
Wrapper,
|
|
274
327
|
{
|
|
275
328
|
...interactive ? { href: artifact.url, target: "_blank", rel: "noreferrer noopener" } : {},
|
|
276
329
|
className: [
|
|
277
330
|
"flex items-center gap-2 rounded-md border border-p-line bg-p-surface px-2.5 py-1.5 no-underline",
|
|
278
331
|
interactive ? "cursor-pointer hover:bg-p-warm/40" : ""
|
|
279
|
-
].join(" ")
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
332
|
+
].join(" "),
|
|
333
|
+
children: [
|
|
334
|
+
/* @__PURE__ */ jsx(Icon, { className: "size-3 shrink-0 text-p-ink-3", "aria-hidden": true }),
|
|
335
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate font-display text-[12.5px] font-semibold text-p-ink", children: artifact.label }),
|
|
336
|
+
artifact.path ? /* @__PURE__ */ jsx("code", { className: "hidden truncate font-mono text-[10.5px] text-p-ink-3 sm:inline", children: artifact.path }) : null
|
|
337
|
+
]
|
|
338
|
+
}
|
|
284
339
|
);
|
|
285
340
|
}
|
|
286
341
|
export {
|
package/dist/swarm-run-card.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { SwarmRun, SwarmLabels } from './types.js';
|
|
4
4
|
|
|
@@ -17,6 +17,6 @@ interface SwarmRunCardProps {
|
|
|
17
17
|
labels?: Partial<SwarmLabels>;
|
|
18
18
|
className?: string;
|
|
19
19
|
}
|
|
20
|
-
declare function SwarmRunCard({ run, now, renderAvatar, bodySlot, onCancel, onRetry, onOpen, labels, className, }: SwarmRunCardProps):
|
|
20
|
+
declare function SwarmRunCard({ run, now, renderAvatar, bodySlot, onCancel, onRetry, onOpen, labels, className, }: SwarmRunCardProps): react_jsx_runtime.JSX.Element;
|
|
21
21
|
|
|
22
22
|
export { SwarmRunCard, type SwarmRunCardProps };
|
package/dist/swarm-run-card.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { RotateCcw, Square } from "lucide-react";
|
|
3
4
|
import { defaultSwarmLabels } from "./types";
|
|
4
5
|
import { elapsedSeconds } from "./lib/format";
|
|
@@ -21,7 +22,7 @@ function SwarmRunCard({
|
|
|
21
22
|
const isLive = run.status === "running" || run.status === "pending";
|
|
22
23
|
const showCancel = onCancel && (run.status === "running" || run.status === "pending");
|
|
23
24
|
const showRetry = onRetry && (run.status === "failed" || run.status === "cancelled");
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsxs(
|
|
25
26
|
"article",
|
|
26
27
|
{
|
|
27
28
|
className: [
|
|
@@ -30,60 +31,80 @@ function SwarmRunCard({
|
|
|
30
31
|
onOpen ? "cursor-pointer hover:shadow-[0_8px_24px_-16px_rgba(0,0,0,0.18)]" : "",
|
|
31
32
|
className || ""
|
|
32
33
|
].join(" "),
|
|
33
|
-
onClick: onOpen ? () => onOpen(run.id) : void 0
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
className: "
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
34
|
+
onClick: onOpen ? () => onOpen(run.id) : void 0,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsxs("header", { className: "flex items-start gap-2", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
SwarmAgentBadge,
|
|
39
|
+
{
|
|
40
|
+
agent: run.agent,
|
|
41
|
+
avatar: renderAvatar?.(run.agent),
|
|
42
|
+
size: "md",
|
|
43
|
+
showName: true
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ jsx("span", { className: "ml-auto" }),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
SwarmStatusPill,
|
|
49
|
+
{
|
|
50
|
+
status: run.status,
|
|
51
|
+
label: L[run.status],
|
|
52
|
+
size: "sm"
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsx("p", { className: "line-clamp-2 font-body text-[13px] leading-snug text-p-ink-2", children: run.title }),
|
|
57
|
+
run.progress !== void 0 && isLive ? /* @__PURE__ */ jsx("div", { className: "h-1 w-full overflow-hidden rounded-full bg-p-warm", children: /* @__PURE__ */ jsx(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: "h-full rounded-full bg-p-accent transition-[width] duration-500 ease-out",
|
|
61
|
+
style: { width: `${Math.max(0, Math.min(100, run.progress * 100))}%` }
|
|
62
|
+
}
|
|
63
|
+
) }) : null,
|
|
64
|
+
run.lastLog ? /* @__PURE__ */ jsx("div", { className: "rounded-md bg-p-bg px-2 py-1 font-mono text-[11px] leading-snug text-p-ink-3 truncate", children: run.lastLog }) : null,
|
|
65
|
+
run.error ? /* @__PURE__ */ jsx("div", { className: "rounded-md border border-[#E63946]/30 bg-[#FEF2F2] px-2 py-1 font-mono text-[11px] leading-snug text-[#E63946]", children: run.error }) : null,
|
|
66
|
+
bodySlot,
|
|
67
|
+
/* @__PURE__ */ jsxs("footer", { className: "mt-1 flex items-center gap-2 font-mono text-[10px] uppercase tracking-[0.14em] text-p-ink-3", children: [
|
|
68
|
+
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: run.startedAt ? isLive ? L.startedAgo(elapsed) : L.duration(elapsed) : "\u2014" }),
|
|
69
|
+
run.background ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70
|
+
/* @__PURE__ */ jsx("span", { className: "text-p-line", children: "\xB7" }),
|
|
71
|
+
/* @__PURE__ */ jsx("span", { children: L.backgroundGroup })
|
|
72
|
+
] }) : null,
|
|
73
|
+
/* @__PURE__ */ jsxs("span", { className: "ml-auto inline-flex items-center gap-1.5", children: [
|
|
74
|
+
showCancel ? /* @__PURE__ */ jsxs(
|
|
75
|
+
"button",
|
|
76
|
+
{
|
|
77
|
+
type: "button",
|
|
78
|
+
onClick: (e) => {
|
|
79
|
+
e.stopPropagation();
|
|
80
|
+
onCancel(run.id);
|
|
81
|
+
},
|
|
82
|
+
className: "inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-p-ink-3 transition-colors cursor-pointer hover:bg-p-warm hover:text-[#E63946]",
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsx(Square, { className: "size-2.5" }),
|
|
85
|
+
L.cancel
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
) : null,
|
|
89
|
+
showRetry ? /* @__PURE__ */ jsxs(
|
|
90
|
+
"button",
|
|
91
|
+
{
|
|
92
|
+
type: "button",
|
|
93
|
+
onClick: (e) => {
|
|
94
|
+
e.stopPropagation();
|
|
95
|
+
onRetry(run.id);
|
|
96
|
+
},
|
|
97
|
+
className: "inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-p-ink-3 transition-colors cursor-pointer hover:bg-p-warm hover:text-p-ink",
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ jsx(RotateCcw, { className: "size-2.5" }),
|
|
100
|
+
L.retry
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
) : null
|
|
104
|
+
] })
|
|
105
|
+
] })
|
|
106
|
+
]
|
|
107
|
+
}
|
|
87
108
|
);
|
|
88
109
|
}
|
|
89
110
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { SwarmRun, SwarmToolCall, SwarmArtifact, SwarmEvaluation, SwarmLabels } from './types.js';
|
|
4
4
|
|
|
@@ -40,6 +40,6 @@ interface SwarmRunDetailProps {
|
|
|
40
40
|
labels?: Partial<SwarmLabels>;
|
|
41
41
|
className?: string;
|
|
42
42
|
}
|
|
43
|
-
declare function SwarmRunDetail({ run, now, variant, renderAvatar, renderToolCalls, renderArtifacts, renderEvaluation, renderMarkdown, hideTools, onClose, onCancel, onRetry, labels, className, }: SwarmRunDetailProps):
|
|
43
|
+
declare function SwarmRunDetail({ run, now, variant, renderAvatar, renderToolCalls, renderArtifacts, renderEvaluation, renderMarkdown, hideTools, onClose, onCancel, onRetry, labels, className, }: SwarmRunDetailProps): react_jsx_runtime.JSX.Element;
|
|
44
44
|
|
|
45
45
|
export { SwarmRunDetail, type SwarmRunDetailProps, type SwarmRunDetailVariant };
|