@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.
Files changed (38) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/orchestrator-document.d.ts +2 -2
  3. package/dist/orchestrator-document.js +2 -1
  4. package/dist/plan-detail.d.ts +6 -6
  5. package/dist/plan-detail.js +214 -156
  6. package/dist/plan-graph.d.ts +2 -2
  7. package/dist/plan-graph.js +178 -119
  8. package/dist/plan-node-detail.d.ts +4 -4
  9. package/dist/plan-node-detail.js +177 -125
  10. package/dist/plan-task-detail.d.ts +2 -2
  11. package/dist/plan-task-detail.js +282 -172
  12. package/dist/run-kanban-filter-menu.d.ts +3 -2
  13. package/dist/run-kanban-filter-menu.js +96 -77
  14. package/dist/run-kanban.d.ts +3 -3
  15. package/dist/run-kanban.js +93 -79
  16. package/dist/swarm-agent-badge.d.ts +2 -2
  17. package/dist/swarm-agent-badge.js +21 -18
  18. package/dist/swarm-run-activity.d.ts +2 -2
  19. package/dist/swarm-run-activity.js +150 -95
  20. package/dist/swarm-run-card.d.ts +2 -2
  21. package/dist/swarm-run-card.js +76 -55
  22. package/dist/swarm-run-detail.d.ts +2 -2
  23. package/dist/swarm-run-detail.js +415 -310
  24. package/dist/swarm-run-list.d.ts +2 -2
  25. package/dist/swarm-run-list.js +37 -27
  26. package/dist/swarm-run-row.d.ts +2 -2
  27. package/dist/swarm-run-row.js +82 -72
  28. package/dist/swarm-skeletons.d.ts +3 -3
  29. package/dist/swarm-skeletons.js +65 -16
  30. package/dist/swarm-status-bar.d.ts +2 -2
  31. package/dist/swarm-status-bar.js +62 -44
  32. package/dist/swarm-status-pill.d.ts +2 -2
  33. package/dist/swarm-status-pill.js +14 -11
  34. package/dist/swarm-timeline.d.ts +2 -2
  35. package/dist/swarm-timeline.js +284 -225
  36. package/dist/task-workspace-sidebar.d.ts +2 -2
  37. package/dist/task-workspace-sidebar.js +145 -113
  38. 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__ */ React.createElement(
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
- /* @__PURE__ */ React.createElement("div", { className: "flex h-11 shrink-0 items-center justify-between gap-2 px-2.5" }, /* @__PURE__ */ React.createElement("h3", { className: "min-w-0 truncate font-display text-[13px] font-semibold uppercase tracking-[0.08em] text-p-ink-2" }, L.title), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-0.5" }, /* @__PURE__ */ React.createElement(
133
- "button",
134
- {
135
- type: "button",
136
- onClick: onToggleKanban,
137
- "aria-pressed": kanbanView,
138
- "aria-label": kanbanView ? L.closeKanban : L.openKanban,
139
- title: kanbanView ? L.closeKanban : L.openKanban,
140
- className: [
141
- "grid size-7 place-items-center rounded-md transition-colors cursor-pointer",
142
- 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"
143
- ].join(" ")
144
- },
145
- /* @__PURE__ */ React.createElement(LayoutGrid, { className: "size-4" })
146
- ), /* @__PURE__ */ React.createElement(
147
- "button",
148
- {
149
- type: "button",
150
- onClick: onCollapse,
151
- "aria-label": L.collapseSidebar,
152
- 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"
153
- },
154
- /* @__PURE__ */ React.createElement(ChevronsLeft, { className: "size-4" })
155
- ))),
156
- /* @__PURE__ */ React.createElement("div", { className: "shrink-0 px-2.5 pt-2 pb-2" }, /* @__PURE__ */ React.createElement("div", { className: "relative" }, /* @__PURE__ */ React.createElement(Search, { className: "pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-p-ink-3" }), /* @__PURE__ */ React.createElement(
157
- "input",
158
- {
159
- value: query,
160
- onChange: (e) => setQuery(e.target.value),
161
- placeholder: L.searchPlaceholder,
162
- 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"
163
- }
164
- ))),
165
- /* @__PURE__ */ React.createElement("div", { className: "min-h-0 flex-1 overflow-y-auto px-1.5 pt-1 pb-2" }, isLoading ? /* @__PURE__ */ React.createElement("div", { className: "px-3 py-6 text-center text-[12px] text-p-ink-3" }, L.loading) : groups.length === 0 ? /* @__PURE__ */ React.createElement("div", { className: "px-3 py-6 text-center text-[12px] text-p-ink-3" }, L.noTasks) : /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-1" }, groups.map(([key, list]) => {
166
- const mission = key === "__orphan__" ? null : missionByKey.get(key);
167
- const title = mission?.name ?? (key === "__orphan__" ? L.orphanGroup : key);
168
- const isCollapsed = groupCollapsed[key] ?? false;
169
- return /* @__PURE__ */ React.createElement("div", { key, className: "flex flex-col" }, /* @__PURE__ */ React.createElement(
170
- MissionGroupHeader,
171
- {
172
- title,
173
- missionLink: mission ? missionHref(mission.id) : null,
174
- active: !!mission && activeMissionId === mission.id,
175
- count: list.length,
176
- collapsed: isCollapsed,
177
- onToggle: () => setGroupCollapsed((c) => ({ ...c, [key]: !isCollapsed })),
178
- renderLink,
179
- L
180
- }
181
- ), !isCollapsed && /* @__PURE__ */ React.createElement("div", { className: "mt-1 mb-1.5 ml-3 flex flex-col gap-0.5 border-l border-p-line pl-1.5" }, list.map(
182
- (row, i) => row.kind === "runtime" ? /* @__PURE__ */ React.createElement(
183
- TaskRow,
184
- {
185
- key: row.task.id,
186
- task: row.task,
187
- agents,
188
- active: row.task.id === activeRuntimeId,
189
- href: runtimeTaskHref(row.task.id),
190
- renderLink
191
- }
192
- ) : /* @__PURE__ */ React.createElement(
193
- DraftTaskRow,
194
- {
195
- key: `plan-${row.missionId}-${row.title}-${i}`,
196
- title: row.title,
197
- assignTo: row.assignTo,
198
- agents,
199
- active: activePlanRef?.missionId === row.missionId && activePlanRef.title === row.title,
200
- href: planTaskHref(row.missionId, row.title),
201
- renderLink,
202
- L
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__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "min-w-0 flex-1 truncate text-[12.5px] font-semibold leading-tight" }, title), /* @__PURE__ */ React.createElement("span", { className: "shrink-0 rounded-full bg-p-warm px-2 py-0.5 text-[10px] font-semibold tabular-nums text-p-ink-2" }, count));
220
- return /* @__PURE__ */ React.createElement(
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: /* @__PURE__ */ React.createElement(React.Fragment, null, titleContent, /* @__PURE__ */ React.createElement(ArrowUpRight, { className: "size-3 shrink-0 text-p-ink-3 opacity-0 transition-opacity duration-150 group-hover/row:opacity-100" }))
253
- }) : /* @__PURE__ */ React.createElement("div", { className: "flex min-w-0 flex-1 items-center gap-2 rounded-md px-1 py-1 text-p-ink-2" }, titleContent)
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__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Icon, { className: "size-3 shrink-0", style: { color } }), /* @__PURE__ */ React.createElement("span", { className: "min-w-0 flex-1 truncate text-[13px] leading-tight" }, task.title), /* @__PURE__ */ React.createElement(MiniAgentAvatar, { agent, fallback: task.assignTo }))
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__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Circle, { className: "size-3 shrink-0 text-p-ink-3/60" }), /* @__PURE__ */ React.createElement("span", { className: "min-w-0 flex-1 truncate text-[13px] italic leading-tight" }, title), /* @__PURE__ */ React.createElement("span", { className: "font-mono text-[9px] font-bold uppercase tracking-[0.16em] text-p-ink-3" }, L.draftBadge), assignTo ? /* @__PURE__ */ React.createElement(MiniAgentAvatar, { agent, fallback: assignTo }) : null)
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__ */ React.createElement(
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
- ref.glyph || display
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.0",
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",