@mstar-harness/dsh 3.8.0 → 3.8.2

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 (51) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +142 -194
  3. package/README.zh.md +29 -17
  4. package/bundle/README.md +83 -171
  5. package/dist/client/index.d.ts +17 -8
  6. package/dist/client/panel/MstarPanelTitle.d.ts +13 -0
  7. package/dist/client/panel/PanelView.d.ts +56 -52
  8. package/dist/client/panel/TabNav.d.ts +17 -14
  9. package/dist/client/panel/definition.d.ts +23 -0
  10. package/dist/client/panel/engine-status-client.d.ts +84 -6
  11. package/dist/client/panel/graph/project-graph.d.ts +35 -64
  12. package/dist/client/panel/graph/schema.d.ts +1 -2
  13. package/dist/client/panel/guards.d.ts +41 -1
  14. package/dist/client/panel/locale.d.ts +1 -1
  15. package/dist/client/panel/mstar-glyph.d.ts +22 -0
  16. package/dist/client/panel/pages/AgentListPage.d.ts +71 -0
  17. package/dist/client/panel/pages/EventLogPage.d.ts +7 -4
  18. package/dist/client/panel/pages/IterationInfoSection.d.ts +16 -13
  19. package/dist/client/panel/pages/IterationTaskPage.d.ts +13 -14
  20. package/dist/client/panel/panel-store.d.ts +28 -0
  21. package/dist/client/panel/sidebar.d.ts +13 -7
  22. package/dist/client/panel/state-section.d.ts +25 -3
  23. package/dist/client/panel/use-mstar-engine-status.d.ts +39 -14
  24. package/dist/client/panel/zones/Legend.d.ts +5 -3
  25. package/dist/client/panel/zones/TaskBoard.d.ts +13 -9
  26. package/dist/client.js +1038 -1242
  27. package/dist/engine-status-endpoint.d.ts +85 -8
  28. package/dist/engine-status-store.d.ts +91 -1
  29. package/dist/engine-status-wire.d.ts +9 -0
  30. package/dist/gates/_shared.d.ts +61 -9
  31. package/dist/gates/adapter.d.ts +32 -2
  32. package/dist/gates/agent-flow.d.ts +312 -60
  33. package/dist/gates/catalog.d.ts +59 -38
  34. package/dist/gates/dispatch.d.ts +11 -2
  35. package/dist/gates/goal-bridge.d.ts +10 -130
  36. package/dist/gates/plan-mode-bridge.d.ts +20 -11
  37. package/dist/gates/role-persona.d.ts +16 -0
  38. package/dist/gates/steering.d.ts +41 -0
  39. package/dist/gates/workflow-ledger.d.ts +31 -4
  40. package/dist/gates/workflow-selection.d.ts +41 -20
  41. package/dist/index.js +1208 -394
  42. package/dist/types.d.ts +50 -18
  43. package/harness-commands/amazing-pr-review.md +2 -0
  44. package/harness-commands/codebase-audit.md +2 -0
  45. package/harness-skills/mstar-host/SKILL.md +3 -1
  46. package/harness-skills/mstar-host/references/dsh-workflow-scripts.md +424 -0
  47. package/harness-skills/mstar-host/references/dsh.md +259 -266
  48. package/harness-skills/mstar-roles/references/project-manager.md +2 -0
  49. package/harness-skills/mstar-sdd/SKILL.md +2 -0
  50. package/package.json +66 -64
  51. package/dist/client/panel/pages/AgentCanvasPage.d.ts +0 -345
package/dist/client.js CHANGED
@@ -72,9 +72,47 @@ __export(exports_client, {
72
72
  });
73
73
  module.exports = __toCommonJS(exports_client);
74
74
 
75
+ // src/client/panel/mstar-glyph.tsx
76
+ var jsx_runtime = require("react/jsx-runtime");
77
+ function MstarGlyph({ size = 16, className }) {
78
+ return /* @__PURE__ */ jsx_runtime.jsx("svg", {
79
+ className,
80
+ width: size,
81
+ height: size,
82
+ viewBox: "0 0 512 512",
83
+ "aria-hidden": "true",
84
+ children: /* @__PURE__ */ jsx_runtime.jsx("path", {
85
+ fill: "currentColor",
86
+ d: "M256 72l36 140 140 36-140 36-36 156-36-156-140-36 140-36 36-140z"
87
+ })
88
+ });
89
+ }
90
+
91
+ // src/client/panel/definition.ts
92
+ var MSTAR_PANEL_ID = "@mstar-harness/dsh";
93
+ var MSTAR_PANEL_KIND = "mstar-workflow";
94
+ var MSTAR_GUIDE_ORDER = 20;
95
+ function mstarPanelDefinition(t) {
96
+ const title = () => t("view.mstar-workflow");
97
+ return {
98
+ id: MSTAR_PANEL_ID,
99
+ kind: MSTAR_PANEL_KIND,
100
+ title,
101
+ guide: [{
102
+ order: MSTAR_GUIDE_ORDER,
103
+ title,
104
+ description: () => t("guide.description"),
105
+ icon: MstarGlyph
106
+ }]
107
+ };
108
+ }
109
+
75
110
  // src/engine-status-wire.ts
76
111
  var ENGINE_STATUS_CHANNEL = "/api";
77
112
  var ENGINE_STATUS_ENDPOINT = "mstar/engineStatus";
113
+ var MSTAR_ENGINE_STATUS_NAMESPACE = "mstar";
114
+ var MSTAR_SELECT_WORKFLOW_METHOD = "selectWorkflow";
115
+ var SELECT_WORKFLOW_ENDPOINT = `${MSTAR_ENGINE_STATUS_NAMESPACE}/${MSTAR_SELECT_WORKFLOW_METHOD}`;
78
116
 
79
117
  // src/client/panel/guards.ts
80
118
  function str(value) {
@@ -92,6 +130,36 @@ function record(value) {
92
130
  function unavailable(reason) {
93
131
  return { status: "unavailable", reason };
94
132
  }
133
+ function selectionView(value) {
134
+ const view = record(value);
135
+ if (view === null)
136
+ return null;
137
+ const workflowId = str(view.workflowId);
138
+ const dir = str(view.dir);
139
+ if (view.kind === "active" || view.kind === "terminal") {
140
+ if (workflowId === null || dir === null)
141
+ return null;
142
+ if (view.kind === "terminal")
143
+ return { kind: "terminal", workflowId, dir };
144
+ const warning = record(view.warning);
145
+ const code2 = warning === null ? null : str(warning.code);
146
+ const message2 = warning === null ? null : str(warning.message);
147
+ return {
148
+ kind: "active",
149
+ workflowId,
150
+ dir,
151
+ ...code2 === null || message2 === null ? {} : { warning: { code: code2, message: message2 } }
152
+ };
153
+ }
154
+ if (view.kind !== "error")
155
+ return null;
156
+ const code = str(view.code);
157
+ const message = str(view.message);
158
+ if (code === null || message === null)
159
+ return null;
160
+ const ids = Array.isArray(view.activeWorkflowIds) ? view.activeWorkflowIds.filter((id) => str(id) !== null) : undefined;
161
+ return { kind: "error", code, message, ...ids === undefined ? {} : { activeWorkflowIds: ids } };
162
+ }
95
163
  function parseEngineStatusResult(raw, sessionId, cwd) {
96
164
  const envelope = record(raw);
97
165
  if (envelope === null)
@@ -121,13 +189,45 @@ function parseEngineStatusResult(raw, sessionId, cwd) {
121
189
  const payload = record(value.payload);
122
190
  if (payload === null)
123
191
  return unavailable("malformed-payload");
124
- return { status: "ok", payload, at, turn };
192
+ const binding = record(value.binding);
193
+ return {
194
+ status: "ok",
195
+ payload,
196
+ at,
197
+ turn,
198
+ binding: binding === null ? null : selectionView(binding.selection)
199
+ };
200
+ }
201
+ function parseSelectWorkflowResult(raw, sessionId, workflowId) {
202
+ const envelope = record(raw);
203
+ if (envelope === null)
204
+ return { status: "unavailable", reason: "malformed-response" };
205
+ if (envelope.ok !== true) {
206
+ const error = record(envelope.error);
207
+ const code = str(error?.code);
208
+ return { status: "unavailable", reason: code === null ? "transport-error" : `transport-error:${code}` };
209
+ }
210
+ const value = record(envelope.value);
211
+ if (value === null)
212
+ return { status: "unavailable", reason: "malformed-response" };
213
+ if (value.status === "unavailable") {
214
+ return { status: "unavailable", reason: str(value.reason) ?? "unavailable" };
215
+ }
216
+ if (value.status !== "selected")
217
+ return { status: "unavailable", reason: "malformed-response" };
218
+ const acknowledgedSession = str(value.sessionId);
219
+ const acknowledgedWorkflow = str(value.workflowId);
220
+ if (acknowledgedSession !== sessionId)
221
+ return { status: "unavailable", reason: "session-mismatch" };
222
+ if (acknowledgedWorkflow !== workflowId)
223
+ return { status: "unavailable", reason: "workflow-mismatch" };
224
+ return { status: "selected", sessionId, workflowId };
125
225
  }
126
226
 
127
227
  // src/client/panel/engine-status-client.ts
128
228
  var ENGINE_STATUS_REQUEST_TIMEOUT_MS = 5000;
129
229
  var ENGINE_STATUS_REFRESH_INTERVAL_MS = 30000;
130
- var EMPTY = { entries: new Map };
230
+ var EMPTY = { entries: new Map, selections: new Map };
131
231
 
132
232
  class MstarEngineStatusClient {
133
233
  connection;
@@ -141,6 +241,8 @@ class MstarEngineStatusClient {
141
241
  refreshTimer = null;
142
242
  generationDisposer = null;
143
243
  generation = 0;
244
+ sessionGenerations = new Map;
245
+ stale = new Set;
144
246
  disposed = false;
145
247
  constructor(connection, options = {}) {
146
248
  this.connection = connection;
@@ -165,8 +267,10 @@ class MstarEngineStatusClient {
165
267
  ensure(sessionId, cwd, anchorTime) {
166
268
  if (this.disposed)
167
269
  return;
168
- if (this.snapshot.entries.get(sessionId)?.anchorTime === anchorTime)
169
- return;
270
+ if (this.snapshot.entries.get(sessionId)?.anchorTime === anchorTime) {
271
+ if (!this.stale.delete(sessionId))
272
+ return;
273
+ }
170
274
  const key = `${sessionId}\x00${anchorTime}`;
171
275
  if (this.inFlight.has(key))
172
276
  return;
@@ -182,9 +286,56 @@ class MstarEngineStatusClient {
182
286
  this.inFlight.clear();
183
287
  if (this.snapshot.entries.size === 0)
184
288
  return;
185
- this.snapshot = EMPTY;
289
+ this.snapshot = { ...this.snapshot, entries: new Map };
290
+ this.notify();
291
+ }
292
+ invalidateSession(sessionId) {
293
+ if (this.disposed)
294
+ return;
295
+ this.sessionGenerations.set(sessionId, this.sessionGen(sessionId) + 1);
296
+ const prefix = `${sessionId}\x00`;
297
+ for (const key of [...this.inFlight.keys()]) {
298
+ if (key.startsWith(prefix))
299
+ this.inFlight.delete(key);
300
+ }
301
+ this.stale.add(sessionId);
302
+ }
303
+ async selectWorkflow(sessionId, cwd, workflowId) {
304
+ if (this.disposed)
305
+ return { status: "unavailable", reason: "disposed" };
306
+ if (this.snapshot.selections.get(sessionId)?.state === "pending") {
307
+ return { status: "unavailable", reason: "selection-pending" };
308
+ }
309
+ this.setSelection(sessionId, { state: "pending" });
310
+ const answer = await this.callSelect(sessionId, cwd, workflowId);
311
+ if (answer.status === "selected") {
312
+ this.invalidateSession(sessionId);
313
+ this.setSelection(sessionId, { state: "selected", workflowId: answer.workflowId });
314
+ } else {
315
+ this.setSelection(sessionId, { state: "failed", reason: answer.reason });
316
+ }
317
+ return answer;
318
+ }
319
+ async callSelect(sessionId, cwd, workflowId) {
320
+ if (this.connection === null || this.connection === undefined || typeof this.connection.rpc?.call !== "function") {
321
+ return { status: "unavailable", reason: "no-connection" };
322
+ }
323
+ try {
324
+ const raw = await this.withDeadline((signal) => this.connection.rpc.call(ENGINE_STATUS_CHANNEL, SELECT_WORKFLOW_ENDPOINT, { args: { sessionId, cwd, workflowId } }, signal));
325
+ return parseSelectWorkflowResult(raw, sessionId, workflowId);
326
+ } catch (error) {
327
+ return { status: "unavailable", reason: `transport-error:${error?.message ?? "unknown"}` };
328
+ }
329
+ }
330
+ setSelection(sessionId, state) {
331
+ const selections = new Map(this.snapshot.selections);
332
+ selections.set(sessionId, state);
333
+ this.snapshot = { ...this.snapshot, selections };
186
334
  this.notify();
187
335
  }
336
+ sessionGen(sessionId) {
337
+ return this.sessionGenerations.get(sessionId) ?? 0;
338
+ }
188
339
  dispose() {
189
340
  this.disposed = true;
190
341
  this.generationDisposer?.();
@@ -228,6 +379,7 @@ class MstarEngineStatusClient {
228
379
  }
229
380
  async fetch(sessionId, cwd, anchorTime) {
230
381
  const generation = this.generation;
382
+ const sessionGeneration = this.sessionGen(sessionId);
231
383
  let answer;
232
384
  if (this.connection === null || this.connection === undefined || typeof this.connection.rpc?.call !== "function") {
233
385
  answer = { status: "unavailable", reason: "no-connection" };
@@ -239,7 +391,7 @@ class MstarEngineStatusClient {
239
391
  answer = { status: "unavailable", reason: `transport-error:${error?.message ?? "unknown"}` };
240
392
  }
241
393
  }
242
- this.write(generation, sessionId, cwd, anchorTime, answer);
394
+ this.write(generation, sessionGeneration, sessionId, cwd, anchorTime, answer);
243
395
  }
244
396
  async withDeadline(call) {
245
397
  if (this.timeoutMs <= 0 || typeof setTimeout !== "function")
@@ -264,19 +416,22 @@ class MstarEngineStatusClient {
264
416
  this.abort.signal.removeEventListener("abort", relay);
265
417
  }
266
418
  }
267
- write(generation, sessionId, cwd, anchorTime, fetch) {
419
+ write(generation, sessionGeneration, sessionId, cwd, anchorTime, fetch) {
268
420
  if (this.disposed)
269
421
  return;
270
422
  if (generation !== this.generation)
271
423
  return;
424
+ if (sessionGeneration !== this.sessionGen(sessionId))
425
+ return;
272
426
  if ((this.snapshot.entries.get(sessionId)?.anchorTime ?? anchorTime) > anchorTime)
273
427
  return;
274
428
  this.writeEntry(sessionId, { anchorTime, cwd, fetchedAt: Date.now(), fetch });
275
429
  }
276
430
  writeEntry(sessionId, entry) {
431
+ this.stale.delete(sessionId);
277
432
  const entries = new Map(this.snapshot.entries);
278
433
  entries.set(sessionId, entry);
279
- this.snapshot = { entries };
434
+ this.snapshot = { ...this.snapshot, entries };
280
435
  this.notify();
281
436
  }
282
437
  notify() {
@@ -288,10 +443,28 @@ class MstarEngineStatusClient {
288
443
  }
289
444
  }
290
445
 
446
+ // src/client/panel/MstarPanelTitle.tsx
447
+ var jsx_runtime2 = require("react/jsx-runtime");
448
+ function MstarPanelTitle({ useTabInfo }) {
449
+ const { tab } = useTabInfo();
450
+ return /* @__PURE__ */ jsx_runtime2.jsxs("span", {
451
+ style: { display: "inline-flex", alignItems: "center", gap: "var(--mstar-space-1, 4px)" },
452
+ children: [
453
+ /* @__PURE__ */ jsx_runtime2.jsx(MstarGlyph, {
454
+ size: 14
455
+ }),
456
+ /* @__PURE__ */ jsx_runtime2.jsx("span", {
457
+ children: tab.title
458
+ })
459
+ ]
460
+ });
461
+ }
462
+
291
463
  // src/client/panel/locale.ts
292
464
  var NS = "mstar-panel";
293
465
  var zh = {
294
- "view.mstar-workflow": "MStar 工作流",
466
+ "view.mstar-workflow": "启明星工作流",
467
+ "guide.description": "查看工作区状态、计划与迭代进度",
295
468
  "tab.tasks": "任务迭代",
296
469
  "tab.agents": "代理执行",
297
470
  "tab.events": "事件记录",
@@ -315,6 +488,7 @@ var zh = {
315
488
  "event-log.field.expected": "预期角色",
316
489
  "event-log.field.settled": "已结算",
317
490
  "event-log.field.duration": "耗时",
491
+ "event-log.field.child-id": "子会话 ID",
318
492
  "event-log.field.run-id": "运行 ID",
319
493
  "event-log.field.name": "运行名称",
320
494
  "event-log.field.members": "成员数",
@@ -384,6 +558,7 @@ var zh = {
384
558
  "zone.agents.group.plan-more": "+{n} 更多",
385
559
  "flow.empty": "暂无实际派发(记录自 agent-flow plan 合并起生效)",
386
560
  "flow.settle-only": "仅有结算记录(无派发证据)",
561
+ "flow.link-only": "仅有身份记录(无派发证据)",
387
562
  "flow.degraded": "agentFlow 证据缺失",
388
563
  "flow.unexpected": "未匹配角色",
389
564
  "flow.in-flight": "已派发",
@@ -394,6 +569,10 @@ var zh = {
394
569
  "state.title": "工作区状态",
395
570
  "state.selection": "所选工作流",
396
571
  "state.selection.history": "历史视图(终端快照)",
572
+ "state.selection.unbound": "存在多个活动工作流——请为本会话选择一个。本会话没有租约,也不在任何工作流工作区内。选择之前写入会暂停。其他会话保持各自的绑定。",
573
+ "state.selection.pick": "选择 {workflowId}",
574
+ "state.selection.pending": "正在提交选择…",
575
+ "state.selection.failed": "选择失败:{reason}",
397
576
  "state.plans": "计划",
398
577
  "state.residuals": "未决残留",
399
578
  "state.policy": "策略",
@@ -414,7 +593,8 @@ var zh = {
414
593
  "freshness.refresh-note": "该会话已存储的快照——不是实时值"
415
594
  };
416
595
  var en = {
417
- "view.mstar-workflow": "MStar Workflow",
596
+ "view.mstar-workflow": "Morning Star Workflow",
597
+ "guide.description": "Workspace state, plans, and iteration progress",
418
598
  "tab.tasks": "Task Iteration",
419
599
  "tab.agents": "Agent Run",
420
600
  "tab.events": "Event Log",
@@ -438,6 +618,7 @@ var en = {
438
618
  "event-log.field.expected": "Expected role",
439
619
  "event-log.field.settled": "Settled",
440
620
  "event-log.field.duration": "Duration",
621
+ "event-log.field.child-id": "Child session ID",
441
622
  "event-log.field.run-id": "Run ID",
442
623
  "event-log.field.name": "Run name",
443
624
  "event-log.field.members": "Members",
@@ -507,6 +688,7 @@ var en = {
507
688
  "zone.agents.group.plan-more": "+{n} more",
508
689
  "flow.empty": "No actual dispatches yet (recording starts at agent-flow plan merge)",
509
690
  "flow.settle-only": "Settle records only (no dispatch evidence)",
691
+ "flow.link-only": "Identity records only (no dispatch evidence)",
510
692
  "flow.degraded": "No agent-flow evidence (ledger missing)",
511
693
  "flow.unexpected": "Unexpected roles",
512
694
  "flow.in-flight": "dispatched",
@@ -517,6 +699,10 @@ var en = {
517
699
  "state.title": "Workspace state",
518
700
  "state.selection": "Selected workflow",
519
701
  "state.selection.history": "history view (terminal snapshot)",
702
+ "state.selection.unbound": "Multiple active workflows — pick one for this session. This session has no lease and is not inside a workflow worktree. Writes pause until you pick. Other sessions stay on their own binding.",
703
+ "state.selection.pick": "Select {workflowId}",
704
+ "state.selection.pending": "Committing your pick…",
705
+ "state.selection.failed": "Pick failed: {reason}",
520
706
  "state.plans": "Plans",
521
707
  "state.residuals": "Open residuals",
522
708
  "state.policy": "Policy",
@@ -537,8 +723,21 @@ var en = {
537
723
  "freshness.refresh-note": "the stored snapshot for this session — never a live value"
538
724
  };
539
725
 
726
+ // src/client/panel/panel-store.ts
727
+ var import_dsh_client_store = require("@deepseek-ai/dsh-client-store");
728
+ function createPanelStore() {
729
+ return import_dsh_client_store.defineStore({
730
+ init: () => ({ byTab: {} }),
731
+ actions: {
732
+ select(d, tabId, section) {
733
+ d.byTab[tabId] = section;
734
+ }
735
+ }
736
+ });
737
+ }
738
+
540
739
  // src/client/panel/PanelView.tsx
541
- var import_react4 = require("react");
740
+ var React2 = __toESM(require("react"));
542
741
 
543
742
  // src/client/panel/panel.module.css
544
743
  var css = `
@@ -553,37 +752,74 @@ var css = `
553
752
  }
554
753
 
555
754
 
556
- .\\32 0fd0e45_root {
755
+ .\\32 0fd0e45_root,
756
+ .f83e09fa_emptyRoot {
557
757
  --mstar-space-1: 4px;
558
758
  --mstar-space-2: 8px;
559
759
  --mstar-space-3: 12px;
560
760
  --mstar-space-4: 16px;
561
761
  --mstar-space-5: 24px;
562
762
  --mstar-space-6: 32px;
563
- display: grid;
564
- grid-template-columns: minmax(0, 1fr) 300px;
565
- grid-template-rows: minmax(0, 1fr);
566
- grid-template-areas: 'main sidebar';
763
+ }
764
+
765
+ .\\32 0fd0e45_root {
766
+ display: flex;
767
+ flex-direction: column;
567
768
  height: 100%;
568
769
  min-height: 0;
569
770
  width: 100%;
570
- padding: 0;
571
-
572
- padding-bottom: calc(var(--dsh-composer-height, 152px) + var(--mstar-space-3));
573
771
  overflow: hidden;
772
+ container-type: inline-size;
574
773
  }
575
774
 
576
775
 
577
- .\\32 0fd0e45_root[data-mstar-panel='no-harness'] {
578
- grid-template-columns: 1fr;
579
- grid-template-areas: 'main';
776
+
777
+ .\\31 843711c_groupGrid {
778
+ display: grid;
779
+ grid-template-columns: minmax(0, 1fr);
780
+ gap: var(--mstar-space-4);
580
781
  }
581
782
 
582
783
 
583
- .\\35 8245a20_noHarnessCard {
584
- flex: 1;
784
+
785
+ @container (max-width: 480px) {
786
+ .dd4ec22c_scroll {
787
+ padding: var(--mstar-space-3);
788
+ }
789
+
790
+ .\\38 1fe4f58_meta {
791
+ padding: var(--mstar-space-3);
792
+ }
793
+
794
+ .\\31 843711c_groupGrid {
795
+ gap: var(--mstar-space-3);
796
+ }
797
+ }
798
+
799
+
800
+
801
+ @container (min-width: 720px) {
802
+ .\\31 843711c_groupGrid {
803
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
804
+ }
805
+ }
806
+
807
+
808
+ .f83e09fa_emptyRoot {
809
+ display: flex;
810
+ align-items: center;
811
+ justify-content: center;
812
+ height: 100%;
585
813
  min-height: 0;
586
814
  width: 100%;
815
+ padding: var(--mstar-space-4);
816
+ overflow: hidden;
817
+ }
818
+
819
+
820
+ .\\35 8245a20_noHarnessCard {
821
+ flex: 1 0 auto;
822
+ width: 100%;
587
823
  max-width: 400px;
588
824
  align-self: center;
589
825
  display: flex;
@@ -618,50 +854,16 @@ var css = `
618
854
  font: var(--dsw-font-xxxs-11);
619
855
  }
620
856
 
621
- @media (max-width: 860px) {
622
- .\\32 0fd0e45_root {
623
- grid-template-columns: 1fr;
624
- grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
625
- grid-template-areas:
626
- 'main'
627
- 'sidebar';
628
- }
629
- .c87acfc7_sidebar {
630
- border-left: 0;
631
- border-top: 1px solid var(--dsw-alias-border-l1);
632
- }
633
-
634
- .\\37 7aea5a6_iterationHeadSplit {
635
- flex-direction: column;
636
- }
637
- .\\37 7aea5a6_iterationHeadSplit > .c3b8dcb0_iterationBranches {
638
- flex: 0 1 auto;
639
- max-width: none;
640
- }
641
- }
642
857
 
643
858
 
644
- .f83e09fa_emptyRoot {
645
- display: flex;
646
- align-items: center;
647
- justify-content: center;
648
- height: 100%;
859
+ .dd4ec22c_scroll {
860
+ flex: 1 1 auto;
649
861
  min-height: 0;
650
- width: 100%;
651
- padding: var(--mstar-space-4);
652
- overflow: hidden;
653
- }
654
-
655
-
656
-
657
- .ea90e208_main {
658
- grid-area: main;
659
862
  display: flex;
660
863
  flex-direction: column;
661
- min-width: 0;
662
- min-height: 0;
663
864
  padding: var(--mstar-space-4);
664
- overflow: hidden;
865
+ overflow-y: auto;
866
+ overflow-x: hidden;
665
867
  }
666
868
 
667
869
 
@@ -670,7 +872,7 @@ var css = `
670
872
  display: flex;
671
873
  flex: none;
672
874
  gap: var(--mstar-space-1);
673
- padding: 0;
875
+ padding: var(--mstar-space-1) var(--mstar-space-2);
674
876
  margin: 0 0 var(--mstar-space-2);
675
877
  border-bottom: 1px solid var(--dsw-alias-border-l1);
676
878
  }
@@ -680,7 +882,7 @@ var css = `
680
882
  appearance: none;
681
883
  border: 0;
682
884
  background: none;
683
- padding: var(--mstar-space-2) var(--mstar-space-3);
885
+ padding: var(--mstar-space-1) var(--mstar-space-2);
684
886
  color: var(--dsw-alias-label-secondary);
685
887
  font: var(--dsw-font-xxs-12);
686
888
  cursor: pointer;
@@ -698,19 +900,10 @@ var css = `
698
900
  }
699
901
 
700
902
 
701
- .\\39 0bec3c2_content {
702
- flex: 1;
703
- min-height: 0;
704
- display: flex;
705
- flex-direction: column;
706
- overflow: hidden;
707
- }
708
-
709
903
 
710
904
 
711
905
  .\\33 b1c4147_iterationPage {
712
- flex: 1;
713
- min-height: 0;
906
+ flex: 1 0 auto;
714
907
  display: flex;
715
908
  flex-direction: column;
716
909
  gap: var(--mstar-space-3);
@@ -820,49 +1013,39 @@ var css = `
820
1013
 
821
1014
  .\\37 7aea5a6_iterationHeadSplit {
822
1015
  display: flex;
823
- align-items: stretch;
824
- gap: var(--mstar-space-4);
1016
+ flex-direction: column;
1017
+ gap: var(--mstar-space-3);
825
1018
  min-width: 0;
826
1019
  }
827
1020
 
828
- @media (min-width: 861px) {
829
-
830
- .\\37 7aea5a6_iterationHeadSplit > .c3b8dcb0_iterationBranches {
831
- flex: 0 1 260px;
832
- max-width: 280px;
833
- min-width: 0;
834
- }
1021
+ .\\37 7aea5a6_iterationHeadSplit > .c3b8dcb0_iterationBranches {
1022
+ min-width: 0;
835
1023
  }
836
1024
 
837
1025
  .\\37 7aea5a6_iterationHeadSplit > .c52f7b85_iterationStepsRow {
838
- flex: 1 1 0;
839
1026
  min-width: 0;
840
1027
  }
841
1028
 
842
1029
 
843
1030
  .c52f7b85_iterationStepsRow {
844
1031
  display: flex;
1032
+ flex-direction: column;
845
1033
  align-items: stretch;
846
- gap: var(--mstar-space-3);
1034
+ gap: var(--mstar-space-2);
847
1035
  margin: 0;
848
1036
  padding: 0;
849
1037
  list-style: none;
850
- overflow-x: auto;
851
- overscroll-behavior: contain;
852
1038
  }
853
1039
 
854
1040
  .\\38 1013a9d_iterationStepItem {
855
- flex: 1 1 0;
856
1041
  min-width: 0;
857
1042
  display: flex;
858
- flex-direction: column;
859
1043
  align-items: center;
860
- justify-content: center;
861
- gap: var(--mstar-space-1);
862
- text-align: center;
1044
+ gap: var(--mstar-space-2);
863
1045
  }
864
1046
 
865
1047
  .\\37 befde45_iterationStepBadge {
1048
+ flex: none;
866
1049
  display: inline-flex;
867
1050
  align-items: center;
868
1051
  justify-content: center;
@@ -877,6 +1060,7 @@ var css = `
877
1060
  }
878
1061
 
879
1062
  .d6cd23a5_iterationStepPhase {
1063
+ flex: 1 1 auto;
880
1064
  overflow-wrap: anywhere;
881
1065
  color: var(--dsw-alias-label-secondary);
882
1066
  font: var(--dsw-font-xxxs-11);
@@ -884,6 +1068,7 @@ var css = `
884
1068
 
885
1069
 
886
1070
  .de293024_iterationStepChip {
1071
+ flex: none;
887
1072
  display: inline-flex;
888
1073
  align-items: center;
889
1074
  padding: 0 var(--mstar-space-2);
@@ -933,6 +1118,7 @@ var css = `
933
1118
 
934
1119
 
935
1120
  .afea5850_iterationVerdictSeat {
1121
+ flex: none;
936
1122
  display: flex;
937
1123
  align-items: center;
938
1124
  justify-content: center;
@@ -1009,32 +1195,19 @@ var css = `
1009
1195
 
1010
1196
 
1011
1197
  .\\38 7f7efbe_iterationTasks {
1012
- flex: 1;
1013
- min-height: 0;
1014
- overflow-y: auto;
1015
- overscroll-behavior: contain;
1016
- }
1017
-
1018
-
1019
-
1020
- .c87acfc7_sidebar {
1021
- grid-area: sidebar;
1022
1198
  display: flex;
1023
1199
  flex-direction: column;
1200
+ gap: var(--mstar-space-3);
1024
1201
  min-width: 0;
1025
- min-height: 0;
1026
- border-left: 1px solid var(--dsw-alias-border-l1);
1027
1202
  }
1028
1203
 
1029
1204
 
1030
- .a0b80516_sidebarScroll {
1031
- flex: 1;
1032
- min-height: 0;
1033
- overflow-y: auto;
1205
+
1206
+ .c87acfc7_sidebar {
1034
1207
  display: flex;
1035
1208
  flex-direction: column;
1036
- gap: var(--mstar-space-4);
1037
- padding: var(--mstar-space-4);
1209
+ gap: var(--mstar-space-2);
1210
+ min-width: 0;
1038
1211
  }
1039
1212
 
1040
1213
 
@@ -1240,6 +1413,65 @@ var css = `
1240
1413
  font-weight: 600;
1241
1414
  }
1242
1415
 
1416
+
1417
+ .\\36 7818fcf_picker {
1418
+ display: flex;
1419
+ flex-direction: column;
1420
+ gap: var(--mstar-space-2);
1421
+ }
1422
+
1423
+ .c6520e3e_pickerCopy {
1424
+ margin: 0;
1425
+ color: var(--dsw-alias-label-caption);
1426
+ font: var(--dsw-font-xxxs-11);
1427
+ }
1428
+
1429
+ .e81be137_pickerList {
1430
+ display: flex;
1431
+ flex-direction: column;
1432
+ gap: var(--mstar-space-1);
1433
+ margin: 0;
1434
+ padding: 0;
1435
+ list-style: none;
1436
+ }
1437
+
1438
+ .\\36 3bf9208_pickerItem {
1439
+ display: flex;
1440
+ min-width: 0;
1441
+ }
1442
+
1443
+ .\\35 9b39fff_pickerButton {
1444
+ appearance: none;
1445
+ min-width: 0;
1446
+ max-width: 100%;
1447
+ padding: var(--mstar-space-1) var(--mstar-space-2);
1448
+ border: 1px solid var(--dsw-alias-border-l2);
1449
+ border-radius: 999px;
1450
+ background: none;
1451
+ color: var(--dsw-alias-label-secondary);
1452
+ font: var(--dsw-font-xxxs-11);
1453
+ text-align: left;
1454
+ overflow-wrap: anywhere;
1455
+ cursor: pointer;
1456
+ transition: color 150ms ease, border-color 150ms ease;
1457
+ }
1458
+
1459
+ .\\35 9b39fff_pickerButton:hover:not(:disabled) {
1460
+ color: var(--dsw-alias-label-primary);
1461
+ border-color: var(--dsw-alias-state-business-primary);
1462
+ }
1463
+
1464
+ .\\35 9b39fff_pickerButton:disabled {
1465
+ color: var(--dsw-alias-label-caption);
1466
+ cursor: default;
1467
+ }
1468
+
1469
+ .e14449f9_pickerStatus {
1470
+ margin: 0;
1471
+ color: var(--dsw-alias-label-caption);
1472
+ font: var(--dsw-font-xxxs-11);
1473
+ }
1474
+
1243
1475
  .\\31 8a7beee_empty {
1244
1476
  margin: 0;
1245
1477
  color: var(--dsw-alias-label-caption);
@@ -1271,7 +1503,7 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
1271
1503
  tag.textContent = css;
1272
1504
  document.head.appendChild(tag);
1273
1505
  }
1274
- var panel_module_default = { root: "20fd0e45_root", emptyRoot: "f83e09fa_emptyRoot", noHarnessCard: "58245a20_noHarnessCard", noHarnessIcon: "ffb65da7_noHarnessIcon", noHarnessTitle: "81e1817c_noHarnessTitle", noHarnessHint: "a2289da7_noHarnessHint", sidebar: "c87acfc7_sidebar", iterationHeadSplit: "77aea5a6_iterationHeadSplit", iterationBranches: "c3b8dcb0_iterationBranches", main: "ea90e208_main", tabNav: "4bb38bc9_tabNav", tab: "98f72e4c_tab", tabActive: "59e199de_tabActive", content: "90bec3c2_content", iterationPage: "3b1c4147_iterationPage", iterationHead: "8a629a8e_iterationHead", iterationSummary: "2d1bee34_iterationSummary", iterationSummaryId: "17162a99_iterationSummaryId", iterationSummaryVerdict: "d3d74135_iterationSummaryVerdict", iterationSummaryStatus: "d9a886be_iterationSummaryStatus", iterationSummaryStatusMuted: "13bf2f41_iterationSummaryStatusMuted", iterationSummaryHint: "ede5708d_iterationSummaryHint", iterationHeadBody: "64d1da62_iterationHeadBody", iterationStepsRow: "c52f7b85_iterationStepsRow", iterationStepItem: "81013a9d_iterationStepItem", iterationStepBadge: "7befde45_iterationStepBadge", iterationStepPhase: "d6cd23a5_iterationStepPhase", iterationStepChip: "de293024_iterationStepChip", iterationVerdictSeat: "afea5850_iterationVerdictSeat", iterationVerdict: "ebe6bbcd_iterationVerdict", iterationBranchesTitle: "e6921da6_iterationBranchesTitle", iterationBranchList: "8a2cd65c_iterationBranchList", iterationBranchRow: "997b0230_iterationBranchRow", iterationBranchLabel: "6cafc032_iterationBranchLabel", iterationBranchValue: "cdcd06ed_iterationBranchValue", iterationTasks: "87f7efbe_iterationTasks", sidebarScroll: "a0b80516_sidebarScroll", meta: "81fe4f58_meta", metaLine: "0fc275e2_metaLine", section: "fcdd0ccc_section", sectionTitle: "aded23ea_sectionTitle", subTitle: "b7190159_subTitle", defList: "26763614_defList", defTerm: "670df156_defTerm", defValue: "3f1b3a05_defValue", planList: "a129f16e_planList", residualList: "113e0aa2_residualList", leaseList: "33dfcc85_leaseList", violationList: "999efdc0_violationList", planId: "744bf63f_planId", leasePlan: "560663a6_leasePlan", leaseHolder: "a68a6d03_leaseHolder", leaseWorktree: "db027b44_leaseWorktree", findingSeverity: "1797fd51_findingSeverity", findingTitle: "c80b7bb0_findingTitle", findingPlan: "616667ad_findingPlan", violationCode: "e42c0bfd_violationCode", knowledgeCategories: "e2098247_knowledgeCategories", planStatus: "a3021d7c_planStatus", truncated: "1849d129_truncated", knowledge: "3eb5feeb_knowledge", direction: "df6dc76a_direction", selection: "4364e615_selection", selectionId: "0ae21b10_selectionId", selectionMeta: "5e43d3a8_selectionMeta", selectionWarning: "da64723f_selectionWarning", selectionCode: "ac988a64_selectionCode", empty: "18a7beee_empty", freshness: "c75c59b0_freshness" };
1506
+ var panel_module_default = { root: "20fd0e45_root", emptyRoot: "f83e09fa_emptyRoot", groupGrid: "1843711c_groupGrid", scroll: "dd4ec22c_scroll", meta: "81fe4f58_meta", noHarnessCard: "58245a20_noHarnessCard", noHarnessIcon: "ffb65da7_noHarnessIcon", noHarnessTitle: "81e1817c_noHarnessTitle", noHarnessHint: "a2289da7_noHarnessHint", tabNav: "4bb38bc9_tabNav", tab: "98f72e4c_tab", tabActive: "59e199de_tabActive", iterationPage: "3b1c4147_iterationPage", iterationHead: "8a629a8e_iterationHead", iterationSummary: "2d1bee34_iterationSummary", iterationSummaryId: "17162a99_iterationSummaryId", iterationSummaryVerdict: "d3d74135_iterationSummaryVerdict", iterationSummaryStatus: "d9a886be_iterationSummaryStatus", iterationSummaryStatusMuted: "13bf2f41_iterationSummaryStatusMuted", iterationSummaryHint: "ede5708d_iterationSummaryHint", iterationHeadBody: "64d1da62_iterationHeadBody", iterationHeadSplit: "77aea5a6_iterationHeadSplit", iterationBranches: "c3b8dcb0_iterationBranches", iterationStepsRow: "c52f7b85_iterationStepsRow", iterationStepItem: "81013a9d_iterationStepItem", iterationStepBadge: "7befde45_iterationStepBadge", iterationStepPhase: "d6cd23a5_iterationStepPhase", iterationStepChip: "de293024_iterationStepChip", iterationVerdictSeat: "afea5850_iterationVerdictSeat", iterationVerdict: "ebe6bbcd_iterationVerdict", iterationBranchesTitle: "e6921da6_iterationBranchesTitle", iterationBranchList: "8a2cd65c_iterationBranchList", iterationBranchRow: "997b0230_iterationBranchRow", iterationBranchLabel: "6cafc032_iterationBranchLabel", iterationBranchValue: "cdcd06ed_iterationBranchValue", iterationTasks: "87f7efbe_iterationTasks", sidebar: "c87acfc7_sidebar", metaLine: "0fc275e2_metaLine", section: "fcdd0ccc_section", sectionTitle: "aded23ea_sectionTitle", subTitle: "b7190159_subTitle", defList: "26763614_defList", defTerm: "670df156_defTerm", defValue: "3f1b3a05_defValue", planList: "a129f16e_planList", residualList: "113e0aa2_residualList", leaseList: "33dfcc85_leaseList", violationList: "999efdc0_violationList", planId: "744bf63f_planId", leasePlan: "560663a6_leasePlan", leaseHolder: "a68a6d03_leaseHolder", leaseWorktree: "db027b44_leaseWorktree", findingSeverity: "1797fd51_findingSeverity", findingTitle: "c80b7bb0_findingTitle", findingPlan: "616667ad_findingPlan", violationCode: "e42c0bfd_violationCode", knowledgeCategories: "e2098247_knowledgeCategories", planStatus: "a3021d7c_planStatus", truncated: "1849d129_truncated", knowledge: "3eb5feeb_knowledge", direction: "df6dc76a_direction", selection: "4364e615_selection", selectionId: "0ae21b10_selectionId", selectionMeta: "5e43d3a8_selectionMeta", selectionWarning: "da64723f_selectionWarning", selectionCode: "ac988a64_selectionCode", picker: "67818fcf_picker", pickerCopy: "c6520e3e_pickerCopy", pickerList: "e81be137_pickerList", pickerItem: "63bf9208_pickerItem", pickerButton: "59b39fff_pickerButton", pickerStatus: "e14449f9_pickerStatus", empty: "18a7beee_empty", freshness: "c75c59b0_freshness" };
1275
1507
 
1276
1508
  // src/client/panel/plan-sort.ts
1277
1509
  var PLAN_CAP = 5;
@@ -1546,23 +1778,6 @@ function bucketOf(role) {
1546
1778
  return "reviewer";
1547
1779
  return null;
1548
1780
  }
1549
- function sddImplementColumnId(stages) {
1550
- const s = stages.find((x) => x.stage === "sdd-implement");
1551
- return s === undefined ? null : s.id;
1552
- }
1553
- function superviseEdges(stages, entries) {
1554
- const columnId = sddImplementColumnId(stages);
1555
- if (columnId === null)
1556
- return [];
1557
- const evidenced = entries.some((e) => e.view.kind === "dispatch" && bucketOf(e.view.role) !== null);
1558
- return [{
1559
- kind: "supervise",
1560
- source: `${columnId}:implementor`,
1561
- target: `${columnId}:reviewer`,
1562
- entityKey: null,
1563
- evidenced
1564
- }];
1565
- }
1566
1781
  function entityKeyOf(role) {
1567
1782
  if (role !== "" && KNOWN_AGENTS.some((a) => a.id === role))
1568
1783
  return role;
@@ -1637,37 +1852,6 @@ function aggregateEntities(entries, pairStatus, currentStep) {
1637
1852
  idle: false
1638
1853
  }));
1639
1854
  }
1640
- function actualEdges(entries) {
1641
- const byPlan = new Map;
1642
- entries.forEach((e, idx) => {
1643
- const v = e.view;
1644
- if (v.kind !== "dispatch")
1645
- return;
1646
- if (v.planId === null)
1647
- return;
1648
- const key = entityKeyOf(v.role);
1649
- const list = byPlan.get(v.planId);
1650
- if (list === undefined)
1651
- byPlan.set(v.planId, [{ key, ts: v.ts, idx }]);
1652
- else
1653
- list.push({ key, ts: v.ts, idx });
1654
- });
1655
- const pairEdges = new Map;
1656
- for (const planId of Array.from(byPlan.keys()).sort()) {
1657
- const rows = byPlan.get(planId).slice().sort((a, b) => a.ts - b.ts || (a.key < b.key ? -1 : a.key > b.key ? 1 : 0) || a.idx - b.idx);
1658
- for (let i = 0;i + 1 < rows.length; i++) {
1659
- if (rows[i].key === rows[i + 1].key)
1660
- continue;
1661
- const a = rows[i].key;
1662
- const b = rows[i + 1].key;
1663
- if (a === GENERAL_BUCKET || b === GENERAL_BUCKET)
1664
- continue;
1665
- const pairKey = a < b ? `${a}|${b}` : `${b}|${a}`;
1666
- pairEdges.set(pairKey, { kind: "actual", source: a, target: b, entityKey: null });
1667
- }
1668
- }
1669
- return Array.from(pairEdges.values());
1670
- }
1671
1855
  function idleEntities(evidencedRoles, litKeys, currentStep) {
1672
1856
  const out = [];
1673
1857
  for (const known of KNOWN_AGENTS) {
@@ -1742,7 +1926,6 @@ function projectAgents(source, currentStep) {
1742
1926
  empty: false,
1743
1927
  note: null,
1744
1928
  entities: idleEntities(new Set, new Set, currentStep),
1745
- edges: superviseEdges(stages, []),
1746
1929
  executing: 0,
1747
1930
  pending: 0,
1748
1931
  activePlanId,
@@ -1751,7 +1934,7 @@ function projectAgents(source, currentStep) {
1751
1934
  }
1752
1935
  const entries = classifyFlowRows(rawEvents);
1753
1936
  const empty = rawEvents.length === 0;
1754
- const note = empty ? "empty" : entries.some((e) => e.view.kind === "dispatch") ? null : "settle-only";
1937
+ const note = empty ? "empty" : entries.some((e) => e.view.kind === "dispatch") ? null : entries.length > 0 && entries.every((e) => e.view.kind === "subagent-link") ? "link-only" : "settle-only";
1755
1938
  const iterationRow = source == null ? null : source.iteration;
1756
1939
  const iterationId = iterationRow === null || iterationRow === undefined ? null : str(iterationRow.iterationId);
1757
1940
  const planRows = Array.isArray(rawPlans) ? rawPlans.map(planRow) : [];
@@ -1784,13 +1967,9 @@ function projectAgents(source, currentStep) {
1784
1967
  const lit = aggregateEntities(filtered, pairStatus, currentStep);
1785
1968
  const litKeys = new Set(lit.map((e) => e.key));
1786
1969
  const entities = [...lit, ...idleEntities(evidencedRoles, litKeys, currentStep)];
1787
- const edges = [
1788
- ...actualEdges(filtered),
1789
- ...superviseEdges(stages, entries)
1790
- ];
1791
1970
  const executing = entities.filter((e) => e.status === "running").length;
1792
1971
  const pending = stages.reduce((sum, s) => sum + (evidenced.has(s.id) ? 0 : s.roles.length), 0);
1793
- return { stages, degraded: false, empty, note, entities, edges, executing, pending, activePlanId, activePlanCount };
1972
+ return { stages, degraded: false, empty, note, entities, executing, pending, activePlanId, activePlanCount };
1794
1973
  }
1795
1974
  var FLOW_EVENT_WINDOW = 50;
1796
1975
  function roleStageIndex() {
@@ -1835,6 +2014,8 @@ function flowEventOf(raw, index, stageIndex) {
1835
2014
  };
1836
2015
  }
1837
2016
  if (kind === "settle") {
2017
+ const childId2 = str(row?.childId);
2018
+ const taskRef = str(row?.taskRef);
1838
2019
  return {
1839
2020
  id: `${ts}-${kind}-${index}`,
1840
2021
  ts,
@@ -1849,7 +2030,30 @@ function flowEventOf(raw, index, stageIndex) {
1849
2030
  stage: matched ?? null,
1850
2031
  settled: false,
1851
2032
  ...row?.paired === true ? { paired: true } : {},
1852
- durationMs: count(row?.durationMs)
2033
+ durationMs: count(row?.durationMs),
2034
+ ...childId2 !== null ? { childId: childId2 } : {},
2035
+ ...taskRef !== null ? { taskRef } : {}
2036
+ };
2037
+ }
2038
+ if (kind === "subagent-link") {
2039
+ const childId2 = str(row?.childId);
2040
+ const taskRef = str(row?.taskRef);
2041
+ return {
2042
+ id: `${ts}-${kind}-${index}`,
2043
+ ts,
2044
+ kind,
2045
+ role,
2046
+ planId: str(row?.planId),
2047
+ taskId: str(row?.taskId),
2048
+ taskCategory: null,
2049
+ agent: str(row?.agent),
2050
+ status: "unknown",
2051
+ expected: matched !== undefined,
2052
+ stage: matched ?? null,
2053
+ settled: false,
2054
+ durationMs: null,
2055
+ ...childId2 !== null ? { childId: childId2 } : {},
2056
+ ...taskRef !== null ? { taskRef } : {}
1853
2057
  };
1854
2058
  }
1855
2059
  const runId = str(row?.runId);
@@ -1960,19 +2164,19 @@ function projectFlowEvents(source) {
1960
2164
  }
1961
2165
 
1962
2166
  // src/client/panel/panel-meta.tsx
1963
- var jsx_runtime = require("react/jsx-runtime");
2167
+ var jsx_runtime3 = require("react/jsx-runtime");
1964
2168
  function PanelMeta({ t, source }) {
1965
- return /* @__PURE__ */ jsx_runtime.jsxs("footer", {
2169
+ return /* @__PURE__ */ jsx_runtime3.jsxs("footer", {
1966
2170
  className: panel_module_default.meta,
1967
2171
  "data-mstar-meta": true,
1968
2172
  "data-mstar-watermark": true,
1969
2173
  children: [
1970
- /* @__PURE__ */ jsx_runtime.jsx("p", {
2174
+ /* @__PURE__ */ jsx_runtime3.jsx("p", {
1971
2175
  className: panel_module_default.metaLine,
1972
2176
  "data-mstar-meta-version": true,
1973
2177
  children: t("watermark.version", { version: str(source.version) ?? t("panel.unknown") })
1974
2178
  }),
1975
- /* @__PURE__ */ jsx_runtime.jsx("p", {
2179
+ /* @__PURE__ */ jsx_runtime3.jsx("p", {
1976
2180
  className: panel_module_default.metaLine,
1977
2181
  "data-mstar-meta-harness": true,
1978
2182
  children: t("watermark.harness", { dir: source.harnessDir ?? t("watermark.none") })
@@ -1982,7 +2186,8 @@ function PanelMeta({ t, source }) {
1982
2186
  }
1983
2187
 
1984
2188
  // src/client/panel/state-section.tsx
1985
- var jsx_runtime2 = require("react/jsx-runtime");
2189
+ var jsx_runtime4 = require("react/jsx-runtime");
2190
+ var NO_IDS = [];
1986
2191
  function enforcementLabel(t, enforcement) {
1987
2192
  if (enforcement === null || enforcement === undefined || typeof enforcement !== "object") {
1988
2193
  return t("panel.unknown");
@@ -1992,7 +2197,16 @@ function enforcementLabel(t, enforcement) {
1992
2197
  const flag = hard === null ? t("panel.unknown") : hard ? t("state.enforcement.hard") : t("state.enforcement.soft");
1993
2198
  return source === null ? flag : `${flag} (${source})`;
1994
2199
  }
1995
- function StateSection({ t, state, enforcement }) {
2200
+ function ackStandsFor(selection, workflowId) {
2201
+ if (selection === null)
2202
+ return true;
2203
+ if (selection.kind === "active")
2204
+ return selection.workflowId === workflowId;
2205
+ if (selection.kind === "error")
2206
+ return selection.activeWorkflowIds?.includes(workflowId) ?? false;
2207
+ return false;
2208
+ }
2209
+ function StateSection({ t, state, enforcement, selection, pick, select }) {
1996
2210
  const plans = Array.isArray(state?.plans) ? state.plans : [];
1997
2211
  const sortedPlans = sortPlans(plans);
1998
2212
  const visiblePlans = sortedPlans.slice(0, PLAN_CAP);
@@ -2002,231 +2216,274 @@ function StateSection({ t, state, enforcement }) {
2002
2216
  const hiddenFindings = findings === null ? 0 : Math.max(0, findings.length - FINDINGS_CAP);
2003
2217
  const leases = Array.isArray(state?.leases) ? state.leases : [];
2004
2218
  const knowledge = state?.knowledge ?? null;
2005
- const selection = state?.selection;
2006
- return /* @__PURE__ */ jsx_runtime2.jsxs("section", {
2219
+ const acked = pick.state === "selected" && ackStandsFor(selection, pick.workflowId) ? pick.workflowId : null;
2220
+ const activeId = selection?.kind === "active" ? selection.workflowId : acked;
2221
+ const activeWarning = selection?.kind === "active" ? selection.warning : undefined;
2222
+ const errorView = selection?.kind === "error" ? selection : null;
2223
+ const unbound = selection?.kind === "error" && (selection.activeWorkflowIds?.length ?? 0) > 0 ? selection : null;
2224
+ const candidates = unbound?.activeWorkflowIds ?? NO_IDS;
2225
+ const commit = select;
2226
+ return /* @__PURE__ */ jsx_runtime4.jsxs("section", {
2007
2227
  className: panel_module_default.section,
2008
2228
  "data-mstar-section": "state",
2009
2229
  children: [
2010
- /* @__PURE__ */ jsx_runtime2.jsx("h2", {
2230
+ /* @__PURE__ */ jsx_runtime4.jsx("h2", {
2011
2231
  className: panel_module_default.sectionTitle,
2012
2232
  children: t("state.title")
2013
2233
  }),
2014
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2234
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
2015
2235
  className: panel_module_default.subTitle,
2016
2236
  children: t("state.selection")
2017
2237
  }),
2018
- selection?.kind === "active" ? /* @__PURE__ */ jsx_runtime2.jsxs("p", {
2238
+ activeId !== null ? /* @__PURE__ */ jsx_runtime4.jsxs("p", {
2019
2239
  className: panel_module_default.selection,
2020
2240
  "data-selection-kind": "active",
2021
- "data-selection-workflow": selection.workflowId,
2241
+ "data-selection-workflow": activeId,
2022
2242
  children: [
2023
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2243
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2024
2244
  className: panel_module_default.selectionId,
2025
- children: selection.workflowId
2245
+ children: activeId
2026
2246
  }),
2027
- selection.warning !== undefined ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
2247
+ activeWarning !== undefined ? /* @__PURE__ */ jsx_runtime4.jsx("span", {
2028
2248
  className: panel_module_default.selectionWarning,
2029
2249
  "data-selection-warning": true,
2030
- children: selection.warning.message
2250
+ children: activeWarning.message
2031
2251
  }) : null
2032
2252
  ]
2033
- }) : selection?.kind === "terminal" ? /* @__PURE__ */ jsx_runtime2.jsxs("p", {
2253
+ }) : selection?.kind === "terminal" ? /* @__PURE__ */ jsx_runtime4.jsxs("p", {
2034
2254
  className: panel_module_default.selection,
2035
2255
  "data-selection-kind": "terminal",
2036
2256
  "data-selection-workflow": selection.workflowId,
2037
2257
  children: [
2038
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2258
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2039
2259
  className: panel_module_default.selectionId,
2040
2260
  children: selection.workflowId
2041
2261
  }),
2042
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2262
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2043
2263
  className: panel_module_default.selectionMeta,
2044
2264
  "data-selection-history": true,
2045
2265
  children: t("state.selection.history")
2046
2266
  })
2047
2267
  ]
2048
- }) : /* @__PURE__ */ jsx_runtime2.jsxs("p", {
2268
+ }) : /* @__PURE__ */ jsx_runtime4.jsxs("p", {
2049
2269
  className: panel_module_default.selection,
2050
2270
  "data-selection-kind": "error",
2051
- "data-selection-code": selection?.code ?? t("panel.unknown"),
2271
+ "data-selection-code": errorView?.code ?? t("panel.unknown"),
2052
2272
  children: [
2053
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2273
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2054
2274
  className: panel_module_default.selectionCode,
2055
- children: selection?.code ?? t("panel.unknown")
2275
+ children: errorView?.code ?? t("panel.unknown")
2056
2276
  }),
2057
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2277
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2058
2278
  className: panel_module_default.selectionMeta,
2059
- children: selection?.message ?? t("state.none")
2279
+ children: errorView?.message ?? t("state.none")
2060
2280
  })
2061
2281
  ]
2062
2282
  }),
2063
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2283
+ unbound !== null && commit !== null ? /* @__PURE__ */ jsx_runtime4.jsxs("div", {
2284
+ className: panel_module_default.picker,
2285
+ "data-mstar-picker": true,
2286
+ "data-picker-code": unbound.code,
2287
+ children: [
2288
+ /* @__PURE__ */ jsx_runtime4.jsx("p", {
2289
+ className: panel_module_default.pickerCopy,
2290
+ "data-picker-copy": true,
2291
+ children: t("state.selection.unbound")
2292
+ }),
2293
+ /* @__PURE__ */ jsx_runtime4.jsx("ul", {
2294
+ className: panel_module_default.pickerList,
2295
+ children: candidates.map((id) => /* @__PURE__ */ jsx_runtime4.jsx("li", {
2296
+ className: panel_module_default.pickerItem,
2297
+ children: /* @__PURE__ */ jsx_runtime4.jsx("button", {
2298
+ type: "button",
2299
+ className: panel_module_default.pickerButton,
2300
+ "data-picker-option": id,
2301
+ disabled: pick.state === "pending",
2302
+ onClick: () => commit(id),
2303
+ children: t("state.selection.pick", { workflowId: id })
2304
+ })
2305
+ }, id))
2306
+ }),
2307
+ pick.state === "pending" ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
2308
+ className: panel_module_default.pickerStatus,
2309
+ "data-picker-pending": true,
2310
+ children: t("state.selection.pending")
2311
+ }) : null,
2312
+ pick.state === "failed" ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
2313
+ className: panel_module_default.pickerStatus,
2314
+ "data-picker-failed": true,
2315
+ "data-picker-reason": pick.reason,
2316
+ children: t("state.selection.failed", { reason: pick.reason })
2317
+ }) : null
2318
+ ]
2319
+ }) : null,
2320
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
2064
2321
  className: panel_module_default.subTitle,
2065
2322
  children: t("state.plans")
2066
2323
  }),
2067
- visiblePlans.length === 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2324
+ visiblePlans.length === 0 ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
2068
2325
  className: panel_module_default.empty,
2069
2326
  "data-mstar-empty": "no-plans",
2070
2327
  children: t("state.none")
2071
- }) : /* @__PURE__ */ jsx_runtime2.jsx("ul", {
2328
+ }) : /* @__PURE__ */ jsx_runtime4.jsx("ul", {
2072
2329
  className: panel_module_default.planList,
2073
- children: visiblePlans.map((plan, i) => /* @__PURE__ */ jsx_runtime2.jsxs("li", {
2330
+ children: visiblePlans.map((plan, i) => /* @__PURE__ */ jsx_runtime4.jsxs("li", {
2074
2331
  "data-plan-id": str(plan.id) ?? "unknown",
2075
2332
  "data-plan-status": str(plan.status) ?? "unknown",
2076
2333
  children: [
2077
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2334
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2078
2335
  className: panel_module_default.planStatus,
2079
2336
  "data-status": str(plan.status) ?? "unknown",
2080
2337
  children: str(plan.status) ?? t("panel.unknown")
2081
2338
  }),
2082
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2339
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2083
2340
  className: panel_module_default.planId,
2084
2341
  children: str(plan.id) ?? t("panel.unknown")
2085
2342
  })
2086
2343
  ]
2087
2344
  }, str(plan.id) ?? `plan-${i}`))
2088
2345
  }),
2089
- hiddenPlans > 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2346
+ hiddenPlans > 0 ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
2090
2347
  className: panel_module_default.truncated,
2091
2348
  "data-plan-truncated": true,
2092
2349
  children: t("state.plans.more", { count: String(hiddenPlans) })
2093
2350
  }) : null,
2094
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2351
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
2095
2352
  className: panel_module_default.subTitle,
2096
2353
  children: t("state.residuals")
2097
2354
  }),
2098
- visibleFindings === null || visibleFindings.length === 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2355
+ visibleFindings === null || visibleFindings.length === 0 ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
2099
2356
  className: panel_module_default.empty,
2100
2357
  "data-mstar-empty": "no-residuals",
2101
2358
  children: t("state.none")
2102
- }) : /* @__PURE__ */ jsx_runtime2.jsx("ul", {
2359
+ }) : /* @__PURE__ */ jsx_runtime4.jsx("ul", {
2103
2360
  className: panel_module_default.residualList,
2104
- children: visibleFindings.map((finding, i) => /* @__PURE__ */ jsx_runtime2.jsxs("li", {
2361
+ children: visibleFindings.map((finding, i) => /* @__PURE__ */ jsx_runtime4.jsxs("li", {
2105
2362
  "data-residual-finding": true,
2106
2363
  "data-residual-finding-id": str(finding.id) ?? "unknown",
2107
2364
  "data-residual-finding-severity": str(finding.severity) ?? "unknown",
2108
2365
  "data-residual-finding-plan": str(finding.planId) ?? "unknown",
2109
2366
  children: [
2110
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2367
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2111
2368
  className: panel_module_default.findingSeverity,
2112
2369
  "data-severity": str(finding.severity) ?? "unknown",
2113
2370
  children: str(finding.severity) ?? t("panel.unknown")
2114
2371
  }),
2115
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2372
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2116
2373
  className: panel_module_default.findingTitle,
2117
2374
  children: str(finding.title) ?? t("panel.unknown")
2118
2375
  }),
2119
- str(finding.planId) !== null ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
2376
+ str(finding.planId) !== null ? /* @__PURE__ */ jsx_runtime4.jsx("span", {
2120
2377
  className: panel_module_default.findingPlan,
2121
2378
  children: finding.planId
2122
2379
  }) : null
2123
2380
  ]
2124
2381
  }, str(finding.id) ?? `finding-${i}`))
2125
2382
  }),
2126
- hiddenFindings > 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2383
+ hiddenFindings > 0 ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
2127
2384
  className: panel_module_default.truncated,
2128
2385
  "data-residual-truncated": true,
2129
2386
  children: t("state.residual.more", { count: String(hiddenFindings) })
2130
2387
  }) : null,
2131
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2388
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
2132
2389
  className: panel_module_default.subTitle,
2133
2390
  children: t("state.policy")
2134
2391
  }),
2135
- /* @__PURE__ */ jsx_runtime2.jsxs("dl", {
2392
+ /* @__PURE__ */ jsx_runtime4.jsxs("dl", {
2136
2393
  className: panel_module_default.defList,
2137
2394
  children: [
2138
- /* @__PURE__ */ jsx_runtime2.jsx("dt", {
2395
+ /* @__PURE__ */ jsx_runtime4.jsx("dt", {
2139
2396
  className: panel_module_default.defTerm,
2140
2397
  children: t("state.enforcement")
2141
2398
  }),
2142
- /* @__PURE__ */ jsx_runtime2.jsx("dd", {
2399
+ /* @__PURE__ */ jsx_runtime4.jsx("dd", {
2143
2400
  className: panel_module_default.defValue,
2144
2401
  "data-field": "enforcement",
2145
2402
  children: enforcementLabel(t, enforcement)
2146
2403
  }),
2147
- /* @__PURE__ */ jsx_runtime2.jsx("dt", {
2404
+ /* @__PURE__ */ jsx_runtime4.jsx("dt", {
2148
2405
  className: panel_module_default.defTerm,
2149
2406
  children: t("state.policy.push")
2150
2407
  }),
2151
- /* @__PURE__ */ jsx_runtime2.jsx("dd", {
2408
+ /* @__PURE__ */ jsx_runtime4.jsx("dd", {
2152
2409
  className: panel_module_default.defValue,
2153
2410
  "data-field": "push-policy",
2154
2411
  children: str(state?.pushPolicy) ?? t("state.none")
2155
2412
  }),
2156
- /* @__PURE__ */ jsx_runtime2.jsx("dt", {
2413
+ /* @__PURE__ */ jsx_runtime4.jsx("dt", {
2157
2414
  className: panel_module_default.defTerm,
2158
2415
  children: t("state.policy.worktree")
2159
2416
  }),
2160
- /* @__PURE__ */ jsx_runtime2.jsx("dd", {
2417
+ /* @__PURE__ */ jsx_runtime4.jsx("dd", {
2161
2418
  className: panel_module_default.defValue,
2162
2419
  "data-field": "worktree-mode",
2163
2420
  children: str(state?.worktreeMode) ?? t("state.none")
2164
2421
  }),
2165
- /* @__PURE__ */ jsx_runtime2.jsx("dt", {
2422
+ /* @__PURE__ */ jsx_runtime4.jsx("dt", {
2166
2423
  className: panel_module_default.defTerm,
2167
2424
  children: t("state.policy.control-worktree")
2168
2425
  }),
2169
- /* @__PURE__ */ jsx_runtime2.jsx("dd", {
2426
+ /* @__PURE__ */ jsx_runtime4.jsx("dd", {
2170
2427
  className: panel_module_default.defValue,
2171
2428
  "data-field": "control-worktree-path",
2172
2429
  children: str(state?.controlWorktreePath) ?? t("state.none")
2173
2430
  })
2174
2431
  ]
2175
2432
  }),
2176
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2433
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
2177
2434
  className: panel_module_default.subTitle,
2178
2435
  children: t("state.leases")
2179
2436
  }),
2180
- leases.length === 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2437
+ leases.length === 0 ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
2181
2438
  className: panel_module_default.empty,
2182
2439
  "data-mstar-empty": "no-leases",
2183
2440
  children: t("state.none")
2184
- }) : /* @__PURE__ */ jsx_runtime2.jsx("ul", {
2441
+ }) : /* @__PURE__ */ jsx_runtime4.jsx("ul", {
2185
2442
  className: panel_module_default.leaseList,
2186
- children: leases.map((lease, i) => /* @__PURE__ */ jsx_runtime2.jsxs("li", {
2443
+ children: leases.map((lease, i) => /* @__PURE__ */ jsx_runtime4.jsxs("li", {
2187
2444
  "data-lease-plan": str(lease.planId) ?? "unknown",
2188
2445
  children: [
2189
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2446
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2190
2447
  className: panel_module_default.leasePlan,
2191
2448
  children: str(lease.planId) ?? t("panel.unknown")
2192
2449
  }),
2193
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2450
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2194
2451
  className: panel_module_default.leaseHolder,
2195
2452
  children: str(lease.holder) ?? t("panel.unknown")
2196
2453
  }),
2197
- str(lease.worktreePath) !== null ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
2454
+ str(lease.worktreePath) !== null ? /* @__PURE__ */ jsx_runtime4.jsx("span", {
2198
2455
  className: panel_module_default.leaseWorktree,
2199
2456
  children: lease.worktreePath
2200
2457
  }) : null
2201
2458
  ]
2202
2459
  }, str(lease.planId) ?? `lease-${i}`))
2203
2460
  }),
2204
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2461
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
2205
2462
  className: panel_module_default.subTitle,
2206
2463
  children: t("state.knowledge")
2207
2464
  }),
2208
- knowledge === null ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2465
+ knowledge === null ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
2209
2466
  className: panel_module_default.empty,
2210
2467
  "data-mstar-empty": "no-knowledge",
2211
2468
  children: t("state.none")
2212
- }) : /* @__PURE__ */ jsx_runtime2.jsxs("p", {
2469
+ }) : /* @__PURE__ */ jsx_runtime4.jsxs("p", {
2213
2470
  className: panel_module_default.knowledge,
2214
2471
  "data-knowledge-docs": count(knowledge.docCount) === null ? "unknown" : String(knowledge.docCount),
2215
2472
  children: [
2216
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2473
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2217
2474
  children: t("state.knowledge.docs", { count: count(knowledge.docCount) === null ? t("panel.unknown") : String(knowledge.docCount) })
2218
2475
  }),
2219
- Array.isArray(knowledge.categories) && knowledge.categories.length > 0 ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
2476
+ Array.isArray(knowledge.categories) && knowledge.categories.length > 0 ? /* @__PURE__ */ jsx_runtime4.jsx("span", {
2220
2477
  className: panel_module_default.knowledgeCategories,
2221
2478
  children: knowledge.categories.filter((category) => typeof category === "string").join(" · ")
2222
2479
  }) : null
2223
2480
  ]
2224
2481
  }),
2225
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2482
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
2226
2483
  className: panel_module_default.subTitle,
2227
2484
  children: t("state.direction")
2228
2485
  }),
2229
- /* @__PURE__ */ jsx_runtime2.jsx("p", {
2486
+ /* @__PURE__ */ jsx_runtime4.jsx("p", {
2230
2487
  className: panel_module_default.direction,
2231
2488
  "data-direction": true,
2232
2489
  children: str(state?.direction) ?? t("state.none")
@@ -2236,46 +2493,39 @@ function StateSection({ t, state, enforcement }) {
2236
2493
  }
2237
2494
 
2238
2495
  // src/client/panel/sidebar.tsx
2239
- var jsx_runtime3 = require("react/jsx-runtime");
2240
- function Sidebar({ t, state, source }) {
2241
- return /* @__PURE__ */ jsx_runtime3.jsxs("aside", {
2496
+ var jsx_runtime5 = require("react/jsx-runtime");
2497
+ function Sidebar({ t, state, source, selection, pick, select }) {
2498
+ return /* @__PURE__ */ jsx_runtime5.jsx("aside", {
2242
2499
  className: panel_module_default.sidebar,
2243
2500
  "data-mstar-sidebar": true,
2244
- children: [
2245
- /* @__PURE__ */ jsx_runtime3.jsx("div", {
2246
- className: panel_module_default.sidebarScroll,
2247
- "data-mstar-sidebar-scroll": true,
2248
- children: state === null ? /* @__PURE__ */ jsx_runtime3.jsx("p", {
2249
- className: panel_module_default.empty,
2250
- "data-mstar-empty": "no-state",
2251
- children: t("state.none")
2252
- }) : /* @__PURE__ */ jsx_runtime3.jsx(StateSection, {
2253
- t,
2254
- state,
2255
- enforcement: source.enforcement
2256
- })
2257
- }),
2258
- /* @__PURE__ */ jsx_runtime3.jsx(PanelMeta, {
2259
- t,
2260
- source
2261
- })
2262
- ]
2501
+ children: state === null ? /* @__PURE__ */ jsx_runtime5.jsx("p", {
2502
+ className: panel_module_default.empty,
2503
+ "data-mstar-empty": "no-state",
2504
+ children: t("state.none")
2505
+ }) : /* @__PURE__ */ jsx_runtime5.jsx(StateSection, {
2506
+ t,
2507
+ state,
2508
+ enforcement: source.enforcement,
2509
+ selection,
2510
+ pick,
2511
+ select
2512
+ })
2263
2513
  });
2264
2514
  }
2265
2515
 
2266
2516
  // src/client/panel/TabNav.tsx
2267
- var jsx_runtime4 = require("react/jsx-runtime");
2517
+ var jsx_runtime6 = require("react/jsx-runtime");
2268
2518
  var TABS = [
2269
2519
  { id: "tasks", label: "tab.tasks" },
2270
2520
  { id: "agents", label: "tab.agents" },
2271
2521
  { id: "events", label: "tab.events" }
2272
2522
  ];
2273
2523
  function TabNav({ active, onChange, t }) {
2274
- return /* @__PURE__ */ jsx_runtime4.jsx("nav", {
2524
+ return /* @__PURE__ */ jsx_runtime6.jsx("nav", {
2275
2525
  className: panel_module_default.tabNav,
2276
2526
  "data-mstar-tab-nav": true,
2277
2527
  role: "tablist",
2278
- children: TABS.map((tab) => /* @__PURE__ */ jsx_runtime4.jsx("button", {
2528
+ children: TABS.map((tab) => /* @__PURE__ */ jsx_runtime6.jsx("button", {
2279
2529
  type: "button",
2280
2530
  role: "tab",
2281
2531
  className: active === tab.id ? `${panel_module_default.tab} ${panel_module_default.tabActive}` : panel_module_default.tab,
@@ -2288,7 +2538,7 @@ function TabNav({ active, onChange, t }) {
2288
2538
  });
2289
2539
  }
2290
2540
 
2291
- // src/client/panel/pages/AgentCanvasPage.tsx
2541
+ // src/client/panel/pages/AgentListPage.tsx
2292
2542
  var import_react2 = require("react");
2293
2543
 
2294
2544
  // src/client/panel/zones/zones.module.css
@@ -2405,22 +2655,16 @@ var css2 = `
2405
2655
 
2406
2656
 
2407
2657
  .\\31 2dfaa6e_kanban {
2408
- display: flex;
2409
- align-items: flex-start;
2410
- gap: var(--mstar-space-1);
2411
2658
  min-width: 0;
2412
- overflow-x: auto;
2413
- overscroll-behavior: contain;
2414
2659
  }
2415
2660
 
2416
2661
 
2417
2662
  .\\31 f8473a4_kanbanColumn {
2418
2663
  box-sizing: border-box;
2419
2664
  display: flex;
2420
- flex: 1 1 0;
2421
2665
  flex-direction: column;
2422
2666
  gap: var(--mstar-space-2);
2423
- min-width: 120px;
2667
+ min-width: 0;
2424
2668
  padding: var(--mstar-space-2);
2425
2669
  border: 1px solid var(--dsw-alias-border-l1);
2426
2670
  border-radius: 8px;
@@ -2439,10 +2683,10 @@ var css2 = `
2439
2683
  opacity: 0.7;
2440
2684
  }
2441
2685
 
2686
+
2442
2687
  .\\33 b1cc701_kanbanColumnHeader {
2443
2688
  display: flex;
2444
2689
  align-items: center;
2445
- justify-content: space-between;
2446
2690
  gap: var(--mstar-space-1);
2447
2691
  min-width: 0;
2448
2692
  }
@@ -2460,6 +2704,7 @@ var css2 = `
2460
2704
 
2461
2705
  .\\34 96af60d_kanbanCount {
2462
2706
  flex: none;
2707
+ margin-left: auto;
2463
2708
  min-width: 18px;
2464
2709
  padding: 0 var(--mstar-space-1);
2465
2710
  border: 1px solid var(--dsw-alias-border-l2);
@@ -2529,7 +2774,6 @@ var css2 = `
2529
2774
 
2530
2775
  .\\36 3518033_kanbanArrow {
2531
2776
  flex: none;
2532
- align-self: center;
2533
2777
  width: 18px;
2534
2778
  height: 18px;
2535
2779
  display: inline-flex;
@@ -2641,28 +2885,28 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
2641
2885
  var zones_module_default = { zone: "0390dc47_zone", zoneHeader: "fa5472ae_zoneHeader", zoneEmpty: "2358ca74_zoneEmpty", legend: "0214fc64_legend", legendTitle: "7fdf3af2_legendTitle", legendList: "5751e1ec_legendList", legendItem: "c648f79b_legendItem", legendSwatch: "84f03998_legendSwatch", swatchAgentRunning: "637ae7a1_swatchAgentRunning", swatchAgentSettled: "e8a7988b_swatchAgentSettled", swatchAgentIdle: "d34b3834_swatchAgentIdle", tasksHeader: "9c376db8_tasksHeader", tasksTotal: "b5ad0f15_tasksTotal", kanban: "12dfaa6e_kanban", kanbanColumn: "1f8473a4_kanbanColumn", kanbanColumnHeader: "3b1cc701_kanbanColumnHeader", kanbanColumnTitle: "503b6432_kanbanColumnTitle", kanbanCount: "496af60d_kanbanCount", kanbanCards: "161359fd_kanbanCards", planCard: "73f0e028_planCard", planCardId: "a37c7a75_planCardId", planCardStatus: "11b4fd6a_planCardStatus", kanbanArrow: "63518033_kanbanArrow", kanbanMore: "0c600f2f_kanbanMore", kanbanMoreButton: "d0f95d1f_kanbanMoreButton", zoneTitle: "a2f9476f_zoneTitle", rollupList: "1ca74b3b_rollupList", rollupItem: "371169b4_rollupItem", rollupMilestone: "5f3f5403_rollupMilestone", rollupCount: "d87816b2_rollupCount", severityChip: "8f4e5388_severityChip" };
2642
2886
 
2643
2887
  // src/client/panel/zones/Legend.tsx
2644
- var jsx_runtime5 = require("react/jsx-runtime");
2888
+ var jsx_runtime7 = require("react/jsx-runtime");
2645
2889
  function Legend({ t }) {
2646
2890
  const items = [
2647
2891
  { key: "agent-running", swatch: zones_module_default.swatchAgentRunning, label: t("zone.legend.agent-running") },
2648
2892
  { key: "agent-settled", swatch: zones_module_default.swatchAgentSettled, label: t("zone.legend.agent-settled") },
2649
2893
  { key: "agent-idle", swatch: zones_module_default.swatchAgentIdle, label: t("zone.legend.agent-idle") }
2650
2894
  ];
2651
- return /* @__PURE__ */ jsx_runtime5.jsxs("div", {
2895
+ return /* @__PURE__ */ jsx_runtime7.jsxs("div", {
2652
2896
  className: zones_module_default.legend,
2653
2897
  "data-mstar-legend": true,
2654
2898
  children: [
2655
- /* @__PURE__ */ jsx_runtime5.jsx("span", {
2899
+ /* @__PURE__ */ jsx_runtime7.jsx("span", {
2656
2900
  className: zones_module_default.legendTitle,
2657
2901
  children: t("zone.legend.title")
2658
2902
  }),
2659
- /* @__PURE__ */ jsx_runtime5.jsx("ul", {
2903
+ /* @__PURE__ */ jsx_runtime7.jsx("ul", {
2660
2904
  className: zones_module_default.legendList,
2661
- children: items.map((item) => /* @__PURE__ */ jsx_runtime5.jsxs("li", {
2905
+ children: items.map((item) => /* @__PURE__ */ jsx_runtime7.jsxs("li", {
2662
2906
  className: zones_module_default.legendItem,
2663
2907
  "data-mstar-legend-item": item.key,
2664
2908
  children: [
2665
- /* @__PURE__ */ jsx_runtime5.jsx("span", {
2909
+ /* @__PURE__ */ jsx_runtime7.jsx("span", {
2666
2910
  className: `${zones_module_default.legendSwatch} ${item.swatch}`
2667
2911
  }),
2668
2912
  item.label
@@ -2675,7 +2919,7 @@ function Legend({ t }) {
2675
2919
 
2676
2920
  // src/client/panel/pages/IterationInfoSection.tsx
2677
2921
  var import_react = require("react");
2678
- var jsx_runtime6 = require("react/jsx-runtime");
2922
+ var jsx_runtime8 = require("react/jsx-runtime");
2679
2923
  function nextExpandedOnActivation(prev, prevActive, nextActive) {
2680
2924
  return !prevActive && nextActive ? true : prev;
2681
2925
  }
@@ -2704,33 +2948,33 @@ function IterationInfoSection({ iteration, t }) {
2704
2948
  const verdictLabel = (verdict) => verdict === "pass" ? t("graph.pass") : verdict === "fail" ? t("graph.fail") : t("panel.unknown");
2705
2949
  const idLabel = iteration.iterationId ?? t("panel.unknown");
2706
2950
  const statusLabel = active && iteration.currentStep !== null ? t("zone.iteration.step-label", { n: String(iteration.currentStep), total: String(iteration.steps.length) }) : t("page.iteration.not-started");
2707
- const stepsRow = /* @__PURE__ */ jsx_runtime6.jsx("ol", {
2951
+ const stepsRow = /* @__PURE__ */ jsx_runtime8.jsx("ol", {
2708
2952
  className: panel_module_default.iterationStepsRow,
2709
2953
  "data-iteration-head-steps": true,
2710
- children: iteration.steps.map((step) => /* @__PURE__ */ jsx_runtime6.jsxs("li", {
2954
+ children: iteration.steps.map((step) => /* @__PURE__ */ jsx_runtime8.jsxs("li", {
2711
2955
  className: panel_module_default.iterationStepItem,
2712
2956
  "data-step": step.step,
2713
2957
  "data-step-state": step.state,
2714
2958
  children: [
2715
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2959
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2716
2960
  className: panel_module_default.iterationStepBadge,
2717
2961
  "data-step-badge": true,
2718
2962
  children: t("zone.iteration.step-badge", { n: String(step.step) })
2719
2963
  }),
2720
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2964
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2721
2965
  className: panel_module_default.iterationStepPhase,
2722
2966
  "data-step-phase": true,
2723
2967
  children: t(`zone.phase.${step.id}`)
2724
2968
  }),
2725
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2969
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2726
2970
  className: panel_module_default.iterationStepChip,
2727
2971
  "data-step-chip": true,
2728
2972
  children: t(STATE_LABEL[step.state])
2729
2973
  }),
2730
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2974
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2731
2975
  className: panel_module_default.iterationVerdictSeat,
2732
2976
  "data-step-verdict-seat": true,
2733
- children: step.state === "current" && step.verdict !== "unknown" && /* @__PURE__ */ jsx_runtime6.jsx("span", {
2977
+ children: step.state === "current" && step.verdict !== "unknown" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
2734
2978
  className: panel_module_default.iterationVerdict,
2735
2979
  "data-iteration-verdict": step.verdict,
2736
2980
  children: verdictLabel(step.verdict)
@@ -2739,13 +2983,13 @@ function IterationInfoSection({ iteration, t }) {
2739
2983
  ]
2740
2984
  }, step.step))
2741
2985
  });
2742
- return /* @__PURE__ */ jsx_runtime6.jsxs("section", {
2986
+ return /* @__PURE__ */ jsx_runtime8.jsxs("section", {
2743
2987
  className: panel_module_default.iterationHead,
2744
2988
  "data-iteration-head": true,
2745
2989
  "data-iteration-head-active": active ? "true" : "false",
2746
2990
  "data-iteration-head-expanded": expanded ? "true" : "false",
2747
2991
  children: [
2748
- /* @__PURE__ */ jsx_runtime6.jsxs("button", {
2992
+ /* @__PURE__ */ jsx_runtime8.jsxs("button", {
2749
2993
  type: "button",
2750
2994
  className: panel_module_default.iterationSummary,
2751
2995
  "data-iteration-head-toggle": true,
@@ -2754,56 +2998,56 @@ function IterationInfoSection({ iteration, t }) {
2754
2998
  "aria-controls": "iteration-head-body",
2755
2999
  onClick: () => setExpanded((v) => !v),
2756
3000
  children: [
2757
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
3001
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2758
3002
  className: panel_module_default.iterationSummaryId,
2759
3003
  "data-iteration-head-id": idLabel,
2760
3004
  children: idLabel
2761
3005
  }),
2762
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
3006
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2763
3007
  className: panel_module_default.iterationSummaryVerdict,
2764
3008
  "data-iteration-head-verdict": iteration.verdict,
2765
3009
  children: verdictLabel(iteration.verdict)
2766
3010
  }),
2767
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
3011
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2768
3012
  className: active ? panel_module_default.iterationSummaryStatus : panel_module_default.iterationSummaryStatusMuted,
2769
3013
  "data-iteration-head-status": statusLabel,
2770
3014
  children: statusLabel
2771
3015
  }),
2772
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
3016
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2773
3017
  className: panel_module_default.iterationSummaryHint,
2774
3018
  "data-iteration-head-hint": true,
2775
3019
  children: t(expanded ? "page.iteration.collapse" : "page.iteration.expand")
2776
3020
  })
2777
3021
  ]
2778
3022
  }),
2779
- expanded && /* @__PURE__ */ jsx_runtime6.jsx("div", {
3023
+ expanded && /* @__PURE__ */ jsx_runtime8.jsx("div", {
2780
3024
  className: panel_module_default.iterationHeadBody,
2781
3025
  id: "iteration-head-body",
2782
3026
  "data-iteration-head-body": true,
2783
- children: iterationSplitActive(active, iteration.branches) ? /* @__PURE__ */ jsx_runtime6.jsxs("div", {
3027
+ children: iterationSplitActive(active, iteration.branches) ? /* @__PURE__ */ jsx_runtime8.jsxs("div", {
2784
3028
  className: panel_module_default.iterationHeadSplit,
2785
3029
  "data-iteration-head-split": true,
2786
3030
  children: [
2787
- /* @__PURE__ */ jsx_runtime6.jsxs("div", {
3031
+ /* @__PURE__ */ jsx_runtime8.jsxs("div", {
2788
3032
  className: panel_module_default.iterationBranches,
2789
3033
  "data-iteration-head-branches": true,
2790
3034
  children: [
2791
- /* @__PURE__ */ jsx_runtime6.jsx("h3", {
3035
+ /* @__PURE__ */ jsx_runtime8.jsx("h3", {
2792
3036
  className: panel_module_default.iterationBranchesTitle,
2793
3037
  "data-branches-title": true,
2794
3038
  children: t("zone.branches.title")
2795
3039
  }),
2796
- /* @__PURE__ */ jsx_runtime6.jsx("ul", {
3040
+ /* @__PURE__ */ jsx_runtime8.jsx("ul", {
2797
3041
  className: panel_module_default.iterationBranchList,
2798
- children: BRANCH_ROWS.map((row) => /* @__PURE__ */ jsx_runtime6.jsxs("li", {
3042
+ children: BRANCH_ROWS.map((row) => /* @__PURE__ */ jsx_runtime8.jsxs("li", {
2799
3043
  className: panel_module_default.iterationBranchRow,
2800
3044
  "data-branch": row.kind,
2801
3045
  children: [
2802
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
3046
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2803
3047
  className: panel_module_default.iterationBranchLabel,
2804
3048
  children: t(row.label)
2805
3049
  }),
2806
- /* @__PURE__ */ jsx_runtime6.jsx("code", {
3050
+ /* @__PURE__ */ jsx_runtime8.jsx("code", {
2807
3051
  className: panel_module_default.iterationBranchValue,
2808
3052
  "data-branch-value": true,
2809
3053
  children: iteration.branches?.[row.value] ?? "—"
@@ -2821,25 +3065,23 @@ function IterationInfoSection({ iteration, t }) {
2821
3065
  });
2822
3066
  }
2823
3067
 
2824
- // src/client/panel/pages/agent-canvas.module.css
3068
+ // src/client/panel/pages/agent-list.module.css
2825
3069
  var css3 = `
2826
3070
 
2827
3071
 
2828
3072
 
2829
- .\\36 2d5f9b2_canvasPage {
2830
- flex: 1;
2831
- min-height: 0;
3073
+ .c7b89a22_listPage {
2832
3074
  display: flex;
2833
3075
  flex-direction: column;
2834
3076
  gap: var(--mstar-space-2);
2835
- padding: var(--mstar-space-3);
3077
+ min-width: 0;
2836
3078
 
2837
3079
  --mstar-canvas-emphasis-current: 100%;
2838
3080
  --mstar-canvas-emphasis-next: 75%;
2839
3081
  --mstar-canvas-emphasis-off: 45%;
2840
3082
  }
2841
3083
 
2842
- .\\37 608ed94_canvasHeader {
3084
+ .e5d7e3c4_listHeader {
2843
3085
  display: flex;
2844
3086
  align-items: baseline;
2845
3087
  justify-content: space-between;
@@ -2848,7 +3090,7 @@ var css3 = `
2848
3090
  min-width: 0;
2849
3091
  }
2850
3092
 
2851
- .\\39 e2394fd_canvasTitle {
3093
+ .\\39 01ce16d_listTitle {
2852
3094
  margin: 0;
2853
3095
  color: var(--dsw-alias-label-primary);
2854
3096
  font: var(--dsw-font-xs-13);
@@ -2856,7 +3098,7 @@ var css3 = `
2856
3098
  }
2857
3099
 
2858
3100
 
2859
- .\\37 4514c6f_canvasSummary {
3101
+ .\\36 678f1df_listSummary {
2860
3102
  flex: none;
2861
3103
  color: var(--dsw-alias-label-caption);
2862
3104
  font: var(--dsw-font-xxxs-11);
@@ -2864,7 +3106,7 @@ var css3 = `
2864
3106
  }
2865
3107
 
2866
3108
 
2867
- .\\38 5e71ac9_canvasNote {
3109
+ .\\37 f7cda39_listNote {
2868
3110
  flex: none;
2869
3111
  margin: 0;
2870
3112
  color: var(--dsw-alias-label-caption);
@@ -2872,66 +3114,35 @@ var css3 = `
2872
3114
  }
2873
3115
 
2874
3116
 
2875
- .\\34 374ac40_canvasLegend {
3117
+ .\\31 bf37650_listLegend {
2876
3118
  flex: none;
2877
3119
  }
2878
3120
 
2879
3121
 
2880
3122
 
2881
- .\\30 ceb0467_canvasViewport {
2882
- position: relative;
2883
- flex: 1;
2884
- min-height: 0;
2885
- overflow: hidden;
2886
- touch-action: none;
2887
- background: var(--dsw-alias-bg-layer-1);
2888
- border: 1px solid var(--dsw-alias-border-l1);
2889
- border-radius: 8px;
2890
- cursor: grab;
2891
- user-select: none;
2892
- }
2893
-
2894
- .\\30 ceb0467_canvasViewport:active {
2895
- cursor: grabbing;
3123
+ .dccb9592_agentList {
3124
+ min-width: 0;
2896
3125
  }
2897
3126
 
2898
3127
 
2899
3128
 
2900
- .\\34 8d128d6_canvasContent {
2901
- position: absolute;
2902
- top: 0;
2903
- left: 0;
2904
- background-color: var(--dsw-alias-bg-layer-1);
2905
- background-image:
2906
- linear-gradient(var(--dsw-alias-border-l1) 1px, transparent 1px),
2907
- linear-gradient(90deg, var(--dsw-alias-border-l1) 1px, transparent 1px);
2908
- background-size: 24px 24px;
2909
- will-change: transform;
2910
- }
2911
-
2912
-
2913
- .\\37 f010373_canvasColumnLabel {
2914
- position: absolute;
2915
- padding: 0 var(--mstar-space-1);
2916
- overflow: hidden;
2917
- text-overflow: ellipsis;
2918
- white-space: nowrap;
2919
- color: var(--dsw-alias-label-caption);
2920
- font: var(--dsw-font-xxxs-11);
2921
- font-weight: 600;
2922
- letter-spacing: 0.03em;
2923
- text-transform: uppercase;
3129
+ .\\37 a1e7d59_agentGroup {
3130
+ display: flex;
3131
+ flex-direction: column;
3132
+ gap: var(--mstar-space-2);
3133
+ min-width: 0;
3134
+ padding: var(--mstar-space-3);
3135
+ border: 1px solid var(--dsw-alias-border-l1);
3136
+ border-radius: 8px;
3137
+ background: var(--dsw-alias-bg-layer-1);
2924
3138
  }
2925
3139
 
2926
-
2927
- .fcf0fc76_canvasGroupLabel {
2928
- position: absolute;
3140
+ .a4d5691a_groupLabel {
2929
3141
  display: flex;
2930
3142
  align-items: center;
2931
3143
  gap: var(--mstar-space-2);
2932
3144
  min-width: 0;
2933
3145
  padding: 0 var(--mstar-space-1);
2934
- overflow: hidden;
2935
3146
  color: var(--dsw-alias-label-primary);
2936
3147
  font: var(--dsw-font-xxxs-11);
2937
3148
  font-weight: 600;
@@ -2940,7 +3151,7 @@ var css3 = `
2940
3151
  }
2941
3152
 
2942
3153
 
2943
- .f17a7dfb_canvasGroupPlan {
3154
+ .\\39 6c8bb5f_groupPlan {
2944
3155
  display: flex;
2945
3156
  align-items: center;
2946
3157
  gap: var(--mstar-space-1);
@@ -2960,7 +3171,7 @@ var css3 = `
2960
3171
  }
2961
3172
 
2962
3173
 
2963
- .\\32 387c06e_canvasGroupPlanMore {
3174
+ .c775aa0a_groupPlanMore {
2964
3175
  flex: none;
2965
3176
  color: var(--dsw-alias-label-caption);
2966
3177
  font: var(--dsw-font-xxxs-11);
@@ -2969,7 +3180,7 @@ var css3 = `
2969
3180
  }
2970
3181
 
2971
3182
 
2972
- .\\34 eb1cc60_canvasGroupNoPlan {
3183
+ .\\35 d27d864_groupNoPlan {
2973
3184
  color: var(--dsw-alias-label-caption);
2974
3185
  font: var(--dsw-font-xxxs-11);
2975
3186
  font-weight: 400;
@@ -2979,41 +3190,64 @@ var css3 = `
2979
3190
 
2980
3191
 
2981
3192
 
2982
- .d0988ac1_canvasEdges {
2983
- position: absolute;
2984
- top: 0;
2985
- left: 0;
2986
- pointer-events: none;
3193
+ .\\32 a00f734_stageGroup {
3194
+ display: flex;
3195
+ flex-direction: column;
3196
+ gap: var(--mstar-space-1);
3197
+ min-width: 0;
3198
+ }
3199
+
3200
+ .\\37 212d235_stageLabel {
3201
+ padding: 0 var(--mstar-space-1);
3202
+ overflow: hidden;
3203
+ text-overflow: ellipsis;
3204
+ white-space: nowrap;
3205
+ color: var(--dsw-alias-label-caption);
3206
+ font: var(--dsw-font-xxxs-11);
3207
+ font-weight: 600;
3208
+ letter-spacing: 0.03em;
3209
+ text-transform: uppercase;
2987
3210
  }
2988
3211
 
2989
3212
 
2990
- .ee3e51b3_canvasEdgeCurve {
2991
- fill: none;
3213
+
3214
+ .\\31 3172d67_subBucket {
3215
+ display: flex;
3216
+ flex-direction: column;
3217
+ gap: var(--mstar-space-1);
3218
+ min-width: 0;
2992
3219
  }
2993
3220
 
2994
- .e6a1115e_canvasEdgeActual {
2995
- stroke: var(--dsw-alias-state-business-primary);
2996
- stroke-width: 1.5;
3221
+ .\\37 78a2d3f_subBucketLabel {
3222
+ display: flex;
3223
+ align-items: center;
3224
+ gap: var(--mstar-space-1);
3225
+ color: var(--dsw-alias-label-caption);
3226
+ font: var(--dsw-font-xxxs-11);
3227
+ letter-spacing: 0.03em;
3228
+ text-transform: uppercase;
2997
3229
  }
2998
3230
 
2999
3231
 
3000
- .d3a4fb6c_canvasArrowActual {
3001
- fill: var(--dsw-alias-state-business-primary);
3232
+ .\\37 78a2d3f_subBucketLabel::after {
3233
+ content: '';
3234
+ flex: 1;
3235
+ border-top: 1px dashed var(--dsw-alias-border-l2);
3002
3236
  }
3003
3237
 
3004
3238
 
3005
3239
 
3006
- .\\34 4301340_canvasCards {
3007
- position: absolute;
3008
- top: 0;
3009
- left: 0;
3240
+ .b34ac147_cardList {
3010
3241
  margin: 0;
3011
3242
  padding: 0;
3012
3243
  list-style: none;
3244
+ display: flex;
3245
+ flex-direction: column;
3246
+ gap: var(--mstar-space-1);
3247
+ min-width: 0;
3013
3248
  }
3014
3249
 
3015
3250
  .a9030174_agentCard {
3016
- position: absolute;
3017
3251
  box-sizing: border-box;
3018
3252
  display: flex;
3019
3253
  flex-direction: column;
@@ -3046,14 +3280,14 @@ var css3 = `
3046
3280
  .\\34 e2c7873_agentCardRunning {
3047
3281
  border-color: var(--dsw-alias-state-business-primary);
3048
3282
  box-shadow: 0 0 0 1px var(--dsw-alias-state-business-primary);
3049
- animation: canvas-card-pulse 1.6s ease-in-out infinite;
3283
+ animation: agent-card-pulse 1.6s ease-in-out infinite;
3050
3284
  }
3051
3285
 
3052
3286
  .\\34 e2c7873_agentCardRunning:hover {
3053
3287
  border-color: var(--dsw-alias-state-business-primary);
3054
3288
  }
3055
3289
 
3056
- @keyframes canvas-card-pulse {
3290
+ @keyframes agent-card-pulse {
3057
3291
  0%, 100% {
3058
3292
  box-shadow: 0 0 0 1px var(--dsw-alias-state-business-primary);
3059
3293
  }
@@ -3083,50 +3317,6 @@ var css3 = `
3083
3317
  }
3084
3318
 
3085
3319
 
3086
- .\\34 fd21091_agentPort {
3087
- position: absolute;
3088
- width: 3px;
3089
- height: 3px;
3090
- border-radius: 999px;
3091
- background: var(--dsw-alias-label-caption);
3092
- opacity: 0;
3093
- pointer-events: none;
3094
- transition: opacity 150ms ease;
3095
- }
3096
-
3097
- .a9030174_agentCard:hover .\\34 fd21091_agentPort {
3098
- opacity: 1;
3099
- }
3100
-
3101
- .\\34 e2c7873_agentCardRunning:hover .\\34 fd21091_agentPort {
3102
- background: var(--dsw-alias-state-business-primary);
3103
- }
3104
-
3105
- .\\34 fd21091_agentPort[data-agent-port='north'] {
3106
- top: 0;
3107
- left: 50%;
3108
- transform: translate(-50%, -50%);
3109
- }
3110
-
3111
- .\\34 fd21091_agentPort[data-agent-port='south'] {
3112
- bottom: 0;
3113
- left: 50%;
3114
- transform: translate(-50%, 50%);
3115
- }
3116
-
3117
- .\\34 fd21091_agentPort[data-agent-port='west'] {
3118
- left: 0;
3119
- top: 50%;
3120
- transform: translate(-50%, -50%);
3121
- }
3122
-
3123
- .\\34 fd21091_agentPort[data-agent-port='east'] {
3124
- right: 0;
3125
- top: 50%;
3126
- transform: translate(50%, -50%);
3127
- }
3128
-
3129
-
3130
3320
  .c2c54212_onDemandBadge {
3131
3321
  align-self: flex-start;
3132
3322
  padding: 0 var(--mstar-space-1);
@@ -3136,46 +3326,6 @@ var css3 = `
3136
3326
  font: var(--dsw-font-xxxs-11);
3137
3327
  }
3138
3328
 
3139
-
3140
- .\\37 78a2d3f_subBucketLabel {
3141
- position: absolute;
3142
- display: flex;
3143
- align-items: center;
3144
- gap: var(--mstar-space-1);
3145
- color: var(--dsw-alias-label-caption);
3146
- font: var(--dsw-font-xxxs-11);
3147
- letter-spacing: 0.03em;
3148
- text-transform: uppercase;
3149
- }
3150
-
3151
-
3152
- .\\37 78a2d3f_subBucketLabel::after {
3153
- content: '';
3154
- flex: 1;
3155
- border-top: 1px dashed var(--dsw-alias-border-l2);
3156
- }
3157
-
3158
-
3159
- .\\39 94a2772_canvasEdgeSupervise {
3160
- stroke: var(--dsw-alias-label-caption);
3161
- stroke-width: 1.5;
3162
- stroke-dasharray: 5 4;
3163
- }
3164
-
3165
- .b2bb1e47_canvasEdgeSuperviseLit {
3166
-
3167
- stroke: var(--dsw-alias-state-business-primary);
3168
- stroke-dasharray: none;
3169
- }
3170
-
3171
- .ad3aae58_canvasArrowSupervise {
3172
- fill: var(--dsw-alias-label-caption);
3173
- }
3174
-
3175
- .\\32 6e265a1_canvasArrowSuperviseLit {
3176
- fill: var(--dsw-alias-state-business-primary);
3177
- }
3178
-
3179
3329
  .e7716946_agentCardLine {
3180
3330
  display: flex;
3181
3331
  align-items: center;
@@ -3268,7 +3418,7 @@ var css3 = `
3268
3418
  color: var(--dsw-alias-label-caption);
3269
3419
  }
3270
3420
  `;
3271
- var tagId3 = "@mstar-harness/dsh/agent-canvas.module.css";
3421
+ var tagId3 = "@mstar-harness/dsh/agent-list.module.css";
3272
3422
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId3) + "]") === null) {
3273
3423
  const tag = document.createElement("style");
3274
3424
  tag.dataset.plugin = "@mstar-harness/dsh";
@@ -3276,51 +3426,29 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
3276
3426
  tag.textContent = css3;
3277
3427
  document.head.appendChild(tag);
3278
3428
  }
3279
- var agent_canvas_module_default = { canvasPage: "62d5f9b2_canvasPage", canvasHeader: "7608ed94_canvasHeader", canvasTitle: "9e2394fd_canvasTitle", canvasSummary: "74514c6f_canvasSummary", canvasNote: "85e71ac9_canvasNote", canvasLegend: "4374ac40_canvasLegend", canvasViewport: "0ceb0467_canvasViewport", canvasContent: "48d128d6_canvasContent", canvasColumnLabel: "7f010373_canvasColumnLabel", canvasGroupLabel: "fcf0fc76_canvasGroupLabel", canvasGroupPlan: "f17a7dfb_canvasGroupPlan", canvasGroupPlanMore: "2387c06e_canvasGroupPlanMore", canvasGroupNoPlan: "4eb1cc60_canvasGroupNoPlan", canvasEdges: "d0988ac1_canvasEdges", canvasEdgeCurve: "ee3e51b3_canvasEdgeCurve", canvasEdgeActual: "e6a1115e_canvasEdgeActual", canvasArrowActual: "d3a4fb6c_canvasArrowActual", canvasCards: "44301340_canvasCards", agentCard: "a9030174_agentCard", agentCardRunning: "4e2c7873_agentCardRunning", agentCardIdle: "1a8bb13e_agentCardIdle", agentCardDone: "d6bf2954_agentCardDone", agentPort: "4fd21091_agentPort", onDemandBadge: "c2c54212_onDemandBadge", subBucketLabel: "778a2d3f_subBucketLabel", canvasEdgeSupervise: "994a2772_canvasEdgeSupervise", canvasEdgeSuperviseLit: "b2bb1e47_canvasEdgeSuperviseLit", canvasArrowSupervise: "ad3aae58_canvasArrowSupervise", canvasArrowSuperviseLit: "26e265a1_canvasArrowSuperviseLit", agentCardLine: "e7716946_agentCardLine", agentCardName: "a47ac04f_agentCardName", agentCount: "e2aedf35_agentCount", agentRoleChip: "e26900b4_agentRoleChip", agentRecord: "1e3b3403_agentRecord", agentStatusDot: "030ace7f_agentStatusDot", agentStatusRunning: "23846eb7_agentStatusRunning", agentStatusSettled: "91dcfc09_agentStatusSettled", agentStatusError: "eeb20a6e_agentStatusError", agentStatusAdvisory: "ec5fca43_agentStatusAdvisory", agentStatusIdle: "63e283ba_agentStatusIdle" };
3429
+ var agent_list_module_default = { listPage: "c7b89a22_listPage", listHeader: "e5d7e3c4_listHeader", listTitle: "901ce16d_listTitle", listSummary: "6678f1df_listSummary", listNote: "7f7cda39_listNote", listLegend: "1bf37650_listLegend", agentList: "dccb9592_agentList", agentGroup: "7a1e7d59_agentGroup", groupLabel: "a4d5691a_groupLabel", groupPlan: "96c8bb5f_groupPlan", groupPlanMore: "c775aa0a_groupPlanMore", groupNoPlan: "5d27d864_groupNoPlan", stageGroup: "2a00f734_stageGroup", stageLabel: "7212d235_stageLabel", subBucket: "13172d67_subBucket", subBucketLabel: "778a2d3f_subBucketLabel", cardList: "b34ac147_cardList", agentCard: "a9030174_agentCard", agentCardRunning: "4e2c7873_agentCardRunning", agentCardIdle: "1a8bb13e_agentCardIdle", agentCardDone: "d6bf2954_agentCardDone", onDemandBadge: "c2c54212_onDemandBadge", agentCardLine: "e7716946_agentCardLine", agentCardName: "a47ac04f_agentCardName", agentCount: "e2aedf35_agentCount", agentRoleChip: "e26900b4_agentRoleChip", agentRecord: "1e3b3403_agentRecord", agentStatusDot: "030ace7f_agentStatusDot", agentStatusRunning: "23846eb7_agentStatusRunning", agentStatusSettled: "91dcfc09_agentStatusSettled", agentStatusError: "eeb20a6e_agentStatusError", agentStatusAdvisory: "ec5fca43_agentStatusAdvisory", agentStatusIdle: "63e283ba_agentStatusIdle" };
3280
3430
 
3281
- // src/client/panel/pages/AgentCanvasPage.tsx
3282
- var jsx_runtime7 = require("react/jsx-runtime");
3283
- var PAN_ORIGIN = { x: 0, y: 0 };
3284
- function panDragStart(pan, x, y) {
3285
- return { originX: pan.x, originY: pan.y, startX: x, startY: y };
3286
- }
3287
- function panDragMove(drag, x, y) {
3288
- return { x: drag.originX + (x - drag.startX), y: drag.originY + (y - drag.startY) };
3289
- }
3290
- function panTransform(pan) {
3291
- return `translate(${pan.x}px, ${pan.y}px)`;
3292
- }
3293
- var COL_W = 200;
3294
- var COL_GAP = 56;
3295
- var CARD_W = 176;
3296
- var CARD_H = 72;
3297
- var ROW_GAP = 12;
3298
- var PAD_X = 24;
3299
- var PAD_Y = 24;
3300
- var COL_PAD = 12;
3301
- var LABEL_H = 18;
3302
- var SUB_LABEL_H = 14;
3303
- var SUB_GAP = 4;
3304
- var GROUP_GAP = 24;
3305
- var STANDOFF = 10;
3306
- var SIDE_GAP = 18;
3431
+ // src/client/panel/pages/AgentListPage.tsx
3432
+ var jsx_runtime9 = require("react/jsx-runtime");
3307
3433
  var UNKNOWN_COLUMN = "unknown";
3308
- var GENERAL_SINK_STAGE = "sdd-implement";
3309
- function layoutAgents(view) {
3310
- const columnIds = view.stages.map((s) => s.id);
3311
- const unknownSinkId = columnIds[columnIds.length - 1] ?? UNKNOWN_COLUMN;
3312
- const sddStage = view.stages.find((s) => s.stage === GENERAL_SINK_STAGE);
3313
- const sddSinkId = sddStage === undefined ? unknownSinkId : sddStage.id;
3314
- const buckets = new Map;
3315
- for (const entity of view.entities) {
3316
- const colId = entity.zone === GENERAL_BUCKET ? unknownSinkId : entity.zone === "on-demand" ? sddSinkId : entity.zone === "flow" && entity.stage !== null ? `${entity.stage.phase}:${entity.stage.stage}` : sddSinkId;
3317
- const bucketId = columnIds.includes(colId) ? colId : sddSinkId;
3318
- const bucket = buckets.get(bucketId);
3319
- if (bucket === undefined)
3320
- buckets.set(bucketId, [entity]);
3321
- else
3322
- bucket.push(entity);
3434
+ function orderedByRole(members, order) {
3435
+ const byKey = new Map(members.map((e) => [e.key, e]));
3436
+ const ordered = [];
3437
+ const claimed = new Set;
3438
+ for (const role of order) {
3439
+ const entity = byKey.get(role);
3440
+ if (entity !== undefined) {
3441
+ ordered.push(entity);
3442
+ claimed.add(role);
3443
+ }
3323
3444
  }
3445
+ for (const entity of members) {
3446
+ if (!claimed.has(entity.key))
3447
+ ordered.push(entity);
3448
+ }
3449
+ return ordered;
3450
+ }
3451
+ function buildGroups(view) {
3324
3452
  const rawGroups = [];
3325
3453
  for (const stage of view.stages) {
3326
3454
  const last = rawGroups[rawGroups.length - 1];
@@ -3328,294 +3456,73 @@ function layoutAgents(view) {
3328
3456
  rawGroups.push({
3329
3457
  phase: stage.phase,
3330
3458
  index: rawGroups.length + 1,
3331
- columnIds: [stage.id],
3459
+ stageIds: [stage.id],
3332
3460
  planNote: stage.phase === "autonomous-execute"
3333
3461
  });
3334
3462
  } else {
3335
- last.columnIds.push(stage.id);
3463
+ last.stageIds.push(stage.id);
3336
3464
  }
3337
3465
  }
3338
- const groups = rawGroups.map((g) => ({ ...g, label: { x: 0, y: 0, w: 0, h: 0 } }));
3339
- const cards = new Map;
3340
- const columns = [];
3341
- const subBuckets = new Map;
3342
- let unknown = null;
3343
- const colY = PAD_Y + LABEL_H + COL_PAD;
3344
- let groupX = PAD_X;
3345
- let canvasBottom = colY;
3346
- for (const group of groups) {
3347
- const groupW = group.columnIds.length * (COL_W + COL_GAP) - COL_GAP;
3348
- group.label = { x: groupX, y: PAD_Y, w: groupW, h: LABEL_H };
3349
- let groupBottom = colY;
3350
- group.columnIds.forEach((id, ci) => {
3351
- const colX = groupX + ci * (COL_W + COL_GAP);
3352
- const column = { id, x: colX, y: colY, w: COL_W, h: 0 };
3353
- columns.push(column);
3354
- const list = buckets.get(id) ?? [];
3355
- if (id === sddSinkId && sddStage !== undefined) {
3356
- const implementor = list.filter((e) => e.bucket === "implementor");
3357
- const reviewer = list.filter((e) => e.bucket === "reviewer");
3358
- const rest = list.filter((e) => e.bucket !== "implementor" && e.bucket !== "reviewer");
3359
- const rosterIndex = new Map(KNOWN_AGENTS.map((a, i) => [a.id, i]));
3360
- const implementorKey = (e) => {
3361
- if (e.zone === "flow") {
3362
- const i = sddStage.roles.indexOf(e.role);
3363
- return i === -1 ? Number.MAX_SAFE_INTEGER : i;
3364
- }
3365
- if (e.zone === "on-demand") {
3366
- return sddStage.roles.length + (rosterIndex.get(e.role) ?? Number.MAX_SAFE_INTEGER);
3367
- }
3368
- return Number.MAX_SAFE_INTEGER;
3369
- };
3370
- implementor.sort((a, b) => implementorKey(a) - implementorKey(b));
3371
- const implLabelY = colY + LABEL_H + COL_PAD;
3372
- const implCards = [];
3373
- let cy = implLabelY + SUB_LABEL_H + SUB_GAP;
3374
- for (const entity of implementor) {
3375
- const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
3376
- cards.set(entity.key, box);
3377
- implCards.push(box);
3378
- cy += CARD_H + ROW_GAP;
3379
- }
3380
- const revLabelY = cy;
3381
- const revCards = [];
3382
- cy = revLabelY + SUB_LABEL_H + SUB_GAP;
3383
- for (const entity of reviewer) {
3384
- const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
3385
- cards.set(entity.key, box);
3386
- revCards.push(box);
3387
- cy += CARD_H + ROW_GAP;
3388
- }
3389
- for (const entity of rest) {
3390
- const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
3391
- cards.set(entity.key, box);
3392
- cy += CARD_H + ROW_GAP;
3393
- }
3394
- const colBottom = cy - ROW_GAP;
3395
- column.h = Math.max(colBottom - colY + COL_PAD, CARD_H + LABEL_H + COL_PAD * 2);
3396
- const band = (boxes) => boxes.length === 0 ? null : { x: colX, y: boxes[0].y, w: COL_W, h: boxes[boxes.length - 1].y + CARD_H - boxes[0].y };
3397
- const labelW = CARD_W;
3398
- subBuckets.set(id, {
3399
- implementor: { label: { x: colX + (COL_W - CARD_W) / 2, y: implLabelY, w: labelW }, band: band(implCards) },
3400
- reviewer: { label: { x: colX + (COL_W - CARD_W) / 2, y: revLabelY, w: labelW }, band: band(revCards) }
3401
- });
3402
- } else if (id === unknownSinkId) {
3403
- const flowList = list.filter((e) => e.zone !== GENERAL_BUCKET);
3404
- const generalList = list.filter((e) => e.zone === GENERAL_BUCKET);
3405
- let cy = colY + LABEL_H + COL_PAD;
3406
- for (const entity of flowList) {
3407
- cards.set(entity.key, { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H });
3408
- cy += CARD_H + ROW_GAP;
3409
- }
3410
- const unknownLabelY = cy;
3411
- const unknownBoxes = [];
3412
- cy = unknownLabelY + SUB_LABEL_H + SUB_GAP;
3413
- for (const entity of generalList) {
3414
- const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
3415
- cards.set(entity.key, box);
3416
- unknownBoxes.push(box);
3417
- cy += CARD_H + ROW_GAP;
3418
- }
3419
- const colBottom = cy - ROW_GAP;
3420
- column.h = Math.max(colBottom - colY + COL_PAD, CARD_H + LABEL_H + COL_PAD * 2);
3421
- const labelW = CARD_W;
3422
- unknown = {
3423
- label: { x: colX + (COL_W - CARD_W) / 2, y: unknownLabelY, w: labelW },
3424
- band: unknownBoxes.length === 0 ? null : { x: colX, y: unknownBoxes[0].y, w: COL_W, h: unknownBoxes[unknownBoxes.length - 1].y + CARD_H - unknownBoxes[0].y }
3425
- };
3426
- } else {
3427
- list.forEach((entity, i) => {
3428
- cards.set(entity.key, {
3429
- x: colX + (COL_W - CARD_W) / 2,
3430
- y: colY + LABEL_H + COL_PAD + i * (CARD_H + ROW_GAP),
3431
- w: CARD_W,
3432
- h: CARD_H
3433
- });
3434
- });
3435
- const h = COL_PAD * 2 + LABEL_H + list.length * CARD_H + Math.max(0, list.length - 1) * ROW_GAP;
3436
- column.h = Math.max(h, CARD_H + LABEL_H + COL_PAD * 2);
3437
- }
3438
- groupBottom = Math.max(groupBottom, colY + column.h);
3439
- });
3440
- canvasBottom = Math.max(canvasBottom, groupBottom);
3441
- groupX += groupW + GROUP_GAP;
3442
- }
3443
- return {
3444
- width: groups.length === 0 ? 0 : groupX - GROUP_GAP + PAD_X,
3445
- height: canvasBottom + PAD_Y,
3446
- columns,
3447
- cards,
3448
- subBuckets,
3449
- unknown,
3450
- groups
3451
- };
3452
- }
3453
- function superviseAnchor(anchor, layout) {
3454
- const idx = anchor.lastIndexOf(":");
3455
- if (idx === -1)
3456
- return null;
3457
- const columnId = anchor.slice(0, idx);
3458
- const bucket = anchor.slice(idx + 1);
3459
- if (bucket !== "implementor" && bucket !== "reviewer")
3460
- return null;
3461
- const column = layout.columns.find((c) => c.id === columnId);
3462
- if (column === undefined)
3463
- return null;
3464
- const geometry = layout.subBuckets.get(columnId);
3465
- if (geometry === undefined)
3466
- return null;
3467
- const partition = bucket === "implementor" ? geometry.implementor : geometry.reviewer;
3468
- const band = partition.band;
3469
- if (band === null)
3470
- return null;
3471
- const cardLeft = column.x + (COL_W - CARD_W) / 2;
3472
- const x = cardLeft + CARD_W + SIDE_GAP;
3473
- const y = bucket === "implementor" ? band.y + band.h : band.y;
3474
- return { x, y };
3475
- }
3476
- function portPoint(box, port) {
3477
- switch (port) {
3478
- case "north":
3479
- return { x: box.x + box.w / 2, y: box.y };
3480
- case "south":
3481
- return { x: box.x + box.w / 2, y: box.y + box.h };
3482
- case "west":
3483
- return { x: box.x, y: box.y + box.h / 2 };
3484
- case "east":
3485
- return { x: box.x + box.w, y: box.y + box.h / 2 };
3486
- }
3487
- }
3488
- function columnIndexOfBox(layout, box) {
3489
- return layout.columns.findIndex((c) => box.x >= c.x && box.x < c.x + c.w && box.y >= c.y && box.y < c.y + c.h);
3490
- }
3491
- function captionRows(layout, columnId) {
3492
- const rows = [];
3493
- const geometry = layout.subBuckets.get(columnId);
3494
- if (geometry !== undefined) {
3495
- for (const p of [geometry.implementor, geometry.reviewer]) {
3496
- if (p.band !== null)
3497
- rows.push({ x: p.label.x, y: p.label.y, w: p.label.w, h: SUB_LABEL_H });
3498
- }
3499
- }
3500
- const lastId = layout.columns[layout.columns.length - 1]?.id;
3501
- if (columnId === lastId && layout.unknown !== null && layout.unknown.band !== null) {
3502
- rows.push({ x: layout.unknown.label.x, y: layout.unknown.label.y, w: layout.unknown.label.w, h: SUB_LABEL_H });
3503
- }
3504
- return rows;
3505
- }
3506
- function intermediateCardBoxes(layout, srcCol, tgtCol) {
3507
- const lo = Math.min(srcCol, tgtCol);
3508
- const hi = Math.max(srcCol, tgtCol);
3509
- const boxes = [];
3510
- for (const box of layout.cards.values()) {
3511
- const col = columnIndexOfBox(layout, box);
3512
- if (col > lo && col < hi)
3513
- boxes.push(box);
3514
- }
3515
- return boxes;
3516
- }
3517
- function crossesCardBody(g, layout, srcCol, tgtCol) {
3518
- return intermediateCardBoxes(layout, srcCol, tgtCol).some((card) => boxOverlaps(g, card));
3519
- }
3520
- function horizontalBBox(sx, sy, tx, ty) {
3521
- const dx = tx - sx;
3522
- const off = Math.max(Math.abs(dx) / 2, 24);
3523
- const dir = dx < 0 ? -1 : 1;
3524
- const xs = [sx, tx, sx + dir * off, tx - dir * off];
3525
- const minX = Math.min(...xs);
3526
- const maxX = Math.max(...xs);
3527
- const minY = Math.min(sy, ty);
3528
- const maxY = Math.max(sy, ty);
3529
- return { x: minX, y: minY, w: maxX - minX, h: maxY - minY };
3530
- }
3531
- function boxOverlaps(a, b) {
3532
- return a.x < b.x + b.w && a.x + a.w > b.x && a.y < b.y + b.h && a.y + a.h > b.y;
3533
- }
3534
- function sideGapDetour(sx, sy, endX, endY, sourceBox, targetBox, layout, srcCol, tgtCol) {
3535
- const forward = srcCol < tgtCol;
3536
- const band = intermediateCardBoxes(layout, srcCol, tgtCol);
3537
- const bandBottom = band.reduce((m, c) => Math.max(m, c.y + c.h), 0);
3538
- const detourY = bandBottom + SIDE_GAP;
3539
- const sourceGapX = forward ? sourceBox.x + sourceBox.w + SIDE_GAP : sourceBox.x - SIDE_GAP;
3540
- const targetGapX = forward ? targetBox.x - SIDE_GAP : targetBox.x + targetBox.w + SIDE_GAP;
3541
- const d = `M ${sx} ${sy} L ${sourceGapX} ${sy} L ${sourceGapX} ${detourY} L ${targetGapX} ${detourY} L ${targetGapX} ${endY} L ${endX} ${endY}`;
3542
- return { d, x1: sx, y1: sy, x2: endX, y2: endY };
3543
- }
3544
- function sameColumnStandoff(gap) {
3545
- return Math.min(STANDOFF, Math.max(2, gap - 8));
3546
- }
3547
- function crossesSameColumnCard(layout, cx, startY, endY, sourceBox, targetBox) {
3548
- const seg = { x: cx, y: Math.min(startY, endY), w: 0, h: Math.abs(endY - startY) };
3549
- for (const box of layout.cards.values()) {
3550
- if (box === sourceBox || box === targetBox)
3466
+ const stageById = new Map(view.stages.map((s) => [s.id, s]));
3467
+ const lastStageId = view.stages.length > 0 ? view.stages[view.stages.length - 1].id : null;
3468
+ const implementorHostId = view.stages.find((s) => s.roles.some((r) => SDD_BUCKET_ROLES.implementor.includes(r)))?.id ?? lastStageId;
3469
+ const members = new Map;
3470
+ for (const entity of view.entities) {
3471
+ const stageId = entity.zone === GENERAL_BUCKET ? lastStageId : entity.zone === "on-demand" ? implementorHostId : entity.zone === "flow" && entity.stage !== null ? `${entity.stage.phase}:${entity.stage.stage}` : implementorHostId;
3472
+ if (stageId === null)
3551
3473
  continue;
3552
- if (boxOverlaps(seg, box))
3553
- return true;
3554
- }
3555
- return false;
3556
- }
3557
- function horizontalCurve(sx, sy, tx, ty) {
3558
- const dx = tx - sx;
3559
- const off = Math.max(Math.abs(dx) / 2, 24);
3560
- const dir = dx < 0 ? -1 : 1;
3561
- const d = `M ${sx} ${sy} C ${sx + dir * off} ${sy}, ${tx - dir * off} ${ty}, ${tx} ${ty}`;
3562
- return { d, x1: sx, y1: sy, x2: tx, y2: ty };
3563
- }
3564
- function verticalCurve(sx, sy, tx, ty) {
3565
- const span = ty - sy;
3566
- const d = `M ${sx} ${sy} C ${sx} ${sy + span / 3}, ${tx} ${ty - span / 3}, ${tx} ${ty}`;
3567
- return { d, x1: sx, y1: sy, x2: tx, y2: ty };
3568
- }
3569
- function edgePath(edge, layout) {
3570
- if (edge.kind === "supervise") {
3571
- const source = superviseAnchor(edge.source, layout);
3572
- const target = superviseAnchor(edge.target, layout);
3573
- if (source === null || target === null)
3574
- return null;
3575
- return verticalCurve(source.x, source.y, target.x, target.y);
3576
- }
3577
- const sourceBox = layout.cards.get(edge.source);
3578
- const targetBox = layout.cards.get(edge.target);
3579
- if (sourceBox === undefined || targetBox === undefined)
3580
- return null;
3581
- const srcCol = columnIndexOfBox(layout, sourceBox);
3582
- const tgtCol = columnIndexOfBox(layout, targetBox);
3583
- if (srcCol < tgtCol) {
3584
- const s = portPoint(sourceBox, "east");
3585
- const t = portPoint(targetBox, "west");
3586
- const endX = t.x - STANDOFF;
3587
- if (crossesCardBody(horizontalBBox(s.x, s.y, endX, t.y), layout, srcCol, tgtCol)) {
3588
- return sideGapDetour(s.x, s.y, endX, t.y, sourceBox, targetBox, layout, srcCol, tgtCol);
3589
- }
3590
- return horizontalCurve(s.x, s.y, endX, t.y);
3591
- }
3592
- if (srcCol > tgtCol) {
3593
- const s = portPoint(sourceBox, "west");
3594
- const t = portPoint(targetBox, "east");
3595
- const endX = t.x + STANDOFF;
3596
- if (crossesCardBody(horizontalBBox(s.x, s.y, endX, t.y), layout, srcCol, tgtCol)) {
3597
- return sideGapDetour(s.x, s.y, endX, t.y, sourceBox, targetBox, layout, srcCol, tgtCol);
3598
- }
3599
- return horizontalCurve(s.x, s.y, endX, t.y);
3600
- }
3601
- const forward = sourceBox.y + sourceBox.h <= targetBox.y;
3602
- const gap = forward ? targetBox.y - (sourceBox.y + sourceBox.h) : sourceBox.y - (targetBox.y + targetBox.h);
3603
- const standoff = sameColumnStandoff(gap);
3604
- const cx = sourceBox.x + sourceBox.w / 2;
3605
- const startY = forward ? sourceBox.y + sourceBox.h : sourceBox.y;
3606
- const endY = forward ? targetBox.y - standoff : targetBox.y + targetBox.h + standoff;
3607
- const colId = layout.columns[srcCol]?.id;
3608
- const crossesCaption = colId !== undefined && captionRows(layout, colId).some((row) => cx >= row.x && cx <= row.x + row.w && Math.min(startY, endY) < row.y + row.h && Math.max(startY, endY) > row.y);
3609
- if (crossesCaption || crossesSameColumnCard(layout, cx, startY, endY, sourceBox, targetBox)) {
3610
- const sideX = sourceBox.x - SIDE_GAP;
3611
- return verticalCurve(sideX, startY, sideX, endY);
3474
+ const list = members.get(stageId);
3475
+ if (list === undefined)
3476
+ members.set(stageId, [entity]);
3477
+ else
3478
+ list.push(entity);
3612
3479
  }
3613
- return verticalCurve(cx, startY, cx, endY);
3480
+ return rawGroups.map((raw) => ({
3481
+ phase: raw.phase,
3482
+ index: raw.index,
3483
+ planNote: raw.planNote,
3484
+ stages: raw.stageIds.map((stageId) => {
3485
+ const stage = stageById.get(stageId);
3486
+ const list = members.get(stageId) ?? [];
3487
+ const isImplementorHost = stageId === implementorHostId;
3488
+ const isLast = stageId === lastStageId;
3489
+ const flow = [];
3490
+ const implementor = [];
3491
+ const reviewer = [];
3492
+ const unknown = [];
3493
+ for (const entity of list) {
3494
+ if (isLast && entity.zone === GENERAL_BUCKET)
3495
+ unknown.push(entity);
3496
+ else if (isImplementorHost && entity.bucket === "implementor")
3497
+ implementor.push(entity);
3498
+ else if (isImplementorHost && entity.bucket === "reviewer")
3499
+ reviewer.push(entity);
3500
+ else
3501
+ flow.push(entity);
3502
+ }
3503
+ const buckets = [];
3504
+ if (implementor.length > 0) {
3505
+ buckets.push({ id: "implementor", entities: orderedByRole(implementor, SDD_BUCKET_ROLES.implementor) });
3506
+ }
3507
+ if (reviewer.length > 0) {
3508
+ buckets.push({ id: "reviewer", entities: orderedByRole(reviewer, SDD_BUCKET_ROLES.reviewer) });
3509
+ }
3510
+ if (unknown.length > 0) {
3511
+ buckets.push({ id: UNKNOWN_COLUMN, entities: orderedByRole(unknown, []) });
3512
+ }
3513
+ return {
3514
+ id: stageId,
3515
+ label: stageId.slice(stageId.indexOf(":") + 1),
3516
+ flow: orderedByRole(flow, stage?.roles ?? []),
3517
+ buckets
3518
+ };
3519
+ })
3520
+ }));
3614
3521
  }
3615
3522
  function StatusPoint({ status, done }) {
3616
- const className = agent_canvas_module_default.agentStatusDot + (status === "running" ? ` ${agent_canvas_module_default.agentStatusRunning}` : status === "settled" ? done ? ` ${agent_canvas_module_default.agentStatusSettled}` : ` ${agent_canvas_module_default.agentStatusIdle}` : status === "error" || status === "denied" ? ` ${agent_canvas_module_default.agentStatusError}` : status === "advisory" ? ` ${agent_canvas_module_default.agentStatusAdvisory}` : ` ${agent_canvas_module_default.agentStatusIdle}`);
3523
+ const className = agent_list_module_default.agentStatusDot + (status === "running" ? ` ${agent_list_module_default.agentStatusRunning}` : status === "settled" ? done ? ` ${agent_list_module_default.agentStatusSettled}` : ` ${agent_list_module_default.agentStatusIdle}` : status === "error" || status === "denied" ? ` ${agent_list_module_default.agentStatusError}` : status === "advisory" ? ` ${agent_list_module_default.agentStatusAdvisory}` : ` ${agent_list_module_default.agentStatusIdle}`);
3617
3524
  if (status === "settled" && done) {
3618
- return /* @__PURE__ */ jsx_runtime7.jsx("span", {
3525
+ return /* @__PURE__ */ jsx_runtime9.jsx("span", {
3619
3526
  className,
3620
3527
  "data-agent-status": status,
3621
3528
  "data-agent-done": "true",
@@ -3623,13 +3530,13 @@ function StatusPoint({ status, done }) {
3623
3530
  children: "✓"
3624
3531
  });
3625
3532
  }
3626
- return /* @__PURE__ */ jsx_runtime7.jsx("span", {
3533
+ return /* @__PURE__ */ jsx_runtime9.jsx("span", {
3627
3534
  className,
3628
3535
  "data-agent-status": status,
3629
3536
  "aria-hidden": "true"
3630
3537
  });
3631
3538
  }
3632
- function EntityCard({ entity, t, box }) {
3539
+ function EntityCard({ entity, t }) {
3633
3540
  const running = entity.status === "running";
3634
3541
  const done = entity.status === "settled" && entity.emphasis !== "off";
3635
3542
  const title = entity.idle ? entity.name : entity.role !== "" ? entity.role : entity.name;
@@ -3638,9 +3545,8 @@ function EntityCard({ entity, t, box }) {
3638
3545
  record2.push(entity.agent);
3639
3546
  if (entity.task !== null)
3640
3547
  record2.push(entity.task);
3641
- return /* @__PURE__ */ jsx_runtime7.jsxs("li", {
3642
- className: entity.idle ? `${agent_canvas_module_default.agentCard} ${agent_canvas_module_default.agentCardIdle}` : running ? `${agent_canvas_module_default.agentCard} ${agent_canvas_module_default.agentCardRunning}` : done ? `${agent_canvas_module_default.agentCard} ${agent_canvas_module_default.agentCardDone}` : agent_canvas_module_default.agentCard,
3643
- style: { left: box.x, top: box.y, width: box.w, height: box.h },
3548
+ return /* @__PURE__ */ jsx_runtime9.jsxs("li", {
3549
+ className: entity.idle ? `${agent_list_module_default.agentCard} ${agent_list_module_default.agentCardIdle}` : running ? `${agent_list_module_default.agentCard} ${agent_list_module_default.agentCardRunning}` : done ? `${agent_list_module_default.agentCard} ${agent_list_module_default.agentCardDone}` : agent_list_module_default.agentCard,
3644
3550
  "data-agent-entity": entity.key,
3645
3551
  "data-agent-status": entity.status,
3646
3552
  "data-agent-idle": entity.idle ? "true" : undefined,
@@ -3650,106 +3556,71 @@ function EntityCard({ entity, t, box }) {
3650
3556
  "data-agent-bucket": entity.bucket ?? undefined,
3651
3557
  "data-agent-emphasis": entity.emphasis ?? undefined,
3652
3558
  children: [
3653
- entity.zone === "on-demand" && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3654
- className: agent_canvas_module_default.onDemandBadge,
3559
+ entity.zone === "on-demand" && /* @__PURE__ */ jsx_runtime9.jsx("span", {
3560
+ className: agent_list_module_default.onDemandBadge,
3655
3561
  "data-agent-on-demand": "true",
3656
3562
  children: t("zone.agents.on-demand")
3657
3563
  }),
3658
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3659
- className: agent_canvas_module_default.agentPort,
3660
- "data-agent-port": "north",
3661
- "aria-hidden": "true"
3662
- }),
3663
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3664
- className: agent_canvas_module_default.agentPort,
3665
- "data-agent-port": "south",
3666
- "aria-hidden": "true"
3667
- }),
3668
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3669
- className: agent_canvas_module_default.agentPort,
3670
- "data-agent-port": "west",
3671
- "aria-hidden": "true"
3672
- }),
3673
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3674
- className: agent_canvas_module_default.agentPort,
3675
- "data-agent-port": "east",
3676
- "aria-hidden": "true"
3677
- }),
3678
- /* @__PURE__ */ jsx_runtime7.jsxs("div", {
3679
- className: agent_canvas_module_default.agentCardLine,
3564
+ /* @__PURE__ */ jsx_runtime9.jsxs("div", {
3565
+ className: agent_list_module_default.agentCardLine,
3680
3566
  children: [
3681
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3682
- className: agent_canvas_module_default.agentCardName,
3567
+ /* @__PURE__ */ jsx_runtime9.jsx("span", {
3568
+ className: agent_list_module_default.agentCardName,
3683
3569
  title,
3684
3570
  children: title
3685
3571
  }),
3686
- /* @__PURE__ */ jsx_runtime7.jsx(StatusPoint, {
3572
+ /* @__PURE__ */ jsx_runtime9.jsx(StatusPoint, {
3687
3573
  status: entity.status,
3688
3574
  done
3689
3575
  }),
3690
- entity.count > 1 && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3691
- className: agent_canvas_module_default.agentCount,
3576
+ entity.count > 1 && /* @__PURE__ */ jsx_runtime9.jsx("span", {
3577
+ className: agent_list_module_default.agentCount,
3692
3578
  "data-agent-count": entity.count,
3693
3579
  children: `×${entity.count}`
3694
3580
  })
3695
3581
  ]
3696
3582
  }),
3697
- entity.role !== "" && entity.role !== entity.key && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3698
- className: agent_canvas_module_default.agentRoleChip,
3583
+ entity.role !== "" && entity.role !== entity.key && /* @__PURE__ */ jsx_runtime9.jsx("span", {
3584
+ className: agent_list_module_default.agentRoleChip,
3699
3585
  "data-agent-role": entity.role,
3700
3586
  children: entity.role
3701
3587
  }),
3702
- record2.length > 0 && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3703
- className: agent_canvas_module_default.agentRecord,
3588
+ record2.length > 0 && /* @__PURE__ */ jsx_runtime9.jsx("span", {
3589
+ className: agent_list_module_default.agentRecord,
3704
3590
  "data-agent-record": true,
3705
3591
  children: record2.join(" · ")
3706
3592
  })
3707
3593
  ]
3708
3594
  });
3709
3595
  }
3710
- function AgentCanvasPage({ view, iteration, t, initialPan }) {
3711
- const { entities, edges, degraded, note, executing, pending } = view;
3712
- const [pan, setPan] = import_react2.useState(() => initialPan ?? PAN_ORIGIN);
3713
- const dragRef = import_react2.useRef(null);
3714
- const layout = import_react2.useMemo(() => layoutAgents(view), [view]);
3715
- const edgeGeoms = import_react2.useMemo(() => edges.map((edge) => ({ edge, curve: edgePath(edge, layout) })), [edges, layout]);
3716
- const handlePointerDown = (e) => {
3717
- if (e.button !== 0 || !e.isPrimary)
3718
- return;
3719
- e.preventDefault();
3720
- e.currentTarget.setPointerCapture(e.pointerId);
3721
- dragRef.current = panDragStart(pan, e.clientX, e.clientY);
3722
- };
3723
- const handlePointerMove = (e) => {
3724
- const drag = dragRef.current;
3725
- if (drag === null)
3726
- return;
3727
- setPan(panDragMove(drag, e.clientX, e.clientY));
3728
- };
3729
- const handlePointerEnd = (e) => {
3730
- dragRef.current = null;
3731
- if (e.currentTarget.hasPointerCapture(e.pointerId)) {
3732
- e.currentTarget.releasePointerCapture(e.pointerId);
3733
- }
3734
- };
3735
- const noteInfo = degraded ? { anchor: "degraded", text: t("flow.degraded") } : note === "empty" ? { anchor: "empty", text: t("flow.empty") } : note === "settle-only" ? { anchor: "settle-only", text: t("flow.settle-only") } : null;
3736
- return /* @__PURE__ */ jsx_runtime7.jsxs("div", {
3737
- className: agent_canvas_module_default.canvasPage,
3596
+ function subBucketLabel(id, t) {
3597
+ if (id === "implementor")
3598
+ return t("zone.agents.bucket.implementor");
3599
+ if (id === "reviewer")
3600
+ return t("zone.agents.bucket.reviewer");
3601
+ return t("zone.agents.unknown-sub");
3602
+ }
3603
+ function AgentListPage({ view, iteration, t }) {
3604
+ const { degraded, note, executing, pending } = view;
3605
+ const groups = import_react2.useMemo(() => buildGroups(view), [view]);
3606
+ const noteInfo = degraded ? { anchor: "degraded", text: t("flow.degraded") } : note === "empty" ? { anchor: "empty", text: t("flow.empty") } : note === "settle-only" ? { anchor: "settle-only", text: t("flow.settle-only") } : note === "link-only" ? { anchor: "link-only", text: t("flow.link-only") } : null;
3607
+ return /* @__PURE__ */ jsx_runtime9.jsxs("div", {
3608
+ className: agent_list_module_default.listPage,
3738
3609
  "data-mstar-page": "agents",
3739
3610
  children: [
3740
- /* @__PURE__ */ jsx_runtime7.jsx(IterationInfoSection, {
3611
+ /* @__PURE__ */ jsx_runtime9.jsx(IterationInfoSection, {
3741
3612
  iteration,
3742
3613
  t
3743
3614
  }),
3744
- /* @__PURE__ */ jsx_runtime7.jsxs("header", {
3745
- className: agent_canvas_module_default.canvasHeader,
3615
+ /* @__PURE__ */ jsx_runtime9.jsxs("header", {
3616
+ className: agent_list_module_default.listHeader,
3746
3617
  children: [
3747
- /* @__PURE__ */ jsx_runtime7.jsx("h2", {
3748
- className: agent_canvas_module_default.canvasTitle,
3618
+ /* @__PURE__ */ jsx_runtime9.jsx("h2", {
3619
+ className: agent_list_module_default.listTitle,
3749
3620
  children: t("zone.agents.title")
3750
3621
  }),
3751
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3752
- className: agent_canvas_module_default.canvasSummary,
3622
+ /* @__PURE__ */ jsx_runtime9.jsx("span", {
3623
+ className: agent_list_module_default.listSummary,
3753
3624
  "data-agent-summary": true,
3754
3625
  "data-agent-summary-executing": executing,
3755
3626
  "data-agent-summary-pending": pending,
@@ -3757,172 +3628,81 @@ function AgentCanvasPage({ view, iteration, t, initialPan }) {
3757
3628
  })
3758
3629
  ]
3759
3630
  }),
3760
- noteInfo !== null && /* @__PURE__ */ jsx_runtime7.jsx("p", {
3761
- className: agent_canvas_module_default.canvasNote,
3762
- "data-canvas-note": noteInfo.anchor,
3631
+ noteInfo !== null && /* @__PURE__ */ jsx_runtime9.jsx("p", {
3632
+ className: agent_list_module_default.listNote,
3633
+ "data-agents-note": noteInfo.anchor,
3763
3634
  children: noteInfo.text
3764
3635
  }),
3765
- /* @__PURE__ */ jsx_runtime7.jsx("div", {
3766
- className: agent_canvas_module_default.canvasViewport,
3767
- "data-canvas-viewport": true,
3768
- onPointerDown: handlePointerDown,
3769
- onPointerMove: handlePointerMove,
3770
- onPointerUp: handlePointerEnd,
3771
- onPointerCancel: handlePointerEnd,
3772
- onLostPointerCapture: handlePointerEnd,
3773
- children: /* @__PURE__ */ jsx_runtime7.jsxs("div", {
3774
- className: agent_canvas_module_default.canvasContent,
3775
- "data-canvas-pan": true,
3776
- style: { transform: panTransform(pan), width: layout.width, height: layout.height },
3636
+ /* @__PURE__ */ jsx_runtime9.jsx("div", {
3637
+ className: `${agent_list_module_default.agentList} ${panel_module_default.groupGrid}`,
3638
+ "data-agent-list": true,
3639
+ children: groups.map((group) => /* @__PURE__ */ jsx_runtime9.jsxs("section", {
3640
+ className: agent_list_module_default.agentGroup,
3641
+ "data-agent-group": group.phase,
3642
+ "data-agent-group-index": group.index,
3777
3643
  children: [
3778
- layout.groups.map((group) => /* @__PURE__ */ jsx_runtime7.jsxs("span", {
3779
- className: agent_canvas_module_default.canvasGroupLabel,
3780
- style: { left: group.label.x, top: group.label.y, width: group.label.w },
3781
- "data-canvas-group": group.phase,
3782
- "data-canvas-group-index": group.index,
3644
+ /* @__PURE__ */ jsx_runtime9.jsxs("span", {
3645
+ className: agent_list_module_default.groupLabel,
3783
3646
  children: [
3784
3647
  group.phase === "iteration-start" ? t("zone.agents.group.phase-1") : group.phase === "autonomous-execute" ? t("zone.agents.group.phase-2") : t("zone.agents.group.phase-n", { n: String(group.index) }),
3785
- group.planNote && (view.activePlanId === null ? /* @__PURE__ */ jsx_runtime7.jsx("span", {
3786
- className: agent_canvas_module_default.canvasGroupNoPlan,
3787
- "data-canvas-group-no-plan": true,
3648
+ group.planNote && (view.activePlanId === null ? /* @__PURE__ */ jsx_runtime9.jsx("span", {
3649
+ className: agent_list_module_default.groupNoPlan,
3650
+ "data-agent-group-no-plan": true,
3788
3651
  children: t("zone.agents.group.no-plan")
3789
- }) : /* @__PURE__ */ jsx_runtime7.jsxs("span", {
3790
- className: agent_canvas_module_default.canvasGroupPlan,
3791
- "data-canvas-group-plan": view.activePlanId,
3652
+ }) : /* @__PURE__ */ jsx_runtime9.jsxs("span", {
3653
+ className: agent_list_module_default.groupPlan,
3654
+ "data-agent-group-plan": view.activePlanId,
3792
3655
  children: [
3793
3656
  t("zone.agents.group.plan", { plan: view.activePlanId }),
3794
- view.activePlanCount > 1 && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3795
- className: agent_canvas_module_default.canvasGroupPlanMore,
3796
- "data-canvas-group-plan-more": true,
3657
+ view.activePlanCount > 1 && /* @__PURE__ */ jsx_runtime9.jsx("span", {
3658
+ className: agent_list_module_default.groupPlanMore,
3659
+ "data-agent-group-plan-more": true,
3797
3660
  children: t("zone.agents.group.plan-more", { n: String(view.activePlanCount - 1) })
3798
3661
  })
3799
3662
  ]
3800
3663
  }))
3801
3664
  ]
3802
- }, group.phase)),
3803
- layout.columns.map((col) => /* @__PURE__ */ jsx_runtime7.jsx("span", {
3804
- className: agent_canvas_module_default.canvasColumnLabel,
3805
- style: { left: col.x, top: col.y },
3806
- "data-canvas-column": col.id,
3807
- children: col.id.slice(col.id.indexOf(":") + 1)
3808
- }, col.id)),
3809
- Array.from(layout.subBuckets.entries()).map(([colId, geometry]) => /* @__PURE__ */ jsx_runtime7.jsxs("span", {
3810
- children: [
3811
- geometry.implementor.band !== null && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3812
- className: agent_canvas_module_default.subBucketLabel,
3813
- style: { left: geometry.implementor.label.x, top: geometry.implementor.label.y, width: geometry.implementor.label.w },
3814
- "data-sub-bucket": "implementor",
3815
- children: t("zone.agents.bucket.implementor")
3816
- }),
3817
- geometry.reviewer.band !== null && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3818
- className: agent_canvas_module_default.subBucketLabel,
3819
- style: { left: geometry.reviewer.label.x, top: geometry.reviewer.label.y, width: geometry.reviewer.label.w },
3820
- "data-sub-bucket": "reviewer",
3821
- children: t("zone.agents.bucket.reviewer")
3822
- })
3823
- ]
3824
- }, colId)),
3825
- layout.unknown !== null && layout.unknown.band !== null && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3826
- className: agent_canvas_module_default.subBucketLabel,
3827
- style: { left: layout.unknown.label.x, top: layout.unknown.label.y, width: layout.unknown.label.w },
3828
- "data-sub-bucket": UNKNOWN_COLUMN,
3829
- children: t("zone.agents.unknown-sub")
3830
3665
  }),
3831
- /* @__PURE__ */ jsx_runtime7.jsxs("svg", {
3832
- className: agent_canvas_module_default.canvasEdges,
3833
- width: layout.width,
3834
- height: layout.height,
3835
- "aria-hidden": "true",
3666
+ group.stages.map((stage) => /* @__PURE__ */ jsx_runtime9.jsxs("section", {
3667
+ className: agent_list_module_default.stageGroup,
3668
+ "data-agent-stage": stage.id,
3836
3669
  children: [
3837
- /* @__PURE__ */ jsx_runtime7.jsxs("defs", {
3670
+ /* @__PURE__ */ jsx_runtime9.jsx("span", {
3671
+ className: agent_list_module_default.stageLabel,
3672
+ children: stage.label
3673
+ }),
3674
+ stage.flow.length > 0 && /* @__PURE__ */ jsx_runtime9.jsx("ul", {
3675
+ className: agent_list_module_default.cardList,
3676
+ children: stage.flow.map((entity) => /* @__PURE__ */ jsx_runtime9.jsx(EntityCard, {
3677
+ entity,
3678
+ t
3679
+ }, entity.key))
3680
+ }),
3681
+ stage.buckets.map((bucket) => /* @__PURE__ */ jsx_runtime9.jsxs("section", {
3682
+ className: agent_list_module_default.subBucket,
3683
+ "data-sub-bucket": bucket.id,
3838
3684
  children: [
3839
- /* @__PURE__ */ jsx_runtime7.jsx("marker", {
3840
- id: "canvas-arrow-actual",
3841
- markerUnits: "userSpaceOnUse",
3842
- viewBox: "0 0 6 8",
3843
- refX: "6",
3844
- refY: "4",
3845
- markerWidth: "6",
3846
- markerHeight: "8",
3847
- orient: "auto",
3848
- children: /* @__PURE__ */ jsx_runtime7.jsx("path", {
3849
- className: agent_canvas_module_default.canvasArrowActual,
3850
- d: "M 0 1 L 6 4 L 0 7 z"
3851
- })
3852
- }),
3853
- /* @__PURE__ */ jsx_runtime7.jsx("marker", {
3854
- id: "canvas-arrow-supervise",
3855
- markerUnits: "userSpaceOnUse",
3856
- viewBox: "0 0 6 8",
3857
- refX: "6",
3858
- refY: "4",
3859
- markerWidth: "6",
3860
- markerHeight: "8",
3861
- orient: "auto-start-reverse",
3862
- children: /* @__PURE__ */ jsx_runtime7.jsx("path", {
3863
- className: agent_canvas_module_default.canvasArrowSupervise,
3864
- d: "M 0 1 L 6 4 L 0 7 z"
3865
- })
3685
+ /* @__PURE__ */ jsx_runtime9.jsx("span", {
3686
+ className: agent_list_module_default.subBucketLabel,
3687
+ children: subBucketLabel(bucket.id, t)
3866
3688
  }),
3867
- /* @__PURE__ */ jsx_runtime7.jsx("marker", {
3868
- id: "canvas-arrow-supervise-lit",
3869
- markerUnits: "userSpaceOnUse",
3870
- viewBox: "0 0 6 8",
3871
- refX: "6",
3872
- refY: "4",
3873
- markerWidth: "6",
3874
- markerHeight: "8",
3875
- orient: "auto-start-reverse",
3876
- children: /* @__PURE__ */ jsx_runtime7.jsx("path", {
3877
- className: agent_canvas_module_default.canvasArrowSuperviseLit,
3878
- d: "M 0 1 L 6 4 L 0 7 z"
3879
- })
3689
+ /* @__PURE__ */ jsx_runtime9.jsx("ul", {
3690
+ className: agent_list_module_default.cardList,
3691
+ children: bucket.entities.map((entity) => /* @__PURE__ */ jsx_runtime9.jsx(EntityCard, {
3692
+ entity,
3693
+ t
3694
+ }, entity.key))
3880
3695
  })
3881
3696
  ]
3882
- }),
3883
- edgeGeoms.map((geom, i) => {
3884
- const curve = geom.curve;
3885
- if (curve === null)
3886
- return null;
3887
- if (geom.edge.kind === "supervise") {
3888
- const lit = geom.edge.evidenced === true;
3889
- return /* @__PURE__ */ jsx_runtime7.jsx("path", {
3890
- className: `${agent_canvas_module_default.canvasEdgeCurve} ${lit ? `${agent_canvas_module_default.canvasEdgeSupervise} ${agent_canvas_module_default.canvasEdgeSuperviseLit}` : agent_canvas_module_default.canvasEdgeSupervise}`,
3891
- d: curve.d,
3892
- markerStart: lit ? "url(#canvas-arrow-supervise-lit)" : "url(#canvas-arrow-supervise)",
3893
- markerEnd: lit ? "url(#canvas-arrow-supervise-lit)" : "url(#canvas-arrow-supervise)",
3894
- "data-agent-edge-supervise": `${geom.edge.source}->${geom.edge.target}`,
3895
- "data-agent-edge-supervise-lit": lit ? "true" : undefined
3896
- }, `supervise-${i}-${geom.edge.source}-${geom.edge.target}`);
3897
- }
3898
- return /* @__PURE__ */ jsx_runtime7.jsx("path", {
3899
- className: `${agent_canvas_module_default.canvasEdgeCurve} ${agent_canvas_module_default.canvasEdgeActual}`,
3900
- d: curve.d,
3901
- markerEnd: "url(#canvas-arrow-actual)",
3902
- "data-agent-edge-actual": `${geom.edge.source}->${geom.edge.target}`
3903
- }, `actual-${i}-${geom.edge.source}-${geom.edge.target}`);
3904
- })
3697
+ }, bucket.id))
3905
3698
  ]
3906
- }),
3907
- /* @__PURE__ */ jsx_runtime7.jsx("ul", {
3908
- className: agent_canvas_module_default.canvasCards,
3909
- children: entities.map((entity) => {
3910
- const box = layout.cards.get(entity.key);
3911
- if (box === undefined)
3912
- return null;
3913
- return /* @__PURE__ */ jsx_runtime7.jsx(EntityCard, {
3914
- entity,
3915
- t,
3916
- box
3917
- }, entity.key);
3918
- })
3919
- })
3699
+ }, stage.id))
3920
3700
  ]
3921
- })
3701
+ }, group.phase))
3922
3702
  }),
3923
- /* @__PURE__ */ jsx_runtime7.jsx("div", {
3924
- className: agent_canvas_module_default.canvasLegend,
3925
- children: /* @__PURE__ */ jsx_runtime7.jsx(Legend, {
3703
+ /* @__PURE__ */ jsx_runtime9.jsx("div", {
3704
+ className: agent_list_module_default.listLegend,
3705
+ children: /* @__PURE__ */ jsx_runtime9.jsx(Legend, {
3926
3706
  t
3927
3707
  })
3928
3708
  })
@@ -3986,15 +3766,9 @@ var css4 = `
3986
3766
 
3987
3767
 
3988
3768
 
3769
+
3989
3770
  .\\38 e395e34_eventLogPage {
3990
- flex: 1;
3991
- min-height: 0;
3992
- display: grid;
3993
- grid-template-columns: repeat(2, minmax(0, 1fr));
3994
- grid-template-rows: minmax(0, 1fr);
3995
- gap: var(--mstar-space-3);
3996
- padding: var(--mstar-space-3);
3997
- overflow: hidden;
3771
+ min-width: 0;
3998
3772
  }
3999
3773
 
4000
3774
 
@@ -4004,7 +3778,6 @@ var css4 = `
4004
3778
  flex-direction: column;
4005
3779
  gap: var(--mstar-space-2);
4006
3780
  min-width: 0;
4007
- min-height: 0;
4008
3781
  padding: var(--mstar-space-3);
4009
3782
  border: 1px solid var(--dsw-alias-border-l1);
4010
3783
  border-radius: 8px;
@@ -4038,9 +3811,6 @@ var css4 = `
4038
3811
  margin: 0;
4039
3812
  padding: 0;
4040
3813
  list-style: none;
4041
- flex: 1;
4042
- min-height: 0;
4043
- overflow-y: auto;
4044
3814
  }
4045
3815
 
4046
3816
 
@@ -4235,15 +4005,6 @@ var css4 = `
4235
4005
  .bd3cb6ff_detailValueMissing {
4236
4006
  color: var(--dsw-alias-label-caption);
4237
4007
  }
4238
-
4239
-
4240
-
4241
- @media (max-width: 1200px) {
4242
- .\\38 e395e34_eventLogPage {
4243
- grid-template-columns: 1fr;
4244
- grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
4245
- }
4246
- }
4247
4008
  `;
4248
4009
  var tagId4 = "@mstar-harness/dsh/event-log.module.css";
4249
4010
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId4) + "]") === null) {
@@ -4256,7 +4017,7 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
4256
4017
  var event_log_module_default = { eventLogPage: "8e395e34_eventLogPage", section: "fcdd0ccc_section", sectionTitle: "aded23ea_sectionTitle", empty: "18a7beee_empty", rowList: "40959323_rowList", eventSummary: "5a6ad2b9_eventSummary", violationSummary: "c5acc9f0_violationSummary", eventDetails: "1e6e6b57_eventDetails", eventRole: "397ccf2b_eventRole", eventStage: "18dd486b_eventStage", eventTarget: "90ce3f22_eventTarget", eventTime: "ae6064ce_eventTime", eventAgent: "ff483c84_eventAgent", eventDuration: "3e37545b_eventDuration", statusChip: "c32c2c65_statusChip", statusDot: "88d97a8a_statusDot", statusDispatched: "d260dfec_statusDispatched", statusAdvisory: "8bbef368_statusAdvisory", statusDenied: "d1f67934_statusDenied", statusOk: "ba35cad1_statusOk", statusError: "819501bf_statusError", statusUnknown: "53c75757_statusUnknown", settledMark: "398c5713_settledMark", settleGlyph: "83e240f0_settleGlyph", unexpectedBadge: "88450335_unexpectedBadge", severityChip: "8f4e5388_severityChip", violationCode: "e42c0bfd_violationCode", violationMessage: "35d5910f_violationMessage", detailBody: "558cab30_detailBody", detailField: "3f8595e8_detailField", detailLabel: "a6812cb2_detailLabel", detailValue: "079e736d_detailValue", detailValueMissing: "bd3cb6ff_detailValueMissing" };
4257
4018
 
4258
4019
  // src/client/panel/pages/EventLogPage.tsx
4259
- var jsx_runtime8 = require("react/jsx-runtime");
4020
+ var jsx_runtime10 = require("react/jsx-runtime");
4260
4021
  function flowStatusLabel(status, t) {
4261
4022
  switch (status) {
4262
4023
  case "dispatched":
@@ -4307,16 +4068,16 @@ function orDash(value) {
4307
4068
  }
4308
4069
  function DetailField({ field, label, value }) {
4309
4070
  const missing = value === "";
4310
- return /* @__PURE__ */ jsx_runtime8.jsxs("div", {
4071
+ return /* @__PURE__ */ jsx_runtime10.jsxs("div", {
4311
4072
  className: event_log_module_default.detailField,
4312
4073
  "data-event-log-field": field,
4313
4074
  "data-event-log-missing": missing ? "true" : "false",
4314
4075
  children: [
4315
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
4076
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4316
4077
  className: event_log_module_default.detailLabel,
4317
4078
  children: label
4318
4079
  }),
4319
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
4080
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4320
4081
  className: missing ? `${event_log_module_default.detailValue} ${event_log_module_default.detailValueMissing}` : event_log_module_default.detailValue,
4321
4082
  children: missing ? "—" : value
4322
4083
  })
@@ -4328,88 +4089,93 @@ function EventDetailsBody({
4328
4089
  source,
4329
4090
  t
4330
4091
  }) {
4331
- return /* @__PURE__ */ jsx_runtime8.jsxs("div", {
4092
+ return /* @__PURE__ */ jsx_runtime10.jsxs("div", {
4332
4093
  className: event_log_module_default.detailBody,
4333
4094
  "data-event-log-detail-body": true,
4334
4095
  children: [
4335
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4096
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4336
4097
  field: "role",
4337
4098
  label: t("event-log.field.role"),
4338
4099
  value: entry.role
4339
4100
  }),
4340
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4101
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4341
4102
  field: "agent",
4342
4103
  label: t("event-log.field.agent"),
4343
4104
  value: entry.agent
4344
4105
  }),
4345
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4106
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4346
4107
  field: "stage",
4347
4108
  label: t("event-log.field.stage"),
4348
4109
  value: entry.stage
4349
4110
  }),
4350
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4111
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4351
4112
  field: "plan",
4352
4113
  label: t("event-log.field.plan"),
4353
4114
  value: source?.planId ?? ""
4354
4115
  }),
4355
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4116
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4356
4117
  field: "task",
4357
4118
  label: t("event-log.field.task"),
4358
4119
  value: source?.taskId ?? ""
4359
4120
  }),
4360
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4121
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4361
4122
  field: "category",
4362
4123
  label: t("event-log.field.category"),
4363
4124
  value: source?.taskCategory ?? ""
4364
4125
  }),
4365
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4126
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4366
4127
  field: "time",
4367
4128
  label: t("event-log.field.time"),
4368
4129
  value: source === undefined ? "" : formatEventTimeFull(source.ts)
4369
4130
  }),
4370
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4131
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4371
4132
  field: "kind",
4372
4133
  label: t("event-log.field.kind"),
4373
4134
  value: entry.eventKind === "dispatch" ? t("event-log.kind.dispatch") : entry.eventKind === "settle" ? t("event-log.kind.settle") : entry.eventKind
4374
4135
  }),
4375
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4136
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4376
4137
  field: "status",
4377
4138
  label: t("event-log.field.status"),
4378
4139
  value: flowStatusLabel(entry.status, t)
4379
4140
  }),
4380
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4141
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4381
4142
  field: "expected",
4382
4143
  label: t("event-log.field.expected"),
4383
- value: entry.eventKind === "settle" || isWorkflowKind(entry.eventKind) ? "" : entry.expected ? t("event-log.yes") : t("event-log.no")
4144
+ value: entry.eventKind === "settle" || entry.eventKind === "subagent-link" || isWorkflowKind(entry.eventKind) ? "" : entry.expected ? t("event-log.yes") : t("event-log.no")
4384
4145
  }),
4385
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4146
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4386
4147
  field: "settled",
4387
4148
  label: t("event-log.field.settled"),
4388
- value: entry.eventKind === "settle" || isWorkflowKind(entry.eventKind) ? "" : entry.settled ? t("event-log.yes") : t("event-log.no")
4149
+ value: entry.eventKind === "settle" || entry.eventKind === "subagent-link" || isWorkflowKind(entry.eventKind) ? "" : entry.settled ? t("event-log.yes") : t("event-log.no")
4389
4150
  }),
4390
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4151
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4391
4152
  field: "duration",
4392
4153
  label: t("event-log.field.duration"),
4393
4154
  value: entry.durationMs === null ? "" : `${entry.durationMs}ms`
4394
4155
  }),
4395
- isWorkflowKind(entry.eventKind) && /* @__PURE__ */ jsx_runtime8.jsxs(jsx_runtime8.Fragment, {
4156
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4157
+ field: "child-id",
4158
+ label: t("event-log.field.child-id"),
4159
+ value: source?.childId ?? ""
4160
+ }),
4161
+ isWorkflowKind(entry.eventKind) && /* @__PURE__ */ jsx_runtime10.jsxs(jsx_runtime10.Fragment, {
4396
4162
  children: [
4397
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4163
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4398
4164
  field: "run-id",
4399
4165
  label: t("event-log.field.run-id"),
4400
4166
  value: source?.runId ?? ""
4401
4167
  }),
4402
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4168
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4403
4169
  field: "name",
4404
4170
  label: t("event-log.field.name"),
4405
4171
  value: entry.name
4406
4172
  }),
4407
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4173
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4408
4174
  field: "members",
4409
4175
  label: t("event-log.field.members"),
4410
4176
  value: source?.memberCount !== undefined ? String(source.memberCount) : ""
4411
4177
  }),
4412
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4178
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4413
4179
  field: "stop-reason",
4414
4180
  label: t("event-log.field.stop-reason"),
4415
4181
  value: source?.stopReason ?? ""
@@ -4426,68 +4192,68 @@ function EventLogEventRow({
4426
4192
  }) {
4427
4193
  const time = formatEventTime(entry.ts);
4428
4194
  const workflowIdentity = isWorkflowKind(entry.eventKind) ? entry.name !== "" ? entry.name : entry.runId !== "" ? entry.runId : "" : "";
4429
- return /* @__PURE__ */ jsx_runtime8.jsx("li", {
4195
+ return /* @__PURE__ */ jsx_runtime10.jsx("li", {
4430
4196
  className: event_log_module_default.eventRow,
4431
4197
  "data-event-log-row-kind": "event",
4432
4198
  "data-event-log-row-id": entry.id,
4433
4199
  "data-event-log-expected": entry.expected ? "true" : "false",
4434
- children: /* @__PURE__ */ jsx_runtime8.jsxs("details", {
4200
+ children: /* @__PURE__ */ jsx_runtime10.jsxs("details", {
4435
4201
  className: event_log_module_default.eventDetails,
4436
4202
  "data-event-log-details": true,
4437
4203
  children: [
4438
- /* @__PURE__ */ jsx_runtime8.jsxs("summary", {
4204
+ /* @__PURE__ */ jsx_runtime10.jsxs("summary", {
4439
4205
  className: event_log_module_default.eventSummary,
4440
4206
  "data-event-log-summary": true,
4441
4207
  children: [
4442
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
4208
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4443
4209
  className: event_log_module_default.eventRole,
4444
- children: entry.eventKind === "settle" ? /* @__PURE__ */ jsx_runtime8.jsx("span", {
4210
+ children: entry.eventKind === "settle" ? /* @__PURE__ */ jsx_runtime10.jsx("span", {
4445
4211
  className: event_log_module_default.settleGlyph,
4446
4212
  "aria-hidden": "true",
4447
4213
  children: "✓"
4448
- }) : workflowIdentity !== "" ? /* @__PURE__ */ jsx_runtime8.jsx("span", {
4214
+ }) : workflowIdentity !== "" ? /* @__PURE__ */ jsx_runtime10.jsx("span", {
4449
4215
  "data-event-log-name": workflowIdentity,
4450
4216
  children: workflowIdentity
4451
4217
  }) : entry.role !== "" ? entry.role : t("panel.unknown")
4452
4218
  }),
4453
- entry.stage !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
4219
+ entry.stage !== "" && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4454
4220
  className: event_log_module_default.eventStage,
4455
4221
  "data-event-log-stage": entry.stage,
4456
4222
  children: entry.stage
4457
4223
  }),
4458
- entry.task !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
4224
+ entry.task !== "" && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4459
4225
  className: event_log_module_default.eventTarget,
4460
4226
  "data-event-log-target": entry.task,
4461
4227
  children: entry.task
4462
4228
  }),
4463
- time !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
4229
+ time !== "" && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4464
4230
  className: event_log_module_default.eventTime,
4465
4231
  "data-event-log-time": time,
4466
4232
  children: time
4467
4233
  }),
4468
- /* @__PURE__ */ jsx_runtime8.jsxs("span", {
4234
+ /* @__PURE__ */ jsx_runtime10.jsxs("span", {
4469
4235
  className: `${event_log_module_default.statusChip} ${flowStatusClass(entry.status)}`,
4470
4236
  "data-event-log-status": entry.status,
4471
4237
  children: [
4472
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
4238
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4473
4239
  className: event_log_module_default.statusDot,
4474
4240
  "aria-hidden": "true"
4475
4241
  }),
4476
4242
  flowStatusLabel(entry.status, t)
4477
4243
  ]
4478
4244
  }),
4479
- entry.eventKind === "dispatch" && entry.settled && /* @__PURE__ */ jsx_runtime8.jsx("span", {
4245
+ entry.eventKind === "dispatch" && entry.settled && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4480
4246
  className: event_log_module_default.settledMark,
4481
4247
  "data-event-log-settled": "true",
4482
4248
  "aria-hidden": "true",
4483
4249
  children: "✓"
4484
4250
  }),
4485
- entry.agent !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
4251
+ entry.agent !== "" && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4486
4252
  className: event_log_module_default.eventAgent,
4487
4253
  "data-event-log-agent": entry.agent,
4488
4254
  children: entry.agent
4489
4255
  }),
4490
- entry.durationMs !== null && /* @__PURE__ */ jsx_runtime8.jsxs("span", {
4256
+ entry.durationMs !== null && /* @__PURE__ */ jsx_runtime10.jsxs("span", {
4491
4257
  className: event_log_module_default.eventDuration,
4492
4258
  "data-event-log-duration": entry.durationMs,
4493
4259
  children: [
@@ -4495,14 +4261,14 @@ function EventLogEventRow({
4495
4261
  "ms"
4496
4262
  ]
4497
4263
  }),
4498
- entry.eventKind === "dispatch" && !entry.expected && /* @__PURE__ */ jsx_runtime8.jsx("span", {
4264
+ entry.eventKind === "dispatch" && !entry.expected && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4499
4265
  className: event_log_module_default.unexpectedBadge,
4500
4266
  "data-event-log-unexpected": "true",
4501
4267
  children: t("flow.unexpected")
4502
4268
  })
4503
4269
  ]
4504
4270
  }),
4505
- /* @__PURE__ */ jsx_runtime8.jsx(EventDetailsBody, {
4271
+ /* @__PURE__ */ jsx_runtime10.jsx(EventDetailsBody, {
4506
4272
  entry,
4507
4273
  source,
4508
4274
  t
@@ -4513,50 +4279,50 @@ function EventLogEventRow({
4513
4279
  }
4514
4280
  function ViolationRow({ entry, t }) {
4515
4281
  const severity = entry.severity !== "" ? entry.severity : "unknown";
4516
- return /* @__PURE__ */ jsx_runtime8.jsx("li", {
4282
+ return /* @__PURE__ */ jsx_runtime10.jsx("li", {
4517
4283
  className: event_log_module_default.violationRow,
4518
4284
  "data-event-log-row-kind": "violation",
4519
4285
  "data-event-log-row-id": entry.id,
4520
- children: /* @__PURE__ */ jsx_runtime8.jsxs("details", {
4286
+ children: /* @__PURE__ */ jsx_runtime10.jsxs("details", {
4521
4287
  className: event_log_module_default.eventDetails,
4522
4288
  "data-event-log-details": true,
4523
4289
  children: [
4524
- /* @__PURE__ */ jsx_runtime8.jsxs("summary", {
4290
+ /* @__PURE__ */ jsx_runtime10.jsxs("summary", {
4525
4291
  className: event_log_module_default.violationSummary,
4526
4292
  "data-event-log-summary": true,
4527
4293
  children: [
4528
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
4294
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4529
4295
  className: event_log_module_default.severityChip,
4530
4296
  "data-event-log-severity": severity,
4531
4297
  children: entry.severity !== "" ? entry.severity : t("panel.unknown")
4532
4298
  }),
4533
- entry.code !== "" && /* @__PURE__ */ jsx_runtime8.jsx("code", {
4299
+ entry.code !== "" && /* @__PURE__ */ jsx_runtime10.jsx("code", {
4534
4300
  className: event_log_module_default.violationCode,
4535
4301
  "data-event-log-code": entry.code,
4536
4302
  children: entry.code
4537
4303
  }),
4538
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
4304
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4539
4305
  className: event_log_module_default.violationMessage,
4540
4306
  "data-event-log-message": entry.message,
4541
4307
  children: orDash(entry.message)
4542
4308
  })
4543
4309
  ]
4544
4310
  }),
4545
- /* @__PURE__ */ jsx_runtime8.jsxs("div", {
4311
+ /* @__PURE__ */ jsx_runtime10.jsxs("div", {
4546
4312
  className: event_log_module_default.detailBody,
4547
4313
  "data-event-log-detail-body": true,
4548
4314
  children: [
4549
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4315
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4550
4316
  field: "severity",
4551
4317
  label: t("event-log.field.severity"),
4552
4318
  value: entry.severity
4553
4319
  }),
4554
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4320
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4555
4321
  field: "code",
4556
4322
  label: t("event-log.field.code"),
4557
4323
  value: entry.code
4558
4324
  }),
4559
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4325
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4560
4326
  field: "message",
4561
4327
  label: t("event-log.field.message"),
4562
4328
  value: entry.message
@@ -4573,38 +4339,38 @@ function EventLogPage({ view, t }) {
4573
4339
  const violationEntries = entries.filter((e) => e.kind === "violation");
4574
4340
  const eventById = new Map(view.events.map((event) => [event.id, event]));
4575
4341
  if (eventEntries.length === 0 && violationEntries.length === 0) {
4576
- return /* @__PURE__ */ jsx_runtime8.jsx("div", {
4342
+ return /* @__PURE__ */ jsx_runtime10.jsx("div", {
4577
4343
  className: event_log_module_default.eventLogPage,
4578
4344
  "data-mstar-page": "events",
4579
- children: /* @__PURE__ */ jsx_runtime8.jsx("p", {
4345
+ children: /* @__PURE__ */ jsx_runtime10.jsx("p", {
4580
4346
  className: event_log_module_default.empty,
4581
4347
  "data-event-log-empty": true,
4582
4348
  children: t("event-log.empty")
4583
4349
  })
4584
4350
  });
4585
4351
  }
4586
- return /* @__PURE__ */ jsx_runtime8.jsxs("div", {
4587
- className: event_log_module_default.eventLogPage,
4352
+ return /* @__PURE__ */ jsx_runtime10.jsxs("div", {
4353
+ className: `${event_log_module_default.eventLogPage} ${panel_module_default.groupGrid}`,
4588
4354
  "data-mstar-page": "events",
4589
4355
  children: [
4590
- /* @__PURE__ */ jsx_runtime8.jsxs("section", {
4356
+ /* @__PURE__ */ jsx_runtime10.jsxs("section", {
4591
4357
  className: event_log_module_default.section,
4592
4358
  "data-event-log-section": "events",
4593
4359
  "data-event-log-section-count": eventEntries.length,
4594
4360
  children: [
4595
- /* @__PURE__ */ jsx_runtime8.jsx("h2", {
4361
+ /* @__PURE__ */ jsx_runtime10.jsx("h2", {
4596
4362
  className: event_log_module_default.sectionTitle,
4597
4363
  "data-event-log-section-title": true,
4598
4364
  children: t("event-log.section.events")
4599
4365
  }),
4600
- eventEntries.length === 0 ? /* @__PURE__ */ jsx_runtime8.jsx("p", {
4366
+ eventEntries.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx("p", {
4601
4367
  className: event_log_module_default.empty,
4602
4368
  "data-event-log-empty-section": "events",
4603
4369
  children: t("event-log.empty.events")
4604
- }) : /* @__PURE__ */ jsx_runtime8.jsx("ul", {
4370
+ }) : /* @__PURE__ */ jsx_runtime10.jsx("ul", {
4605
4371
  className: event_log_module_default.rowList,
4606
4372
  "data-event-log-list": "events",
4607
- children: eventEntries.map((entry) => /* @__PURE__ */ jsx_runtime8.jsx(EventLogEventRow, {
4373
+ children: eventEntries.map((entry) => /* @__PURE__ */ jsx_runtime10.jsx(EventLogEventRow, {
4608
4374
  entry,
4609
4375
  source: eventById.get(entry.id),
4610
4376
  t
@@ -4612,24 +4378,24 @@ function EventLogPage({ view, t }) {
4612
4378
  })
4613
4379
  ]
4614
4380
  }),
4615
- /* @__PURE__ */ jsx_runtime8.jsxs("section", {
4381
+ /* @__PURE__ */ jsx_runtime10.jsxs("section", {
4616
4382
  className: event_log_module_default.section,
4617
4383
  "data-event-log-section": "violations",
4618
4384
  "data-event-log-section-count": violationEntries.length,
4619
4385
  children: [
4620
- /* @__PURE__ */ jsx_runtime8.jsx("h2", {
4386
+ /* @__PURE__ */ jsx_runtime10.jsx("h2", {
4621
4387
  className: event_log_module_default.sectionTitle,
4622
4388
  "data-event-log-section-title": true,
4623
4389
  children: t("event-log.section.violations")
4624
4390
  }),
4625
- violationEntries.length === 0 ? /* @__PURE__ */ jsx_runtime8.jsx("p", {
4391
+ violationEntries.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx("p", {
4626
4392
  className: event_log_module_default.empty,
4627
4393
  "data-event-log-empty-section": "violations",
4628
4394
  children: t("event-log.empty.violations")
4629
- }) : /* @__PURE__ */ jsx_runtime8.jsx("ul", {
4395
+ }) : /* @__PURE__ */ jsx_runtime10.jsx("ul", {
4630
4396
  className: event_log_module_default.rowList,
4631
4397
  "data-event-log-list": "violations",
4632
- children: violationEntries.map((entry) => /* @__PURE__ */ jsx_runtime8.jsx(ViolationRow, {
4398
+ children: violationEntries.map((entry) => /* @__PURE__ */ jsx_runtime10.jsx(ViolationRow, {
4633
4399
  entry,
4634
4400
  t
4635
4401
  }, entry.id))
@@ -4642,7 +4408,7 @@ function EventLogPage({ view, t }) {
4642
4408
 
4643
4409
  // src/client/panel/zones/TaskBoard.tsx
4644
4410
  var React = __toESM(require("react"));
4645
- var jsx_runtime9 = require("react/jsx-runtime");
4411
+ var jsx_runtime11 = require("react/jsx-runtime");
4646
4412
  var COLUMN_TITLE = {
4647
4413
  Todo: "zone.state.Todo",
4648
4414
  InProgress: "zone.state.InProgress",
@@ -4675,97 +4441,93 @@ function TaskBoard({ view, t }) {
4675
4441
  const empty = view.total === 0;
4676
4442
  const [expanded, setExpanded] = React.useState(new Set);
4677
4443
  const toggle = (id) => setExpanded((prev) => toggleKanbanExpanded(prev, id));
4678
- return /* @__PURE__ */ jsx_runtime9.jsxs("section", {
4444
+ return /* @__PURE__ */ jsx_runtime11.jsxs("section", {
4679
4445
  className: zones_module_default.zone,
4680
4446
  "data-zone": "tasks",
4681
4447
  children: [
4682
- /* @__PURE__ */ jsx_runtime9.jsxs("header", {
4448
+ /* @__PURE__ */ jsx_runtime11.jsxs("header", {
4683
4449
  className: zones_module_default.tasksHeader,
4684
4450
  "data-zone-header": true,
4685
4451
  children: [
4686
- /* @__PURE__ */ jsx_runtime9.jsx("h2", {
4452
+ /* @__PURE__ */ jsx_runtime11.jsx("h2", {
4687
4453
  className: zones_module_default.zoneHeader,
4688
4454
  children: t("zone.tasks.title")
4689
4455
  }),
4690
- /* @__PURE__ */ jsx_runtime9.jsx("span", {
4456
+ /* @__PURE__ */ jsx_runtime11.jsx("span", {
4691
4457
  className: zones_module_default.tasksTotal,
4692
4458
  "data-tasks-total": view.total,
4693
4459
  children: t("zone.tasks.total", { count: String(view.total) })
4694
4460
  })
4695
4461
  ]
4696
4462
  }),
4697
- empty && /* @__PURE__ */ jsx_runtime9.jsx("p", {
4463
+ empty && /* @__PURE__ */ jsx_runtime11.jsx("p", {
4698
4464
  className: zones_module_default.zoneEmpty,
4699
4465
  "data-zone-empty": "no-plans",
4700
4466
  children: t("zone.tasks.no-plans")
4701
4467
  }),
4702
- /* @__PURE__ */ jsx_runtime9.jsx("div", {
4703
- className: zones_module_default.kanban,
4468
+ /* @__PURE__ */ jsx_runtime11.jsx("div", {
4469
+ className: `${zones_module_default.kanban} ${panel_module_default.groupGrid}`,
4704
4470
  "data-mstar-kanban": true,
4705
- children: columns.map((column, i) => {
4706
- const arrow = i > 0 ? leadingArrow(column.id) : null;
4471
+ children: columns.map((column) => {
4472
+ const arrow = leadingArrow(column.id);
4707
4473
  const isExpanded = expanded.has(column.id);
4708
4474
  const shown = visibleKanbanPlans(column, isExpanded);
4709
4475
  const overflow = column.capped === null ? 0 : column.count - column.capped;
4710
- return /* @__PURE__ */ jsx_runtime9.jsxs(React.Fragment, {
4476
+ return /* @__PURE__ */ jsx_runtime11.jsxs("div", {
4477
+ className: zones_module_default.kanbanColumn,
4478
+ "data-kanban-column": column.id,
4711
4479
  children: [
4712
- arrow !== null && /* @__PURE__ */ jsx_runtime9.jsx("span", {
4713
- className: zones_module_default.kanbanArrow,
4714
- "data-kanban-arrow": arrow.label,
4715
- "aria-hidden": "true",
4716
- children: arrow.glyph
4480
+ /* @__PURE__ */ jsx_runtime11.jsxs("header", {
4481
+ className: zones_module_default.kanbanColumnHeader,
4482
+ children: [
4483
+ arrow !== null && /* @__PURE__ */ jsx_runtime11.jsx("span", {
4484
+ className: zones_module_default.kanbanArrow,
4485
+ "data-kanban-arrow": arrow.label,
4486
+ "aria-hidden": "true",
4487
+ children: arrow.glyph
4488
+ }),
4489
+ /* @__PURE__ */ jsx_runtime11.jsx("span", {
4490
+ className: zones_module_default.kanbanColumnTitle,
4491
+ children: t(COLUMN_TITLE[column.id])
4492
+ }),
4493
+ /* @__PURE__ */ jsx_runtime11.jsx("span", {
4494
+ className: zones_module_default.kanbanCount,
4495
+ "data-kanban-count": column.count,
4496
+ children: column.count
4497
+ })
4498
+ ]
4717
4499
  }),
4718
- /* @__PURE__ */ jsx_runtime9.jsxs("div", {
4719
- className: zones_module_default.kanbanColumn,
4720
- "data-kanban-column": column.id,
4500
+ /* @__PURE__ */ jsx_runtime11.jsxs("ul", {
4501
+ className: zones_module_default.kanbanCards,
4502
+ id: `kanban-cards-${column.id}`,
4721
4503
  children: [
4722
- /* @__PURE__ */ jsx_runtime9.jsxs("header", {
4723
- className: zones_module_default.kanbanColumnHeader,
4504
+ shown.map((plan, j) => /* @__PURE__ */ jsx_runtime11.jsxs("li", {
4505
+ className: zones_module_default.planCard,
4506
+ "data-plan-id": plan.id,
4507
+ "data-plan-status": plan.status,
4724
4508
  children: [
4725
- /* @__PURE__ */ jsx_runtime9.jsx("span", {
4726
- className: zones_module_default.kanbanColumnTitle,
4727
- children: t(COLUMN_TITLE[column.id])
4509
+ /* @__PURE__ */ jsx_runtime11.jsx("code", {
4510
+ className: zones_module_default.planCardId,
4511
+ children: plan.id
4728
4512
  }),
4729
- /* @__PURE__ */ jsx_runtime9.jsx("span", {
4730
- className: zones_module_default.kanbanCount,
4731
- "data-kanban-count": column.count,
4732
- children: column.count
4733
- })
4734
- ]
4735
- }),
4736
- /* @__PURE__ */ jsx_runtime9.jsxs("ul", {
4737
- className: zones_module_default.kanbanCards,
4738
- id: `kanban-cards-${column.id}`,
4739
- children: [
4740
- shown.map((plan, j) => /* @__PURE__ */ jsx_runtime9.jsxs("li", {
4741
- className: zones_module_default.planCard,
4742
- "data-plan-id": plan.id,
4743
- "data-plan-status": plan.status,
4744
- children: [
4745
- /* @__PURE__ */ jsx_runtime9.jsx("code", {
4746
- className: zones_module_default.planCardId,
4747
- children: plan.id
4748
- }),
4749
- /* @__PURE__ */ jsx_runtime9.jsx("span", {
4750
- className: zones_module_default.planCardStatus,
4751
- "data-status": plan.status,
4752
- children: plan.status
4753
- })
4754
- ]
4755
- }, plan.id === "" ? `card-${j}` : plan.id)),
4756
- overflow > 0 && /* @__PURE__ */ jsx_runtime9.jsx("li", {
4757
- className: zones_module_default.kanbanMore,
4758
- children: /* @__PURE__ */ jsx_runtime9.jsx("button", {
4759
- type: "button",
4760
- className: zones_module_default.kanbanMoreButton,
4761
- "data-kanban-more": isExpanded ? "collapse" : "expand",
4762
- "aria-expanded": isExpanded,
4763
- "aria-controls": `kanban-cards-${column.id}`,
4764
- onClick: () => toggle(column.id),
4765
- children: isExpanded ? t("zone.tasks.collapse") : t("zone.tasks.more", { count: String(overflow) })
4766
- })
4513
+ /* @__PURE__ */ jsx_runtime11.jsx("span", {
4514
+ className: zones_module_default.planCardStatus,
4515
+ "data-status": plan.status,
4516
+ children: plan.status
4767
4517
  })
4768
4518
  ]
4519
+ }, plan.id === "" ? `card-${j}` : plan.id)),
4520
+ overflow > 0 && /* @__PURE__ */ jsx_runtime11.jsx("li", {
4521
+ className: zones_module_default.kanbanMore,
4522
+ children: /* @__PURE__ */ jsx_runtime11.jsx("button", {
4523
+ type: "button",
4524
+ className: zones_module_default.kanbanMoreButton,
4525
+ "data-kanban-more": isExpanded ? "collapse" : "expand",
4526
+ "aria-expanded": isExpanded,
4527
+ "aria-controls": `kanban-cards-${column.id}`,
4528
+ onClick: () => toggle(column.id),
4529
+ children: isExpanded ? t("zone.tasks.collapse") : t("zone.tasks.more", { count: String(overflow) })
4530
+ })
4769
4531
  })
4770
4532
  ]
4771
4533
  })
@@ -4778,64 +4540,64 @@ function TaskBoard({ view, t }) {
4778
4540
  }
4779
4541
 
4780
4542
  // src/client/panel/zones/ProjectRollup.tsx
4781
- var jsx_runtime10 = require("react/jsx-runtime");
4543
+ var jsx_runtime12 = require("react/jsx-runtime");
4782
4544
  function ProjectRollup({ view, t }) {
4783
4545
  const { milestones, openResiduals } = view;
4784
- return /* @__PURE__ */ jsx_runtime10.jsxs("section", {
4546
+ return /* @__PURE__ */ jsx_runtime12.jsxs("section", {
4785
4547
  className: zones_module_default.zone,
4786
4548
  "data-zone": "project",
4787
4549
  children: [
4788
- /* @__PURE__ */ jsx_runtime10.jsx("header", {
4550
+ /* @__PURE__ */ jsx_runtime12.jsx("header", {
4789
4551
  className: zones_module_default.tasksHeader,
4790
4552
  "data-zone-header": true,
4791
- children: /* @__PURE__ */ jsx_runtime10.jsx("h2", {
4553
+ children: /* @__PURE__ */ jsx_runtime12.jsx("h2", {
4792
4554
  className: zones_module_default.zoneHeader,
4793
4555
  children: t("zone.project.title")
4794
4556
  })
4795
4557
  }),
4796
- /* @__PURE__ */ jsx_runtime10.jsx("h3", {
4558
+ /* @__PURE__ */ jsx_runtime12.jsx("h3", {
4797
4559
  className: zones_module_default.zoneTitle,
4798
4560
  "data-project-milestones-title": true,
4799
4561
  children: t("zone.project.milestones")
4800
4562
  }),
4801
- milestones.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx("p", {
4563
+ milestones.length === 0 ? /* @__PURE__ */ jsx_runtime12.jsx("p", {
4802
4564
  className: zones_module_default.zoneEmpty,
4803
4565
  "data-mstar-empty": "no-milestones",
4804
4566
  children: t("zone.project.none")
4805
- }) : /* @__PURE__ */ jsx_runtime10.jsx("ul", {
4567
+ }) : /* @__PURE__ */ jsx_runtime12.jsx("ul", {
4806
4568
  className: zones_module_default.rollupList,
4807
4569
  "data-project-milestones": true,
4808
- children: milestones.map((milestone, i) => /* @__PURE__ */ jsx_runtime10.jsx("li", {
4570
+ children: milestones.map((milestone, i) => /* @__PURE__ */ jsx_runtime12.jsx("li", {
4809
4571
  className: zones_module_default.rollupItem,
4810
4572
  "data-project-milestone": true,
4811
- children: /* @__PURE__ */ jsx_runtime10.jsx("span", {
4573
+ children: /* @__PURE__ */ jsx_runtime12.jsx("span", {
4812
4574
  className: zones_module_default.rollupMilestone,
4813
4575
  children: milestone
4814
4576
  })
4815
4577
  }, `${milestone}-${i}`))
4816
4578
  }),
4817
- /* @__PURE__ */ jsx_runtime10.jsx("h3", {
4579
+ /* @__PURE__ */ jsx_runtime12.jsx("h3", {
4818
4580
  className: zones_module_default.zoneTitle,
4819
4581
  "data-project-residuals-title": true,
4820
4582
  children: t("zone.project.residuals")
4821
4583
  }),
4822
- openResiduals.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx("p", {
4584
+ openResiduals.length === 0 ? /* @__PURE__ */ jsx_runtime12.jsx("p", {
4823
4585
  className: zones_module_default.zoneEmpty,
4824
4586
  "data-mstar-empty": "no-project-residuals",
4825
4587
  children: t("zone.project.none")
4826
- }) : /* @__PURE__ */ jsx_runtime10.jsx("ul", {
4588
+ }) : /* @__PURE__ */ jsx_runtime12.jsx("ul", {
4827
4589
  className: zones_module_default.rollupList,
4828
4590
  "data-project-residuals": true,
4829
- children: openResiduals.map((row, i) => /* @__PURE__ */ jsx_runtime10.jsxs("li", {
4591
+ children: openResiduals.map((row, i) => /* @__PURE__ */ jsx_runtime12.jsxs("li", {
4830
4592
  className: zones_module_default.rollupItem,
4831
4593
  "data-project-residual": true,
4832
4594
  children: [
4833
- /* @__PURE__ */ jsx_runtime10.jsx("span", {
4595
+ /* @__PURE__ */ jsx_runtime12.jsx("span", {
4834
4596
  className: zones_module_default.severityChip,
4835
4597
  "data-severity": row.severity,
4836
4598
  children: row.severity
4837
4599
  }),
4838
- /* @__PURE__ */ jsx_runtime10.jsx("span", {
4600
+ /* @__PURE__ */ jsx_runtime12.jsx("span", {
4839
4601
  className: zones_module_default.rollupCount,
4840
4602
  "data-project-residual-count": row.count,
4841
4603
  children: row.count
@@ -4848,25 +4610,24 @@ function ProjectRollup({ view, t }) {
4848
4610
  }
4849
4611
 
4850
4612
  // src/client/panel/pages/IterationTaskPage.tsx
4851
- var jsx_runtime11 = require("react/jsx-runtime");
4613
+ var jsx_runtime13 = require("react/jsx-runtime");
4852
4614
  function IterationTaskPage({ view, t }) {
4853
- return /* @__PURE__ */ jsx_runtime11.jsxs("div", {
4615
+ return /* @__PURE__ */ jsx_runtime13.jsxs("div", {
4854
4616
  className: panel_module_default.iterationPage,
4855
4617
  "data-mstar-page": "tasks",
4856
4618
  children: [
4857
- /* @__PURE__ */ jsx_runtime11.jsx(IterationInfoSection, {
4619
+ /* @__PURE__ */ jsx_runtime13.jsx(IterationInfoSection, {
4858
4620
  iteration: view.iteration,
4859
4621
  t
4860
4622
  }),
4861
- /* @__PURE__ */ jsx_runtime11.jsxs("div", {
4623
+ /* @__PURE__ */ jsx_runtime13.jsxs("div", {
4862
4624
  className: panel_module_default.iterationTasks,
4863
- "data-mstar-tasks-scroll": true,
4864
4625
  children: [
4865
- /* @__PURE__ */ jsx_runtime11.jsx(TaskBoard, {
4626
+ /* @__PURE__ */ jsx_runtime13.jsx(TaskBoard, {
4866
4627
  view: view.tasks,
4867
4628
  t
4868
4629
  }),
4869
- /* @__PURE__ */ jsx_runtime11.jsx(ProjectRollup, {
4630
+ /* @__PURE__ */ jsx_runtime13.jsx(ProjectRollup, {
4870
4631
  view: view.project,
4871
4632
  t
4872
4633
  })
@@ -4878,17 +4639,20 @@ function IterationTaskPage({ view, t }) {
4878
4639
 
4879
4640
  // src/client/panel/use-mstar-engine-status.ts
4880
4641
  var import_react3 = require("react");
4881
- var EMPTY_SNAPSHOT = { entries: new Map };
4642
+ var EMPTY_SNAPSHOT = { entries: new Map, selections: new Map };
4882
4643
  var NO_SUBSCRIBE = () => () => {};
4883
4644
  var readEmptySnapshot = () => EMPTY_SNAPSHOT;
4645
+ var ANCHOR_PLUGIN = "mstar-engine";
4646
+ var LEGACY_ANCHOR_PLUGIN = "mstar-engine-status";
4884
4647
  function latestEngineStatusRow(nodes) {
4885
4648
  for (let i = nodes.length - 1;i >= 0; i--) {
4886
4649
  const node = nodes[i];
4887
4650
  if (node.kind !== "context" || node.form !== "catalog")
4888
4651
  continue;
4889
4652
  const source = node.source;
4890
- if (source?.kind === "plugin" && source.plugin === "mstar-engine-status")
4653
+ if (source?.kind === "plugin" && (source.plugin === ANCHOR_PLUGIN || source.plugin === LEGACY_ANCHOR_PLUGIN)) {
4891
4654
  return node;
4655
+ }
4892
4656
  }
4893
4657
  return null;
4894
4658
  }
@@ -4913,11 +4677,13 @@ function selectSessionCwd(sessionId) {
4913
4677
  };
4914
4678
  }
4915
4679
  var WAITING = { state: "waiting", anchorTime: null, payload: null, at: null, turn: null, reason: null };
4680
+ var IDLE_PICK = { state: "idle" };
4916
4681
  function unavailable2(anchorTime, reason) {
4917
4682
  return { state: "unavailable", anchorTime, payload: null, at: null, turn: null, reason };
4918
4683
  }
4919
4684
  function useMstarEngineStatus(seats) {
4920
4685
  const { useChat, useSessions, sessionId, engineStatus } = seats;
4686
+ const session = sessionId === undefined ? null : String(sessionId);
4921
4687
  let anchorTime = null;
4922
4688
  let cwd = null;
4923
4689
  try {
@@ -4931,62 +4697,84 @@ function useMstarEngineStatus(seats) {
4931
4697
  cwd = null;
4932
4698
  }
4933
4699
  const snapshot = import_react3.useSyncExternalStore(engineStatus?.subscribe ?? NO_SUBSCRIBE, engineStatus?.getSnapshot ?? readEmptySnapshot, engineStatus?.getSnapshot ?? readEmptySnapshot);
4934
- if (anchorTime === null)
4935
- return WAITING;
4936
- if (engineStatus !== undefined && sessionId !== undefined && cwd !== null) {
4937
- try {
4938
- engineStatus.ensure(String(sessionId), cwd, anchorTime);
4939
- } catch {}
4940
- }
4941
- const entry = sessionId === undefined ? undefined : snapshot.entries.get(String(sessionId));
4942
- if (entry === undefined) {
4943
- if (engineStatus === undefined)
4944
- return unavailable2(anchorTime, "no-connection");
4945
- if (sessionId === undefined)
4946
- return unavailable2(anchorTime, "session-unknown");
4947
- if (cwd === null)
4948
- return unavailable2(anchorTime, "session-cwd-unknown");
4949
- return { state: "loading", anchorTime, payload: null, at: null, turn: null, reason: null };
4700
+ const target = engineStatus !== undefined && session !== null && cwd !== null ? { client: engineStatus, sessionId: session, cwd } : null;
4701
+ let view;
4702
+ if (anchorTime === null) {
4703
+ view = WAITING;
4704
+ } else {
4705
+ if (target !== null) {
4706
+ try {
4707
+ target.client.ensure(target.sessionId, target.cwd, anchorTime);
4708
+ } catch {}
4709
+ }
4710
+ const entry = session === null ? undefined : snapshot.entries.get(session);
4711
+ if (entry === undefined) {
4712
+ if (engineStatus === undefined)
4713
+ view = unavailable2(anchorTime, "no-connection");
4714
+ else if (session === null)
4715
+ view = unavailable2(anchorTime, "session-unknown");
4716
+ else if (cwd === null)
4717
+ view = unavailable2(anchorTime, "session-cwd-unknown");
4718
+ else
4719
+ view = { state: "loading", anchorTime, payload: null, at: null, turn: null, reason: null };
4720
+ } else if (entry.fetch.status === "unavailable") {
4721
+ view = unavailable2(anchorTime, entry.fetch.reason);
4722
+ } else {
4723
+ view = { state: "ok", anchorTime, payload: entry.fetch.payload, at: entry.fetch.at, turn: entry.fetch.turn, binding: entry.fetch.binding, reason: null };
4724
+ }
4950
4725
  }
4951
- if (entry.fetch.status === "unavailable")
4952
- return unavailable2(anchorTime, entry.fetch.reason);
4953
- return { state: "ok", anchorTime, payload: entry.fetch.payload, at: entry.fetch.at, turn: entry.fetch.turn, reason: null };
4726
+ return {
4727
+ view,
4728
+ selection: view.state === "ok" ? view.binding ?? view.payload.state?.selection ?? null : null,
4729
+ pick: session === null ? IDLE_PICK : snapshot.selections.get(session) ?? IDLE_PICK,
4730
+ select: target === null ? null : (workflowId) => {
4731
+ try {
4732
+ target.client.selectWorkflow(target.sessionId, target.cwd, workflowId);
4733
+ } catch {}
4734
+ }
4735
+ };
4954
4736
  }
4955
4737
 
4956
4738
  // src/client/panel/PanelView.tsx
4957
- var jsx_runtime12 = require("react/jsx-runtime");
4739
+ var jsx_runtime14 = require("react/jsx-runtime");
4958
4740
  function formatSnapshotTime(at) {
4959
4741
  const ms = Date.parse(at);
4960
4742
  return Number.isNaN(ms) ? null : new Date(ms).toLocaleTimeString("en-GB");
4961
4743
  }
4962
- function PanelContent({ tab, source, t }) {
4963
- if (tab === "agents") {
4964
- const view = projectGraph(source);
4965
- return /* @__PURE__ */ jsx_runtime12.jsx(AgentCanvasPage, {
4744
+ function PanelContent({ section, source, t }) {
4745
+ const view = React2.useMemo(() => projectGraph(source), [source]);
4746
+ if (section === "agents") {
4747
+ return /* @__PURE__ */ jsx_runtime14.jsx(AgentListPage, {
4966
4748
  view: view.agents,
4967
4749
  iteration: view.iteration,
4968
4750
  t
4969
4751
  });
4970
4752
  }
4971
- if (tab === "events")
4972
- return /* @__PURE__ */ jsx_runtime12.jsx(EventLogPage, {
4973
- view: projectGraph(source),
4753
+ if (section === "events")
4754
+ return /* @__PURE__ */ jsx_runtime14.jsx(EventLogPage, {
4755
+ view,
4974
4756
  t
4975
4757
  });
4976
- return /* @__PURE__ */ jsx_runtime12.jsx(IterationTaskPage, {
4977
- view: projectGraph(source),
4758
+ return /* @__PURE__ */ jsx_runtime14.jsx(IterationTaskPage, {
4759
+ view,
4978
4760
  t
4979
4761
  });
4980
4762
  }
4981
- function PanelView({ t, useChat, useSessions, sessionId, engineStatus }) {
4982
- const view = useMstarEngineStatus({ useChat, useSessions, sessionId, engineStatus });
4983
- const [tab, setTab] = import_react4.useState("tasks");
4763
+ function PanelView({ t, useChat, useSessions, sessionId, engineStatus, useTabInfo, useStore, actions }) {
4764
+ const { view, selection, pick, select } = useMstarEngineStatus({ useChat, useSessions, sessionId, engineStatus });
4765
+ const tabInfo = useTabInfo();
4766
+ const tabId = tabInfo.tab.id;
4767
+ const section = useStore((s) => s.byTab[tabId]) ?? "tasks";
4768
+ if (!tabInfo.tab.visible)
4769
+ return null;
4770
+ const selectSection = (next) => {
4771
+ actions.select(tabId, next);
4772
+ };
4984
4773
  if (view.state === "waiting") {
4985
- return /* @__PURE__ */ jsx_runtime12.jsx("div", {
4774
+ return /* @__PURE__ */ jsx_runtime14.jsx("div", {
4986
4775
  className: panel_module_default.emptyRoot,
4987
4776
  "data-mstar-panel": "waiting",
4988
- "data-conversation-composer-overlay": "",
4989
- children: /* @__PURE__ */ jsx_runtime12.jsx("p", {
4777
+ children: /* @__PURE__ */ jsx_runtime14.jsx("p", {
4990
4778
  className: panel_module_default.empty,
4991
4779
  "data-mstar-empty": "waiting",
4992
4780
  children: t("empty.waiting")
@@ -4994,11 +4782,10 @@ function PanelView({ t, useChat, useSessions, sessionId, engineStatus }) {
4994
4782
  });
4995
4783
  }
4996
4784
  if (view.state === "loading") {
4997
- return /* @__PURE__ */ jsx_runtime12.jsx("div", {
4785
+ return /* @__PURE__ */ jsx_runtime14.jsx("div", {
4998
4786
  className: panel_module_default.emptyRoot,
4999
4787
  "data-mstar-panel": "loading",
5000
- "data-conversation-composer-overlay": "",
5001
- children: /* @__PURE__ */ jsx_runtime12.jsx("p", {
4788
+ children: /* @__PURE__ */ jsx_runtime14.jsx("p", {
5002
4789
  className: panel_module_default.empty,
5003
4790
  "data-mstar-empty": "loading",
5004
4791
  children: t("empty.loading")
@@ -5006,11 +4793,10 @@ function PanelView({ t, useChat, useSessions, sessionId, engineStatus }) {
5006
4793
  });
5007
4794
  }
5008
4795
  if (view.state === "unavailable") {
5009
- return /* @__PURE__ */ jsx_runtime12.jsx("div", {
4796
+ return /* @__PURE__ */ jsx_runtime14.jsx("div", {
5010
4797
  className: panel_module_default.emptyRoot,
5011
4798
  "data-mstar-panel": "unavailable",
5012
- "data-conversation-composer-overlay": "",
5013
- children: /* @__PURE__ */ jsx_runtime12.jsx("p", {
4799
+ children: /* @__PURE__ */ jsx_runtime14.jsx("p", {
5014
4800
  className: panel_module_default.empty,
5015
4801
  "data-mstar-empty": "unavailable",
5016
4802
  "data-mstar-unavailable-reason": view.reason,
@@ -5021,34 +4807,34 @@ function PanelView({ t, useChat, useSessions, sessionId, engineStatus }) {
5021
4807
  const source = view.payload;
5022
4808
  const snapshotTime = formatSnapshotTime(view.at);
5023
4809
  const noHarness = source.harnessDir === null && source.state === null && source.iteration == null;
5024
- const freshness = /* @__PURE__ */ jsx_runtime12.jsxs("footer", {
4810
+ const freshness = /* @__PURE__ */ jsx_runtime14.jsxs("footer", {
5025
4811
  className: panel_module_default.freshness,
5026
4812
  "data-mstar-freshness": true,
5027
4813
  children: [
5028
- snapshotTime === null ? null : /* @__PURE__ */ jsx_runtime12.jsx("span", {
4814
+ snapshotTime === null ? null : /* @__PURE__ */ jsx_runtime14.jsx("span", {
5029
4815
  "data-mstar-freshness-at": view.at,
5030
4816
  "data-mstar-freshness-turn": String(view.turn),
5031
4817
  children: t("freshness.last-updated", { time: snapshotTime, turn: String(view.turn) })
5032
4818
  }),
5033
- /* @__PURE__ */ jsx_runtime12.jsx("span", {
4819
+ /* @__PURE__ */ jsx_runtime14.jsx("span", {
5034
4820
  children: t("freshness.refresh-note")
5035
4821
  })
5036
4822
  ]
5037
4823
  });
5038
4824
  if (noHarness) {
5039
- return /* @__PURE__ */ jsx_runtime12.jsx("div", {
4825
+ return /* @__PURE__ */ jsx_runtime14.jsx("div", {
5040
4826
  className: panel_module_default.root,
5041
4827
  "data-mstar-panel": "no-harness",
5042
- "data-conversation-composer-overlay": "",
5043
- children: /* @__PURE__ */ jsx_runtime12.jsxs("main", {
5044
- className: panel_module_default.main,
4828
+ children: /* @__PURE__ */ jsx_runtime14.jsxs("div", {
4829
+ className: panel_module_default.scroll,
4830
+ "data-mstar-scroll": true,
5045
4831
  "data-mstar-graph": true,
5046
4832
  children: [
5047
- /* @__PURE__ */ jsx_runtime12.jsxs("div", {
4833
+ /* @__PURE__ */ jsx_runtime14.jsxs("div", {
5048
4834
  className: panel_module_default.noHarnessCard,
5049
4835
  "data-mstar-empty-card": true,
5050
4836
  children: [
5051
- /* @__PURE__ */ jsx_runtime12.jsxs("svg", {
4837
+ /* @__PURE__ */ jsx_runtime14.jsxs("svg", {
5052
4838
  className: panel_module_default.noHarnessIcon,
5053
4839
  "data-mstar-empty-icon": true,
5054
4840
  width: "32",
@@ -5061,25 +4847,25 @@ function PanelView({ t, useChat, useSessions, sessionId, engineStatus }) {
5061
4847
  strokeLinejoin: "round",
5062
4848
  "aria-hidden": "true",
5063
4849
  children: [
5064
- /* @__PURE__ */ jsx_runtime12.jsx("path", {
4850
+ /* @__PURE__ */ jsx_runtime14.jsx("path", {
5065
4851
  d: "M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"
5066
4852
  }),
5067
- /* @__PURE__ */ jsx_runtime12.jsx("path", {
4853
+ /* @__PURE__ */ jsx_runtime14.jsx("path", {
5068
4854
  d: "M9.7 9.4a2.4 2.4 0 1 1 3.4 2.2c-.7.3-1 .8-1 1.5"
5069
4855
  }),
5070
- /* @__PURE__ */ jsx_runtime12.jsx("circle", {
4856
+ /* @__PURE__ */ jsx_runtime14.jsx("circle", {
5071
4857
  cx: "12",
5072
4858
  cy: "16.4",
5073
4859
  r: "0.6"
5074
4860
  })
5075
4861
  ]
5076
4862
  }),
5077
- /* @__PURE__ */ jsx_runtime12.jsx("p", {
4863
+ /* @__PURE__ */ jsx_runtime14.jsx("p", {
5078
4864
  className: panel_module_default.noHarnessTitle,
5079
4865
  "data-mstar-empty": "no-harness",
5080
4866
  children: t("empty.no-harness")
5081
4867
  }),
5082
- /* @__PURE__ */ jsx_runtime12.jsx("p", {
4868
+ /* @__PURE__ */ jsx_runtime14.jsx("p", {
5083
4869
  className: panel_module_default.noHarnessHint,
5084
4870
  children: t("empty.no-harness-hint")
5085
4871
  })
@@ -5090,34 +4876,38 @@ function PanelView({ t, useChat, useSessions, sessionId, engineStatus }) {
5090
4876
  })
5091
4877
  });
5092
4878
  }
5093
- return /* @__PURE__ */ jsx_runtime12.jsxs("div", {
4879
+ return /* @__PURE__ */ jsx_runtime14.jsxs("div", {
5094
4880
  className: panel_module_default.root,
5095
4881
  "data-mstar-panel": "panel",
5096
- "data-conversation-composer-overlay": "",
5097
4882
  children: [
5098
- /* @__PURE__ */ jsx_runtime12.jsxs("main", {
5099
- className: panel_module_default.main,
4883
+ /* @__PURE__ */ jsx_runtime14.jsx(TabNav, {
4884
+ active: section,
4885
+ onChange: selectSection,
4886
+ t
4887
+ }),
4888
+ /* @__PURE__ */ jsx_runtime14.jsxs("div", {
4889
+ className: panel_module_default.scroll,
4890
+ "data-mstar-scroll": true,
4891
+ "data-mstar-graph": true,
5100
4892
  children: [
5101
- /* @__PURE__ */ jsx_runtime12.jsx(TabNav, {
5102
- active: tab,
5103
- onChange: setTab,
4893
+ /* @__PURE__ */ jsx_runtime14.jsx(PanelContent, {
4894
+ section,
4895
+ source,
5104
4896
  t
5105
4897
  }),
5106
- /* @__PURE__ */ jsx_runtime12.jsx("div", {
5107
- className: panel_module_default.content,
5108
- "data-mstar-graph": true,
5109
- children: /* @__PURE__ */ jsx_runtime12.jsx(PanelContent, {
5110
- tab,
5111
- source,
5112
- t
5113
- })
4898
+ /* @__PURE__ */ jsx_runtime14.jsx(Sidebar, {
4899
+ t,
4900
+ state: source.state,
4901
+ source,
4902
+ selection,
4903
+ pick,
4904
+ select
5114
4905
  }),
5115
4906
  freshness
5116
4907
  ]
5117
4908
  }),
5118
- /* @__PURE__ */ jsx_runtime12.jsx(Sidebar, {
4909
+ /* @__PURE__ */ jsx_runtime14.jsx(PanelMeta, {
5119
4910
  t,
5120
- state: source.state,
5121
4911
  source
5122
4912
  })
5123
4913
  ]
@@ -5125,18 +4915,24 @@ function PanelView({ t, useChat, useSessions, sessionId, engineStatus }) {
5125
4915
  }
5126
4916
 
5127
4917
  // src/client/index.ts
5128
- var inject = ["slots", "sessions", "locale", "connection"];
4918
+ var inject = ["slots", "sessions", "locale", "connection", "sidebarRightTabs"];
5129
4919
  function apply(ctx) {
5130
4920
  const engineStatus = new MstarEngineStatusClient(ctx.connection);
5131
4921
  ctx.effect(() => () => engineStatus.dispose(), "ui-mstar-panel: engine-status client");
4922
+ const t = ctx.locale.bind(NS);
5132
4923
  ctx.effect(() => ctx.locale.register(NS, { zh, en }), "ui-mstar-panel: dictionaries");
5133
- ctx.slots.inject("conversation.view", () => ctx.slots.register({
5134
- name: "conversation.view",
5135
- id: "mstar-workflow",
5136
- order: 20,
5137
- label: () => ctx.locale.bind(NS)("view.mstar-workflow"),
5138
- locale: NS
5139
- }, (props) => PanelView({ ...props, engineStatus })));
4924
+ ctx.effect(() => ctx.sidebarRightTabs.register(mstarPanelDefinition(t)), "ui-mstar-panel: tab type");
4925
+ const panelStore = createPanelStore();
4926
+ ctx.effect(() => ctx.slots.inject("sidebar.right.pane.tab", () => ctx.slots.register({
4927
+ name: "sidebar.right.pane.tab",
4928
+ key: MSTAR_PANEL_ID,
4929
+ locale: NS,
4930
+ store: panelStore
4931
+ }, (props) => PanelView({ ...props, engineStatus }))), "ui-mstar-panel: panel body");
4932
+ ctx.effect(() => ctx.slots.inject("sidebar.right.pane.tab.title", () => ctx.slots.register({
4933
+ name: "sidebar.right.pane.tab.title",
4934
+ key: MSTAR_PANEL_ID
4935
+ }, MstarPanelTitle)), "ui-mstar-panel: panel chip title");
5140
4936
  }
5141
4937
 
5142
4938
  return module.exports; } });