@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 { useMemo, useState } from "react";
|
|
3
4
|
import {
|
|
4
5
|
ArrowUpRight,
|
|
@@ -118,7 +119,7 @@ function TaskWorkspaceSidebar({
|
|
|
118
119
|
return recent(b[1]).localeCompare(recent(a[1]));
|
|
119
120
|
});
|
|
120
121
|
}, [tasks, missions, query, parsePlan]);
|
|
121
|
-
return /* @__PURE__ */
|
|
122
|
+
return /* @__PURE__ */ jsxs(
|
|
122
123
|
"aside",
|
|
123
124
|
{
|
|
124
125
|
"aria-hidden": closed,
|
|
@@ -127,83 +128,97 @@ function TaskWorkspaceSidebar({
|
|
|
127
128
|
"flex h-full min-h-0 min-w-0 flex-col overflow-hidden bg-p-surface",
|
|
128
129
|
closed ? "border-r-0 pointer-events-none" : "border-r border-p-line",
|
|
129
130
|
className || ""
|
|
130
|
-
].join(" ")
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
131
|
+
].join(" "),
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ jsxs("div", { className: "flex h-11 shrink-0 items-center justify-between gap-2 px-2.5", children: [
|
|
134
|
+
/* @__PURE__ */ jsx("h3", { className: "min-w-0 truncate font-display text-[13px] font-semibold uppercase tracking-[0.08em] text-p-ink-2", children: L.title }),
|
|
135
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5", children: [
|
|
136
|
+
/* @__PURE__ */ jsx(
|
|
137
|
+
"button",
|
|
138
|
+
{
|
|
139
|
+
type: "button",
|
|
140
|
+
onClick: onToggleKanban,
|
|
141
|
+
"aria-pressed": kanbanView,
|
|
142
|
+
"aria-label": kanbanView ? L.closeKanban : L.openKanban,
|
|
143
|
+
title: kanbanView ? L.closeKanban : L.openKanban,
|
|
144
|
+
className: [
|
|
145
|
+
"grid size-7 place-items-center rounded-md transition-colors cursor-pointer",
|
|
146
|
+
kanbanView ? "bg-p-ink text-p-bg hover:bg-p-ink-2" : "bg-transparent text-p-ink-3 hover:bg-p-warm hover:text-p-ink"
|
|
147
|
+
].join(" "),
|
|
148
|
+
children: /* @__PURE__ */ jsx(LayoutGrid, { className: "size-4" })
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ jsx(
|
|
152
|
+
"button",
|
|
153
|
+
{
|
|
154
|
+
type: "button",
|
|
155
|
+
onClick: onCollapse,
|
|
156
|
+
"aria-label": L.collapseSidebar,
|
|
157
|
+
className: "grid size-7 place-items-center rounded-md bg-transparent text-p-ink-3 transition-colors cursor-pointer hover:bg-p-warm hover:text-p-ink",
|
|
158
|
+
children: /* @__PURE__ */ jsx(ChevronsLeft, { className: "size-4" })
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] })
|
|
162
|
+
] }),
|
|
163
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0 px-2.5 pt-2 pb-2", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
164
|
+
/* @__PURE__ */ jsx(Search, { className: "pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-p-ink-3" }),
|
|
165
|
+
/* @__PURE__ */ jsx(
|
|
166
|
+
"input",
|
|
167
|
+
{
|
|
168
|
+
value: query,
|
|
169
|
+
onChange: (e) => setQuery(e.target.value),
|
|
170
|
+
placeholder: L.searchPlaceholder,
|
|
171
|
+
className: "h-8 w-full rounded-md border border-p-line bg-p-bg pl-8 pr-2.5 font-body text-[12px] text-p-ink outline-none transition-colors duration-150 placeholder:text-p-ink-3 focus:border-p-ink-3 focus:bg-p-surface"
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] }) }),
|
|
175
|
+
/* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto px-1.5 pt-1 pb-2", children: isLoading ? /* @__PURE__ */ jsx("div", { className: "px-3 py-6 text-center text-[12px] text-p-ink-3", children: L.loading }) : groups.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-3 py-6 text-center text-[12px] text-p-ink-3", children: L.noTasks }) : /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: groups.map(([key, list]) => {
|
|
176
|
+
const mission = key === "__orphan__" ? null : missionByKey.get(key);
|
|
177
|
+
const title = mission?.name ?? (key === "__orphan__" ? L.orphanGroup : key);
|
|
178
|
+
const isCollapsed = groupCollapsed[key] ?? false;
|
|
179
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
180
|
+
/* @__PURE__ */ jsx(
|
|
181
|
+
MissionGroupHeader,
|
|
182
|
+
{
|
|
183
|
+
title,
|
|
184
|
+
missionLink: mission ? missionHref(mission.id) : null,
|
|
185
|
+
active: !!mission && activeMissionId === mission.id,
|
|
186
|
+
count: list.length,
|
|
187
|
+
collapsed: isCollapsed,
|
|
188
|
+
onToggle: () => setGroupCollapsed((c) => ({ ...c, [key]: !isCollapsed })),
|
|
189
|
+
renderLink,
|
|
190
|
+
L
|
|
191
|
+
}
|
|
192
|
+
),
|
|
193
|
+
!isCollapsed && /* @__PURE__ */ jsx("div", { className: "mt-1 mb-1.5 ml-3 flex flex-col gap-0.5 border-l border-p-line pl-1.5", children: list.map(
|
|
194
|
+
(row, i) => row.kind === "runtime" ? /* @__PURE__ */ jsx(
|
|
195
|
+
TaskRow,
|
|
196
|
+
{
|
|
197
|
+
task: row.task,
|
|
198
|
+
agents,
|
|
199
|
+
active: row.task.id === activeRuntimeId,
|
|
200
|
+
href: runtimeTaskHref(row.task.id),
|
|
201
|
+
renderLink
|
|
202
|
+
},
|
|
203
|
+
row.task.id
|
|
204
|
+
) : /* @__PURE__ */ jsx(
|
|
205
|
+
DraftTaskRow,
|
|
206
|
+
{
|
|
207
|
+
title: row.title,
|
|
208
|
+
assignTo: row.assignTo,
|
|
209
|
+
agents,
|
|
210
|
+
active: activePlanRef?.missionId === row.missionId && activePlanRef.title === row.title,
|
|
211
|
+
href: planTaskHref(row.missionId, row.title),
|
|
212
|
+
renderLink,
|
|
213
|
+
L
|
|
214
|
+
},
|
|
215
|
+
`plan-${row.missionId}-${row.title}-${i}`
|
|
216
|
+
)
|
|
217
|
+
) })
|
|
218
|
+
] }, key);
|
|
219
|
+
}) }) })
|
|
220
|
+
]
|
|
221
|
+
}
|
|
207
222
|
);
|
|
208
223
|
}
|
|
209
224
|
function MissionGroupHeader({
|
|
@@ -216,41 +231,49 @@ function MissionGroupHeader({
|
|
|
216
231
|
renderLink,
|
|
217
232
|
L
|
|
218
233
|
}) {
|
|
219
|
-
const titleContent = /* @__PURE__ */
|
|
220
|
-
|
|
234
|
+
const titleContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
235
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-[12.5px] font-semibold leading-tight", children: title }),
|
|
236
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-full bg-p-warm px-2 py-0.5 text-[10px] font-semibold tabular-nums text-p-ink-2", children: count })
|
|
237
|
+
] });
|
|
238
|
+
return /* @__PURE__ */ jsxs(
|
|
221
239
|
"div",
|
|
222
240
|
{
|
|
223
241
|
className: [
|
|
224
242
|
"group flex w-full items-center gap-1 rounded-md",
|
|
225
243
|
active ? "bg-p-warm" : ""
|
|
226
|
-
].join(" ")
|
|
227
|
-
},
|
|
228
|
-
/* @__PURE__ */ React.createElement(
|
|
229
|
-
"button",
|
|
230
|
-
{
|
|
231
|
-
type: "button",
|
|
232
|
-
onClick: onToggle,
|
|
233
|
-
"aria-label": collapsed ? L.expand : L.collapse,
|
|
234
|
-
className: "grid size-6 shrink-0 place-items-center rounded-md text-p-ink-3 transition-colors cursor-pointer hover:bg-p-warm hover:text-p-ink"
|
|
235
|
-
},
|
|
236
|
-
/* @__PURE__ */ React.createElement(
|
|
237
|
-
ChevronRight,
|
|
238
|
-
{
|
|
239
|
-
className: [
|
|
240
|
-
"size-3.5 transition-transform duration-150",
|
|
241
|
-
!collapsed ? "rotate-90" : ""
|
|
242
|
-
].join(" ")
|
|
243
|
-
}
|
|
244
|
-
)
|
|
245
|
-
),
|
|
246
|
-
missionLink ? renderLink({
|
|
247
|
-
href: missionLink,
|
|
248
|
-
className: [
|
|
249
|
-
"group/row flex min-w-0 flex-1 items-center gap-2 rounded-md px-1 py-1 no-underline transition-colors duration-100 cursor-pointer hover:bg-p-warm/60",
|
|
250
|
-
active ? "text-p-ink font-semibold" : "text-p-ink"
|
|
251
244
|
].join(" "),
|
|
252
|
-
children:
|
|
253
|
-
|
|
245
|
+
children: [
|
|
246
|
+
/* @__PURE__ */ jsx(
|
|
247
|
+
"button",
|
|
248
|
+
{
|
|
249
|
+
type: "button",
|
|
250
|
+
onClick: onToggle,
|
|
251
|
+
"aria-label": collapsed ? L.expand : L.collapse,
|
|
252
|
+
className: "grid size-6 shrink-0 place-items-center rounded-md text-p-ink-3 transition-colors cursor-pointer hover:bg-p-warm hover:text-p-ink",
|
|
253
|
+
children: /* @__PURE__ */ jsx(
|
|
254
|
+
ChevronRight,
|
|
255
|
+
{
|
|
256
|
+
className: [
|
|
257
|
+
"size-3.5 transition-transform duration-150",
|
|
258
|
+
!collapsed ? "rotate-90" : ""
|
|
259
|
+
].join(" ")
|
|
260
|
+
}
|
|
261
|
+
)
|
|
262
|
+
}
|
|
263
|
+
),
|
|
264
|
+
missionLink ? renderLink({
|
|
265
|
+
href: missionLink,
|
|
266
|
+
className: [
|
|
267
|
+
"group/row flex min-w-0 flex-1 items-center gap-2 rounded-md px-1 py-1 no-underline transition-colors duration-100 cursor-pointer hover:bg-p-warm/60",
|
|
268
|
+
active ? "text-p-ink font-semibold" : "text-p-ink"
|
|
269
|
+
].join(" "),
|
|
270
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
271
|
+
titleContent,
|
|
272
|
+
/* @__PURE__ */ jsx(ArrowUpRight, { className: "size-3 shrink-0 text-p-ink-3 opacity-0 transition-opacity duration-150 group-hover/row:opacity-100" })
|
|
273
|
+
] })
|
|
274
|
+
}) : /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2 rounded-md px-1 py-1 text-p-ink-2", children: titleContent })
|
|
275
|
+
]
|
|
276
|
+
}
|
|
254
277
|
);
|
|
255
278
|
}
|
|
256
279
|
const TASK_STATUS_COLOR = {
|
|
@@ -289,7 +312,11 @@ function TaskRow({
|
|
|
289
312
|
"group relative flex w-full items-center gap-2 rounded-md px-2.5 py-2 no-underline transition-colors duration-100 cursor-pointer",
|
|
290
313
|
active ? "bg-p-warm text-p-ink font-semibold" : "text-p-ink-2 hover:bg-p-warm hover:text-p-ink"
|
|
291
314
|
].join(" "),
|
|
292
|
-
children: /* @__PURE__ */
|
|
315
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
316
|
+
/* @__PURE__ */ jsx(Icon, { className: "size-3 shrink-0", style: { color } }),
|
|
317
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-[13px] leading-tight", children: task.title }),
|
|
318
|
+
/* @__PURE__ */ jsx(MiniAgentAvatar, { agent, fallback: task.assignTo })
|
|
319
|
+
] })
|
|
293
320
|
});
|
|
294
321
|
}
|
|
295
322
|
function DraftTaskRow({
|
|
@@ -308,7 +335,12 @@ function DraftTaskRow({
|
|
|
308
335
|
"group relative flex w-full items-center gap-2 rounded-md px-2.5 py-2 no-underline transition-colors duration-100 cursor-pointer",
|
|
309
336
|
active ? "bg-p-warm text-p-ink font-semibold" : "text-p-ink-3 hover:bg-p-warm hover:text-p-ink-2"
|
|
310
337
|
].join(" "),
|
|
311
|
-
children: /* @__PURE__ */
|
|
338
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
339
|
+
/* @__PURE__ */ jsx(Circle, { className: "size-3 shrink-0 text-p-ink-3/60" }),
|
|
340
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-[13px] italic leading-tight", children: title }),
|
|
341
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[9px] font-bold uppercase tracking-[0.16em] text-p-ink-3", children: L.draftBadge }),
|
|
342
|
+
assignTo ? /* @__PURE__ */ jsx(MiniAgentAvatar, { agent, fallback: assignTo }) : null
|
|
343
|
+
] })
|
|
312
344
|
});
|
|
313
345
|
}
|
|
314
346
|
function MiniAgentAvatar({
|
|
@@ -318,14 +350,14 @@ function MiniAgentAvatar({
|
|
|
318
350
|
const ref = agent ?? (fallback ? { name: fallback } : void 0);
|
|
319
351
|
if (!ref) return null;
|
|
320
352
|
const display = (ref.displayName ?? ref.name).charAt(0).toUpperCase();
|
|
321
|
-
return /* @__PURE__ */
|
|
353
|
+
return /* @__PURE__ */ jsx(
|
|
322
354
|
"span",
|
|
323
355
|
{
|
|
324
356
|
"aria-hidden": true,
|
|
325
357
|
className: "grid size-4 shrink-0 place-items-center rounded-[3px] font-display text-[9px] font-bold text-white",
|
|
326
|
-
style: { background: ref.color || "#999" }
|
|
327
|
-
|
|
328
|
-
|
|
358
|
+
style: { background: ref.color || "#999" },
|
|
359
|
+
children: ref.glyph || display
|
|
360
|
+
}
|
|
329
361
|
);
|
|
330
362
|
}
|
|
331
363
|
function defaultParsePlan(raw) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumea-labs/orchestrator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Swarm + workflow primitives — SwarmProvider, RunCard / RunRow / RunDetail / RunKanban, PlanGraph (React Flow), PlanDetail.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|