@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/index.d.ts
CHANGED
|
@@ -18,4 +18,5 @@ export { BuildSwarmRunActivityOptions, SwarmRunActivityStream, SwarmRunActivityS
|
|
|
18
18
|
export { SwarmRunActivityStreamSkeleton, SwarmRunActivityStreamSkeletonProps, SwarmRunDetailSkeleton, SwarmRunDetailSkeletonProps } from './swarm-skeletons.js';
|
|
19
19
|
export { SwarmTimeline, SwarmTimelineProps } from './swarm-timeline.js';
|
|
20
20
|
export { PlanOnlyTaskShape, RenderLinkArgs, RenderLinkFn, TaskWorkspaceSidebar, TaskWorkspaceSidebarLabels, TaskWorkspaceSidebarProps, defaultTaskWorkspaceSidebarLabels } from './task-workspace-sidebar.js';
|
|
21
|
+
import 'react/jsx-runtime';
|
|
21
22
|
import 'react';
|
|
@@ -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, SwarmCounts, SwarmStartInput, SwarmCapabilities, SwarmLabels, SwarmAdapter } from './types.js';
|
|
4
4
|
|
|
@@ -32,6 +32,6 @@ interface SwarmProviderProps {
|
|
|
32
32
|
autoLoad?: boolean;
|
|
33
33
|
children: ReactNode;
|
|
34
34
|
}
|
|
35
|
-
declare function SwarmProvider({ adapter, labels, autoLoad, children, }: SwarmProviderProps):
|
|
35
|
+
declare function SwarmProvider({ adapter, labels, autoLoad, children, }: SwarmProviderProps): react_jsx_runtime.JSX.Element;
|
|
36
36
|
|
|
37
37
|
export { type SwarmContextValue, SwarmProvider, type SwarmProviderProps, useSwarm };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import {
|
|
3
4
|
createContext,
|
|
4
5
|
use,
|
|
@@ -114,7 +115,7 @@ function SwarmProvider({
|
|
|
114
115
|
}),
|
|
115
116
|
[runs, counts, isLoading, now, refresh, start, cancel, retry, cancelAll, retryFailed, capabilities, merged]
|
|
116
117
|
);
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ jsx(Ctx, { value, children });
|
|
118
119
|
}
|
|
119
120
|
export {
|
|
120
121
|
SwarmProvider,
|
package/dist/plan-detail.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 { PlanGraphTaskRef } from './plan-graph.js';
|
|
4
4
|
import { Plan, PlanTaskRuntime, PlanDetailLabels, PlanGraphLabels } from './plan-types.js';
|
|
@@ -19,7 +19,7 @@ interface PlanDetailHeaderProps {
|
|
|
19
19
|
labels?: Partial<PlanDetailLabels>;
|
|
20
20
|
className?: string;
|
|
21
21
|
}
|
|
22
|
-
declare function PlanDetailHeader({ plan, runtimeByTitle, briefSlot, actionsSlot, headerLeading, headerTrailing, labels, className, }: PlanDetailHeaderProps):
|
|
22
|
+
declare function PlanDetailHeader({ plan, runtimeByTitle, briefSlot, actionsSlot, headerLeading, headerTrailing, labels, className, }: PlanDetailHeaderProps): react_jsx_runtime.JSX.Element;
|
|
23
23
|
interface PlanDetailMastheadProps {
|
|
24
24
|
plan: Plan;
|
|
25
25
|
runtimeByTitle?: Map<string, PlanTaskRuntime>;
|
|
@@ -32,7 +32,7 @@ interface PlanDetailMastheadProps {
|
|
|
32
32
|
labels?: Partial<PlanDetailLabels>;
|
|
33
33
|
className?: string;
|
|
34
34
|
}
|
|
35
|
-
declare function PlanDetailMasthead({ plan, runtimeByTitle, briefSlot, actionsSlot, headerLeading, headerTrailing, labels, className, }: PlanDetailMastheadProps):
|
|
35
|
+
declare function PlanDetailMasthead({ plan, runtimeByTitle, briefSlot, actionsSlot, headerLeading, headerTrailing, labels, className, }: PlanDetailMastheadProps): react_jsx_runtime.JSX.Element;
|
|
36
36
|
interface PlanDetailGraphProps {
|
|
37
37
|
plan: Plan;
|
|
38
38
|
runtimeByTitle?: Map<string, PlanTaskRuntime>;
|
|
@@ -62,7 +62,7 @@ interface PlanDetailGraphProps {
|
|
|
62
62
|
graphLabels?: Partial<PlanGraphLabels>;
|
|
63
63
|
className?: string;
|
|
64
64
|
}
|
|
65
|
-
declare function PlanDetailGraph({ plan, runtimeByTitle, agents, graphHeight, fillHeight, onOpenTask, onOpenCheckpoint, onOpenGate, onOpenDelay, selectedNodeId, zoomToSelected, graphLabels, className, }: PlanDetailGraphProps):
|
|
65
|
+
declare function PlanDetailGraph({ plan, runtimeByTitle, agents, graphHeight, fillHeight, onOpenTask, onOpenCheckpoint, onOpenGate, onOpenDelay, selectedNodeId, zoomToSelected, graphLabels, className, }: PlanDetailGraphProps): react_jsx_runtime.JSX.Element;
|
|
66
66
|
interface PlanDetailBreakdownProps {
|
|
67
67
|
plan: Plan;
|
|
68
68
|
runtimeByTitle?: Map<string, PlanTaskRuntime>;
|
|
@@ -74,7 +74,7 @@ interface PlanDetailBreakdownProps {
|
|
|
74
74
|
labels?: Partial<PlanDetailLabels>;
|
|
75
75
|
className?: string;
|
|
76
76
|
}
|
|
77
|
-
declare function PlanDetailBreakdown({ plan, runtimeByTitle, agents, defaultOpen, alwaysOpen, onOpenTask, labels, className, }: PlanDetailBreakdownProps):
|
|
77
|
+
declare function PlanDetailBreakdown({ plan, runtimeByTitle, agents, defaultOpen, alwaysOpen, onOpenTask, labels, className, }: PlanDetailBreakdownProps): react_jsx_runtime.JSX.Element;
|
|
78
78
|
interface PlanDetailProps {
|
|
79
79
|
plan: Plan;
|
|
80
80
|
/** Runtime status overlay, keyed by task title. */
|
|
@@ -97,6 +97,6 @@ interface PlanDetailProps {
|
|
|
97
97
|
graphLabels?: Partial<PlanGraphLabels>;
|
|
98
98
|
className?: string;
|
|
99
99
|
}
|
|
100
|
-
declare function PlanDetail({ plan, runtimeByTitle, agents, briefSlot, actionsSlot, headerTrailing, hideBreakdown, defaultBreakdownOpen, graphHeight, onOpenTask, labels, graphLabels, className, }: PlanDetailProps):
|
|
100
|
+
declare function PlanDetail({ plan, runtimeByTitle, agents, briefSlot, actionsSlot, headerTrailing, hideBreakdown, defaultBreakdownOpen, graphHeight, onOpenTask, labels, graphLabels, className, }: PlanDetailProps): react_jsx_runtime.JSX.Element;
|
|
101
101
|
|
|
102
102
|
export { PlanDetail, PlanDetailBreakdown, type PlanDetailBreakdownProps, PlanDetailGraph, type PlanDetailGraphProps, PlanDetailHeader, type PlanDetailHeaderProps, PlanDetailMasthead, type PlanDetailMastheadProps, type PlanDetailProps };
|
package/dist/plan-detail.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useMemo, useState } from "react";
|
|
3
4
|
import {
|
|
4
5
|
CheckCircle2,
|
|
@@ -54,18 +55,33 @@ function PlanDetailHeader({
|
|
|
54
55
|
runtimeByTitle
|
|
55
56
|
]);
|
|
56
57
|
const hasRuntime = runtimeByTitle && runtimeByTitle.size > 0;
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ jsxs(
|
|
58
59
|
"header",
|
|
59
60
|
{
|
|
60
61
|
className: [
|
|
61
62
|
"flex flex-col border-b border-p-line",
|
|
62
63
|
className || ""
|
|
63
|
-
].join(" ")
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
].join(" "),
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 px-5 py-3", children: [
|
|
67
|
+
headerLeading,
|
|
68
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] font-bold uppercase tracking-[0.24em] text-p-ink-3", children: L.kicker }),
|
|
69
|
+
/* @__PURE__ */ jsx("h2", { className: "font-display text-[22px] font-bold leading-tight tracking-[-0.02em] text-p-ink", children: plan.name ?? "\u2014" }),
|
|
70
|
+
/* @__PURE__ */ jsxs("span", { className: "ml-auto inline-flex items-center gap-2", children: [
|
|
71
|
+
headerTrailing,
|
|
72
|
+
actionsSlot
|
|
73
|
+
] })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-px border-t border-p-line bg-p-line sm:grid-cols-4", children: [
|
|
76
|
+
/* @__PURE__ */ jsx(MetaCell, { label: L.taskCountLabel(taskCount), accent: true }),
|
|
77
|
+
/* @__PURE__ */ jsx(MetaCell, { label: L.checkpointCountLabel(cpCount) }),
|
|
78
|
+
/* @__PURE__ */ jsx(MetaCell, { label: L.gateCountLabel(gateCount) }),
|
|
79
|
+
/* @__PURE__ */ jsx(MetaCell, { label: L.delayCountLabel(delayCount) })
|
|
80
|
+
] }),
|
|
81
|
+
hasRuntime ? /* @__PURE__ */ jsx(StatusCountsStrip, { counts, L }) : null,
|
|
82
|
+
briefSlot ? /* @__PURE__ */ jsx("div", { className: "border-t border-p-line px-5 py-4 font-body text-[14px] leading-[1.55] text-p-ink-2", children: briefSlot }) : null
|
|
83
|
+
]
|
|
84
|
+
}
|
|
69
85
|
);
|
|
70
86
|
}
|
|
71
87
|
function PlanDetailMasthead({
|
|
@@ -91,18 +107,38 @@ function PlanDetailMasthead({
|
|
|
91
107
|
runtimeByTitle
|
|
92
108
|
]);
|
|
93
109
|
const hasRuntime = runtimeByTitle && runtimeByTitle.size > 0;
|
|
94
|
-
return /* @__PURE__ */
|
|
110
|
+
return /* @__PURE__ */ jsxs(
|
|
95
111
|
"header",
|
|
96
112
|
{
|
|
97
113
|
className: [
|
|
98
114
|
"flex flex-col gap-5 border-b border-p-line px-7 py-7",
|
|
99
115
|
className || ""
|
|
100
|
-
].join(" ")
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
116
|
+
].join(" "),
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
|
|
119
|
+
headerLeading ? /* @__PURE__ */ jsx("div", { className: "shrink-0 pt-1", children: headerLeading }) : null,
|
|
120
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
121
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] font-bold uppercase tracking-[0.24em] text-p-ink-3", children: L.kicker }),
|
|
122
|
+
/* @__PURE__ */ jsx("h2", { className: "mt-2 font-display text-[34px] font-bold leading-[1.04] tracking-[-0.025em] text-p-ink", children: plan.name ?? "\u2014" })
|
|
123
|
+
] }),
|
|
124
|
+
headerTrailing || actionsSlot ? /* @__PURE__ */ jsxs("div", { className: "shrink-0 flex flex-col items-end gap-2", children: [
|
|
125
|
+
headerTrailing,
|
|
126
|
+
actionsSlot
|
|
127
|
+
] }) : null
|
|
128
|
+
] }),
|
|
129
|
+
briefSlot ? /* @__PURE__ */ jsx("div", { className: "max-w-[64ch] font-body text-[14.5px] leading-[1.65] text-p-ink-2", children: briefSlot }) : null,
|
|
130
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-x-4 gap-y-1.5 font-mono text-[10.5px] uppercase tracking-[0.22em]", children: [
|
|
131
|
+
/* @__PURE__ */ jsx(InventoryItem, { label: L.taskCountLabel(taskCount), accent: true }),
|
|
132
|
+
/* @__PURE__ */ jsx(Sep, {}),
|
|
133
|
+
/* @__PURE__ */ jsx(InventoryItem, { label: L.checkpointCountLabel(cpCount) }),
|
|
134
|
+
/* @__PURE__ */ jsx(Sep, {}),
|
|
135
|
+
/* @__PURE__ */ jsx(InventoryItem, { label: L.gateCountLabel(gateCount) }),
|
|
136
|
+
/* @__PURE__ */ jsx(Sep, {}),
|
|
137
|
+
/* @__PURE__ */ jsx(InventoryItem, { label: L.delayCountLabel(delayCount) })
|
|
138
|
+
] }),
|
|
139
|
+
hasRuntime ? /* @__PURE__ */ jsx(StatusCountsStrip, { counts, L, dense: true }) : null
|
|
140
|
+
]
|
|
141
|
+
}
|
|
106
142
|
);
|
|
107
143
|
}
|
|
108
144
|
function PlanDetailGraph({
|
|
@@ -124,31 +160,31 @@ function PlanDetailGraph({
|
|
|
124
160
|
() => ({ ...defaultPlanGraphLabels, ...graphLabels }),
|
|
125
161
|
[graphLabels]
|
|
126
162
|
);
|
|
127
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ jsx(
|
|
128
164
|
"div",
|
|
129
165
|
{
|
|
130
166
|
className: [fillHeight ? "min-h-0 flex-1" : "", className || ""].join(" ").trim(),
|
|
131
|
-
style: fillHeight ? void 0 : { height: graphHeight }
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
167
|
+
style: fillHeight ? void 0 : { height: graphHeight },
|
|
168
|
+
children: /* @__PURE__ */ jsx(
|
|
169
|
+
PlanGraph,
|
|
170
|
+
{
|
|
171
|
+
tasks: plan.tasks,
|
|
172
|
+
runtimeByTitle,
|
|
173
|
+
checkpoints: plan.checkpoints,
|
|
174
|
+
qualityGates: plan.qualityGates,
|
|
175
|
+
delays: plan.delays,
|
|
176
|
+
agents,
|
|
177
|
+
onOpenTask,
|
|
178
|
+
onOpenCheckpoint,
|
|
179
|
+
onOpenGate,
|
|
180
|
+
onOpenDelay,
|
|
181
|
+
selectedNodeId,
|
|
182
|
+
zoomToSelected,
|
|
183
|
+
labels: GL,
|
|
184
|
+
className: "h-full"
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
}
|
|
152
188
|
);
|
|
153
189
|
}
|
|
154
190
|
function PlanDetailBreakdown({
|
|
@@ -172,68 +208,86 @@ function PlanDetailBreakdown({
|
|
|
172
208
|
for (const a of agents ?? []) m.set(a.name, a);
|
|
173
209
|
return m;
|
|
174
210
|
}, [agents]);
|
|
175
|
-
return /* @__PURE__ */
|
|
211
|
+
return /* @__PURE__ */ jsxs(
|
|
176
212
|
"section",
|
|
177
213
|
{
|
|
178
214
|
className: [
|
|
179
215
|
"flex flex-col gap-2 border-t border-p-line px-5 py-4",
|
|
180
216
|
className || ""
|
|
181
|
-
].join(" ")
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
className: "group flex items-center gap-3 rounded-md border-none bg-transparent p-0 text-left cursor-pointer"
|
|
190
|
-
},
|
|
191
|
-
/* @__PURE__ */ React.createElement("span", { className: "grid size-5 shrink-0 place-items-center rounded text-p-ink-3 transition-colors group-hover:bg-p-warm group-hover:text-p-ink" }, open ? /* @__PURE__ */ React.createElement(ChevronDown, { className: "size-3.5" }) : /* @__PURE__ */ React.createElement(ChevronRight, { className: "size-3.5" })),
|
|
192
|
-
/* @__PURE__ */ React.createElement("span", { className: "font-mono text-[10px] font-bold uppercase tracking-[0.22em] text-p-ink-3 group-hover:text-p-ink" }, L.breakdown),
|
|
193
|
-
/* @__PURE__ */ React.createElement("span", { className: "font-mono text-[10px] tabular-nums text-p-ink-3" }, String(plan.tasks.length).padStart(2, "0")),
|
|
194
|
-
/* @__PURE__ */ React.createElement("span", { className: "h-px flex-1 bg-p-line" })
|
|
195
|
-
),
|
|
196
|
-
!isOpen ? null : plan.tasks.length === 0 ? /* @__PURE__ */ React.createElement("p", { className: "px-1 py-2 font-mono text-[11px] uppercase tracking-[0.16em] text-p-ink-3" }, L.noTasks) : /* @__PURE__ */ React.createElement("ol", { className: "flex flex-col divide-y divide-p-line/60" }, plan.tasks.map((tk, i) => {
|
|
197
|
-
const rt = runtimeByTitle?.get(tk.title);
|
|
198
|
-
const status = rt?.status ?? "draft";
|
|
199
|
-
const Icon = STATUS_ICON[status];
|
|
200
|
-
const tone = STATUS_TONE[status];
|
|
201
|
-
const agentName = rt?.agentName ?? tk.assignTo ?? void 0;
|
|
202
|
-
const agentRef = agentName ? agentByName.get(agentName) : void 0;
|
|
203
|
-
return /* @__PURE__ */ React.createElement(
|
|
204
|
-
"li",
|
|
205
|
-
{
|
|
206
|
-
key: tk.title,
|
|
207
|
-
className: [
|
|
208
|
-
"grid grid-cols-[24px_minmax(0,1fr)_auto_88px] items-center gap-3 py-2",
|
|
209
|
-
onOpenTask ? "cursor-pointer transition-colors hover:bg-p-warm/40" : ""
|
|
210
|
-
].join(" "),
|
|
211
|
-
onClick: onOpenTask ? () => onOpenTask({ title: tk.title }) : void 0
|
|
212
|
-
},
|
|
213
|
-
/* @__PURE__ */ React.createElement("span", { className: "font-mono text-[10px] font-bold uppercase tracking-[0.14em] text-p-ink-3 tabular-nums" }, String(i + 1).padStart(2, "0")),
|
|
214
|
-
/* @__PURE__ */ React.createElement("div", { className: "min-w-0 flex flex-col leading-tight" }, /* @__PURE__ */ React.createElement("span", { className: "truncate font-display text-[13.5px] font-bold text-p-ink" }, tk.title), tk.description ? /* @__PURE__ */ React.createElement("span", { className: "truncate font-body text-[11.5px] text-p-ink-3" }, tk.description) : null),
|
|
215
|
-
/* @__PURE__ */ React.createElement("span", { className: "inline-flex shrink-0 items-center gap-1.5 font-mono text-[10.5px] uppercase tracking-[0.14em] text-p-ink-2" }, agentRef ? /* @__PURE__ */ React.createElement(
|
|
216
|
-
"span",
|
|
217
|
+
].join(" "),
|
|
218
|
+
children: [
|
|
219
|
+
alwaysOpen ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
220
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] font-bold uppercase tracking-[0.22em] text-p-ink-3", children: L.breakdown }),
|
|
221
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] tabular-nums text-p-ink-3", children: String(plan.tasks.length).padStart(2, "0") }),
|
|
222
|
+
/* @__PURE__ */ jsx("span", { className: "h-px flex-1 bg-p-line" })
|
|
223
|
+
] }) : /* @__PURE__ */ jsxs(
|
|
224
|
+
"button",
|
|
217
225
|
{
|
|
218
|
-
"
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
226
|
+
type: "button",
|
|
227
|
+
onClick: () => setOpen((v) => !v),
|
|
228
|
+
"aria-expanded": open,
|
|
229
|
+
className: "group flex items-center gap-3 rounded-md border-none bg-transparent p-0 text-left cursor-pointer",
|
|
230
|
+
children: [
|
|
231
|
+
/* @__PURE__ */ jsx("span", { className: "grid size-5 shrink-0 place-items-center rounded text-p-ink-3 transition-colors group-hover:bg-p-warm group-hover:text-p-ink", children: open ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5" }) }),
|
|
232
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] font-bold uppercase tracking-[0.22em] text-p-ink-3 group-hover:text-p-ink", children: L.breakdown }),
|
|
233
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] tabular-nums text-p-ink-3", children: String(plan.tasks.length).padStart(2, "0") }),
|
|
234
|
+
/* @__PURE__ */ jsx("span", { className: "h-px flex-1 bg-p-line" })
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
),
|
|
238
|
+
!isOpen ? null : plan.tasks.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-1 py-2 font-mono text-[11px] uppercase tracking-[0.16em] text-p-ink-3", children: L.noTasks }) : /* @__PURE__ */ jsx("ol", { className: "flex flex-col divide-y divide-p-line/60", children: plan.tasks.map((tk, i) => {
|
|
239
|
+
const rt = runtimeByTitle?.get(tk.title);
|
|
240
|
+
const status = rt?.status ?? "draft";
|
|
241
|
+
const Icon = STATUS_ICON[status];
|
|
242
|
+
const tone = STATUS_TONE[status];
|
|
243
|
+
const agentName = rt?.agentName ?? tk.assignTo ?? void 0;
|
|
244
|
+
const agentRef = agentName ? agentByName.get(agentName) : void 0;
|
|
245
|
+
return /* @__PURE__ */ jsxs(
|
|
246
|
+
"li",
|
|
247
|
+
{
|
|
248
|
+
className: [
|
|
249
|
+
"grid grid-cols-[24px_minmax(0,1fr)_auto_88px] items-center gap-3 py-2",
|
|
250
|
+
onOpenTask ? "cursor-pointer transition-colors hover:bg-p-warm/40" : ""
|
|
251
|
+
].join(" "),
|
|
252
|
+
onClick: onOpenTask ? () => onOpenTask({ title: tk.title }) : void 0,
|
|
253
|
+
children: [
|
|
254
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] font-bold uppercase tracking-[0.14em] text-p-ink-3 tabular-nums", children: String(i + 1).padStart(2, "0") }),
|
|
255
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex flex-col leading-tight", children: [
|
|
256
|
+
/* @__PURE__ */ jsx("span", { className: "truncate font-display text-[13.5px] font-bold text-p-ink", children: tk.title }),
|
|
257
|
+
tk.description ? /* @__PURE__ */ jsx("span", { className: "truncate font-body text-[11.5px] text-p-ink-3", children: tk.description }) : null
|
|
258
|
+
] }),
|
|
259
|
+
/* @__PURE__ */ jsxs("span", { className: "inline-flex shrink-0 items-center gap-1.5 font-mono text-[10.5px] uppercase tracking-[0.14em] text-p-ink-2", children: [
|
|
260
|
+
agentRef ? /* @__PURE__ */ jsx(
|
|
261
|
+
"span",
|
|
262
|
+
{
|
|
263
|
+
"aria-hidden": true,
|
|
264
|
+
className: "grid size-4 shrink-0 place-items-center rounded font-display text-[9px] font-bold text-white",
|
|
265
|
+
style: { background: agentRef.color || "#999" },
|
|
266
|
+
children: agentRef.glyph || (agentRef.displayName ?? agentRef.name).charAt(0).toUpperCase()
|
|
267
|
+
}
|
|
268
|
+
) : null,
|
|
269
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: agentName ?? "\u2014" })
|
|
270
|
+
] }),
|
|
271
|
+
/* @__PURE__ */ jsxs(
|
|
272
|
+
"span",
|
|
273
|
+
{
|
|
274
|
+
className: [
|
|
275
|
+
"inline-flex shrink-0 items-center justify-end gap-1.5 font-mono text-[10.5px] font-bold uppercase tracking-[0.14em]",
|
|
276
|
+
tone
|
|
277
|
+
].join(" "),
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ jsx(Icon, { className: "size-3" }),
|
|
280
|
+
L.status[status]
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
)
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
tk.title
|
|
287
|
+
);
|
|
288
|
+
}) })
|
|
289
|
+
]
|
|
290
|
+
}
|
|
237
291
|
);
|
|
238
292
|
}
|
|
239
293
|
function PlanDetail({
|
|
@@ -251,47 +305,49 @@ function PlanDetail({
|
|
|
251
305
|
graphLabels,
|
|
252
306
|
className
|
|
253
307
|
}) {
|
|
254
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ jsxs(
|
|
255
309
|
"article",
|
|
256
310
|
{
|
|
257
311
|
className: [
|
|
258
312
|
"flex flex-col overflow-hidden rounded-2xl border border-p-line bg-p-surface",
|
|
259
313
|
className || ""
|
|
260
|
-
].join(" ")
|
|
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
|
-
|
|
314
|
+
].join(" "),
|
|
315
|
+
children: [
|
|
316
|
+
/* @__PURE__ */ jsx(
|
|
317
|
+
PlanDetailHeader,
|
|
318
|
+
{
|
|
319
|
+
plan,
|
|
320
|
+
runtimeByTitle,
|
|
321
|
+
briefSlot,
|
|
322
|
+
actionsSlot,
|
|
323
|
+
headerTrailing,
|
|
324
|
+
labels
|
|
325
|
+
}
|
|
326
|
+
),
|
|
327
|
+
/* @__PURE__ */ jsx(
|
|
328
|
+
PlanDetailGraph,
|
|
329
|
+
{
|
|
330
|
+
plan,
|
|
331
|
+
runtimeByTitle,
|
|
332
|
+
agents,
|
|
333
|
+
graphHeight,
|
|
334
|
+
onOpenTask,
|
|
335
|
+
graphLabels
|
|
336
|
+
}
|
|
337
|
+
),
|
|
338
|
+
!hideBreakdown ? /* @__PURE__ */ jsx(
|
|
339
|
+
PlanDetailBreakdown,
|
|
340
|
+
{
|
|
341
|
+
plan,
|
|
342
|
+
runtimeByTitle,
|
|
343
|
+
agents,
|
|
344
|
+
defaultOpen: defaultBreakdownOpen,
|
|
345
|
+
onOpenTask,
|
|
346
|
+
labels
|
|
347
|
+
}
|
|
348
|
+
) : null
|
|
349
|
+
]
|
|
350
|
+
}
|
|
295
351
|
);
|
|
296
352
|
}
|
|
297
353
|
function statusCounts(plan, runtimeByTitle) {
|
|
@@ -324,57 +380,59 @@ function StatusCountsStrip({
|
|
|
324
380
|
];
|
|
325
381
|
const visible = order.filter((s) => counts[s] > 0);
|
|
326
382
|
if (visible.length === 0) return null;
|
|
327
|
-
return /* @__PURE__ */
|
|
383
|
+
return /* @__PURE__ */ jsx(
|
|
328
384
|
"div",
|
|
329
385
|
{
|
|
330
386
|
className: [
|
|
331
387
|
"flex flex-wrap items-center gap-3 font-mono text-[10.5px] uppercase tracking-[0.16em] text-p-ink-3",
|
|
332
388
|
dense ? "" : "border-t border-p-line px-5 py-2.5"
|
|
333
|
-
].join(" ")
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
389
|
+
].join(" "),
|
|
390
|
+
children: visible.map((s) => {
|
|
391
|
+
const Icon = STATUS_ICON[s];
|
|
392
|
+
return /* @__PURE__ */ jsxs(
|
|
393
|
+
"span",
|
|
394
|
+
{
|
|
395
|
+
className: ["inline-flex items-center gap-1.5", STATUS_TONE[s]].join(
|
|
396
|
+
" "
|
|
397
|
+
),
|
|
398
|
+
children: [
|
|
399
|
+
/* @__PURE__ */ jsx(Icon, { className: "size-3" }),
|
|
400
|
+
/* @__PURE__ */ jsx("span", { className: "font-display text-[14px] font-bold tabular-nums leading-none text-p-ink", children: counts[s] }),
|
|
401
|
+
/* @__PURE__ */ jsx("span", { children: L.status[s] })
|
|
402
|
+
]
|
|
403
|
+
},
|
|
404
|
+
s
|
|
405
|
+
);
|
|
406
|
+
})
|
|
407
|
+
}
|
|
350
408
|
);
|
|
351
409
|
}
|
|
352
410
|
function MetaCell({ label, accent }) {
|
|
353
|
-
return /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ jsx("div", { className: "bg-p-surface px-4 py-2.5", children: /* @__PURE__ */ jsx(
|
|
354
412
|
"span",
|
|
355
413
|
{
|
|
356
414
|
className: [
|
|
357
415
|
"block font-mono text-[10px] font-bold uppercase tracking-[0.18em]",
|
|
358
416
|
accent ? "text-p-accent" : "text-p-ink-3"
|
|
359
|
-
].join(" ")
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
));
|
|
417
|
+
].join(" "),
|
|
418
|
+
children: label
|
|
419
|
+
}
|
|
420
|
+
) });
|
|
363
421
|
}
|
|
364
422
|
function InventoryItem({ label, accent }) {
|
|
365
|
-
return /* @__PURE__ */
|
|
423
|
+
return /* @__PURE__ */ jsx(
|
|
366
424
|
"span",
|
|
367
425
|
{
|
|
368
426
|
className: [
|
|
369
427
|
"font-bold",
|
|
370
428
|
accent ? "text-p-accent" : "text-p-ink-2"
|
|
371
|
-
].join(" ")
|
|
372
|
-
|
|
373
|
-
|
|
429
|
+
].join(" "),
|
|
430
|
+
children: label
|
|
431
|
+
}
|
|
374
432
|
);
|
|
375
433
|
}
|
|
376
434
|
function Sep() {
|
|
377
|
-
return /* @__PURE__ */
|
|
435
|
+
return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-p-line", children: "\xB7" });
|
|
378
436
|
}
|
|
379
437
|
export {
|
|
380
438
|
PlanDetail,
|
package/dist/plan-graph.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { PlanTask, PlanTaskRuntime, PlanCheckpoint, PlanQualityGate, PlanDelay, PlanGraphLabels } from './plan-types.js';
|
|
3
3
|
import { SwarmAgentRef } from './types.js';
|
|
4
4
|
|
|
@@ -34,6 +34,6 @@ interface PlanGraphProps {
|
|
|
34
34
|
labels?: Partial<PlanGraphLabels>;
|
|
35
35
|
className?: string;
|
|
36
36
|
}
|
|
37
|
-
declare function PlanGraph(props: PlanGraphProps):
|
|
37
|
+
declare function PlanGraph(props: PlanGraphProps): react_jsx_runtime.JSX.Element;
|
|
38
38
|
|
|
39
39
|
export { PlanGraph, type PlanGraphProps, type PlanGraphTaskRef };
|