@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
package/dist/swarm-run-detail.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import {
|
|
3
4
|
useLayoutEffect,
|
|
4
5
|
useRef,
|
|
@@ -43,82 +44,101 @@ function SwarmRunDetail({
|
|
|
43
44
|
const isLive = run.status === "running" || run.status === "pending";
|
|
44
45
|
const showCancel = onCancel && isLive;
|
|
45
46
|
const showRetry = onRetry && (run.status === "failed" || run.status === "cancelled");
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ jsxs(
|
|
47
48
|
"section",
|
|
48
49
|
{
|
|
49
50
|
className: [
|
|
50
51
|
"flex h-full min-h-0 flex-col overflow-hidden rounded-2xl border border-p-line bg-p-surface",
|
|
51
52
|
className || ""
|
|
52
|
-
].join(" ")
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
53
|
+
].join(" "),
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ jsxs("header", { className: "flex shrink-0 flex-wrap items-center gap-2 border-b border-p-line px-4 py-3", children: [
|
|
56
|
+
/* @__PURE__ */ jsx(SwarmAgentBadge, { agent: run.agent, avatar: renderAvatar?.(run.agent) }),
|
|
57
|
+
/* @__PURE__ */ jsxs("span", { className: "ml-auto inline-flex items-center gap-1", children: [
|
|
58
|
+
showCancel ? /* @__PURE__ */ jsxs(
|
|
59
|
+
"button",
|
|
60
|
+
{
|
|
61
|
+
type: "button",
|
|
62
|
+
onClick: () => onCancel(run.id),
|
|
63
|
+
className: "inline-flex items-center gap-1 rounded-md px-2 py-1 font-mono text-[10.5px] font-bold uppercase tracking-[0.16em] text-p-ink-3 transition-colors cursor-pointer hover:bg-p-warm hover:text-[#E63946]",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Square, { className: "size-2.5" }),
|
|
66
|
+
L.cancel
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
) : null,
|
|
70
|
+
showRetry ? /* @__PURE__ */ jsxs(
|
|
71
|
+
"button",
|
|
72
|
+
{
|
|
73
|
+
type: "button",
|
|
74
|
+
onClick: () => onRetry(run.id),
|
|
75
|
+
className: "inline-flex items-center gap-1 rounded-md px-2 py-1 font-mono text-[10.5px] font-bold uppercase tracking-[0.16em] text-p-ink-3 transition-colors cursor-pointer hover:bg-p-warm hover:text-p-ink",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ jsx(RotateCcw, { className: "size-2.5" }),
|
|
78
|
+
L.retry
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
) : null,
|
|
82
|
+
onClose ? /* @__PURE__ */ jsx(
|
|
83
|
+
"button",
|
|
84
|
+
{
|
|
85
|
+
type: "button",
|
|
86
|
+
onClick: onClose,
|
|
87
|
+
"aria-label": "Close",
|
|
88
|
+
title: "Close",
|
|
89
|
+
className: "grid size-7 place-items-center rounded-md text-p-ink-3 transition-colors cursor-pointer hover:bg-p-warm hover:text-p-ink",
|
|
90
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-4" })
|
|
91
|
+
}
|
|
92
|
+
) : null
|
|
93
|
+
] })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ jsx(VitalSigns, { run, L, isLive, elapsed }),
|
|
96
|
+
/* @__PURE__ */ jsxs("div", { className: "border-b border-p-line px-4 py-3", children: [
|
|
97
|
+
/* @__PURE__ */ jsx("div", { className: "font-mono text-[10px] font-bold uppercase tracking-[0.18em] text-p-ink-3", children: L.goal }),
|
|
98
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1 font-body text-[14px] leading-snug text-p-ink", children: renderMarkdown ? renderMarkdown(run.goal) : /* @__PURE__ */ jsx("p", { className: "m-0", children: run.goal }) }),
|
|
99
|
+
isLive && run.lastLog ? /* @__PURE__ */ jsxs(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: "mt-2 flex items-center gap-2 rounded-md border border-p-line bg-p-bg/60 px-2 py-1.5 font-mono text-[11px] italic text-p-ink-3",
|
|
103
|
+
"aria-live": "polite",
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
"span",
|
|
107
|
+
{
|
|
108
|
+
"aria-hidden": true,
|
|
109
|
+
className: "size-1.5 shrink-0 animate-pulse rounded-full bg-p-accent"
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: run.lastLog })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
) : null
|
|
116
|
+
] }),
|
|
117
|
+
variant === "tabs" ? /* @__PURE__ */ jsx(
|
|
118
|
+
TabsBody,
|
|
119
|
+
{
|
|
120
|
+
run,
|
|
121
|
+
L,
|
|
122
|
+
hideTools,
|
|
123
|
+
renderToolCalls,
|
|
124
|
+
renderArtifacts,
|
|
125
|
+
renderEvaluation,
|
|
126
|
+
renderMarkdown
|
|
127
|
+
}
|
|
128
|
+
) : /* @__PURE__ */ jsx(
|
|
129
|
+
FlatBody,
|
|
130
|
+
{
|
|
131
|
+
run,
|
|
132
|
+
L,
|
|
133
|
+
hideTools,
|
|
134
|
+
renderToolCalls,
|
|
135
|
+
renderArtifacts,
|
|
136
|
+
renderEvaluation,
|
|
137
|
+
renderMarkdown
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
]
|
|
141
|
+
}
|
|
122
142
|
);
|
|
123
143
|
}
|
|
124
144
|
function TabsBody({
|
|
@@ -138,50 +158,63 @@ function TabsBody({
|
|
|
138
158
|
const artifactCount = run.artifacts?.length ?? 0;
|
|
139
159
|
const toolCount = run.toolCalls?.length ?? 0;
|
|
140
160
|
const safeTab = tab === "tools" && hideTools ? "output" : tab;
|
|
141
|
-
return /* @__PURE__ */
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
onClick: () => setTab("output"),
|
|
146
|
-
label: run.error ? L.error : L.output
|
|
147
|
-
}
|
|
148
|
-
), /* @__PURE__ */ React.createElement(
|
|
149
|
-
Tab,
|
|
150
|
-
{
|
|
151
|
-
active: safeTab === "artifacts",
|
|
152
|
-
onClick: () => setTab("artifacts"),
|
|
153
|
-
label: "artifacts",
|
|
154
|
-
badge: artifactCount > 0 ? /* @__PURE__ */ React.createElement(CountBadge, { value: artifactCount }) : null
|
|
155
|
-
}
|
|
156
|
-
), !hideTools ? /* @__PURE__ */ React.createElement(
|
|
157
|
-
Tab,
|
|
158
|
-
{
|
|
159
|
-
active: safeTab === "tools",
|
|
160
|
-
onClick: () => setTab("tools"),
|
|
161
|
-
label: L.tools,
|
|
162
|
-
badge: toolCount > 0 ? /* @__PURE__ */ React.createElement(CountBadge, { value: toolCount }) : null
|
|
163
|
-
}
|
|
164
|
-
) : null, hasEval ? /* @__PURE__ */ React.createElement(
|
|
165
|
-
Tab,
|
|
166
|
-
{
|
|
167
|
-
active: safeTab === "eval",
|
|
168
|
-
onClick: () => setTab("eval"),
|
|
169
|
-
label: "eval",
|
|
170
|
-
badge: /* @__PURE__ */ React.createElement(
|
|
171
|
-
ScoreBadge,
|
|
161
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
162
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1 border-b border-p-line px-2", children: [
|
|
163
|
+
/* @__PURE__ */ jsx(
|
|
164
|
+
Tab,
|
|
172
165
|
{
|
|
173
|
-
|
|
174
|
-
|
|
166
|
+
active: safeTab === "output",
|
|
167
|
+
onClick: () => setTab("output"),
|
|
168
|
+
label: run.error ? L.error : L.output
|
|
175
169
|
}
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
170
|
+
),
|
|
171
|
+
/* @__PURE__ */ jsx(
|
|
172
|
+
Tab,
|
|
173
|
+
{
|
|
174
|
+
active: safeTab === "artifacts",
|
|
175
|
+
onClick: () => setTab("artifacts"),
|
|
176
|
+
label: "artifacts",
|
|
177
|
+
badge: artifactCount > 0 ? /* @__PURE__ */ jsx(CountBadge, { value: artifactCount }) : null
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
!hideTools ? /* @__PURE__ */ jsx(
|
|
181
|
+
Tab,
|
|
182
|
+
{
|
|
183
|
+
active: safeTab === "tools",
|
|
184
|
+
onClick: () => setTab("tools"),
|
|
185
|
+
label: L.tools,
|
|
186
|
+
badge: toolCount > 0 ? /* @__PURE__ */ jsx(CountBadge, { value: toolCount }) : null
|
|
187
|
+
}
|
|
188
|
+
) : null,
|
|
189
|
+
hasEval ? /* @__PURE__ */ jsx(
|
|
190
|
+
Tab,
|
|
191
|
+
{
|
|
192
|
+
active: safeTab === "eval",
|
|
193
|
+
onClick: () => setTab("eval"),
|
|
194
|
+
label: "eval",
|
|
195
|
+
badge: /* @__PURE__ */ jsx(
|
|
196
|
+
ScoreBadge,
|
|
197
|
+
{
|
|
198
|
+
score: run.evaluation.verdict.overall,
|
|
199
|
+
scale: run.evaluation.verdict.scale
|
|
200
|
+
}
|
|
201
|
+
)
|
|
202
|
+
}
|
|
203
|
+
) : null
|
|
204
|
+
] }),
|
|
205
|
+
/* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto p-4", children: [
|
|
206
|
+
safeTab === "output" ? /* @__PURE__ */ jsx(OutputBlock, { run, L, renderMarkdown }) : null,
|
|
207
|
+
safeTab === "artifacts" ? /* @__PURE__ */ jsx(ArtifactsBlock, { run, renderArtifacts }) : null,
|
|
208
|
+
safeTab === "tools" && !hideTools ? /* @__PURE__ */ jsx(ToolsBlock, { run, renderToolCalls }) : null,
|
|
209
|
+
safeTab === "eval" && run.evaluation ? /* @__PURE__ */ jsx(
|
|
210
|
+
EvalBlock,
|
|
211
|
+
{
|
|
212
|
+
evaluation: run.evaluation,
|
|
213
|
+
renderEvaluation
|
|
214
|
+
}
|
|
215
|
+
) : null
|
|
216
|
+
] })
|
|
217
|
+
] });
|
|
185
218
|
}
|
|
186
219
|
function FlatBody({
|
|
187
220
|
run,
|
|
@@ -195,28 +228,33 @@ function FlatBody({
|
|
|
195
228
|
const toolCount = run.toolCalls?.length ?? 0;
|
|
196
229
|
const artifactCount = run.artifacts?.length ?? 0;
|
|
197
230
|
const hasEval = !!run.evaluation;
|
|
198
|
-
return /* @__PURE__ */
|
|
199
|
-
FlatSection,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
231
|
+
return /* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
|
|
232
|
+
/* @__PURE__ */ jsx(FlatSection, { title: run.error ? L.error : L.output, children: /* @__PURE__ */ jsx(OutputBlock, { run, L, renderMarkdown }) }),
|
|
233
|
+
/* @__PURE__ */ jsx(
|
|
234
|
+
FlatSection,
|
|
235
|
+
{
|
|
236
|
+
title: "artifacts",
|
|
237
|
+
meta: artifactCount > 0 ? String(artifactCount) : void 0,
|
|
238
|
+
children: /* @__PURE__ */ jsx(ArtifactsBlock, { run, renderArtifacts })
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
!hideTools ? /* @__PURE__ */ jsx(
|
|
242
|
+
FlatSection,
|
|
243
|
+
{
|
|
244
|
+
title: L.tools,
|
|
245
|
+
meta: toolCount > 0 ? String(toolCount) : void 0,
|
|
246
|
+
last: !hasEval,
|
|
247
|
+
children: /* @__PURE__ */ jsx(ToolsBlock, { run, renderToolCalls })
|
|
248
|
+
}
|
|
249
|
+
) : null,
|
|
250
|
+
hasEval ? /* @__PURE__ */ jsx(FlatSection, { title: "evaluation", last: true, children: /* @__PURE__ */ jsx(
|
|
251
|
+
EvalBlock,
|
|
252
|
+
{
|
|
253
|
+
evaluation: run.evaluation,
|
|
254
|
+
renderEvaluation
|
|
255
|
+
}
|
|
256
|
+
) }) : null
|
|
257
|
+
] });
|
|
220
258
|
}
|
|
221
259
|
function FlatSection({
|
|
222
260
|
title,
|
|
@@ -237,68 +275,84 @@ function FlatSection({
|
|
|
237
275
|
if (mode === "collapsed" || !bodyRef.current) return;
|
|
238
276
|
setOverflows(bodyRef.current.scrollHeight > previewMaxHeight + 4);
|
|
239
277
|
}, [mode, previewMaxHeight, children]);
|
|
240
|
-
return /* @__PURE__ */
|
|
278
|
+
return /* @__PURE__ */ jsxs(
|
|
241
279
|
"section",
|
|
242
280
|
{
|
|
243
281
|
className: [
|
|
244
282
|
"px-4 py-4",
|
|
245
283
|
last ? "" : "border-b border-p-line"
|
|
246
|
-
].join(" ")
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
"
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
284
|
+
].join(" "),
|
|
285
|
+
children: [
|
|
286
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center gap-2", children: [
|
|
287
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] font-bold uppercase tracking-[0.22em] text-p-ink-3", children: title }),
|
|
288
|
+
meta ? /* @__PURE__ */ jsxs("span", { className: "font-mono text-[10px] uppercase tracking-[0.18em] text-p-ink-3/70 tabular-nums", children: [
|
|
289
|
+
"\xB7 ",
|
|
290
|
+
meta
|
|
291
|
+
] }) : null,
|
|
292
|
+
/* @__PURE__ */ jsx(
|
|
293
|
+
"button",
|
|
294
|
+
{
|
|
295
|
+
type: "button",
|
|
296
|
+
onClick: () => setMode((m) => m === "collapsed" ? "preview" : "collapsed"),
|
|
297
|
+
"aria-label": mode === "collapsed" ? "Expand section" : "Collapse section",
|
|
298
|
+
"aria-expanded": mode !== "collapsed",
|
|
299
|
+
className: "ml-auto grid size-5 place-items-center rounded text-p-ink-3 transition-colors cursor-pointer hover:bg-p-warm hover:text-p-ink",
|
|
300
|
+
children: /* @__PURE__ */ jsx(
|
|
301
|
+
ChevronDown,
|
|
302
|
+
{
|
|
303
|
+
className: [
|
|
304
|
+
"size-3.5 transition-transform duration-150",
|
|
305
|
+
mode === "collapsed" ? "-rotate-90" : ""
|
|
306
|
+
].join(" ")
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
}
|
|
310
|
+
)
|
|
311
|
+
] }),
|
|
312
|
+
mode === "collapsed" ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
313
|
+
/* @__PURE__ */ jsxs(
|
|
314
|
+
"div",
|
|
315
|
+
{
|
|
316
|
+
ref: bodyRef,
|
|
317
|
+
className: "relative overflow-hidden",
|
|
318
|
+
style: {
|
|
319
|
+
maxHeight: mode === "preview" && overflows ? previewMaxHeight : void 0
|
|
320
|
+
},
|
|
321
|
+
children: [
|
|
322
|
+
children,
|
|
323
|
+
mode === "preview" && overflows ? /* @__PURE__ */ jsx(
|
|
324
|
+
"div",
|
|
325
|
+
{
|
|
326
|
+
"aria-hidden": true,
|
|
327
|
+
className: "pointer-events-none absolute inset-x-0 bottom-0 h-12 bg-gradient-to-t from-p-surface to-transparent"
|
|
328
|
+
}
|
|
329
|
+
) : null
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
),
|
|
333
|
+
overflows ? /* @__PURE__ */ jsxs(
|
|
334
|
+
"button",
|
|
335
|
+
{
|
|
336
|
+
type: "button",
|
|
337
|
+
onClick: () => setMode((m) => m === "preview" ? "expanded" : "preview"),
|
|
338
|
+
className: "mt-2 inline-flex items-center gap-1 rounded-md font-mono text-[10.5px] font-bold uppercase tracking-[0.16em] text-p-ink-3 transition-colors cursor-pointer hover:text-p-ink",
|
|
339
|
+
children: [
|
|
340
|
+
mode === "preview" ? "show more" : "show less",
|
|
341
|
+
/* @__PURE__ */ jsx(
|
|
342
|
+
ChevronDown,
|
|
343
|
+
{
|
|
344
|
+
className: [
|
|
345
|
+
"size-3 transition-transform duration-150",
|
|
346
|
+
mode === "expanded" ? "rotate-180" : ""
|
|
347
|
+
].join(" ")
|
|
348
|
+
}
|
|
349
|
+
)
|
|
350
|
+
]
|
|
351
|
+
}
|
|
352
|
+
) : null
|
|
353
|
+
] })
|
|
354
|
+
]
|
|
355
|
+
}
|
|
302
356
|
);
|
|
303
357
|
}
|
|
304
358
|
function VitalSigns({
|
|
@@ -309,35 +363,48 @@ function VitalSigns({
|
|
|
309
363
|
}) {
|
|
310
364
|
const attempts = (run.retries ?? 0) + 1;
|
|
311
365
|
const maxAttempts = typeof run.maxRetries === "number" ? run.maxRetries + 1 : void 0;
|
|
312
|
-
return /* @__PURE__ */
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
366
|
+
return /* @__PURE__ */ jsxs("section", { className: "grid shrink-0 grid-cols-3 gap-px border-b border-p-line bg-p-line", children: [
|
|
367
|
+
/* @__PURE__ */ jsx(
|
|
368
|
+
Stat,
|
|
369
|
+
{
|
|
370
|
+
label: "duration",
|
|
371
|
+
value: /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: isLive ? L.startedAgo(elapsed) : L.duration(elapsed) })
|
|
372
|
+
}
|
|
373
|
+
),
|
|
374
|
+
/* @__PURE__ */ jsx(
|
|
375
|
+
Stat,
|
|
376
|
+
{
|
|
377
|
+
label: "status",
|
|
378
|
+
value: /* @__PURE__ */ jsx(
|
|
379
|
+
SwarmStatusPill,
|
|
380
|
+
{
|
|
381
|
+
status: run.status,
|
|
382
|
+
label: L[run.status],
|
|
383
|
+
size: "sm"
|
|
384
|
+
}
|
|
385
|
+
)
|
|
386
|
+
}
|
|
387
|
+
),
|
|
388
|
+
/* @__PURE__ */ jsx(
|
|
389
|
+
Stat,
|
|
390
|
+
{
|
|
391
|
+
label: "attempts",
|
|
392
|
+
value: /* @__PURE__ */ jsxs("span", { className: "tabular-nums", children: [
|
|
393
|
+
attempts,
|
|
394
|
+
typeof maxAttempts === "number" ? /* @__PURE__ */ jsxs("span", { className: "text-p-ink-3", children: [
|
|
395
|
+
"/",
|
|
396
|
+
maxAttempts
|
|
397
|
+
] }) : null
|
|
398
|
+
] })
|
|
399
|
+
}
|
|
400
|
+
)
|
|
401
|
+
] });
|
|
338
402
|
}
|
|
339
403
|
function Stat({ label, value }) {
|
|
340
|
-
return /* @__PURE__ */
|
|
404
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 bg-p-surface px-4 py-3", children: [
|
|
405
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[9.5px] font-bold uppercase tracking-[0.22em] text-p-ink-3", children: label }),
|
|
406
|
+
/* @__PURE__ */ jsx("span", { className: "font-display text-[16px] font-bold leading-tight tracking-[-0.01em] text-p-ink", children: value })
|
|
407
|
+
] });
|
|
341
408
|
}
|
|
342
409
|
function OutputBlock({
|
|
343
410
|
run,
|
|
@@ -345,40 +412,43 @@ function OutputBlock({
|
|
|
345
412
|
renderMarkdown
|
|
346
413
|
}) {
|
|
347
414
|
if (run.error) {
|
|
348
|
-
return /* @__PURE__ */
|
|
415
|
+
return /* @__PURE__ */ jsx("pre", { className: "m-0 whitespace-pre-wrap break-words font-mono text-[12px] leading-relaxed text-[#E63946]", children: run.error });
|
|
349
416
|
}
|
|
350
417
|
if (!run.output) {
|
|
351
|
-
return /* @__PURE__ */
|
|
418
|
+
return /* @__PURE__ */ jsxs("span", { className: "block px-1 py-2 font-mono text-[11px] uppercase tracking-[0.16em] text-p-ink-3", children: [
|
|
419
|
+
L.output,
|
|
420
|
+
" \u2014 \u2014"
|
|
421
|
+
] });
|
|
352
422
|
}
|
|
353
423
|
if (renderMarkdown) {
|
|
354
|
-
return /* @__PURE__ */
|
|
424
|
+
return /* @__PURE__ */ jsx("div", { className: "font-body text-[14px] leading-[1.65] text-p-ink-2", children: renderMarkdown(run.output) });
|
|
355
425
|
}
|
|
356
|
-
return /* @__PURE__ */
|
|
426
|
+
return /* @__PURE__ */ jsx("pre", { className: "m-0 whitespace-pre-wrap break-words font-mono text-[12px] leading-relaxed text-p-ink-2", children: run.output });
|
|
357
427
|
}
|
|
358
428
|
function ArtifactsBlock({
|
|
359
429
|
run,
|
|
360
430
|
renderArtifacts
|
|
361
431
|
}) {
|
|
362
432
|
const artifacts = run.artifacts ?? [];
|
|
363
|
-
if (renderArtifacts) return /* @__PURE__ */
|
|
433
|
+
if (renderArtifacts) return /* @__PURE__ */ jsx(Fragment, { children: renderArtifacts(artifacts) });
|
|
364
434
|
if (artifacts.length === 0) {
|
|
365
|
-
return /* @__PURE__ */
|
|
435
|
+
return /* @__PURE__ */ jsx("span", { className: "block px-1 py-2 font-mono text-[11px] uppercase tracking-[0.16em] text-p-ink-3", children: "no artifacts produced" });
|
|
366
436
|
}
|
|
367
|
-
return /* @__PURE__ */
|
|
437
|
+
return /* @__PURE__ */ jsx(DefaultArtifactList, { artifacts });
|
|
368
438
|
}
|
|
369
439
|
function ToolsBlock({
|
|
370
440
|
run,
|
|
371
441
|
renderToolCalls
|
|
372
442
|
}) {
|
|
373
|
-
if (renderToolCalls) return /* @__PURE__ */
|
|
374
|
-
return /* @__PURE__ */
|
|
443
|
+
if (renderToolCalls) return /* @__PURE__ */ jsx(Fragment, { children: renderToolCalls(run.toolCalls ?? []) });
|
|
444
|
+
return /* @__PURE__ */ jsx(DefaultToolCallList, { toolCalls: run.toolCalls ?? [] });
|
|
375
445
|
}
|
|
376
446
|
function EvalBlock({
|
|
377
447
|
evaluation,
|
|
378
448
|
renderEvaluation
|
|
379
449
|
}) {
|
|
380
|
-
if (renderEvaluation) return /* @__PURE__ */
|
|
381
|
-
return /* @__PURE__ */
|
|
450
|
+
if (renderEvaluation) return /* @__PURE__ */ jsx(Fragment, { children: renderEvaluation(evaluation) });
|
|
451
|
+
return /* @__PURE__ */ jsx(DefaultEvalSummary, { evaluation });
|
|
382
452
|
}
|
|
383
453
|
function DefaultEvalSummary({
|
|
384
454
|
evaluation
|
|
@@ -386,34 +456,63 @@ function DefaultEvalSummary({
|
|
|
386
456
|
const { verdict, scores, evaluatedAt } = evaluation;
|
|
387
457
|
const scale = verdict.scale ?? scores[0]?.scale ?? { min: 1, max: 5 };
|
|
388
458
|
const tone = verdictTone(verdict.overall, scale);
|
|
389
|
-
return /* @__PURE__ */
|
|
390
|
-
"
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
)
|
|
416
|
-
|
|
459
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
460
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-3", children: [
|
|
461
|
+
/* @__PURE__ */ jsx(
|
|
462
|
+
"span",
|
|
463
|
+
{
|
|
464
|
+
className: "font-display text-[40px] font-bold leading-none tracking-[-0.02em] tabular-nums",
|
|
465
|
+
style: { color: tone },
|
|
466
|
+
children: formatScore(verdict.overall)
|
|
467
|
+
}
|
|
468
|
+
),
|
|
469
|
+
/* @__PURE__ */ jsxs("span", { className: "font-mono text-[10.5px] uppercase tracking-[0.18em] text-p-ink-3", children: [
|
|
470
|
+
"/",
|
|
471
|
+
scale.max,
|
|
472
|
+
" \xB7 evaluated",
|
|
473
|
+
" ",
|
|
474
|
+
new Date(evaluatedAt).toLocaleDateString(void 0, {
|
|
475
|
+
month: "short",
|
|
476
|
+
day: "numeric"
|
|
477
|
+
}),
|
|
478
|
+
typeof verdict.passed === "boolean" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
479
|
+
/* @__PURE__ */ jsx("span", { className: "mx-1.5 text-p-line", children: "\xB7" }),
|
|
480
|
+
/* @__PURE__ */ jsx("span", { style: { color: verdict.passed ? "var(--green)" : "#E63946" }, children: verdict.passed ? "passed" : "failed" })
|
|
481
|
+
] }) : null
|
|
482
|
+
] })
|
|
483
|
+
] }),
|
|
484
|
+
verdict.summary ? /* @__PURE__ */ jsx("p", { className: "font-body text-[13px] leading-[1.55] text-p-ink-2", children: verdict.summary }) : null,
|
|
485
|
+
/* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-2", children: scores.map((s) => {
|
|
486
|
+
const sScale = s.scale ?? scale;
|
|
487
|
+
const pct = Math.max(
|
|
488
|
+
0,
|
|
489
|
+
Math.min(
|
|
490
|
+
100,
|
|
491
|
+
(s.value - sScale.min) / (sScale.max - sScale.min) * 100
|
|
492
|
+
)
|
|
493
|
+
);
|
|
494
|
+
const sTone = verdictTone(s.value, sScale);
|
|
495
|
+
return /* @__PURE__ */ jsxs("li", { className: "flex flex-col gap-1", children: [
|
|
496
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between gap-3 font-mono text-[10.5px] uppercase tracking-[0.16em]", children: [
|
|
497
|
+
/* @__PURE__ */ jsx("span", { className: "text-p-ink-2", children: s.criterion }),
|
|
498
|
+
/* @__PURE__ */ jsxs("span", { className: "tabular-nums", style: { color: sTone }, children: [
|
|
499
|
+
formatScore(s.value),
|
|
500
|
+
/* @__PURE__ */ jsxs("span", { className: "text-p-ink-3", children: [
|
|
501
|
+
"/",
|
|
502
|
+
sScale.max
|
|
503
|
+
] })
|
|
504
|
+
] })
|
|
505
|
+
] }),
|
|
506
|
+
/* @__PURE__ */ jsx("div", { className: "h-[3px] w-full overflow-hidden rounded-full bg-p-line", children: /* @__PURE__ */ jsx(
|
|
507
|
+
"div",
|
|
508
|
+
{
|
|
509
|
+
className: "h-full rounded-full",
|
|
510
|
+
style: { width: `${pct}%`, background: sTone }
|
|
511
|
+
}
|
|
512
|
+
) })
|
|
513
|
+
] }, s.criterion);
|
|
514
|
+
}) })
|
|
515
|
+
] });
|
|
417
516
|
}
|
|
418
517
|
function formatScore(n) {
|
|
419
518
|
return n.toFixed(1).replace(/\.0$/, "");
|
|
@@ -433,7 +532,7 @@ function Tab({
|
|
|
433
532
|
label,
|
|
434
533
|
badge
|
|
435
534
|
}) {
|
|
436
|
-
return /* @__PURE__ */
|
|
535
|
+
return /* @__PURE__ */ jsxs(
|
|
437
536
|
"button",
|
|
438
537
|
{
|
|
439
538
|
type: "button",
|
|
@@ -441,21 +540,23 @@ function Tab({
|
|
|
441
540
|
className: [
|
|
442
541
|
"relative inline-flex items-center gap-1.5 px-3 py-2 font-mono text-[11px] font-bold uppercase tracking-[0.16em] transition-colors cursor-pointer",
|
|
443
542
|
active ? "text-p-ink" : "text-p-ink-3 hover:text-p-ink"
|
|
444
|
-
].join(" ")
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
543
|
+
].join(" "),
|
|
544
|
+
children: [
|
|
545
|
+
label,
|
|
546
|
+
badge,
|
|
547
|
+
active ? /* @__PURE__ */ jsx(
|
|
548
|
+
"span",
|
|
549
|
+
{
|
|
550
|
+
"aria-hidden": true,
|
|
551
|
+
className: "absolute inset-x-2 -bottom-px h-[2px] rounded-t bg-p-accent"
|
|
552
|
+
}
|
|
553
|
+
) : null
|
|
554
|
+
]
|
|
555
|
+
}
|
|
455
556
|
);
|
|
456
557
|
}
|
|
457
558
|
function CountBadge({ value }) {
|
|
458
|
-
return /* @__PURE__ */
|
|
559
|
+
return /* @__PURE__ */ jsx("span", { className: "inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full border border-p-line bg-transparent px-1.5 font-mono text-[10px] font-bold tabular-nums text-p-ink-3", children: value });
|
|
459
560
|
}
|
|
460
561
|
function ScoreBadge({
|
|
461
562
|
score,
|
|
@@ -477,7 +578,7 @@ function ScoreBadge({
|
|
|
477
578
|
bg: "bg-[#FEF2F2]",
|
|
478
579
|
ring: "border-[#E63946]/30"
|
|
479
580
|
};
|
|
480
|
-
return /* @__PURE__ */
|
|
581
|
+
return /* @__PURE__ */ jsx(
|
|
481
582
|
"span",
|
|
482
583
|
{
|
|
483
584
|
className: [
|
|
@@ -485,34 +586,36 @@ function ScoreBadge({
|
|
|
485
586
|
palette.fg,
|
|
486
587
|
palette.bg,
|
|
487
588
|
palette.ring
|
|
488
|
-
].join(" ")
|
|
489
|
-
|
|
490
|
-
|
|
589
|
+
].join(" "),
|
|
590
|
+
children: formatScore(score)
|
|
591
|
+
}
|
|
491
592
|
);
|
|
492
593
|
}
|
|
493
594
|
function DefaultToolCallList({ toolCalls }) {
|
|
494
595
|
if (toolCalls.length === 0) {
|
|
495
|
-
return /* @__PURE__ */
|
|
596
|
+
return /* @__PURE__ */ jsx("span", { className: "block px-1 py-2 font-mono text-[11px] uppercase tracking-[0.16em] text-p-ink-3", children: "no tool calls yet" });
|
|
496
597
|
}
|
|
497
|
-
return /* @__PURE__ */
|
|
598
|
+
return /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1.5", children: toolCalls.map((t) => /* @__PURE__ */ jsxs(
|
|
498
599
|
"li",
|
|
499
600
|
{
|
|
500
|
-
|
|
501
|
-
|
|
601
|
+
className: "flex items-center gap-2 rounded-md border border-p-line bg-p-bg px-2 py-1.5",
|
|
602
|
+
children: [
|
|
603
|
+
/* @__PURE__ */ jsx(
|
|
604
|
+
"span",
|
|
605
|
+
{
|
|
606
|
+
"aria-hidden": true,
|
|
607
|
+
className: [
|
|
608
|
+
"size-1.5 shrink-0 rounded-full",
|
|
609
|
+
t.state === "calling" ? "bg-p-accent animate-pulse" : t.state === "completed" ? "bg-p-green" : "bg-[#E63946]"
|
|
610
|
+
].join(" ")
|
|
611
|
+
}
|
|
612
|
+
),
|
|
613
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[11.5px] font-semibold text-p-ink", children: t.name }),
|
|
614
|
+
t.summary ? /* @__PURE__ */ jsx("span", { className: "truncate font-mono text-[11px] text-p-ink-3", children: t.summary }) : null
|
|
615
|
+
]
|
|
502
616
|
},
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
{
|
|
506
|
-
"aria-hidden": true,
|
|
507
|
-
className: [
|
|
508
|
-
"size-1.5 shrink-0 rounded-full",
|
|
509
|
-
t.state === "calling" ? "bg-p-accent animate-pulse" : t.state === "completed" ? "bg-p-green" : "bg-[#E63946]"
|
|
510
|
-
].join(" ")
|
|
511
|
-
}
|
|
512
|
-
),
|
|
513
|
-
/* @__PURE__ */ React.createElement("span", { className: "font-mono text-[11.5px] font-semibold text-p-ink" }, t.name),
|
|
514
|
-
t.summary ? /* @__PURE__ */ React.createElement("span", { className: "truncate font-mono text-[11px] text-p-ink-3" }, t.summary) : null
|
|
515
|
-
)));
|
|
617
|
+
t.id
|
|
618
|
+
)) });
|
|
516
619
|
}
|
|
517
620
|
const ARTIFACT_ICON = {
|
|
518
621
|
file: FileText,
|
|
@@ -522,11 +625,11 @@ const ARTIFACT_ICON = {
|
|
|
522
625
|
note: StickyNote
|
|
523
626
|
};
|
|
524
627
|
function DefaultArtifactList({ artifacts }) {
|
|
525
|
-
return /* @__PURE__ */
|
|
628
|
+
return /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1.5", children: artifacts.map((a) => {
|
|
526
629
|
const Icon = ARTIFACT_ICON[a.kind];
|
|
527
630
|
const interactive = !!a.url;
|
|
528
631
|
const Wrapper = interactive ? "a" : "div";
|
|
529
|
-
return /* @__PURE__ */
|
|
632
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
530
633
|
Wrapper,
|
|
531
634
|
{
|
|
532
635
|
...interactive ? {
|
|
@@ -537,22 +640,24 @@ function DefaultArtifactList({ artifacts }) {
|
|
|
537
640
|
className: [
|
|
538
641
|
"flex items-center gap-2 rounded-md border border-p-line bg-p-surface px-2.5 py-1.5 no-underline transition-colors",
|
|
539
642
|
interactive ? "cursor-pointer hover:bg-p-warm/40" : ""
|
|
540
|
-
].join(" ")
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
643
|
+
].join(" "),
|
|
644
|
+
children: [
|
|
645
|
+
/* @__PURE__ */ jsx(Icon, { className: "size-3 shrink-0 text-p-ink-3", "aria-hidden": true }),
|
|
646
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate font-display text-[12.5px] font-semibold text-p-ink", children: a.label }),
|
|
647
|
+
a.path ? /* @__PURE__ */ jsx("code", { className: "hidden truncate font-mono text-[10.5px] text-p-ink-3 sm:inline", children: a.path }) : null,
|
|
648
|
+
a.tags && a.tags.length > 0 ? /* @__PURE__ */ jsx("span", { className: "hidden flex-wrap gap-1 sm:inline-flex", children: a.tags.map((t) => /* @__PURE__ */ jsx(
|
|
649
|
+
"span",
|
|
650
|
+
{
|
|
651
|
+
className: "inline-flex items-center rounded border border-p-line bg-p-bg px-1 py-px font-mono text-[9.5px] uppercase tracking-[0.14em] text-p-ink-2",
|
|
652
|
+
children: t
|
|
653
|
+
},
|
|
654
|
+
t
|
|
655
|
+
)) }) : null,
|
|
656
|
+
a.summary ? /* @__PURE__ */ jsx("span", { className: "hidden truncate font-mono text-[10.5px] text-p-ink-3 lg:inline", children: a.summary }) : null
|
|
657
|
+
]
|
|
658
|
+
}
|
|
659
|
+
) }, a.id);
|
|
660
|
+
}) });
|
|
556
661
|
}
|
|
557
662
|
export {
|
|
558
663
|
SwarmRunDetail
|