@mstar-harness/dsh 3.7.3 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +127 -189
  3. package/README.zh.md +14 -12
  4. package/bundle/README.md +84 -165
  5. package/dist/client/index.d.ts +22 -7
  6. package/dist/client/panel/MstarPanelTitle.d.ts +13 -0
  7. package/dist/client/panel/PanelView.d.ts +75 -49
  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 +187 -0
  11. package/dist/client/panel/graph/project-graph.d.ts +13 -55
  12. package/dist/client/panel/graph/schema.d.ts +1 -2
  13. package/dist/client/panel/guards.d.ts +52 -3
  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-meta.d.ts +2 -2
  21. package/dist/client/panel/panel-store.d.ts +28 -0
  22. package/dist/client/panel/sidebar.d.ts +12 -7
  23. package/dist/client/panel/state-section.d.ts +2 -2
  24. package/dist/client/panel/use-mstar-engine-status.d.ts +105 -32
  25. package/dist/client/panel/zones/Legend.d.ts +5 -3
  26. package/dist/client/panel/zones/TaskBoard.d.ts +13 -9
  27. package/dist/client.js +1017 -1236
  28. package/dist/engine-status-endpoint.d.ts +154 -0
  29. package/dist/engine-status-store.d.ts +190 -0
  30. package/dist/engine-status-wire.d.ts +29 -0
  31. package/dist/gates/_shared.d.ts +9 -0
  32. package/dist/gates/catalog.d.ts +8 -8
  33. package/dist/gates/system-prompt.d.ts +1 -1
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.js +528 -94
  36. package/dist/types.d.ts +40 -19
  37. package/harness-skills/mstar-artifacts/references/status-and-residuals.md +1 -1
  38. package/harness-skills/mstar-host/references/dsh.md +94 -219
  39. package/package.json +67 -63
  40. package/dist/client/panel/pages/AgentCanvasPage.d.ts +0 -345
package/dist/client.js CHANGED
@@ -72,10 +72,279 @@ __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
+
110
+ // src/engine-status-wire.ts
111
+ var ENGINE_STATUS_CHANNEL = "/api";
112
+ var ENGINE_STATUS_ENDPOINT = "mstar/engineStatus";
113
+
114
+ // src/client/panel/guards.ts
115
+ function str(value) {
116
+ return typeof value === "string" && value.length > 0 ? value : null;
117
+ }
118
+ function bool(value) {
119
+ return typeof value === "boolean" ? value : null;
120
+ }
121
+ function count(value) {
122
+ return typeof value === "number" && Number.isFinite(value) ? value : null;
123
+ }
124
+ function record(value) {
125
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
126
+ }
127
+ function unavailable(reason) {
128
+ return { status: "unavailable", reason };
129
+ }
130
+ function parseEngineStatusResult(raw, sessionId, cwd) {
131
+ const envelope = record(raw);
132
+ if (envelope === null)
133
+ return unavailable("malformed-response");
134
+ if (envelope.ok !== true) {
135
+ const error = record(envelope.error);
136
+ const code = str(error?.code);
137
+ return unavailable(code === null ? "transport-error" : `transport-error:${code}`);
138
+ }
139
+ const value = record(envelope.value);
140
+ if (value === null)
141
+ return unavailable("malformed-response");
142
+ if (value.status === "unavailable")
143
+ return unavailable(str(value.reason) ?? "unavailable");
144
+ if (value.status !== "ok")
145
+ return unavailable("malformed-response");
146
+ if (value.sessionId !== sessionId)
147
+ return unavailable("session-mismatch");
148
+ if (cwd !== undefined && value.cwd !== cwd)
149
+ return unavailable("cwd-mismatch");
150
+ const at = str(value.at);
151
+ if (at === null)
152
+ return unavailable("malformed-snapshot");
153
+ const turn = count(value.turn);
154
+ if (turn === null)
155
+ return unavailable("malformed-snapshot");
156
+ const payload = record(value.payload);
157
+ if (payload === null)
158
+ return unavailable("malformed-payload");
159
+ return { status: "ok", payload, at, turn };
160
+ }
161
+
162
+ // src/client/panel/engine-status-client.ts
163
+ var ENGINE_STATUS_REQUEST_TIMEOUT_MS = 5000;
164
+ var ENGINE_STATUS_REFRESH_INTERVAL_MS = 30000;
165
+ var EMPTY = { entries: new Map };
166
+
167
+ class MstarEngineStatusClient {
168
+ connection;
169
+ snapshot = EMPTY;
170
+ listeners = new Set;
171
+ inFlight = new Map;
172
+ abort = new AbortController;
173
+ refreshing = new Set;
174
+ timeoutMs;
175
+ refreshIntervalMs;
176
+ refreshTimer = null;
177
+ generationDisposer = null;
178
+ generation = 0;
179
+ disposed = false;
180
+ constructor(connection, options = {}) {
181
+ this.connection = connection;
182
+ this.timeoutMs = options.timeoutMs ?? ENGINE_STATUS_REQUEST_TIMEOUT_MS;
183
+ this.refreshIntervalMs = options.refreshIntervalMs ?? ENGINE_STATUS_REFRESH_INTERVAL_MS;
184
+ try {
185
+ this.generationDisposer = connection?.generation?.subscribe(() => {
186
+ this.invalidate();
187
+ }) ?? null;
188
+ } catch {
189
+ this.generationDisposer = null;
190
+ }
191
+ this.startRefreshTimer();
192
+ }
193
+ getSnapshot = () => this.snapshot;
194
+ subscribe = (listener) => {
195
+ this.listeners.add(listener);
196
+ return () => {
197
+ this.listeners.delete(listener);
198
+ };
199
+ };
200
+ ensure(sessionId, cwd, anchorTime) {
201
+ if (this.disposed)
202
+ return;
203
+ if (this.snapshot.entries.get(sessionId)?.anchorTime === anchorTime)
204
+ return;
205
+ const key = `${sessionId}\x00${anchorTime}`;
206
+ if (this.inFlight.has(key))
207
+ return;
208
+ const request = this.fetch(sessionId, cwd, anchorTime).finally(() => {
209
+ this.inFlight.delete(key);
210
+ });
211
+ this.inFlight.set(key, request);
212
+ }
213
+ invalidate() {
214
+ if (this.disposed)
215
+ return;
216
+ this.generation += 1;
217
+ this.inFlight.clear();
218
+ if (this.snapshot.entries.size === 0)
219
+ return;
220
+ this.snapshot = EMPTY;
221
+ this.notify();
222
+ }
223
+ dispose() {
224
+ this.disposed = true;
225
+ this.generationDisposer?.();
226
+ this.generationDisposer = null;
227
+ if (this.refreshTimer !== null) {
228
+ clearInterval(this.refreshTimer);
229
+ this.refreshTimer = null;
230
+ }
231
+ this.abort.abort();
232
+ this.listeners.clear();
233
+ }
234
+ startRefreshTimer() {
235
+ if (this.disposed || this.refreshIntervalMs <= 0)
236
+ return;
237
+ if (typeof setInterval !== "function")
238
+ return;
239
+ this.refreshTimer = setInterval(() => {
240
+ this.refresh();
241
+ }, this.refreshIntervalMs);
242
+ const timer = this.refreshTimer;
243
+ timer.unref?.();
244
+ }
245
+ refresh() {
246
+ if (this.disposed)
247
+ return;
248
+ const now = Date.now();
249
+ for (const [sessionId, entry] of [...this.snapshot.entries]) {
250
+ if (this.disposed)
251
+ return;
252
+ if (now - entry.fetchedAt < this.refreshIntervalMs)
253
+ continue;
254
+ if (this.refreshing.has(sessionId))
255
+ continue;
256
+ if (this.snapshot.entries.get(sessionId)?.anchorTime !== entry.anchorTime)
257
+ continue;
258
+ this.refreshing.add(sessionId);
259
+ this.fetch(sessionId, entry.cwd, entry.anchorTime).finally(() => {
260
+ this.refreshing.delete(sessionId);
261
+ });
262
+ }
263
+ }
264
+ async fetch(sessionId, cwd, anchorTime) {
265
+ const generation = this.generation;
266
+ let answer;
267
+ if (this.connection === null || this.connection === undefined || typeof this.connection.rpc?.call !== "function") {
268
+ answer = { status: "unavailable", reason: "no-connection" };
269
+ } else {
270
+ try {
271
+ const raw = await this.withDeadline((signal) => this.connection.rpc.call(ENGINE_STATUS_CHANNEL, ENGINE_STATUS_ENDPOINT, { args: { sessionId, cwd } }, signal));
272
+ answer = parseEngineStatusResult(raw, sessionId, cwd);
273
+ } catch (error) {
274
+ answer = { status: "unavailable", reason: `transport-error:${error?.message ?? "unknown"}` };
275
+ }
276
+ }
277
+ this.write(generation, sessionId, cwd, anchorTime, answer);
278
+ }
279
+ async withDeadline(call) {
280
+ if (this.timeoutMs <= 0 || typeof setTimeout !== "function")
281
+ return await call(this.abort.signal);
282
+ const controller = new AbortController;
283
+ const relay = () => {
284
+ controller.abort();
285
+ };
286
+ this.abort.signal.addEventListener("abort", relay);
287
+ let timer = null;
288
+ const deadline = new Promise((_resolve, reject) => {
289
+ timer = setTimeout(() => {
290
+ controller.abort();
291
+ reject(new Error(`timeout:${this.timeoutMs}ms`));
292
+ }, this.timeoutMs);
293
+ });
294
+ try {
295
+ return await Promise.race([call(controller.signal), deadline]);
296
+ } finally {
297
+ if (timer !== null)
298
+ clearTimeout(timer);
299
+ this.abort.signal.removeEventListener("abort", relay);
300
+ }
301
+ }
302
+ write(generation, sessionId, cwd, anchorTime, fetch) {
303
+ if (this.disposed)
304
+ return;
305
+ if (generation !== this.generation)
306
+ return;
307
+ if ((this.snapshot.entries.get(sessionId)?.anchorTime ?? anchorTime) > anchorTime)
308
+ return;
309
+ this.writeEntry(sessionId, { anchorTime, cwd, fetchedAt: Date.now(), fetch });
310
+ }
311
+ writeEntry(sessionId, entry) {
312
+ const entries = new Map(this.snapshot.entries);
313
+ entries.set(sessionId, entry);
314
+ this.snapshot = { entries };
315
+ this.notify();
316
+ }
317
+ notify() {
318
+ for (const listener of [...this.listeners]) {
319
+ try {
320
+ listener();
321
+ } catch {}
322
+ }
323
+ }
324
+ }
325
+
326
+ // src/client/panel/MstarPanelTitle.tsx
327
+ var jsx_runtime2 = require("react/jsx-runtime");
328
+ function MstarPanelTitle({ useTabInfo }) {
329
+ const { tab } = useTabInfo();
330
+ return /* @__PURE__ */ jsx_runtime2.jsxs("span", {
331
+ style: { display: "inline-flex", alignItems: "center", gap: "var(--mstar-space-1, 4px)" },
332
+ children: [
333
+ /* @__PURE__ */ jsx_runtime2.jsx(MstarGlyph, {
334
+ size: 14
335
+ }),
336
+ /* @__PURE__ */ jsx_runtime2.jsx("span", {
337
+ children: tab.title
338
+ })
339
+ ]
340
+ });
341
+ }
342
+
75
343
  // src/client/panel/locale.ts
76
344
  var NS = "mstar-panel";
77
345
  var zh = {
78
- "view.mstar-workflow": "MStar 工作流",
346
+ "view.mstar-workflow": "启明星工作流",
347
+ "guide.description": "查看工作区状态、计划与迭代进度",
79
348
  "tab.tasks": "任务迭代",
80
349
  "tab.agents": "代理执行",
81
350
  "tab.events": "事件记录",
@@ -111,6 +380,8 @@ var zh = {
111
380
  "event-log.yes": "是",
112
381
  "event-log.no": "否",
113
382
  "empty.waiting": "等待首条 engine-status catalog…",
383
+ "empty.loading": "正在读取该会话的 engine-status 快照…",
384
+ "empty.unavailable": "engine-status 快照不可用({reason})",
114
385
  "empty.no-harness": "未检测到 Morning Star harness",
115
386
  "empty.no-harness-hint": "当前工作区未发现 .mstar/ harness 目录,详细面板保持未激活;检测到 harness 后自动呈现",
116
387
  "watermark.version": "mstar {version}",
@@ -192,11 +463,12 @@ var zh = {
192
463
  "state.policy.worktree": "worktree",
193
464
  "state.policy.control-worktree": "control worktree",
194
465
  "state.knowledge.docs": "{count} 篇文档",
195
- "freshness.last-updated": "最后更新 {time}",
196
- "freshness.refresh-note": "刷新跟随 catalog 重发(约 ≤1 分钟)"
466
+ "freshness.last-updated": "快照 {time} · 第 {turn} 轮",
467
+ "freshness.refresh-note": "该会话已存储的快照——不是实时值"
197
468
  };
198
469
  var en = {
199
- "view.mstar-workflow": "MStar Workflow",
470
+ "view.mstar-workflow": "Morning Star Workflow",
471
+ "guide.description": "Workspace state, plans, and iteration progress",
200
472
  "tab.tasks": "Task Iteration",
201
473
  "tab.agents": "Agent Run",
202
474
  "tab.events": "Event Log",
@@ -232,6 +504,8 @@ var en = {
232
504
  "event-log.yes": "yes",
233
505
  "event-log.no": "no",
234
506
  "empty.waiting": "Waiting for the first engine-status catalog…",
507
+ "empty.loading": "Reading this session’s engine-status snapshot…",
508
+ "empty.unavailable": "Engine-status snapshot unavailable ({reason})",
235
509
  "empty.no-harness": "No Morning Star harness detected",
236
510
  "empty.no-harness-hint": "No .mstar/ harness directory found in this workspace — the detail panel stays inactive and activates automatically once a harness is detected",
237
511
  "watermark.version": "mstar {version}",
@@ -313,12 +587,25 @@ var en = {
313
587
  "state.policy.worktree": "worktree",
314
588
  "state.policy.control-worktree": "control worktree",
315
589
  "state.knowledge.docs": "{count} docs",
316
- "freshness.last-updated": "last updated {time}",
317
- "freshness.refresh-note": "refreshes with catalog re-emission (≤~1 min)"
590
+ "freshness.last-updated": "snapshot {time} · turn {turn}",
591
+ "freshness.refresh-note": "the stored snapshot for this session — never a live value"
318
592
  };
319
593
 
594
+ // src/client/panel/panel-store.ts
595
+ var import_dsh_client_store = require("@deepseek-ai/dsh-client-store");
596
+ function createPanelStore() {
597
+ return import_dsh_client_store.defineStore({
598
+ init: () => ({ byTab: {} }),
599
+ actions: {
600
+ select(d, tabId, section) {
601
+ d.byTab[tabId] = section;
602
+ }
603
+ }
604
+ });
605
+ }
606
+
320
607
  // src/client/panel/PanelView.tsx
321
- var import_react3 = require("react");
608
+ var React2 = __toESM(require("react"));
322
609
 
323
610
  // src/client/panel/panel.module.css
324
611
  var css = `
@@ -333,37 +620,74 @@ var css = `
333
620
  }
334
621
 
335
622
 
336
- .\\32 0fd0e45_root {
623
+ .\\32 0fd0e45_root,
624
+ .f83e09fa_emptyRoot {
337
625
  --mstar-space-1: 4px;
338
626
  --mstar-space-2: 8px;
339
627
  --mstar-space-3: 12px;
340
628
  --mstar-space-4: 16px;
341
629
  --mstar-space-5: 24px;
342
630
  --mstar-space-6: 32px;
343
- display: grid;
344
- grid-template-columns: minmax(0, 1fr) 300px;
345
- grid-template-rows: minmax(0, 1fr);
346
- grid-template-areas: 'main sidebar';
631
+ }
632
+
633
+ .\\32 0fd0e45_root {
634
+ display: flex;
635
+ flex-direction: column;
347
636
  height: 100%;
348
637
  min-height: 0;
349
638
  width: 100%;
350
- padding: 0;
351
-
352
- padding-bottom: calc(var(--dsh-composer-height, 152px) + var(--mstar-space-3));
353
639
  overflow: hidden;
640
+ container-type: inline-size;
354
641
  }
355
642
 
356
643
 
357
- .\\32 0fd0e45_root[data-mstar-panel='no-harness'] {
358
- grid-template-columns: 1fr;
359
- grid-template-areas: 'main';
644
+
645
+ .\\31 843711c_groupGrid {
646
+ display: grid;
647
+ grid-template-columns: minmax(0, 1fr);
648
+ gap: var(--mstar-space-4);
360
649
  }
361
650
 
362
651
 
363
- .\\35 8245a20_noHarnessCard {
364
- flex: 1;
652
+
653
+ @container (max-width: 480px) {
654
+ .dd4ec22c_scroll {
655
+ padding: var(--mstar-space-3);
656
+ }
657
+
658
+ .\\38 1fe4f58_meta {
659
+ padding: var(--mstar-space-3);
660
+ }
661
+
662
+ .\\31 843711c_groupGrid {
663
+ gap: var(--mstar-space-3);
664
+ }
665
+ }
666
+
667
+
668
+
669
+ @container (min-width: 720px) {
670
+ .\\31 843711c_groupGrid {
671
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
672
+ }
673
+ }
674
+
675
+
676
+ .f83e09fa_emptyRoot {
677
+ display: flex;
678
+ align-items: center;
679
+ justify-content: center;
680
+ height: 100%;
365
681
  min-height: 0;
366
682
  width: 100%;
683
+ padding: var(--mstar-space-4);
684
+ overflow: hidden;
685
+ }
686
+
687
+
688
+ .\\35 8245a20_noHarnessCard {
689
+ flex: 1 0 auto;
690
+ width: 100%;
367
691
  max-width: 400px;
368
692
  align-self: center;
369
693
  display: flex;
@@ -398,50 +722,16 @@ var css = `
398
722
  font: var(--dsw-font-xxxs-11);
399
723
  }
400
724
 
401
- @media (max-width: 860px) {
402
- .\\32 0fd0e45_root {
403
- grid-template-columns: 1fr;
404
- grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
405
- grid-template-areas:
406
- 'main'
407
- 'sidebar';
408
- }
409
- .c87acfc7_sidebar {
410
- border-left: 0;
411
- border-top: 1px solid var(--dsw-alias-border-l1);
412
- }
413
-
414
- .\\37 7aea5a6_iterationHeadSplit {
415
- flex-direction: column;
416
- }
417
- .\\37 7aea5a6_iterationHeadSplit > .c3b8dcb0_iterationBranches {
418
- flex: 0 1 auto;
419
- max-width: none;
420
- }
421
- }
422
725
 
423
726
 
424
- .f83e09fa_emptyRoot {
425
- display: flex;
426
- align-items: center;
427
- justify-content: center;
428
- height: 100%;
727
+ .dd4ec22c_scroll {
728
+ flex: 1 1 auto;
429
729
  min-height: 0;
430
- width: 100%;
431
- padding: var(--mstar-space-4);
432
- overflow: hidden;
433
- }
434
-
435
-
436
-
437
- .ea90e208_main {
438
- grid-area: main;
439
730
  display: flex;
440
731
  flex-direction: column;
441
- min-width: 0;
442
- min-height: 0;
443
732
  padding: var(--mstar-space-4);
444
- overflow: hidden;
733
+ overflow-y: auto;
734
+ overflow-x: hidden;
445
735
  }
446
736
 
447
737
 
@@ -450,7 +740,7 @@ var css = `
450
740
  display: flex;
451
741
  flex: none;
452
742
  gap: var(--mstar-space-1);
453
- padding: 0;
743
+ padding: var(--mstar-space-1) var(--mstar-space-2);
454
744
  margin: 0 0 var(--mstar-space-2);
455
745
  border-bottom: 1px solid var(--dsw-alias-border-l1);
456
746
  }
@@ -460,7 +750,7 @@ var css = `
460
750
  appearance: none;
461
751
  border: 0;
462
752
  background: none;
463
- padding: var(--mstar-space-2) var(--mstar-space-3);
753
+ padding: var(--mstar-space-1) var(--mstar-space-2);
464
754
  color: var(--dsw-alias-label-secondary);
465
755
  font: var(--dsw-font-xxs-12);
466
756
  cursor: pointer;
@@ -478,19 +768,10 @@ var css = `
478
768
  }
479
769
 
480
770
 
481
- .\\39 0bec3c2_content {
482
- flex: 1;
483
- min-height: 0;
484
- display: flex;
485
- flex-direction: column;
486
- overflow: hidden;
487
- }
488
-
489
771
 
490
772
 
491
773
  .\\33 b1c4147_iterationPage {
492
- flex: 1;
493
- min-height: 0;
774
+ flex: 1 0 auto;
494
775
  display: flex;
495
776
  flex-direction: column;
496
777
  gap: var(--mstar-space-3);
@@ -600,49 +881,39 @@ var css = `
600
881
 
601
882
  .\\37 7aea5a6_iterationHeadSplit {
602
883
  display: flex;
603
- align-items: stretch;
604
- gap: var(--mstar-space-4);
884
+ flex-direction: column;
885
+ gap: var(--mstar-space-3);
605
886
  min-width: 0;
606
887
  }
607
888
 
608
- @media (min-width: 861px) {
609
-
610
- .\\37 7aea5a6_iterationHeadSplit > .c3b8dcb0_iterationBranches {
611
- flex: 0 1 260px;
612
- max-width: 280px;
613
- min-width: 0;
614
- }
889
+ .\\37 7aea5a6_iterationHeadSplit > .c3b8dcb0_iterationBranches {
890
+ min-width: 0;
615
891
  }
616
892
 
617
893
  .\\37 7aea5a6_iterationHeadSplit > .c52f7b85_iterationStepsRow {
618
- flex: 1 1 0;
619
894
  min-width: 0;
620
895
  }
621
896
 
622
897
 
623
898
  .c52f7b85_iterationStepsRow {
624
899
  display: flex;
900
+ flex-direction: column;
625
901
  align-items: stretch;
626
- gap: var(--mstar-space-3);
902
+ gap: var(--mstar-space-2);
627
903
  margin: 0;
628
904
  padding: 0;
629
905
  list-style: none;
630
- overflow-x: auto;
631
- overscroll-behavior: contain;
632
906
  }
633
907
 
634
908
  .\\38 1013a9d_iterationStepItem {
635
- flex: 1 1 0;
636
909
  min-width: 0;
637
910
  display: flex;
638
- flex-direction: column;
639
911
  align-items: center;
640
- justify-content: center;
641
- gap: var(--mstar-space-1);
642
- text-align: center;
912
+ gap: var(--mstar-space-2);
643
913
  }
644
914
 
645
915
  .\\37 befde45_iterationStepBadge {
916
+ flex: none;
646
917
  display: inline-flex;
647
918
  align-items: center;
648
919
  justify-content: center;
@@ -657,6 +928,7 @@ var css = `
657
928
  }
658
929
 
659
930
  .d6cd23a5_iterationStepPhase {
931
+ flex: 1 1 auto;
660
932
  overflow-wrap: anywhere;
661
933
  color: var(--dsw-alias-label-secondary);
662
934
  font: var(--dsw-font-xxxs-11);
@@ -664,6 +936,7 @@ var css = `
664
936
 
665
937
 
666
938
  .de293024_iterationStepChip {
939
+ flex: none;
667
940
  display: inline-flex;
668
941
  align-items: center;
669
942
  padding: 0 var(--mstar-space-2);
@@ -713,6 +986,7 @@ var css = `
713
986
 
714
987
 
715
988
  .afea5850_iterationVerdictSeat {
989
+ flex: none;
716
990
  display: flex;
717
991
  align-items: center;
718
992
  justify-content: center;
@@ -789,32 +1063,19 @@ var css = `
789
1063
 
790
1064
 
791
1065
  .\\38 7f7efbe_iterationTasks {
792
- flex: 1;
793
- min-height: 0;
794
- overflow-y: auto;
795
- overscroll-behavior: contain;
796
- }
797
-
798
-
799
-
800
- .c87acfc7_sidebar {
801
- grid-area: sidebar;
802
1066
  display: flex;
803
1067
  flex-direction: column;
1068
+ gap: var(--mstar-space-3);
804
1069
  min-width: 0;
805
- min-height: 0;
806
- border-left: 1px solid var(--dsw-alias-border-l1);
807
1070
  }
808
1071
 
809
1072
 
810
- .a0b80516_sidebarScroll {
811
- flex: 1;
812
- min-height: 0;
813
- overflow-y: auto;
1073
+
1074
+ .c87acfc7_sidebar {
814
1075
  display: flex;
815
1076
  flex-direction: column;
816
- gap: var(--mstar-space-4);
817
- padding: var(--mstar-space-4);
1077
+ gap: var(--mstar-space-2);
1078
+ min-width: 0;
818
1079
  }
819
1080
 
820
1081
 
@@ -1051,18 +1312,7 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
1051
1312
  tag.textContent = css;
1052
1313
  document.head.appendChild(tag);
1053
1314
  }
1054
- 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" };
1055
-
1056
- // src/client/panel/guards.ts
1057
- function str(value) {
1058
- return typeof value === "string" && value.length > 0 ? value : null;
1059
- }
1060
- function bool(value) {
1061
- return typeof value === "boolean" ? value : null;
1062
- }
1063
- function count(value) {
1064
- return typeof value === "number" && Number.isFinite(value) ? value : null;
1065
- }
1315
+ 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", empty: "18a7beee_empty", freshness: "c75c59b0_freshness" };
1066
1316
 
1067
1317
  // src/client/panel/plan-sort.ts
1068
1318
  var PLAN_CAP = 5;
@@ -1337,23 +1587,6 @@ function bucketOf(role) {
1337
1587
  return "reviewer";
1338
1588
  return null;
1339
1589
  }
1340
- function sddImplementColumnId(stages) {
1341
- const s = stages.find((x) => x.stage === "sdd-implement");
1342
- return s === undefined ? null : s.id;
1343
- }
1344
- function superviseEdges(stages, entries) {
1345
- const columnId = sddImplementColumnId(stages);
1346
- if (columnId === null)
1347
- return [];
1348
- const evidenced = entries.some((e) => e.view.kind === "dispatch" && bucketOf(e.view.role) !== null);
1349
- return [{
1350
- kind: "supervise",
1351
- source: `${columnId}:implementor`,
1352
- target: `${columnId}:reviewer`,
1353
- entityKey: null,
1354
- evidenced
1355
- }];
1356
- }
1357
1590
  function entityKeyOf(role) {
1358
1591
  if (role !== "" && KNOWN_AGENTS.some((a) => a.id === role))
1359
1592
  return role;
@@ -1428,37 +1661,6 @@ function aggregateEntities(entries, pairStatus, currentStep) {
1428
1661
  idle: false
1429
1662
  }));
1430
1663
  }
1431
- function actualEdges(entries) {
1432
- const byPlan = new Map;
1433
- entries.forEach((e, idx) => {
1434
- const v = e.view;
1435
- if (v.kind !== "dispatch")
1436
- return;
1437
- if (v.planId === null)
1438
- return;
1439
- const key = entityKeyOf(v.role);
1440
- const list = byPlan.get(v.planId);
1441
- if (list === undefined)
1442
- byPlan.set(v.planId, [{ key, ts: v.ts, idx }]);
1443
- else
1444
- list.push({ key, ts: v.ts, idx });
1445
- });
1446
- const pairEdges = new Map;
1447
- for (const planId of Array.from(byPlan.keys()).sort()) {
1448
- 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);
1449
- for (let i = 0;i + 1 < rows.length; i++) {
1450
- if (rows[i].key === rows[i + 1].key)
1451
- continue;
1452
- const a = rows[i].key;
1453
- const b = rows[i + 1].key;
1454
- if (a === GENERAL_BUCKET || b === GENERAL_BUCKET)
1455
- continue;
1456
- const pairKey = a < b ? `${a}|${b}` : `${b}|${a}`;
1457
- pairEdges.set(pairKey, { kind: "actual", source: a, target: b, entityKey: null });
1458
- }
1459
- }
1460
- return Array.from(pairEdges.values());
1461
- }
1462
1664
  function idleEntities(evidencedRoles, litKeys, currentStep) {
1463
1665
  const out = [];
1464
1666
  for (const known of KNOWN_AGENTS) {
@@ -1533,7 +1735,6 @@ function projectAgents(source, currentStep) {
1533
1735
  empty: false,
1534
1736
  note: null,
1535
1737
  entities: idleEntities(new Set, new Set, currentStep),
1536
- edges: superviseEdges(stages, []),
1537
1738
  executing: 0,
1538
1739
  pending: 0,
1539
1740
  activePlanId,
@@ -1575,13 +1776,9 @@ function projectAgents(source, currentStep) {
1575
1776
  const lit = aggregateEntities(filtered, pairStatus, currentStep);
1576
1777
  const litKeys = new Set(lit.map((e) => e.key));
1577
1778
  const entities = [...lit, ...idleEntities(evidencedRoles, litKeys, currentStep)];
1578
- const edges = [
1579
- ...actualEdges(filtered),
1580
- ...superviseEdges(stages, entries)
1581
- ];
1582
1779
  const executing = entities.filter((e) => e.status === "running").length;
1583
1780
  const pending = stages.reduce((sum, s) => sum + (evidenced.has(s.id) ? 0 : s.roles.length), 0);
1584
- return { stages, degraded: false, empty, note, entities, edges, executing, pending, activePlanId, activePlanCount };
1781
+ return { stages, degraded: false, empty, note, entities, executing, pending, activePlanId, activePlanCount };
1585
1782
  }
1586
1783
  var FLOW_EVENT_WINDOW = 50;
1587
1784
  function roleStageIndex() {
@@ -1679,7 +1876,7 @@ function pairingKeyOf(row) {
1679
1876
  return [row.agent ?? "", row.role ?? "", row.planId ?? "", row.taskId ?? ""].join("\x00");
1680
1877
  }
1681
1878
  function pairSettleStatus(rows) {
1682
- const record = new Map;
1879
+ const record2 = new Map;
1683
1880
  const lastDispatch = new Map;
1684
1881
  for (let i = rows.length - 1;i >= 0; i--) {
1685
1882
  const entry = rows[i];
@@ -1689,10 +1886,10 @@ function pairSettleStatus(rows) {
1689
1886
  } else if (entry.paired === true && entry.agent !== null) {
1690
1887
  const paired = lastDispatch.get(pairingKeyOf(entry));
1691
1888
  if (paired !== undefined)
1692
- record.set(paired, entry.status ?? "ok");
1889
+ record2.set(paired, entry.status ?? "ok");
1693
1890
  }
1694
1891
  }
1695
- return record;
1892
+ return record2;
1696
1893
  }
1697
1894
  function pairSettleIndexes(rows) {
1698
1895
  return new Set(pairSettleStatus(rows).keys());
@@ -1751,19 +1948,19 @@ function projectFlowEvents(source) {
1751
1948
  }
1752
1949
 
1753
1950
  // src/client/panel/panel-meta.tsx
1754
- var jsx_runtime = require("react/jsx-runtime");
1951
+ var jsx_runtime3 = require("react/jsx-runtime");
1755
1952
  function PanelMeta({ t, source }) {
1756
- return /* @__PURE__ */ jsx_runtime.jsxs("footer", {
1953
+ return /* @__PURE__ */ jsx_runtime3.jsxs("footer", {
1757
1954
  className: panel_module_default.meta,
1758
1955
  "data-mstar-meta": true,
1759
1956
  "data-mstar-watermark": true,
1760
1957
  children: [
1761
- /* @__PURE__ */ jsx_runtime.jsx("p", {
1958
+ /* @__PURE__ */ jsx_runtime3.jsx("p", {
1762
1959
  className: panel_module_default.metaLine,
1763
1960
  "data-mstar-meta-version": true,
1764
1961
  children: t("watermark.version", { version: str(source.version) ?? t("panel.unknown") })
1765
1962
  }),
1766
- /* @__PURE__ */ jsx_runtime.jsx("p", {
1963
+ /* @__PURE__ */ jsx_runtime3.jsx("p", {
1767
1964
  className: panel_module_default.metaLine,
1768
1965
  "data-mstar-meta-harness": true,
1769
1966
  children: t("watermark.harness", { dir: source.harnessDir ?? t("watermark.none") })
@@ -1773,7 +1970,7 @@ function PanelMeta({ t, source }) {
1773
1970
  }
1774
1971
 
1775
1972
  // src/client/panel/state-section.tsx
1776
- var jsx_runtime2 = require("react/jsx-runtime");
1973
+ var jsx_runtime4 = require("react/jsx-runtime");
1777
1974
  function enforcementLabel(t, enforcement) {
1778
1975
  if (enforcement === null || enforcement === undefined || typeof enforcement !== "object") {
1779
1976
  return t("panel.unknown");
@@ -1794,230 +1991,230 @@ function StateSection({ t, state, enforcement }) {
1794
1991
  const leases = Array.isArray(state?.leases) ? state.leases : [];
1795
1992
  const knowledge = state?.knowledge ?? null;
1796
1993
  const selection = state?.selection;
1797
- return /* @__PURE__ */ jsx_runtime2.jsxs("section", {
1994
+ return /* @__PURE__ */ jsx_runtime4.jsxs("section", {
1798
1995
  className: panel_module_default.section,
1799
1996
  "data-mstar-section": "state",
1800
1997
  children: [
1801
- /* @__PURE__ */ jsx_runtime2.jsx("h2", {
1998
+ /* @__PURE__ */ jsx_runtime4.jsx("h2", {
1802
1999
  className: panel_module_default.sectionTitle,
1803
2000
  children: t("state.title")
1804
2001
  }),
1805
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2002
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
1806
2003
  className: panel_module_default.subTitle,
1807
2004
  children: t("state.selection")
1808
2005
  }),
1809
- selection?.kind === "active" ? /* @__PURE__ */ jsx_runtime2.jsxs("p", {
2006
+ selection?.kind === "active" ? /* @__PURE__ */ jsx_runtime4.jsxs("p", {
1810
2007
  className: panel_module_default.selection,
1811
2008
  "data-selection-kind": "active",
1812
2009
  "data-selection-workflow": selection.workflowId,
1813
2010
  children: [
1814
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2011
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1815
2012
  className: panel_module_default.selectionId,
1816
2013
  children: selection.workflowId
1817
2014
  }),
1818
- selection.warning !== undefined ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
2015
+ selection.warning !== undefined ? /* @__PURE__ */ jsx_runtime4.jsx("span", {
1819
2016
  className: panel_module_default.selectionWarning,
1820
2017
  "data-selection-warning": true,
1821
2018
  children: selection.warning.message
1822
2019
  }) : null
1823
2020
  ]
1824
- }) : selection?.kind === "terminal" ? /* @__PURE__ */ jsx_runtime2.jsxs("p", {
2021
+ }) : selection?.kind === "terminal" ? /* @__PURE__ */ jsx_runtime4.jsxs("p", {
1825
2022
  className: panel_module_default.selection,
1826
2023
  "data-selection-kind": "terminal",
1827
2024
  "data-selection-workflow": selection.workflowId,
1828
2025
  children: [
1829
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2026
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1830
2027
  className: panel_module_default.selectionId,
1831
2028
  children: selection.workflowId
1832
2029
  }),
1833
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2030
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1834
2031
  className: panel_module_default.selectionMeta,
1835
2032
  "data-selection-history": true,
1836
2033
  children: t("state.selection.history")
1837
2034
  })
1838
2035
  ]
1839
- }) : /* @__PURE__ */ jsx_runtime2.jsxs("p", {
2036
+ }) : /* @__PURE__ */ jsx_runtime4.jsxs("p", {
1840
2037
  className: panel_module_default.selection,
1841
2038
  "data-selection-kind": "error",
1842
2039
  "data-selection-code": selection?.code ?? t("panel.unknown"),
1843
2040
  children: [
1844
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2041
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1845
2042
  className: panel_module_default.selectionCode,
1846
2043
  children: selection?.code ?? t("panel.unknown")
1847
2044
  }),
1848
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2045
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1849
2046
  className: panel_module_default.selectionMeta,
1850
2047
  children: selection?.message ?? t("state.none")
1851
2048
  })
1852
2049
  ]
1853
2050
  }),
1854
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2051
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
1855
2052
  className: panel_module_default.subTitle,
1856
2053
  children: t("state.plans")
1857
2054
  }),
1858
- visiblePlans.length === 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2055
+ visiblePlans.length === 0 ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
1859
2056
  className: panel_module_default.empty,
1860
2057
  "data-mstar-empty": "no-plans",
1861
2058
  children: t("state.none")
1862
- }) : /* @__PURE__ */ jsx_runtime2.jsx("ul", {
2059
+ }) : /* @__PURE__ */ jsx_runtime4.jsx("ul", {
1863
2060
  className: panel_module_default.planList,
1864
- children: visiblePlans.map((plan, i) => /* @__PURE__ */ jsx_runtime2.jsxs("li", {
2061
+ children: visiblePlans.map((plan, i) => /* @__PURE__ */ jsx_runtime4.jsxs("li", {
1865
2062
  "data-plan-id": str(plan.id) ?? "unknown",
1866
2063
  "data-plan-status": str(plan.status) ?? "unknown",
1867
2064
  children: [
1868
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2065
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1869
2066
  className: panel_module_default.planStatus,
1870
2067
  "data-status": str(plan.status) ?? "unknown",
1871
2068
  children: str(plan.status) ?? t("panel.unknown")
1872
2069
  }),
1873
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2070
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1874
2071
  className: panel_module_default.planId,
1875
2072
  children: str(plan.id) ?? t("panel.unknown")
1876
2073
  })
1877
2074
  ]
1878
2075
  }, str(plan.id) ?? `plan-${i}`))
1879
2076
  }),
1880
- hiddenPlans > 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2077
+ hiddenPlans > 0 ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
1881
2078
  className: panel_module_default.truncated,
1882
2079
  "data-plan-truncated": true,
1883
2080
  children: t("state.plans.more", { count: String(hiddenPlans) })
1884
2081
  }) : null,
1885
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2082
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
1886
2083
  className: panel_module_default.subTitle,
1887
2084
  children: t("state.residuals")
1888
2085
  }),
1889
- visibleFindings === null || visibleFindings.length === 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2086
+ visibleFindings === null || visibleFindings.length === 0 ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
1890
2087
  className: panel_module_default.empty,
1891
2088
  "data-mstar-empty": "no-residuals",
1892
2089
  children: t("state.none")
1893
- }) : /* @__PURE__ */ jsx_runtime2.jsx("ul", {
2090
+ }) : /* @__PURE__ */ jsx_runtime4.jsx("ul", {
1894
2091
  className: panel_module_default.residualList,
1895
- children: visibleFindings.map((finding, i) => /* @__PURE__ */ jsx_runtime2.jsxs("li", {
2092
+ children: visibleFindings.map((finding, i) => /* @__PURE__ */ jsx_runtime4.jsxs("li", {
1896
2093
  "data-residual-finding": true,
1897
2094
  "data-residual-finding-id": str(finding.id) ?? "unknown",
1898
2095
  "data-residual-finding-severity": str(finding.severity) ?? "unknown",
1899
2096
  "data-residual-finding-plan": str(finding.planId) ?? "unknown",
1900
2097
  children: [
1901
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2098
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1902
2099
  className: panel_module_default.findingSeverity,
1903
2100
  "data-severity": str(finding.severity) ?? "unknown",
1904
2101
  children: str(finding.severity) ?? t("panel.unknown")
1905
2102
  }),
1906
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2103
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1907
2104
  className: panel_module_default.findingTitle,
1908
2105
  children: str(finding.title) ?? t("panel.unknown")
1909
2106
  }),
1910
- str(finding.planId) !== null ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
2107
+ str(finding.planId) !== null ? /* @__PURE__ */ jsx_runtime4.jsx("span", {
1911
2108
  className: panel_module_default.findingPlan,
1912
2109
  children: finding.planId
1913
2110
  }) : null
1914
2111
  ]
1915
2112
  }, str(finding.id) ?? `finding-${i}`))
1916
2113
  }),
1917
- hiddenFindings > 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2114
+ hiddenFindings > 0 ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
1918
2115
  className: panel_module_default.truncated,
1919
2116
  "data-residual-truncated": true,
1920
2117
  children: t("state.residual.more", { count: String(hiddenFindings) })
1921
2118
  }) : null,
1922
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2119
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
1923
2120
  className: panel_module_default.subTitle,
1924
2121
  children: t("state.policy")
1925
2122
  }),
1926
- /* @__PURE__ */ jsx_runtime2.jsxs("dl", {
2123
+ /* @__PURE__ */ jsx_runtime4.jsxs("dl", {
1927
2124
  className: panel_module_default.defList,
1928
2125
  children: [
1929
- /* @__PURE__ */ jsx_runtime2.jsx("dt", {
2126
+ /* @__PURE__ */ jsx_runtime4.jsx("dt", {
1930
2127
  className: panel_module_default.defTerm,
1931
2128
  children: t("state.enforcement")
1932
2129
  }),
1933
- /* @__PURE__ */ jsx_runtime2.jsx("dd", {
2130
+ /* @__PURE__ */ jsx_runtime4.jsx("dd", {
1934
2131
  className: panel_module_default.defValue,
1935
2132
  "data-field": "enforcement",
1936
2133
  children: enforcementLabel(t, enforcement)
1937
2134
  }),
1938
- /* @__PURE__ */ jsx_runtime2.jsx("dt", {
2135
+ /* @__PURE__ */ jsx_runtime4.jsx("dt", {
1939
2136
  className: panel_module_default.defTerm,
1940
2137
  children: t("state.policy.push")
1941
2138
  }),
1942
- /* @__PURE__ */ jsx_runtime2.jsx("dd", {
2139
+ /* @__PURE__ */ jsx_runtime4.jsx("dd", {
1943
2140
  className: panel_module_default.defValue,
1944
2141
  "data-field": "push-policy",
1945
2142
  children: str(state?.pushPolicy) ?? t("state.none")
1946
2143
  }),
1947
- /* @__PURE__ */ jsx_runtime2.jsx("dt", {
2144
+ /* @__PURE__ */ jsx_runtime4.jsx("dt", {
1948
2145
  className: panel_module_default.defTerm,
1949
2146
  children: t("state.policy.worktree")
1950
2147
  }),
1951
- /* @__PURE__ */ jsx_runtime2.jsx("dd", {
2148
+ /* @__PURE__ */ jsx_runtime4.jsx("dd", {
1952
2149
  className: panel_module_default.defValue,
1953
2150
  "data-field": "worktree-mode",
1954
2151
  children: str(state?.worktreeMode) ?? t("state.none")
1955
2152
  }),
1956
- /* @__PURE__ */ jsx_runtime2.jsx("dt", {
2153
+ /* @__PURE__ */ jsx_runtime4.jsx("dt", {
1957
2154
  className: panel_module_default.defTerm,
1958
2155
  children: t("state.policy.control-worktree")
1959
2156
  }),
1960
- /* @__PURE__ */ jsx_runtime2.jsx("dd", {
2157
+ /* @__PURE__ */ jsx_runtime4.jsx("dd", {
1961
2158
  className: panel_module_default.defValue,
1962
2159
  "data-field": "control-worktree-path",
1963
2160
  children: str(state?.controlWorktreePath) ?? t("state.none")
1964
2161
  })
1965
2162
  ]
1966
2163
  }),
1967
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2164
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
1968
2165
  className: panel_module_default.subTitle,
1969
2166
  children: t("state.leases")
1970
2167
  }),
1971
- leases.length === 0 ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2168
+ leases.length === 0 ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
1972
2169
  className: panel_module_default.empty,
1973
2170
  "data-mstar-empty": "no-leases",
1974
2171
  children: t("state.none")
1975
- }) : /* @__PURE__ */ jsx_runtime2.jsx("ul", {
2172
+ }) : /* @__PURE__ */ jsx_runtime4.jsx("ul", {
1976
2173
  className: panel_module_default.leaseList,
1977
- children: leases.map((lease, i) => /* @__PURE__ */ jsx_runtime2.jsxs("li", {
2174
+ children: leases.map((lease, i) => /* @__PURE__ */ jsx_runtime4.jsxs("li", {
1978
2175
  "data-lease-plan": str(lease.planId) ?? "unknown",
1979
2176
  children: [
1980
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2177
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1981
2178
  className: panel_module_default.leasePlan,
1982
2179
  children: str(lease.planId) ?? t("panel.unknown")
1983
2180
  }),
1984
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2181
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
1985
2182
  className: panel_module_default.leaseHolder,
1986
2183
  children: str(lease.holder) ?? t("panel.unknown")
1987
2184
  }),
1988
- str(lease.worktreePath) !== null ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
2185
+ str(lease.worktreePath) !== null ? /* @__PURE__ */ jsx_runtime4.jsx("span", {
1989
2186
  className: panel_module_default.leaseWorktree,
1990
2187
  children: lease.worktreePath
1991
2188
  }) : null
1992
2189
  ]
1993
2190
  }, str(lease.planId) ?? `lease-${i}`))
1994
2191
  }),
1995
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2192
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
1996
2193
  className: panel_module_default.subTitle,
1997
2194
  children: t("state.knowledge")
1998
2195
  }),
1999
- knowledge === null ? /* @__PURE__ */ jsx_runtime2.jsx("p", {
2196
+ knowledge === null ? /* @__PURE__ */ jsx_runtime4.jsx("p", {
2000
2197
  className: panel_module_default.empty,
2001
2198
  "data-mstar-empty": "no-knowledge",
2002
2199
  children: t("state.none")
2003
- }) : /* @__PURE__ */ jsx_runtime2.jsxs("p", {
2200
+ }) : /* @__PURE__ */ jsx_runtime4.jsxs("p", {
2004
2201
  className: panel_module_default.knowledge,
2005
2202
  "data-knowledge-docs": count(knowledge.docCount) === null ? "unknown" : String(knowledge.docCount),
2006
2203
  children: [
2007
- /* @__PURE__ */ jsx_runtime2.jsx("span", {
2204
+ /* @__PURE__ */ jsx_runtime4.jsx("span", {
2008
2205
  children: t("state.knowledge.docs", { count: count(knowledge.docCount) === null ? t("panel.unknown") : String(knowledge.docCount) })
2009
2206
  }),
2010
- Array.isArray(knowledge.categories) && knowledge.categories.length > 0 ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
2207
+ Array.isArray(knowledge.categories) && knowledge.categories.length > 0 ? /* @__PURE__ */ jsx_runtime4.jsx("span", {
2011
2208
  className: panel_module_default.knowledgeCategories,
2012
2209
  children: knowledge.categories.filter((category) => typeof category === "string").join(" · ")
2013
2210
  }) : null
2014
2211
  ]
2015
2212
  }),
2016
- /* @__PURE__ */ jsx_runtime2.jsx("h3", {
2213
+ /* @__PURE__ */ jsx_runtime4.jsx("h3", {
2017
2214
  className: panel_module_default.subTitle,
2018
2215
  children: t("state.direction")
2019
2216
  }),
2020
- /* @__PURE__ */ jsx_runtime2.jsx("p", {
2217
+ /* @__PURE__ */ jsx_runtime4.jsx("p", {
2021
2218
  className: panel_module_default.direction,
2022
2219
  "data-direction": true,
2023
2220
  children: str(state?.direction) ?? t("state.none")
@@ -2027,46 +2224,36 @@ function StateSection({ t, state, enforcement }) {
2027
2224
  }
2028
2225
 
2029
2226
  // src/client/panel/sidebar.tsx
2030
- var jsx_runtime3 = require("react/jsx-runtime");
2227
+ var jsx_runtime5 = require("react/jsx-runtime");
2031
2228
  function Sidebar({ t, state, source }) {
2032
- return /* @__PURE__ */ jsx_runtime3.jsxs("aside", {
2229
+ return /* @__PURE__ */ jsx_runtime5.jsx("aside", {
2033
2230
  className: panel_module_default.sidebar,
2034
2231
  "data-mstar-sidebar": true,
2035
- children: [
2036
- /* @__PURE__ */ jsx_runtime3.jsx("div", {
2037
- className: panel_module_default.sidebarScroll,
2038
- "data-mstar-sidebar-scroll": true,
2039
- children: state === null ? /* @__PURE__ */ jsx_runtime3.jsx("p", {
2040
- className: panel_module_default.empty,
2041
- "data-mstar-empty": "no-state",
2042
- children: t("state.none")
2043
- }) : /* @__PURE__ */ jsx_runtime3.jsx(StateSection, {
2044
- t,
2045
- state,
2046
- enforcement: source.enforcement
2047
- })
2048
- }),
2049
- /* @__PURE__ */ jsx_runtime3.jsx(PanelMeta, {
2050
- t,
2051
- source
2052
- })
2053
- ]
2232
+ children: state === null ? /* @__PURE__ */ jsx_runtime5.jsx("p", {
2233
+ className: panel_module_default.empty,
2234
+ "data-mstar-empty": "no-state",
2235
+ children: t("state.none")
2236
+ }) : /* @__PURE__ */ jsx_runtime5.jsx(StateSection, {
2237
+ t,
2238
+ state,
2239
+ enforcement: source.enforcement
2240
+ })
2054
2241
  });
2055
2242
  }
2056
2243
 
2057
2244
  // src/client/panel/TabNav.tsx
2058
- var jsx_runtime4 = require("react/jsx-runtime");
2245
+ var jsx_runtime6 = require("react/jsx-runtime");
2059
2246
  var TABS = [
2060
2247
  { id: "tasks", label: "tab.tasks" },
2061
2248
  { id: "agents", label: "tab.agents" },
2062
2249
  { id: "events", label: "tab.events" }
2063
2250
  ];
2064
2251
  function TabNav({ active, onChange, t }) {
2065
- return /* @__PURE__ */ jsx_runtime4.jsx("nav", {
2252
+ return /* @__PURE__ */ jsx_runtime6.jsx("nav", {
2066
2253
  className: panel_module_default.tabNav,
2067
2254
  "data-mstar-tab-nav": true,
2068
2255
  role: "tablist",
2069
- children: TABS.map((tab) => /* @__PURE__ */ jsx_runtime4.jsx("button", {
2256
+ children: TABS.map((tab) => /* @__PURE__ */ jsx_runtime6.jsx("button", {
2070
2257
  type: "button",
2071
2258
  role: "tab",
2072
2259
  className: active === tab.id ? `${panel_module_default.tab} ${panel_module_default.tabActive}` : panel_module_default.tab,
@@ -2079,7 +2266,7 @@ function TabNav({ active, onChange, t }) {
2079
2266
  });
2080
2267
  }
2081
2268
 
2082
- // src/client/panel/pages/AgentCanvasPage.tsx
2269
+ // src/client/panel/pages/AgentListPage.tsx
2083
2270
  var import_react2 = require("react");
2084
2271
 
2085
2272
  // src/client/panel/zones/zones.module.css
@@ -2196,22 +2383,16 @@ var css2 = `
2196
2383
 
2197
2384
 
2198
2385
  .\\31 2dfaa6e_kanban {
2199
- display: flex;
2200
- align-items: flex-start;
2201
- gap: var(--mstar-space-1);
2202
2386
  min-width: 0;
2203
- overflow-x: auto;
2204
- overscroll-behavior: contain;
2205
2387
  }
2206
2388
 
2207
2389
 
2208
2390
  .\\31 f8473a4_kanbanColumn {
2209
2391
  box-sizing: border-box;
2210
2392
  display: flex;
2211
- flex: 1 1 0;
2212
2393
  flex-direction: column;
2213
2394
  gap: var(--mstar-space-2);
2214
- min-width: 120px;
2395
+ min-width: 0;
2215
2396
  padding: var(--mstar-space-2);
2216
2397
  border: 1px solid var(--dsw-alias-border-l1);
2217
2398
  border-radius: 8px;
@@ -2230,10 +2411,10 @@ var css2 = `
2230
2411
  opacity: 0.7;
2231
2412
  }
2232
2413
 
2414
+
2233
2415
  .\\33 b1cc701_kanbanColumnHeader {
2234
2416
  display: flex;
2235
2417
  align-items: center;
2236
- justify-content: space-between;
2237
2418
  gap: var(--mstar-space-1);
2238
2419
  min-width: 0;
2239
2420
  }
@@ -2251,6 +2432,7 @@ var css2 = `
2251
2432
 
2252
2433
  .\\34 96af60d_kanbanCount {
2253
2434
  flex: none;
2435
+ margin-left: auto;
2254
2436
  min-width: 18px;
2255
2437
  padding: 0 var(--mstar-space-1);
2256
2438
  border: 1px solid var(--dsw-alias-border-l2);
@@ -2320,7 +2502,6 @@ var css2 = `
2320
2502
 
2321
2503
  .\\36 3518033_kanbanArrow {
2322
2504
  flex: none;
2323
- align-self: center;
2324
2505
  width: 18px;
2325
2506
  height: 18px;
2326
2507
  display: inline-flex;
@@ -2432,28 +2613,28 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
2432
2613
  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" };
2433
2614
 
2434
2615
  // src/client/panel/zones/Legend.tsx
2435
- var jsx_runtime5 = require("react/jsx-runtime");
2616
+ var jsx_runtime7 = require("react/jsx-runtime");
2436
2617
  function Legend({ t }) {
2437
2618
  const items = [
2438
2619
  { key: "agent-running", swatch: zones_module_default.swatchAgentRunning, label: t("zone.legend.agent-running") },
2439
2620
  { key: "agent-settled", swatch: zones_module_default.swatchAgentSettled, label: t("zone.legend.agent-settled") },
2440
2621
  { key: "agent-idle", swatch: zones_module_default.swatchAgentIdle, label: t("zone.legend.agent-idle") }
2441
2622
  ];
2442
- return /* @__PURE__ */ jsx_runtime5.jsxs("div", {
2623
+ return /* @__PURE__ */ jsx_runtime7.jsxs("div", {
2443
2624
  className: zones_module_default.legend,
2444
2625
  "data-mstar-legend": true,
2445
2626
  children: [
2446
- /* @__PURE__ */ jsx_runtime5.jsx("span", {
2627
+ /* @__PURE__ */ jsx_runtime7.jsx("span", {
2447
2628
  className: zones_module_default.legendTitle,
2448
2629
  children: t("zone.legend.title")
2449
2630
  }),
2450
- /* @__PURE__ */ jsx_runtime5.jsx("ul", {
2631
+ /* @__PURE__ */ jsx_runtime7.jsx("ul", {
2451
2632
  className: zones_module_default.legendList,
2452
- children: items.map((item) => /* @__PURE__ */ jsx_runtime5.jsxs("li", {
2633
+ children: items.map((item) => /* @__PURE__ */ jsx_runtime7.jsxs("li", {
2453
2634
  className: zones_module_default.legendItem,
2454
2635
  "data-mstar-legend-item": item.key,
2455
2636
  children: [
2456
- /* @__PURE__ */ jsx_runtime5.jsx("span", {
2637
+ /* @__PURE__ */ jsx_runtime7.jsx("span", {
2457
2638
  className: `${zones_module_default.legendSwatch} ${item.swatch}`
2458
2639
  }),
2459
2640
  item.label
@@ -2466,7 +2647,7 @@ function Legend({ t }) {
2466
2647
 
2467
2648
  // src/client/panel/pages/IterationInfoSection.tsx
2468
2649
  var import_react = require("react");
2469
- var jsx_runtime6 = require("react/jsx-runtime");
2650
+ var jsx_runtime8 = require("react/jsx-runtime");
2470
2651
  function nextExpandedOnActivation(prev, prevActive, nextActive) {
2471
2652
  return !prevActive && nextActive ? true : prev;
2472
2653
  }
@@ -2495,33 +2676,33 @@ function IterationInfoSection({ iteration, t }) {
2495
2676
  const verdictLabel = (verdict) => verdict === "pass" ? t("graph.pass") : verdict === "fail" ? t("graph.fail") : t("panel.unknown");
2496
2677
  const idLabel = iteration.iterationId ?? t("panel.unknown");
2497
2678
  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");
2498
- const stepsRow = /* @__PURE__ */ jsx_runtime6.jsx("ol", {
2679
+ const stepsRow = /* @__PURE__ */ jsx_runtime8.jsx("ol", {
2499
2680
  className: panel_module_default.iterationStepsRow,
2500
2681
  "data-iteration-head-steps": true,
2501
- children: iteration.steps.map((step) => /* @__PURE__ */ jsx_runtime6.jsxs("li", {
2682
+ children: iteration.steps.map((step) => /* @__PURE__ */ jsx_runtime8.jsxs("li", {
2502
2683
  className: panel_module_default.iterationStepItem,
2503
2684
  "data-step": step.step,
2504
2685
  "data-step-state": step.state,
2505
2686
  children: [
2506
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2687
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2507
2688
  className: panel_module_default.iterationStepBadge,
2508
2689
  "data-step-badge": true,
2509
2690
  children: t("zone.iteration.step-badge", { n: String(step.step) })
2510
2691
  }),
2511
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2692
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2512
2693
  className: panel_module_default.iterationStepPhase,
2513
2694
  "data-step-phase": true,
2514
2695
  children: t(`zone.phase.${step.id}`)
2515
2696
  }),
2516
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2697
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2517
2698
  className: panel_module_default.iterationStepChip,
2518
2699
  "data-step-chip": true,
2519
2700
  children: t(STATE_LABEL[step.state])
2520
2701
  }),
2521
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2702
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2522
2703
  className: panel_module_default.iterationVerdictSeat,
2523
2704
  "data-step-verdict-seat": true,
2524
- children: step.state === "current" && step.verdict !== "unknown" && /* @__PURE__ */ jsx_runtime6.jsx("span", {
2705
+ children: step.state === "current" && step.verdict !== "unknown" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
2525
2706
  className: panel_module_default.iterationVerdict,
2526
2707
  "data-iteration-verdict": step.verdict,
2527
2708
  children: verdictLabel(step.verdict)
@@ -2530,13 +2711,13 @@ function IterationInfoSection({ iteration, t }) {
2530
2711
  ]
2531
2712
  }, step.step))
2532
2713
  });
2533
- return /* @__PURE__ */ jsx_runtime6.jsxs("section", {
2714
+ return /* @__PURE__ */ jsx_runtime8.jsxs("section", {
2534
2715
  className: panel_module_default.iterationHead,
2535
2716
  "data-iteration-head": true,
2536
2717
  "data-iteration-head-active": active ? "true" : "false",
2537
2718
  "data-iteration-head-expanded": expanded ? "true" : "false",
2538
2719
  children: [
2539
- /* @__PURE__ */ jsx_runtime6.jsxs("button", {
2720
+ /* @__PURE__ */ jsx_runtime8.jsxs("button", {
2540
2721
  type: "button",
2541
2722
  className: panel_module_default.iterationSummary,
2542
2723
  "data-iteration-head-toggle": true,
@@ -2545,56 +2726,56 @@ function IterationInfoSection({ iteration, t }) {
2545
2726
  "aria-controls": "iteration-head-body",
2546
2727
  onClick: () => setExpanded((v) => !v),
2547
2728
  children: [
2548
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2729
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2549
2730
  className: panel_module_default.iterationSummaryId,
2550
2731
  "data-iteration-head-id": idLabel,
2551
2732
  children: idLabel
2552
2733
  }),
2553
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2734
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2554
2735
  className: panel_module_default.iterationSummaryVerdict,
2555
2736
  "data-iteration-head-verdict": iteration.verdict,
2556
2737
  children: verdictLabel(iteration.verdict)
2557
2738
  }),
2558
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2739
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2559
2740
  className: active ? panel_module_default.iterationSummaryStatus : panel_module_default.iterationSummaryStatusMuted,
2560
2741
  "data-iteration-head-status": statusLabel,
2561
2742
  children: statusLabel
2562
2743
  }),
2563
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2744
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2564
2745
  className: panel_module_default.iterationSummaryHint,
2565
2746
  "data-iteration-head-hint": true,
2566
2747
  children: t(expanded ? "page.iteration.collapse" : "page.iteration.expand")
2567
2748
  })
2568
2749
  ]
2569
2750
  }),
2570
- expanded && /* @__PURE__ */ jsx_runtime6.jsx("div", {
2751
+ expanded && /* @__PURE__ */ jsx_runtime8.jsx("div", {
2571
2752
  className: panel_module_default.iterationHeadBody,
2572
2753
  id: "iteration-head-body",
2573
2754
  "data-iteration-head-body": true,
2574
- children: iterationSplitActive(active, iteration.branches) ? /* @__PURE__ */ jsx_runtime6.jsxs("div", {
2755
+ children: iterationSplitActive(active, iteration.branches) ? /* @__PURE__ */ jsx_runtime8.jsxs("div", {
2575
2756
  className: panel_module_default.iterationHeadSplit,
2576
2757
  "data-iteration-head-split": true,
2577
2758
  children: [
2578
- /* @__PURE__ */ jsx_runtime6.jsxs("div", {
2759
+ /* @__PURE__ */ jsx_runtime8.jsxs("div", {
2579
2760
  className: panel_module_default.iterationBranches,
2580
2761
  "data-iteration-head-branches": true,
2581
2762
  children: [
2582
- /* @__PURE__ */ jsx_runtime6.jsx("h3", {
2763
+ /* @__PURE__ */ jsx_runtime8.jsx("h3", {
2583
2764
  className: panel_module_default.iterationBranchesTitle,
2584
2765
  "data-branches-title": true,
2585
2766
  children: t("zone.branches.title")
2586
2767
  }),
2587
- /* @__PURE__ */ jsx_runtime6.jsx("ul", {
2768
+ /* @__PURE__ */ jsx_runtime8.jsx("ul", {
2588
2769
  className: panel_module_default.iterationBranchList,
2589
- children: BRANCH_ROWS.map((row) => /* @__PURE__ */ jsx_runtime6.jsxs("li", {
2770
+ children: BRANCH_ROWS.map((row) => /* @__PURE__ */ jsx_runtime8.jsxs("li", {
2590
2771
  className: panel_module_default.iterationBranchRow,
2591
2772
  "data-branch": row.kind,
2592
2773
  children: [
2593
- /* @__PURE__ */ jsx_runtime6.jsx("span", {
2774
+ /* @__PURE__ */ jsx_runtime8.jsx("span", {
2594
2775
  className: panel_module_default.iterationBranchLabel,
2595
2776
  children: t(row.label)
2596
2777
  }),
2597
- /* @__PURE__ */ jsx_runtime6.jsx("code", {
2778
+ /* @__PURE__ */ jsx_runtime8.jsx("code", {
2598
2779
  className: panel_module_default.iterationBranchValue,
2599
2780
  "data-branch-value": true,
2600
2781
  children: iteration.branches?.[row.value] ?? "—"
@@ -2612,25 +2793,23 @@ function IterationInfoSection({ iteration, t }) {
2612
2793
  });
2613
2794
  }
2614
2795
 
2615
- // src/client/panel/pages/agent-canvas.module.css
2796
+ // src/client/panel/pages/agent-list.module.css
2616
2797
  var css3 = `
2617
2798
 
2618
2799
 
2619
2800
 
2620
- .\\36 2d5f9b2_canvasPage {
2621
- flex: 1;
2622
- min-height: 0;
2801
+ .c7b89a22_listPage {
2623
2802
  display: flex;
2624
2803
  flex-direction: column;
2625
2804
  gap: var(--mstar-space-2);
2626
- padding: var(--mstar-space-3);
2805
+ min-width: 0;
2627
2806
 
2628
2807
  --mstar-canvas-emphasis-current: 100%;
2629
2808
  --mstar-canvas-emphasis-next: 75%;
2630
2809
  --mstar-canvas-emphasis-off: 45%;
2631
2810
  }
2632
2811
 
2633
- .\\37 608ed94_canvasHeader {
2812
+ .e5d7e3c4_listHeader {
2634
2813
  display: flex;
2635
2814
  align-items: baseline;
2636
2815
  justify-content: space-between;
@@ -2639,7 +2818,7 @@ var css3 = `
2639
2818
  min-width: 0;
2640
2819
  }
2641
2820
 
2642
- .\\39 e2394fd_canvasTitle {
2821
+ .\\39 01ce16d_listTitle {
2643
2822
  margin: 0;
2644
2823
  color: var(--dsw-alias-label-primary);
2645
2824
  font: var(--dsw-font-xs-13);
@@ -2647,7 +2826,7 @@ var css3 = `
2647
2826
  }
2648
2827
 
2649
2828
 
2650
- .\\37 4514c6f_canvasSummary {
2829
+ .\\36 678f1df_listSummary {
2651
2830
  flex: none;
2652
2831
  color: var(--dsw-alias-label-caption);
2653
2832
  font: var(--dsw-font-xxxs-11);
@@ -2655,7 +2834,7 @@ var css3 = `
2655
2834
  }
2656
2835
 
2657
2836
 
2658
- .\\38 5e71ac9_canvasNote {
2837
+ .\\37 f7cda39_listNote {
2659
2838
  flex: none;
2660
2839
  margin: 0;
2661
2840
  color: var(--dsw-alias-label-caption);
@@ -2663,66 +2842,35 @@ var css3 = `
2663
2842
  }
2664
2843
 
2665
2844
 
2666
- .\\34 374ac40_canvasLegend {
2845
+ .\\31 bf37650_listLegend {
2667
2846
  flex: none;
2668
2847
  }
2669
2848
 
2670
2849
 
2671
2850
 
2672
- .\\30 ceb0467_canvasViewport {
2673
- position: relative;
2674
- flex: 1;
2675
- min-height: 0;
2676
- overflow: hidden;
2677
- touch-action: none;
2678
- background: var(--dsw-alias-bg-layer-1);
2679
- border: 1px solid var(--dsw-alias-border-l1);
2680
- border-radius: 8px;
2681
- cursor: grab;
2682
- user-select: none;
2851
+ .dccb9592_agentList {
2852
+ min-width: 0;
2683
2853
  }
2684
2854
 
2685
- .\\30 ceb0467_canvasViewport:active {
2686
- cursor: grabbing;
2687
- }
2688
2855
 
2689
2856
 
2690
-
2691
- .\\34 8d128d6_canvasContent {
2692
- position: absolute;
2693
- top: 0;
2694
- left: 0;
2695
- background-color: var(--dsw-alias-bg-layer-1);
2696
- background-image:
2697
- linear-gradient(var(--dsw-alias-border-l1) 1px, transparent 1px),
2698
- linear-gradient(90deg, var(--dsw-alias-border-l1) 1px, transparent 1px);
2699
- background-size: 24px 24px;
2700
- will-change: transform;
2701
- }
2702
-
2703
-
2704
- .\\37 f010373_canvasColumnLabel {
2705
- position: absolute;
2706
- padding: 0 var(--mstar-space-1);
2707
- overflow: hidden;
2708
- text-overflow: ellipsis;
2709
- white-space: nowrap;
2710
- color: var(--dsw-alias-label-caption);
2711
- font: var(--dsw-font-xxxs-11);
2712
- font-weight: 600;
2713
- letter-spacing: 0.03em;
2714
- text-transform: uppercase;
2857
+ .\\37 a1e7d59_agentGroup {
2858
+ display: flex;
2859
+ flex-direction: column;
2860
+ gap: var(--mstar-space-2);
2861
+ min-width: 0;
2862
+ padding: var(--mstar-space-3);
2863
+ border: 1px solid var(--dsw-alias-border-l1);
2864
+ border-radius: 8px;
2865
+ background: var(--dsw-alias-bg-layer-1);
2715
2866
  }
2716
2867
 
2717
-
2718
- .fcf0fc76_canvasGroupLabel {
2719
- position: absolute;
2868
+ .a4d5691a_groupLabel {
2720
2869
  display: flex;
2721
2870
  align-items: center;
2722
2871
  gap: var(--mstar-space-2);
2723
2872
  min-width: 0;
2724
2873
  padding: 0 var(--mstar-space-1);
2725
- overflow: hidden;
2726
2874
  color: var(--dsw-alias-label-primary);
2727
2875
  font: var(--dsw-font-xxxs-11);
2728
2876
  font-weight: 600;
@@ -2731,7 +2879,7 @@ var css3 = `
2731
2879
  }
2732
2880
 
2733
2881
 
2734
- .f17a7dfb_canvasGroupPlan {
2882
+ .\\39 6c8bb5f_groupPlan {
2735
2883
  display: flex;
2736
2884
  align-items: center;
2737
2885
  gap: var(--mstar-space-1);
@@ -2751,7 +2899,7 @@ var css3 = `
2751
2899
  }
2752
2900
 
2753
2901
 
2754
- .\\32 387c06e_canvasGroupPlanMore {
2902
+ .c775aa0a_groupPlanMore {
2755
2903
  flex: none;
2756
2904
  color: var(--dsw-alias-label-caption);
2757
2905
  font: var(--dsw-font-xxxs-11);
@@ -2760,7 +2908,7 @@ var css3 = `
2760
2908
  }
2761
2909
 
2762
2910
 
2763
- .\\34 eb1cc60_canvasGroupNoPlan {
2911
+ .\\35 d27d864_groupNoPlan {
2764
2912
  color: var(--dsw-alias-label-caption);
2765
2913
  font: var(--dsw-font-xxxs-11);
2766
2914
  font-weight: 400;
@@ -2770,41 +2918,64 @@ var css3 = `
2770
2918
 
2771
2919
 
2772
2920
 
2773
- .d0988ac1_canvasEdges {
2774
- position: absolute;
2775
- top: 0;
2776
- left: 0;
2777
- pointer-events: none;
2921
+ .\\32 a00f734_stageGroup {
2922
+ display: flex;
2923
+ flex-direction: column;
2924
+ gap: var(--mstar-space-1);
2925
+ min-width: 0;
2926
+ }
2927
+
2928
+ .\\37 212d235_stageLabel {
2929
+ padding: 0 var(--mstar-space-1);
2930
+ overflow: hidden;
2931
+ text-overflow: ellipsis;
2932
+ white-space: nowrap;
2933
+ color: var(--dsw-alias-label-caption);
2934
+ font: var(--dsw-font-xxxs-11);
2935
+ font-weight: 600;
2936
+ letter-spacing: 0.03em;
2937
+ text-transform: uppercase;
2778
2938
  }
2779
2939
 
2780
2940
 
2781
- .ee3e51b3_canvasEdgeCurve {
2782
- fill: none;
2941
+
2942
+ .\\31 3172d67_subBucket {
2943
+ display: flex;
2944
+ flex-direction: column;
2945
+ gap: var(--mstar-space-1);
2946
+ min-width: 0;
2783
2947
  }
2784
2948
 
2785
- .e6a1115e_canvasEdgeActual {
2786
- stroke: var(--dsw-alias-state-business-primary);
2787
- stroke-width: 1.5;
2949
+ .\\37 78a2d3f_subBucketLabel {
2950
+ display: flex;
2951
+ align-items: center;
2952
+ gap: var(--mstar-space-1);
2953
+ color: var(--dsw-alias-label-caption);
2954
+ font: var(--dsw-font-xxxs-11);
2955
+ letter-spacing: 0.03em;
2956
+ text-transform: uppercase;
2788
2957
  }
2789
2958
 
2790
2959
 
2791
- .d3a4fb6c_canvasArrowActual {
2792
- fill: var(--dsw-alias-state-business-primary);
2960
+ .\\37 78a2d3f_subBucketLabel::after {
2961
+ content: '';
2962
+ flex: 1;
2963
+ border-top: 1px dashed var(--dsw-alias-border-l2);
2793
2964
  }
2794
2965
 
2795
2966
 
2796
2967
 
2797
- .\\34 4301340_canvasCards {
2798
- position: absolute;
2799
- top: 0;
2800
- left: 0;
2968
+ .b34ac147_cardList {
2801
2969
  margin: 0;
2802
2970
  padding: 0;
2803
2971
  list-style: none;
2972
+ display: flex;
2973
+ flex-direction: column;
2974
+ gap: var(--mstar-space-1);
2975
+ min-width: 0;
2804
2976
  }
2805
2977
 
2806
2978
  .a9030174_agentCard {
2807
- position: absolute;
2808
2979
  box-sizing: border-box;
2809
2980
  display: flex;
2810
2981
  flex-direction: column;
@@ -2837,14 +3008,14 @@ var css3 = `
2837
3008
  .\\34 e2c7873_agentCardRunning {
2838
3009
  border-color: var(--dsw-alias-state-business-primary);
2839
3010
  box-shadow: 0 0 0 1px var(--dsw-alias-state-business-primary);
2840
- animation: canvas-card-pulse 1.6s ease-in-out infinite;
3011
+ animation: agent-card-pulse 1.6s ease-in-out infinite;
2841
3012
  }
2842
3013
 
2843
3014
  .\\34 e2c7873_agentCardRunning:hover {
2844
3015
  border-color: var(--dsw-alias-state-business-primary);
2845
3016
  }
2846
3017
 
2847
- @keyframes canvas-card-pulse {
3018
+ @keyframes agent-card-pulse {
2848
3019
  0%, 100% {
2849
3020
  box-shadow: 0 0 0 1px var(--dsw-alias-state-business-primary);
2850
3021
  }
@@ -2874,50 +3045,6 @@ var css3 = `
2874
3045
  }
2875
3046
 
2876
3047
 
2877
- .\\34 fd21091_agentPort {
2878
- position: absolute;
2879
- width: 3px;
2880
- height: 3px;
2881
- border-radius: 999px;
2882
- background: var(--dsw-alias-label-caption);
2883
- opacity: 0;
2884
- pointer-events: none;
2885
- transition: opacity 150ms ease;
2886
- }
2887
-
2888
- .a9030174_agentCard:hover .\\34 fd21091_agentPort {
2889
- opacity: 1;
2890
- }
2891
-
2892
- .\\34 e2c7873_agentCardRunning:hover .\\34 fd21091_agentPort {
2893
- background: var(--dsw-alias-state-business-primary);
2894
- }
2895
-
2896
- .\\34 fd21091_agentPort[data-agent-port='north'] {
2897
- top: 0;
2898
- left: 50%;
2899
- transform: translate(-50%, -50%);
2900
- }
2901
-
2902
- .\\34 fd21091_agentPort[data-agent-port='south'] {
2903
- bottom: 0;
2904
- left: 50%;
2905
- transform: translate(-50%, 50%);
2906
- }
2907
-
2908
- .\\34 fd21091_agentPort[data-agent-port='west'] {
2909
- left: 0;
2910
- top: 50%;
2911
- transform: translate(-50%, -50%);
2912
- }
2913
-
2914
- .\\34 fd21091_agentPort[data-agent-port='east'] {
2915
- right: 0;
2916
- top: 50%;
2917
- transform: translate(50%, -50%);
2918
- }
2919
-
2920
-
2921
3048
  .c2c54212_onDemandBadge {
2922
3049
  align-self: flex-start;
2923
3050
  padding: 0 var(--mstar-space-1);
@@ -2927,46 +3054,6 @@ var css3 = `
2927
3054
  font: var(--dsw-font-xxxs-11);
2928
3055
  }
2929
3056
 
2930
-
2931
- .\\37 78a2d3f_subBucketLabel {
2932
- position: absolute;
2933
- display: flex;
2934
- align-items: center;
2935
- gap: var(--mstar-space-1);
2936
- color: var(--dsw-alias-label-caption);
2937
- font: var(--dsw-font-xxxs-11);
2938
- letter-spacing: 0.03em;
2939
- text-transform: uppercase;
2940
- }
2941
-
2942
-
2943
- .\\37 78a2d3f_subBucketLabel::after {
2944
- content: '';
2945
- flex: 1;
2946
- border-top: 1px dashed var(--dsw-alias-border-l2);
2947
- }
2948
-
2949
-
2950
- .\\39 94a2772_canvasEdgeSupervise {
2951
- stroke: var(--dsw-alias-label-caption);
2952
- stroke-width: 1.5;
2953
- stroke-dasharray: 5 4;
2954
- }
2955
-
2956
- .b2bb1e47_canvasEdgeSuperviseLit {
2957
-
2958
- stroke: var(--dsw-alias-state-business-primary);
2959
- stroke-dasharray: none;
2960
- }
2961
-
2962
- .ad3aae58_canvasArrowSupervise {
2963
- fill: var(--dsw-alias-label-caption);
2964
- }
2965
-
2966
- .\\32 6e265a1_canvasArrowSuperviseLit {
2967
- fill: var(--dsw-alias-state-business-primary);
2968
- }
2969
-
2970
3057
  .e7716946_agentCardLine {
2971
3058
  display: flex;
2972
3059
  align-items: center;
@@ -3059,7 +3146,7 @@ var css3 = `
3059
3146
  color: var(--dsw-alias-label-caption);
3060
3147
  }
3061
3148
  `;
3062
- var tagId3 = "@mstar-harness/dsh/agent-canvas.module.css";
3149
+ var tagId3 = "@mstar-harness/dsh/agent-list.module.css";
3063
3150
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId3) + "]") === null) {
3064
3151
  const tag = document.createElement("style");
3065
3152
  tag.dataset.plugin = "@mstar-harness/dsh";
@@ -3067,51 +3154,29 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
3067
3154
  tag.textContent = css3;
3068
3155
  document.head.appendChild(tag);
3069
3156
  }
3070
- 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" };
3157
+ 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" };
3071
3158
 
3072
- // src/client/panel/pages/AgentCanvasPage.tsx
3073
- var jsx_runtime7 = require("react/jsx-runtime");
3074
- var PAN_ORIGIN = { x: 0, y: 0 };
3075
- function panDragStart(pan, x, y) {
3076
- return { originX: pan.x, originY: pan.y, startX: x, startY: y };
3077
- }
3078
- function panDragMove(drag, x, y) {
3079
- return { x: drag.originX + (x - drag.startX), y: drag.originY + (y - drag.startY) };
3080
- }
3081
- function panTransform(pan) {
3082
- return `translate(${pan.x}px, ${pan.y}px)`;
3083
- }
3084
- var COL_W = 200;
3085
- var COL_GAP = 56;
3086
- var CARD_W = 176;
3087
- var CARD_H = 72;
3088
- var ROW_GAP = 12;
3089
- var PAD_X = 24;
3090
- var PAD_Y = 24;
3091
- var COL_PAD = 12;
3092
- var LABEL_H = 18;
3093
- var SUB_LABEL_H = 14;
3094
- var SUB_GAP = 4;
3095
- var GROUP_GAP = 24;
3096
- var STANDOFF = 10;
3097
- var SIDE_GAP = 18;
3159
+ // src/client/panel/pages/AgentListPage.tsx
3160
+ var jsx_runtime9 = require("react/jsx-runtime");
3098
3161
  var UNKNOWN_COLUMN = "unknown";
3099
- var GENERAL_SINK_STAGE = "sdd-implement";
3100
- function layoutAgents(view) {
3101
- const columnIds = view.stages.map((s) => s.id);
3102
- const unknownSinkId = columnIds[columnIds.length - 1] ?? UNKNOWN_COLUMN;
3103
- const sddStage = view.stages.find((s) => s.stage === GENERAL_SINK_STAGE);
3104
- const sddSinkId = sddStage === undefined ? unknownSinkId : sddStage.id;
3105
- const buckets = new Map;
3106
- for (const entity of view.entities) {
3107
- 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;
3108
- const bucketId = columnIds.includes(colId) ? colId : sddSinkId;
3109
- const bucket = buckets.get(bucketId);
3110
- if (bucket === undefined)
3111
- buckets.set(bucketId, [entity]);
3112
- else
3113
- bucket.push(entity);
3162
+ function orderedByRole(members, order) {
3163
+ const byKey = new Map(members.map((e) => [e.key, e]));
3164
+ const ordered = [];
3165
+ const claimed = new Set;
3166
+ for (const role of order) {
3167
+ const entity = byKey.get(role);
3168
+ if (entity !== undefined) {
3169
+ ordered.push(entity);
3170
+ claimed.add(role);
3171
+ }
3114
3172
  }
3173
+ for (const entity of members) {
3174
+ if (!claimed.has(entity.key))
3175
+ ordered.push(entity);
3176
+ }
3177
+ return ordered;
3178
+ }
3179
+ function buildGroups(view) {
3115
3180
  const rawGroups = [];
3116
3181
  for (const stage of view.stages) {
3117
3182
  const last = rawGroups[rawGroups.length - 1];
@@ -3119,294 +3184,73 @@ function layoutAgents(view) {
3119
3184
  rawGroups.push({
3120
3185
  phase: stage.phase,
3121
3186
  index: rawGroups.length + 1,
3122
- columnIds: [stage.id],
3187
+ stageIds: [stage.id],
3123
3188
  planNote: stage.phase === "autonomous-execute"
3124
3189
  });
3125
3190
  } else {
3126
- last.columnIds.push(stage.id);
3127
- }
3128
- }
3129
- const groups = rawGroups.map((g) => ({ ...g, label: { x: 0, y: 0, w: 0, h: 0 } }));
3130
- const cards = new Map;
3131
- const columns = [];
3132
- const subBuckets = new Map;
3133
- let unknown = null;
3134
- const colY = PAD_Y + LABEL_H + COL_PAD;
3135
- let groupX = PAD_X;
3136
- let canvasBottom = colY;
3137
- for (const group of groups) {
3138
- const groupW = group.columnIds.length * (COL_W + COL_GAP) - COL_GAP;
3139
- group.label = { x: groupX, y: PAD_Y, w: groupW, h: LABEL_H };
3140
- let groupBottom = colY;
3141
- group.columnIds.forEach((id, ci) => {
3142
- const colX = groupX + ci * (COL_W + COL_GAP);
3143
- const column = { id, x: colX, y: colY, w: COL_W, h: 0 };
3144
- columns.push(column);
3145
- const list = buckets.get(id) ?? [];
3146
- if (id === sddSinkId && sddStage !== undefined) {
3147
- const implementor = list.filter((e) => e.bucket === "implementor");
3148
- const reviewer = list.filter((e) => e.bucket === "reviewer");
3149
- const rest = list.filter((e) => e.bucket !== "implementor" && e.bucket !== "reviewer");
3150
- const rosterIndex = new Map(KNOWN_AGENTS.map((a, i) => [a.id, i]));
3151
- const implementorKey = (e) => {
3152
- if (e.zone === "flow") {
3153
- const i = sddStage.roles.indexOf(e.role);
3154
- return i === -1 ? Number.MAX_SAFE_INTEGER : i;
3155
- }
3156
- if (e.zone === "on-demand") {
3157
- return sddStage.roles.length + (rosterIndex.get(e.role) ?? Number.MAX_SAFE_INTEGER);
3158
- }
3159
- return Number.MAX_SAFE_INTEGER;
3160
- };
3161
- implementor.sort((a, b) => implementorKey(a) - implementorKey(b));
3162
- const implLabelY = colY + LABEL_H + COL_PAD;
3163
- const implCards = [];
3164
- let cy = implLabelY + SUB_LABEL_H + SUB_GAP;
3165
- for (const entity of implementor) {
3166
- const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
3167
- cards.set(entity.key, box);
3168
- implCards.push(box);
3169
- cy += CARD_H + ROW_GAP;
3170
- }
3171
- const revLabelY = cy;
3172
- const revCards = [];
3173
- cy = revLabelY + SUB_LABEL_H + SUB_GAP;
3174
- for (const entity of reviewer) {
3175
- const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
3176
- cards.set(entity.key, box);
3177
- revCards.push(box);
3178
- cy += CARD_H + ROW_GAP;
3179
- }
3180
- for (const entity of rest) {
3181
- const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
3182
- cards.set(entity.key, box);
3183
- cy += CARD_H + ROW_GAP;
3184
- }
3185
- const colBottom = cy - ROW_GAP;
3186
- column.h = Math.max(colBottom - colY + COL_PAD, CARD_H + LABEL_H + COL_PAD * 2);
3187
- 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 };
3188
- const labelW = CARD_W;
3189
- subBuckets.set(id, {
3190
- implementor: { label: { x: colX + (COL_W - CARD_W) / 2, y: implLabelY, w: labelW }, band: band(implCards) },
3191
- reviewer: { label: { x: colX + (COL_W - CARD_W) / 2, y: revLabelY, w: labelW }, band: band(revCards) }
3192
- });
3193
- } else if (id === unknownSinkId) {
3194
- const flowList = list.filter((e) => e.zone !== GENERAL_BUCKET);
3195
- const generalList = list.filter((e) => e.zone === GENERAL_BUCKET);
3196
- let cy = colY + LABEL_H + COL_PAD;
3197
- for (const entity of flowList) {
3198
- cards.set(entity.key, { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H });
3199
- cy += CARD_H + ROW_GAP;
3200
- }
3201
- const unknownLabelY = cy;
3202
- const unknownBoxes = [];
3203
- cy = unknownLabelY + SUB_LABEL_H + SUB_GAP;
3204
- for (const entity of generalList) {
3205
- const box = { x: colX + (COL_W - CARD_W) / 2, y: cy, w: CARD_W, h: CARD_H };
3206
- cards.set(entity.key, box);
3207
- unknownBoxes.push(box);
3208
- cy += CARD_H + ROW_GAP;
3209
- }
3210
- const colBottom = cy - ROW_GAP;
3211
- column.h = Math.max(colBottom - colY + COL_PAD, CARD_H + LABEL_H + COL_PAD * 2);
3212
- const labelW = CARD_W;
3213
- unknown = {
3214
- label: { x: colX + (COL_W - CARD_W) / 2, y: unknownLabelY, w: labelW },
3215
- 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 }
3216
- };
3217
- } else {
3218
- list.forEach((entity, i) => {
3219
- cards.set(entity.key, {
3220
- x: colX + (COL_W - CARD_W) / 2,
3221
- y: colY + LABEL_H + COL_PAD + i * (CARD_H + ROW_GAP),
3222
- w: CARD_W,
3223
- h: CARD_H
3224
- });
3225
- });
3226
- const h = COL_PAD * 2 + LABEL_H + list.length * CARD_H + Math.max(0, list.length - 1) * ROW_GAP;
3227
- column.h = Math.max(h, CARD_H + LABEL_H + COL_PAD * 2);
3228
- }
3229
- groupBottom = Math.max(groupBottom, colY + column.h);
3230
- });
3231
- canvasBottom = Math.max(canvasBottom, groupBottom);
3232
- groupX += groupW + GROUP_GAP;
3233
- }
3234
- return {
3235
- width: groups.length === 0 ? 0 : groupX - GROUP_GAP + PAD_X,
3236
- height: canvasBottom + PAD_Y,
3237
- columns,
3238
- cards,
3239
- subBuckets,
3240
- unknown,
3241
- groups
3242
- };
3243
- }
3244
- function superviseAnchor(anchor, layout) {
3245
- const idx = anchor.lastIndexOf(":");
3246
- if (idx === -1)
3247
- return null;
3248
- const columnId = anchor.slice(0, idx);
3249
- const bucket = anchor.slice(idx + 1);
3250
- if (bucket !== "implementor" && bucket !== "reviewer")
3251
- return null;
3252
- const column = layout.columns.find((c) => c.id === columnId);
3253
- if (column === undefined)
3254
- return null;
3255
- const geometry = layout.subBuckets.get(columnId);
3256
- if (geometry === undefined)
3257
- return null;
3258
- const partition = bucket === "implementor" ? geometry.implementor : geometry.reviewer;
3259
- const band = partition.band;
3260
- if (band === null)
3261
- return null;
3262
- const cardLeft = column.x + (COL_W - CARD_W) / 2;
3263
- const x = cardLeft + CARD_W + SIDE_GAP;
3264
- const y = bucket === "implementor" ? band.y + band.h : band.y;
3265
- return { x, y };
3266
- }
3267
- function portPoint(box, port) {
3268
- switch (port) {
3269
- case "north":
3270
- return { x: box.x + box.w / 2, y: box.y };
3271
- case "south":
3272
- return { x: box.x + box.w / 2, y: box.y + box.h };
3273
- case "west":
3274
- return { x: box.x, y: box.y + box.h / 2 };
3275
- case "east":
3276
- return { x: box.x + box.w, y: box.y + box.h / 2 };
3277
- }
3278
- }
3279
- function columnIndexOfBox(layout, box) {
3280
- 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);
3281
- }
3282
- function captionRows(layout, columnId) {
3283
- const rows = [];
3284
- const geometry = layout.subBuckets.get(columnId);
3285
- if (geometry !== undefined) {
3286
- for (const p of [geometry.implementor, geometry.reviewer]) {
3287
- if (p.band !== null)
3288
- rows.push({ x: p.label.x, y: p.label.y, w: p.label.w, h: SUB_LABEL_H });
3191
+ last.stageIds.push(stage.id);
3289
3192
  }
3290
3193
  }
3291
- const lastId = layout.columns[layout.columns.length - 1]?.id;
3292
- if (columnId === lastId && layout.unknown !== null && layout.unknown.band !== null) {
3293
- rows.push({ x: layout.unknown.label.x, y: layout.unknown.label.y, w: layout.unknown.label.w, h: SUB_LABEL_H });
3294
- }
3295
- return rows;
3296
- }
3297
- function intermediateCardBoxes(layout, srcCol, tgtCol) {
3298
- const lo = Math.min(srcCol, tgtCol);
3299
- const hi = Math.max(srcCol, tgtCol);
3300
- const boxes = [];
3301
- for (const box of layout.cards.values()) {
3302
- const col = columnIndexOfBox(layout, box);
3303
- if (col > lo && col < hi)
3304
- boxes.push(box);
3305
- }
3306
- return boxes;
3307
- }
3308
- function crossesCardBody(g, layout, srcCol, tgtCol) {
3309
- return intermediateCardBoxes(layout, srcCol, tgtCol).some((card) => boxOverlaps(g, card));
3310
- }
3311
- function horizontalBBox(sx, sy, tx, ty) {
3312
- const dx = tx - sx;
3313
- const off = Math.max(Math.abs(dx) / 2, 24);
3314
- const dir = dx < 0 ? -1 : 1;
3315
- const xs = [sx, tx, sx + dir * off, tx - dir * off];
3316
- const minX = Math.min(...xs);
3317
- const maxX = Math.max(...xs);
3318
- const minY = Math.min(sy, ty);
3319
- const maxY = Math.max(sy, ty);
3320
- return { x: minX, y: minY, w: maxX - minX, h: maxY - minY };
3321
- }
3322
- function boxOverlaps(a, b) {
3323
- 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;
3324
- }
3325
- function sideGapDetour(sx, sy, endX, endY, sourceBox, targetBox, layout, srcCol, tgtCol) {
3326
- const forward = srcCol < tgtCol;
3327
- const band = intermediateCardBoxes(layout, srcCol, tgtCol);
3328
- const bandBottom = band.reduce((m, c) => Math.max(m, c.y + c.h), 0);
3329
- const detourY = bandBottom + SIDE_GAP;
3330
- const sourceGapX = forward ? sourceBox.x + sourceBox.w + SIDE_GAP : sourceBox.x - SIDE_GAP;
3331
- const targetGapX = forward ? targetBox.x - SIDE_GAP : targetBox.x + targetBox.w + SIDE_GAP;
3332
- const d = `M ${sx} ${sy} L ${sourceGapX} ${sy} L ${sourceGapX} ${detourY} L ${targetGapX} ${detourY} L ${targetGapX} ${endY} L ${endX} ${endY}`;
3333
- return { d, x1: sx, y1: sy, x2: endX, y2: endY };
3334
- }
3335
- function sameColumnStandoff(gap) {
3336
- return Math.min(STANDOFF, Math.max(2, gap - 8));
3337
- }
3338
- function crossesSameColumnCard(layout, cx, startY, endY, sourceBox, targetBox) {
3339
- const seg = { x: cx, y: Math.min(startY, endY), w: 0, h: Math.abs(endY - startY) };
3340
- for (const box of layout.cards.values()) {
3341
- if (box === sourceBox || box === targetBox)
3194
+ const stageById = new Map(view.stages.map((s) => [s.id, s]));
3195
+ const lastStageId = view.stages.length > 0 ? view.stages[view.stages.length - 1].id : null;
3196
+ const implementorHostId = view.stages.find((s) => s.roles.some((r) => SDD_BUCKET_ROLES.implementor.includes(r)))?.id ?? lastStageId;
3197
+ const members = new Map;
3198
+ for (const entity of view.entities) {
3199
+ 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;
3200
+ if (stageId === null)
3342
3201
  continue;
3343
- if (boxOverlaps(seg, box))
3344
- return true;
3345
- }
3346
- return false;
3347
- }
3348
- function horizontalCurve(sx, sy, tx, ty) {
3349
- const dx = tx - sx;
3350
- const off = Math.max(Math.abs(dx) / 2, 24);
3351
- const dir = dx < 0 ? -1 : 1;
3352
- const d = `M ${sx} ${sy} C ${sx + dir * off} ${sy}, ${tx - dir * off} ${ty}, ${tx} ${ty}`;
3353
- return { d, x1: sx, y1: sy, x2: tx, y2: ty };
3354
- }
3355
- function verticalCurve(sx, sy, tx, ty) {
3356
- const span = ty - sy;
3357
- const d = `M ${sx} ${sy} C ${sx} ${sy + span / 3}, ${tx} ${ty - span / 3}, ${tx} ${ty}`;
3358
- return { d, x1: sx, y1: sy, x2: tx, y2: ty };
3359
- }
3360
- function edgePath(edge, layout) {
3361
- if (edge.kind === "supervise") {
3362
- const source = superviseAnchor(edge.source, layout);
3363
- const target = superviseAnchor(edge.target, layout);
3364
- if (source === null || target === null)
3365
- return null;
3366
- return verticalCurve(source.x, source.y, target.x, target.y);
3367
- }
3368
- const sourceBox = layout.cards.get(edge.source);
3369
- const targetBox = layout.cards.get(edge.target);
3370
- if (sourceBox === undefined || targetBox === undefined)
3371
- return null;
3372
- const srcCol = columnIndexOfBox(layout, sourceBox);
3373
- const tgtCol = columnIndexOfBox(layout, targetBox);
3374
- if (srcCol < tgtCol) {
3375
- const s = portPoint(sourceBox, "east");
3376
- const t = portPoint(targetBox, "west");
3377
- const endX = t.x - STANDOFF;
3378
- if (crossesCardBody(horizontalBBox(s.x, s.y, endX, t.y), layout, srcCol, tgtCol)) {
3379
- return sideGapDetour(s.x, s.y, endX, t.y, sourceBox, targetBox, layout, srcCol, tgtCol);
3380
- }
3381
- return horizontalCurve(s.x, s.y, endX, t.y);
3382
- }
3383
- if (srcCol > tgtCol) {
3384
- const s = portPoint(sourceBox, "west");
3385
- const t = portPoint(targetBox, "east");
3386
- const endX = t.x + STANDOFF;
3387
- if (crossesCardBody(horizontalBBox(s.x, s.y, endX, t.y), layout, srcCol, tgtCol)) {
3388
- return sideGapDetour(s.x, s.y, endX, t.y, sourceBox, targetBox, layout, srcCol, tgtCol);
3389
- }
3390
- return horizontalCurve(s.x, s.y, endX, t.y);
3391
- }
3392
- const forward = sourceBox.y + sourceBox.h <= targetBox.y;
3393
- const gap = forward ? targetBox.y - (sourceBox.y + sourceBox.h) : sourceBox.y - (targetBox.y + targetBox.h);
3394
- const standoff = sameColumnStandoff(gap);
3395
- const cx = sourceBox.x + sourceBox.w / 2;
3396
- const startY = forward ? sourceBox.y + sourceBox.h : sourceBox.y;
3397
- const endY = forward ? targetBox.y - standoff : targetBox.y + targetBox.h + standoff;
3398
- const colId = layout.columns[srcCol]?.id;
3399
- 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);
3400
- if (crossesCaption || crossesSameColumnCard(layout, cx, startY, endY, sourceBox, targetBox)) {
3401
- const sideX = sourceBox.x - SIDE_GAP;
3402
- return verticalCurve(sideX, startY, sideX, endY);
3202
+ const list = members.get(stageId);
3203
+ if (list === undefined)
3204
+ members.set(stageId, [entity]);
3205
+ else
3206
+ list.push(entity);
3403
3207
  }
3404
- return verticalCurve(cx, startY, cx, endY);
3208
+ return rawGroups.map((raw) => ({
3209
+ phase: raw.phase,
3210
+ index: raw.index,
3211
+ planNote: raw.planNote,
3212
+ stages: raw.stageIds.map((stageId) => {
3213
+ const stage = stageById.get(stageId);
3214
+ const list = members.get(stageId) ?? [];
3215
+ const isImplementorHost = stageId === implementorHostId;
3216
+ const isLast = stageId === lastStageId;
3217
+ const flow = [];
3218
+ const implementor = [];
3219
+ const reviewer = [];
3220
+ const unknown = [];
3221
+ for (const entity of list) {
3222
+ if (isLast && entity.zone === GENERAL_BUCKET)
3223
+ unknown.push(entity);
3224
+ else if (isImplementorHost && entity.bucket === "implementor")
3225
+ implementor.push(entity);
3226
+ else if (isImplementorHost && entity.bucket === "reviewer")
3227
+ reviewer.push(entity);
3228
+ else
3229
+ flow.push(entity);
3230
+ }
3231
+ const buckets = [];
3232
+ if (implementor.length > 0) {
3233
+ buckets.push({ id: "implementor", entities: orderedByRole(implementor, SDD_BUCKET_ROLES.implementor) });
3234
+ }
3235
+ if (reviewer.length > 0) {
3236
+ buckets.push({ id: "reviewer", entities: orderedByRole(reviewer, SDD_BUCKET_ROLES.reviewer) });
3237
+ }
3238
+ if (unknown.length > 0) {
3239
+ buckets.push({ id: UNKNOWN_COLUMN, entities: orderedByRole(unknown, []) });
3240
+ }
3241
+ return {
3242
+ id: stageId,
3243
+ label: stageId.slice(stageId.indexOf(":") + 1),
3244
+ flow: orderedByRole(flow, stage?.roles ?? []),
3245
+ buckets
3246
+ };
3247
+ })
3248
+ }));
3405
3249
  }
3406
3250
  function StatusPoint({ status, done }) {
3407
- 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}`);
3251
+ 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}`);
3408
3252
  if (status === "settled" && done) {
3409
- return /* @__PURE__ */ jsx_runtime7.jsx("span", {
3253
+ return /* @__PURE__ */ jsx_runtime9.jsx("span", {
3410
3254
  className,
3411
3255
  "data-agent-status": status,
3412
3256
  "data-agent-done": "true",
@@ -3414,24 +3258,23 @@ function StatusPoint({ status, done }) {
3414
3258
  children: "✓"
3415
3259
  });
3416
3260
  }
3417
- return /* @__PURE__ */ jsx_runtime7.jsx("span", {
3261
+ return /* @__PURE__ */ jsx_runtime9.jsx("span", {
3418
3262
  className,
3419
3263
  "data-agent-status": status,
3420
3264
  "aria-hidden": "true"
3421
3265
  });
3422
3266
  }
3423
- function EntityCard({ entity, t, box }) {
3267
+ function EntityCard({ entity, t }) {
3424
3268
  const running = entity.status === "running";
3425
3269
  const done = entity.status === "settled" && entity.emphasis !== "off";
3426
3270
  const title = entity.idle ? entity.name : entity.role !== "" ? entity.role : entity.name;
3427
- const record = [];
3271
+ const record2 = [];
3428
3272
  if (entity.agent !== null)
3429
- record.push(entity.agent);
3273
+ record2.push(entity.agent);
3430
3274
  if (entity.task !== null)
3431
- record.push(entity.task);
3432
- return /* @__PURE__ */ jsx_runtime7.jsxs("li", {
3433
- 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,
3434
- style: { left: box.x, top: box.y, width: box.w, height: box.h },
3275
+ record2.push(entity.task);
3276
+ return /* @__PURE__ */ jsx_runtime9.jsxs("li", {
3277
+ 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,
3435
3278
  "data-agent-entity": entity.key,
3436
3279
  "data-agent-status": entity.status,
3437
3280
  "data-agent-idle": entity.idle ? "true" : undefined,
@@ -3441,106 +3284,71 @@ function EntityCard({ entity, t, box }) {
3441
3284
  "data-agent-bucket": entity.bucket ?? undefined,
3442
3285
  "data-agent-emphasis": entity.emphasis ?? undefined,
3443
3286
  children: [
3444
- entity.zone === "on-demand" && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3445
- className: agent_canvas_module_default.onDemandBadge,
3287
+ entity.zone === "on-demand" && /* @__PURE__ */ jsx_runtime9.jsx("span", {
3288
+ className: agent_list_module_default.onDemandBadge,
3446
3289
  "data-agent-on-demand": "true",
3447
3290
  children: t("zone.agents.on-demand")
3448
3291
  }),
3449
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3450
- className: agent_canvas_module_default.agentPort,
3451
- "data-agent-port": "north",
3452
- "aria-hidden": "true"
3453
- }),
3454
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3455
- className: agent_canvas_module_default.agentPort,
3456
- "data-agent-port": "south",
3457
- "aria-hidden": "true"
3458
- }),
3459
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3460
- className: agent_canvas_module_default.agentPort,
3461
- "data-agent-port": "west",
3462
- "aria-hidden": "true"
3463
- }),
3464
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3465
- className: agent_canvas_module_default.agentPort,
3466
- "data-agent-port": "east",
3467
- "aria-hidden": "true"
3468
- }),
3469
- /* @__PURE__ */ jsx_runtime7.jsxs("div", {
3470
- className: agent_canvas_module_default.agentCardLine,
3292
+ /* @__PURE__ */ jsx_runtime9.jsxs("div", {
3293
+ className: agent_list_module_default.agentCardLine,
3471
3294
  children: [
3472
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3473
- className: agent_canvas_module_default.agentCardName,
3295
+ /* @__PURE__ */ jsx_runtime9.jsx("span", {
3296
+ className: agent_list_module_default.agentCardName,
3474
3297
  title,
3475
3298
  children: title
3476
3299
  }),
3477
- /* @__PURE__ */ jsx_runtime7.jsx(StatusPoint, {
3300
+ /* @__PURE__ */ jsx_runtime9.jsx(StatusPoint, {
3478
3301
  status: entity.status,
3479
3302
  done
3480
3303
  }),
3481
- entity.count > 1 && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3482
- className: agent_canvas_module_default.agentCount,
3304
+ entity.count > 1 && /* @__PURE__ */ jsx_runtime9.jsx("span", {
3305
+ className: agent_list_module_default.agentCount,
3483
3306
  "data-agent-count": entity.count,
3484
3307
  children: `×${entity.count}`
3485
3308
  })
3486
3309
  ]
3487
3310
  }),
3488
- entity.role !== "" && entity.role !== entity.key && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3489
- className: agent_canvas_module_default.agentRoleChip,
3311
+ entity.role !== "" && entity.role !== entity.key && /* @__PURE__ */ jsx_runtime9.jsx("span", {
3312
+ className: agent_list_module_default.agentRoleChip,
3490
3313
  "data-agent-role": entity.role,
3491
3314
  children: entity.role
3492
3315
  }),
3493
- record.length > 0 && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3494
- className: agent_canvas_module_default.agentRecord,
3316
+ record2.length > 0 && /* @__PURE__ */ jsx_runtime9.jsx("span", {
3317
+ className: agent_list_module_default.agentRecord,
3495
3318
  "data-agent-record": true,
3496
- children: record.join(" · ")
3319
+ children: record2.join(" · ")
3497
3320
  })
3498
3321
  ]
3499
3322
  });
3500
3323
  }
3501
- function AgentCanvasPage({ view, iteration, t, initialPan }) {
3502
- const { entities, edges, degraded, note, executing, pending } = view;
3503
- const [pan, setPan] = import_react2.useState(() => initialPan ?? PAN_ORIGIN);
3504
- const dragRef = import_react2.useRef(null);
3505
- const layout = import_react2.useMemo(() => layoutAgents(view), [view]);
3506
- const edgeGeoms = import_react2.useMemo(() => edges.map((edge) => ({ edge, curve: edgePath(edge, layout) })), [edges, layout]);
3507
- const handlePointerDown = (e) => {
3508
- if (e.button !== 0 || !e.isPrimary)
3509
- return;
3510
- e.preventDefault();
3511
- e.currentTarget.setPointerCapture(e.pointerId);
3512
- dragRef.current = panDragStart(pan, e.clientX, e.clientY);
3513
- };
3514
- const handlePointerMove = (e) => {
3515
- const drag = dragRef.current;
3516
- if (drag === null)
3517
- return;
3518
- setPan(panDragMove(drag, e.clientX, e.clientY));
3519
- };
3520
- const handlePointerEnd = (e) => {
3521
- dragRef.current = null;
3522
- if (e.currentTarget.hasPointerCapture(e.pointerId)) {
3523
- e.currentTarget.releasePointerCapture(e.pointerId);
3524
- }
3525
- };
3324
+ function subBucketLabel(id, t) {
3325
+ if (id === "implementor")
3326
+ return t("zone.agents.bucket.implementor");
3327
+ if (id === "reviewer")
3328
+ return t("zone.agents.bucket.reviewer");
3329
+ return t("zone.agents.unknown-sub");
3330
+ }
3331
+ function AgentListPage({ view, iteration, t }) {
3332
+ const { degraded, note, executing, pending } = view;
3333
+ const groups = import_react2.useMemo(() => buildGroups(view), [view]);
3526
3334
  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;
3527
- return /* @__PURE__ */ jsx_runtime7.jsxs("div", {
3528
- className: agent_canvas_module_default.canvasPage,
3335
+ return /* @__PURE__ */ jsx_runtime9.jsxs("div", {
3336
+ className: agent_list_module_default.listPage,
3529
3337
  "data-mstar-page": "agents",
3530
3338
  children: [
3531
- /* @__PURE__ */ jsx_runtime7.jsx(IterationInfoSection, {
3339
+ /* @__PURE__ */ jsx_runtime9.jsx(IterationInfoSection, {
3532
3340
  iteration,
3533
3341
  t
3534
3342
  }),
3535
- /* @__PURE__ */ jsx_runtime7.jsxs("header", {
3536
- className: agent_canvas_module_default.canvasHeader,
3343
+ /* @__PURE__ */ jsx_runtime9.jsxs("header", {
3344
+ className: agent_list_module_default.listHeader,
3537
3345
  children: [
3538
- /* @__PURE__ */ jsx_runtime7.jsx("h2", {
3539
- className: agent_canvas_module_default.canvasTitle,
3346
+ /* @__PURE__ */ jsx_runtime9.jsx("h2", {
3347
+ className: agent_list_module_default.listTitle,
3540
3348
  children: t("zone.agents.title")
3541
3349
  }),
3542
- /* @__PURE__ */ jsx_runtime7.jsx("span", {
3543
- className: agent_canvas_module_default.canvasSummary,
3350
+ /* @__PURE__ */ jsx_runtime9.jsx("span", {
3351
+ className: agent_list_module_default.listSummary,
3544
3352
  "data-agent-summary": true,
3545
3353
  "data-agent-summary-executing": executing,
3546
3354
  "data-agent-summary-pending": pending,
@@ -3548,172 +3356,81 @@ function AgentCanvasPage({ view, iteration, t, initialPan }) {
3548
3356
  })
3549
3357
  ]
3550
3358
  }),
3551
- noteInfo !== null && /* @__PURE__ */ jsx_runtime7.jsx("p", {
3552
- className: agent_canvas_module_default.canvasNote,
3553
- "data-canvas-note": noteInfo.anchor,
3359
+ noteInfo !== null && /* @__PURE__ */ jsx_runtime9.jsx("p", {
3360
+ className: agent_list_module_default.listNote,
3361
+ "data-agents-note": noteInfo.anchor,
3554
3362
  children: noteInfo.text
3555
3363
  }),
3556
- /* @__PURE__ */ jsx_runtime7.jsx("div", {
3557
- className: agent_canvas_module_default.canvasViewport,
3558
- "data-canvas-viewport": true,
3559
- onPointerDown: handlePointerDown,
3560
- onPointerMove: handlePointerMove,
3561
- onPointerUp: handlePointerEnd,
3562
- onPointerCancel: handlePointerEnd,
3563
- onLostPointerCapture: handlePointerEnd,
3564
- children: /* @__PURE__ */ jsx_runtime7.jsxs("div", {
3565
- className: agent_canvas_module_default.canvasContent,
3566
- "data-canvas-pan": true,
3567
- style: { transform: panTransform(pan), width: layout.width, height: layout.height },
3364
+ /* @__PURE__ */ jsx_runtime9.jsx("div", {
3365
+ className: `${agent_list_module_default.agentList} ${panel_module_default.groupGrid}`,
3366
+ "data-agent-list": true,
3367
+ children: groups.map((group) => /* @__PURE__ */ jsx_runtime9.jsxs("section", {
3368
+ className: agent_list_module_default.agentGroup,
3369
+ "data-agent-group": group.phase,
3370
+ "data-agent-group-index": group.index,
3568
3371
  children: [
3569
- layout.groups.map((group) => /* @__PURE__ */ jsx_runtime7.jsxs("span", {
3570
- className: agent_canvas_module_default.canvasGroupLabel,
3571
- style: { left: group.label.x, top: group.label.y, width: group.label.w },
3572
- "data-canvas-group": group.phase,
3573
- "data-canvas-group-index": group.index,
3372
+ /* @__PURE__ */ jsx_runtime9.jsxs("span", {
3373
+ className: agent_list_module_default.groupLabel,
3574
3374
  children: [
3575
3375
  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) }),
3576
- group.planNote && (view.activePlanId === null ? /* @__PURE__ */ jsx_runtime7.jsx("span", {
3577
- className: agent_canvas_module_default.canvasGroupNoPlan,
3578
- "data-canvas-group-no-plan": true,
3376
+ group.planNote && (view.activePlanId === null ? /* @__PURE__ */ jsx_runtime9.jsx("span", {
3377
+ className: agent_list_module_default.groupNoPlan,
3378
+ "data-agent-group-no-plan": true,
3579
3379
  children: t("zone.agents.group.no-plan")
3580
- }) : /* @__PURE__ */ jsx_runtime7.jsxs("span", {
3581
- className: agent_canvas_module_default.canvasGroupPlan,
3582
- "data-canvas-group-plan": view.activePlanId,
3380
+ }) : /* @__PURE__ */ jsx_runtime9.jsxs("span", {
3381
+ className: agent_list_module_default.groupPlan,
3382
+ "data-agent-group-plan": view.activePlanId,
3583
3383
  children: [
3584
3384
  t("zone.agents.group.plan", { plan: view.activePlanId }),
3585
- view.activePlanCount > 1 && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3586
- className: agent_canvas_module_default.canvasGroupPlanMore,
3587
- "data-canvas-group-plan-more": true,
3385
+ view.activePlanCount > 1 && /* @__PURE__ */ jsx_runtime9.jsx("span", {
3386
+ className: agent_list_module_default.groupPlanMore,
3387
+ "data-agent-group-plan-more": true,
3588
3388
  children: t("zone.agents.group.plan-more", { n: String(view.activePlanCount - 1) })
3589
3389
  })
3590
3390
  ]
3591
3391
  }))
3592
3392
  ]
3593
- }, group.phase)),
3594
- layout.columns.map((col) => /* @__PURE__ */ jsx_runtime7.jsx("span", {
3595
- className: agent_canvas_module_default.canvasColumnLabel,
3596
- style: { left: col.x, top: col.y },
3597
- "data-canvas-column": col.id,
3598
- children: col.id.slice(col.id.indexOf(":") + 1)
3599
- }, col.id)),
3600
- Array.from(layout.subBuckets.entries()).map(([colId, geometry]) => /* @__PURE__ */ jsx_runtime7.jsxs("span", {
3601
- children: [
3602
- geometry.implementor.band !== null && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3603
- className: agent_canvas_module_default.subBucketLabel,
3604
- style: { left: geometry.implementor.label.x, top: geometry.implementor.label.y, width: geometry.implementor.label.w },
3605
- "data-sub-bucket": "implementor",
3606
- children: t("zone.agents.bucket.implementor")
3607
- }),
3608
- geometry.reviewer.band !== null && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3609
- className: agent_canvas_module_default.subBucketLabel,
3610
- style: { left: geometry.reviewer.label.x, top: geometry.reviewer.label.y, width: geometry.reviewer.label.w },
3611
- "data-sub-bucket": "reviewer",
3612
- children: t("zone.agents.bucket.reviewer")
3613
- })
3614
- ]
3615
- }, colId)),
3616
- layout.unknown !== null && layout.unknown.band !== null && /* @__PURE__ */ jsx_runtime7.jsx("span", {
3617
- className: agent_canvas_module_default.subBucketLabel,
3618
- style: { left: layout.unknown.label.x, top: layout.unknown.label.y, width: layout.unknown.label.w },
3619
- "data-sub-bucket": UNKNOWN_COLUMN,
3620
- children: t("zone.agents.unknown-sub")
3621
3393
  }),
3622
- /* @__PURE__ */ jsx_runtime7.jsxs("svg", {
3623
- className: agent_canvas_module_default.canvasEdges,
3624
- width: layout.width,
3625
- height: layout.height,
3626
- "aria-hidden": "true",
3394
+ group.stages.map((stage) => /* @__PURE__ */ jsx_runtime9.jsxs("section", {
3395
+ className: agent_list_module_default.stageGroup,
3396
+ "data-agent-stage": stage.id,
3627
3397
  children: [
3628
- /* @__PURE__ */ jsx_runtime7.jsxs("defs", {
3398
+ /* @__PURE__ */ jsx_runtime9.jsx("span", {
3399
+ className: agent_list_module_default.stageLabel,
3400
+ children: stage.label
3401
+ }),
3402
+ stage.flow.length > 0 && /* @__PURE__ */ jsx_runtime9.jsx("ul", {
3403
+ className: agent_list_module_default.cardList,
3404
+ children: stage.flow.map((entity) => /* @__PURE__ */ jsx_runtime9.jsx(EntityCard, {
3405
+ entity,
3406
+ t
3407
+ }, entity.key))
3408
+ }),
3409
+ stage.buckets.map((bucket) => /* @__PURE__ */ jsx_runtime9.jsxs("section", {
3410
+ className: agent_list_module_default.subBucket,
3411
+ "data-sub-bucket": bucket.id,
3629
3412
  children: [
3630
- /* @__PURE__ */ jsx_runtime7.jsx("marker", {
3631
- id: "canvas-arrow-actual",
3632
- markerUnits: "userSpaceOnUse",
3633
- viewBox: "0 0 6 8",
3634
- refX: "6",
3635
- refY: "4",
3636
- markerWidth: "6",
3637
- markerHeight: "8",
3638
- orient: "auto",
3639
- children: /* @__PURE__ */ jsx_runtime7.jsx("path", {
3640
- className: agent_canvas_module_default.canvasArrowActual,
3641
- d: "M 0 1 L 6 4 L 0 7 z"
3642
- })
3643
- }),
3644
- /* @__PURE__ */ jsx_runtime7.jsx("marker", {
3645
- id: "canvas-arrow-supervise",
3646
- markerUnits: "userSpaceOnUse",
3647
- viewBox: "0 0 6 8",
3648
- refX: "6",
3649
- refY: "4",
3650
- markerWidth: "6",
3651
- markerHeight: "8",
3652
- orient: "auto-start-reverse",
3653
- children: /* @__PURE__ */ jsx_runtime7.jsx("path", {
3654
- className: agent_canvas_module_default.canvasArrowSupervise,
3655
- d: "M 0 1 L 6 4 L 0 7 z"
3656
- })
3413
+ /* @__PURE__ */ jsx_runtime9.jsx("span", {
3414
+ className: agent_list_module_default.subBucketLabel,
3415
+ children: subBucketLabel(bucket.id, t)
3657
3416
  }),
3658
- /* @__PURE__ */ jsx_runtime7.jsx("marker", {
3659
- id: "canvas-arrow-supervise-lit",
3660
- markerUnits: "userSpaceOnUse",
3661
- viewBox: "0 0 6 8",
3662
- refX: "6",
3663
- refY: "4",
3664
- markerWidth: "6",
3665
- markerHeight: "8",
3666
- orient: "auto-start-reverse",
3667
- children: /* @__PURE__ */ jsx_runtime7.jsx("path", {
3668
- className: agent_canvas_module_default.canvasArrowSuperviseLit,
3669
- d: "M 0 1 L 6 4 L 0 7 z"
3670
- })
3417
+ /* @__PURE__ */ jsx_runtime9.jsx("ul", {
3418
+ className: agent_list_module_default.cardList,
3419
+ children: bucket.entities.map((entity) => /* @__PURE__ */ jsx_runtime9.jsx(EntityCard, {
3420
+ entity,
3421
+ t
3422
+ }, entity.key))
3671
3423
  })
3672
3424
  ]
3673
- }),
3674
- edgeGeoms.map((geom, i) => {
3675
- const curve = geom.curve;
3676
- if (curve === null)
3677
- return null;
3678
- if (geom.edge.kind === "supervise") {
3679
- const lit = geom.edge.evidenced === true;
3680
- return /* @__PURE__ */ jsx_runtime7.jsx("path", {
3681
- className: `${agent_canvas_module_default.canvasEdgeCurve} ${lit ? `${agent_canvas_module_default.canvasEdgeSupervise} ${agent_canvas_module_default.canvasEdgeSuperviseLit}` : agent_canvas_module_default.canvasEdgeSupervise}`,
3682
- d: curve.d,
3683
- markerStart: lit ? "url(#canvas-arrow-supervise-lit)" : "url(#canvas-arrow-supervise)",
3684
- markerEnd: lit ? "url(#canvas-arrow-supervise-lit)" : "url(#canvas-arrow-supervise)",
3685
- "data-agent-edge-supervise": `${geom.edge.source}->${geom.edge.target}`,
3686
- "data-agent-edge-supervise-lit": lit ? "true" : undefined
3687
- }, `supervise-${i}-${geom.edge.source}-${geom.edge.target}`);
3688
- }
3689
- return /* @__PURE__ */ jsx_runtime7.jsx("path", {
3690
- className: `${agent_canvas_module_default.canvasEdgeCurve} ${agent_canvas_module_default.canvasEdgeActual}`,
3691
- d: curve.d,
3692
- markerEnd: "url(#canvas-arrow-actual)",
3693
- "data-agent-edge-actual": `${geom.edge.source}->${geom.edge.target}`
3694
- }, `actual-${i}-${geom.edge.source}-${geom.edge.target}`);
3695
- })
3425
+ }, bucket.id))
3696
3426
  ]
3697
- }),
3698
- /* @__PURE__ */ jsx_runtime7.jsx("ul", {
3699
- className: agent_canvas_module_default.canvasCards,
3700
- children: entities.map((entity) => {
3701
- const box = layout.cards.get(entity.key);
3702
- if (box === undefined)
3703
- return null;
3704
- return /* @__PURE__ */ jsx_runtime7.jsx(EntityCard, {
3705
- entity,
3706
- t,
3707
- box
3708
- }, entity.key);
3709
- })
3710
- })
3427
+ }, stage.id))
3711
3428
  ]
3712
- })
3429
+ }, group.phase))
3713
3430
  }),
3714
- /* @__PURE__ */ jsx_runtime7.jsx("div", {
3715
- className: agent_canvas_module_default.canvasLegend,
3716
- children: /* @__PURE__ */ jsx_runtime7.jsx(Legend, {
3431
+ /* @__PURE__ */ jsx_runtime9.jsx("div", {
3432
+ className: agent_list_module_default.listLegend,
3433
+ children: /* @__PURE__ */ jsx_runtime9.jsx(Legend, {
3717
3434
  t
3718
3435
  })
3719
3436
  })
@@ -3777,15 +3494,9 @@ var css4 = `
3777
3494
 
3778
3495
 
3779
3496
 
3497
+
3780
3498
  .\\38 e395e34_eventLogPage {
3781
- flex: 1;
3782
- min-height: 0;
3783
- display: grid;
3784
- grid-template-columns: repeat(2, minmax(0, 1fr));
3785
- grid-template-rows: minmax(0, 1fr);
3786
- gap: var(--mstar-space-3);
3787
- padding: var(--mstar-space-3);
3788
- overflow: hidden;
3499
+ min-width: 0;
3789
3500
  }
3790
3501
 
3791
3502
 
@@ -3795,7 +3506,6 @@ var css4 = `
3795
3506
  flex-direction: column;
3796
3507
  gap: var(--mstar-space-2);
3797
3508
  min-width: 0;
3798
- min-height: 0;
3799
3509
  padding: var(--mstar-space-3);
3800
3510
  border: 1px solid var(--dsw-alias-border-l1);
3801
3511
  border-radius: 8px;
@@ -3829,9 +3539,6 @@ var css4 = `
3829
3539
  margin: 0;
3830
3540
  padding: 0;
3831
3541
  list-style: none;
3832
- flex: 1;
3833
- min-height: 0;
3834
- overflow-y: auto;
3835
3542
  }
3836
3543
 
3837
3544
 
@@ -4026,15 +3733,6 @@ var css4 = `
4026
3733
  .bd3cb6ff_detailValueMissing {
4027
3734
  color: var(--dsw-alias-label-caption);
4028
3735
  }
4029
-
4030
-
4031
-
4032
- @media (max-width: 1200px) {
4033
- .\\38 e395e34_eventLogPage {
4034
- grid-template-columns: 1fr;
4035
- grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
4036
- }
4037
- }
4038
3736
  `;
4039
3737
  var tagId4 = "@mstar-harness/dsh/event-log.module.css";
4040
3738
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId4) + "]") === null) {
@@ -4047,7 +3745,7 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
4047
3745
  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" };
4048
3746
 
4049
3747
  // src/client/panel/pages/EventLogPage.tsx
4050
- var jsx_runtime8 = require("react/jsx-runtime");
3748
+ var jsx_runtime10 = require("react/jsx-runtime");
4051
3749
  function flowStatusLabel(status, t) {
4052
3750
  switch (status) {
4053
3751
  case "dispatched":
@@ -4098,16 +3796,16 @@ function orDash(value) {
4098
3796
  }
4099
3797
  function DetailField({ field, label, value }) {
4100
3798
  const missing = value === "";
4101
- return /* @__PURE__ */ jsx_runtime8.jsxs("div", {
3799
+ return /* @__PURE__ */ jsx_runtime10.jsxs("div", {
4102
3800
  className: event_log_module_default.detailField,
4103
3801
  "data-event-log-field": field,
4104
3802
  "data-event-log-missing": missing ? "true" : "false",
4105
3803
  children: [
4106
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
3804
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4107
3805
  className: event_log_module_default.detailLabel,
4108
3806
  children: label
4109
3807
  }),
4110
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
3808
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4111
3809
  className: missing ? `${event_log_module_default.detailValue} ${event_log_module_default.detailValueMissing}` : event_log_module_default.detailValue,
4112
3810
  children: missing ? "—" : value
4113
3811
  })
@@ -4119,88 +3817,88 @@ function EventDetailsBody({
4119
3817
  source,
4120
3818
  t
4121
3819
  }) {
4122
- return /* @__PURE__ */ jsx_runtime8.jsxs("div", {
3820
+ return /* @__PURE__ */ jsx_runtime10.jsxs("div", {
4123
3821
  className: event_log_module_default.detailBody,
4124
3822
  "data-event-log-detail-body": true,
4125
3823
  children: [
4126
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3824
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4127
3825
  field: "role",
4128
3826
  label: t("event-log.field.role"),
4129
3827
  value: entry.role
4130
3828
  }),
4131
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3829
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4132
3830
  field: "agent",
4133
3831
  label: t("event-log.field.agent"),
4134
3832
  value: entry.agent
4135
3833
  }),
4136
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3834
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4137
3835
  field: "stage",
4138
3836
  label: t("event-log.field.stage"),
4139
3837
  value: entry.stage
4140
3838
  }),
4141
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3839
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4142
3840
  field: "plan",
4143
3841
  label: t("event-log.field.plan"),
4144
3842
  value: source?.planId ?? ""
4145
3843
  }),
4146
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3844
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4147
3845
  field: "task",
4148
3846
  label: t("event-log.field.task"),
4149
3847
  value: source?.taskId ?? ""
4150
3848
  }),
4151
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3849
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4152
3850
  field: "category",
4153
3851
  label: t("event-log.field.category"),
4154
3852
  value: source?.taskCategory ?? ""
4155
3853
  }),
4156
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3854
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4157
3855
  field: "time",
4158
3856
  label: t("event-log.field.time"),
4159
3857
  value: source === undefined ? "" : formatEventTimeFull(source.ts)
4160
3858
  }),
4161
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3859
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4162
3860
  field: "kind",
4163
3861
  label: t("event-log.field.kind"),
4164
3862
  value: entry.eventKind === "dispatch" ? t("event-log.kind.dispatch") : entry.eventKind === "settle" ? t("event-log.kind.settle") : entry.eventKind
4165
3863
  }),
4166
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3864
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4167
3865
  field: "status",
4168
3866
  label: t("event-log.field.status"),
4169
3867
  value: flowStatusLabel(entry.status, t)
4170
3868
  }),
4171
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3869
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4172
3870
  field: "expected",
4173
3871
  label: t("event-log.field.expected"),
4174
3872
  value: entry.eventKind === "settle" || isWorkflowKind(entry.eventKind) ? "" : entry.expected ? t("event-log.yes") : t("event-log.no")
4175
3873
  }),
4176
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3874
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4177
3875
  field: "settled",
4178
3876
  label: t("event-log.field.settled"),
4179
3877
  value: entry.eventKind === "settle" || isWorkflowKind(entry.eventKind) ? "" : entry.settled ? t("event-log.yes") : t("event-log.no")
4180
3878
  }),
4181
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3879
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4182
3880
  field: "duration",
4183
3881
  label: t("event-log.field.duration"),
4184
3882
  value: entry.durationMs === null ? "" : `${entry.durationMs}ms`
4185
3883
  }),
4186
- isWorkflowKind(entry.eventKind) && /* @__PURE__ */ jsx_runtime8.jsxs(jsx_runtime8.Fragment, {
3884
+ isWorkflowKind(entry.eventKind) && /* @__PURE__ */ jsx_runtime10.jsxs(jsx_runtime10.Fragment, {
4187
3885
  children: [
4188
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3886
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4189
3887
  field: "run-id",
4190
3888
  label: t("event-log.field.run-id"),
4191
3889
  value: source?.runId ?? ""
4192
3890
  }),
4193
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3891
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4194
3892
  field: "name",
4195
3893
  label: t("event-log.field.name"),
4196
3894
  value: entry.name
4197
3895
  }),
4198
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3896
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4199
3897
  field: "members",
4200
3898
  label: t("event-log.field.members"),
4201
3899
  value: source?.memberCount !== undefined ? String(source.memberCount) : ""
4202
3900
  }),
4203
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
3901
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4204
3902
  field: "stop-reason",
4205
3903
  label: t("event-log.field.stop-reason"),
4206
3904
  value: source?.stopReason ?? ""
@@ -4217,68 +3915,68 @@ function EventLogEventRow({
4217
3915
  }) {
4218
3916
  const time = formatEventTime(entry.ts);
4219
3917
  const workflowIdentity = isWorkflowKind(entry.eventKind) ? entry.name !== "" ? entry.name : entry.runId !== "" ? entry.runId : "" : "";
4220
- return /* @__PURE__ */ jsx_runtime8.jsx("li", {
3918
+ return /* @__PURE__ */ jsx_runtime10.jsx("li", {
4221
3919
  className: event_log_module_default.eventRow,
4222
3920
  "data-event-log-row-kind": "event",
4223
3921
  "data-event-log-row-id": entry.id,
4224
3922
  "data-event-log-expected": entry.expected ? "true" : "false",
4225
- children: /* @__PURE__ */ jsx_runtime8.jsxs("details", {
3923
+ children: /* @__PURE__ */ jsx_runtime10.jsxs("details", {
4226
3924
  className: event_log_module_default.eventDetails,
4227
3925
  "data-event-log-details": true,
4228
3926
  children: [
4229
- /* @__PURE__ */ jsx_runtime8.jsxs("summary", {
3927
+ /* @__PURE__ */ jsx_runtime10.jsxs("summary", {
4230
3928
  className: event_log_module_default.eventSummary,
4231
3929
  "data-event-log-summary": true,
4232
3930
  children: [
4233
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
3931
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4234
3932
  className: event_log_module_default.eventRole,
4235
- children: entry.eventKind === "settle" ? /* @__PURE__ */ jsx_runtime8.jsx("span", {
3933
+ children: entry.eventKind === "settle" ? /* @__PURE__ */ jsx_runtime10.jsx("span", {
4236
3934
  className: event_log_module_default.settleGlyph,
4237
3935
  "aria-hidden": "true",
4238
3936
  children: "✓"
4239
- }) : workflowIdentity !== "" ? /* @__PURE__ */ jsx_runtime8.jsx("span", {
3937
+ }) : workflowIdentity !== "" ? /* @__PURE__ */ jsx_runtime10.jsx("span", {
4240
3938
  "data-event-log-name": workflowIdentity,
4241
3939
  children: workflowIdentity
4242
3940
  }) : entry.role !== "" ? entry.role : t("panel.unknown")
4243
3941
  }),
4244
- entry.stage !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
3942
+ entry.stage !== "" && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4245
3943
  className: event_log_module_default.eventStage,
4246
3944
  "data-event-log-stage": entry.stage,
4247
3945
  children: entry.stage
4248
3946
  }),
4249
- entry.task !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
3947
+ entry.task !== "" && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4250
3948
  className: event_log_module_default.eventTarget,
4251
3949
  "data-event-log-target": entry.task,
4252
3950
  children: entry.task
4253
3951
  }),
4254
- time !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
3952
+ time !== "" && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4255
3953
  className: event_log_module_default.eventTime,
4256
3954
  "data-event-log-time": time,
4257
3955
  children: time
4258
3956
  }),
4259
- /* @__PURE__ */ jsx_runtime8.jsxs("span", {
3957
+ /* @__PURE__ */ jsx_runtime10.jsxs("span", {
4260
3958
  className: `${event_log_module_default.statusChip} ${flowStatusClass(entry.status)}`,
4261
3959
  "data-event-log-status": entry.status,
4262
3960
  children: [
4263
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
3961
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4264
3962
  className: event_log_module_default.statusDot,
4265
3963
  "aria-hidden": "true"
4266
3964
  }),
4267
3965
  flowStatusLabel(entry.status, t)
4268
3966
  ]
4269
3967
  }),
4270
- entry.eventKind === "dispatch" && entry.settled && /* @__PURE__ */ jsx_runtime8.jsx("span", {
3968
+ entry.eventKind === "dispatch" && entry.settled && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4271
3969
  className: event_log_module_default.settledMark,
4272
3970
  "data-event-log-settled": "true",
4273
3971
  "aria-hidden": "true",
4274
3972
  children: "✓"
4275
3973
  }),
4276
- entry.agent !== "" && /* @__PURE__ */ jsx_runtime8.jsx("span", {
3974
+ entry.agent !== "" && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4277
3975
  className: event_log_module_default.eventAgent,
4278
3976
  "data-event-log-agent": entry.agent,
4279
3977
  children: entry.agent
4280
3978
  }),
4281
- entry.durationMs !== null && /* @__PURE__ */ jsx_runtime8.jsxs("span", {
3979
+ entry.durationMs !== null && /* @__PURE__ */ jsx_runtime10.jsxs("span", {
4282
3980
  className: event_log_module_default.eventDuration,
4283
3981
  "data-event-log-duration": entry.durationMs,
4284
3982
  children: [
@@ -4286,14 +3984,14 @@ function EventLogEventRow({
4286
3984
  "ms"
4287
3985
  ]
4288
3986
  }),
4289
- entry.eventKind === "dispatch" && !entry.expected && /* @__PURE__ */ jsx_runtime8.jsx("span", {
3987
+ entry.eventKind === "dispatch" && !entry.expected && /* @__PURE__ */ jsx_runtime10.jsx("span", {
4290
3988
  className: event_log_module_default.unexpectedBadge,
4291
3989
  "data-event-log-unexpected": "true",
4292
3990
  children: t("flow.unexpected")
4293
3991
  })
4294
3992
  ]
4295
3993
  }),
4296
- /* @__PURE__ */ jsx_runtime8.jsx(EventDetailsBody, {
3994
+ /* @__PURE__ */ jsx_runtime10.jsx(EventDetailsBody, {
4297
3995
  entry,
4298
3996
  source,
4299
3997
  t
@@ -4304,50 +4002,50 @@ function EventLogEventRow({
4304
4002
  }
4305
4003
  function ViolationRow({ entry, t }) {
4306
4004
  const severity = entry.severity !== "" ? entry.severity : "unknown";
4307
- return /* @__PURE__ */ jsx_runtime8.jsx("li", {
4005
+ return /* @__PURE__ */ jsx_runtime10.jsx("li", {
4308
4006
  className: event_log_module_default.violationRow,
4309
4007
  "data-event-log-row-kind": "violation",
4310
4008
  "data-event-log-row-id": entry.id,
4311
- children: /* @__PURE__ */ jsx_runtime8.jsxs("details", {
4009
+ children: /* @__PURE__ */ jsx_runtime10.jsxs("details", {
4312
4010
  className: event_log_module_default.eventDetails,
4313
4011
  "data-event-log-details": true,
4314
4012
  children: [
4315
- /* @__PURE__ */ jsx_runtime8.jsxs("summary", {
4013
+ /* @__PURE__ */ jsx_runtime10.jsxs("summary", {
4316
4014
  className: event_log_module_default.violationSummary,
4317
4015
  "data-event-log-summary": true,
4318
4016
  children: [
4319
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
4017
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4320
4018
  className: event_log_module_default.severityChip,
4321
4019
  "data-event-log-severity": severity,
4322
4020
  children: entry.severity !== "" ? entry.severity : t("panel.unknown")
4323
4021
  }),
4324
- entry.code !== "" && /* @__PURE__ */ jsx_runtime8.jsx("code", {
4022
+ entry.code !== "" && /* @__PURE__ */ jsx_runtime10.jsx("code", {
4325
4023
  className: event_log_module_default.violationCode,
4326
4024
  "data-event-log-code": entry.code,
4327
4025
  children: entry.code
4328
4026
  }),
4329
- /* @__PURE__ */ jsx_runtime8.jsx("span", {
4027
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4330
4028
  className: event_log_module_default.violationMessage,
4331
4029
  "data-event-log-message": entry.message,
4332
4030
  children: orDash(entry.message)
4333
4031
  })
4334
4032
  ]
4335
4033
  }),
4336
- /* @__PURE__ */ jsx_runtime8.jsxs("div", {
4034
+ /* @__PURE__ */ jsx_runtime10.jsxs("div", {
4337
4035
  className: event_log_module_default.detailBody,
4338
4036
  "data-event-log-detail-body": true,
4339
4037
  children: [
4340
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4038
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4341
4039
  field: "severity",
4342
4040
  label: t("event-log.field.severity"),
4343
4041
  value: entry.severity
4344
4042
  }),
4345
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4043
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4346
4044
  field: "code",
4347
4045
  label: t("event-log.field.code"),
4348
4046
  value: entry.code
4349
4047
  }),
4350
- /* @__PURE__ */ jsx_runtime8.jsx(DetailField, {
4048
+ /* @__PURE__ */ jsx_runtime10.jsx(DetailField, {
4351
4049
  field: "message",
4352
4050
  label: t("event-log.field.message"),
4353
4051
  value: entry.message
@@ -4364,38 +4062,38 @@ function EventLogPage({ view, t }) {
4364
4062
  const violationEntries = entries.filter((e) => e.kind === "violation");
4365
4063
  const eventById = new Map(view.events.map((event) => [event.id, event]));
4366
4064
  if (eventEntries.length === 0 && violationEntries.length === 0) {
4367
- return /* @__PURE__ */ jsx_runtime8.jsx("div", {
4065
+ return /* @__PURE__ */ jsx_runtime10.jsx("div", {
4368
4066
  className: event_log_module_default.eventLogPage,
4369
4067
  "data-mstar-page": "events",
4370
- children: /* @__PURE__ */ jsx_runtime8.jsx("p", {
4068
+ children: /* @__PURE__ */ jsx_runtime10.jsx("p", {
4371
4069
  className: event_log_module_default.empty,
4372
4070
  "data-event-log-empty": true,
4373
4071
  children: t("event-log.empty")
4374
4072
  })
4375
4073
  });
4376
4074
  }
4377
- return /* @__PURE__ */ jsx_runtime8.jsxs("div", {
4378
- className: event_log_module_default.eventLogPage,
4075
+ return /* @__PURE__ */ jsx_runtime10.jsxs("div", {
4076
+ className: `${event_log_module_default.eventLogPage} ${panel_module_default.groupGrid}`,
4379
4077
  "data-mstar-page": "events",
4380
4078
  children: [
4381
- /* @__PURE__ */ jsx_runtime8.jsxs("section", {
4079
+ /* @__PURE__ */ jsx_runtime10.jsxs("section", {
4382
4080
  className: event_log_module_default.section,
4383
4081
  "data-event-log-section": "events",
4384
4082
  "data-event-log-section-count": eventEntries.length,
4385
4083
  children: [
4386
- /* @__PURE__ */ jsx_runtime8.jsx("h2", {
4084
+ /* @__PURE__ */ jsx_runtime10.jsx("h2", {
4387
4085
  className: event_log_module_default.sectionTitle,
4388
4086
  "data-event-log-section-title": true,
4389
4087
  children: t("event-log.section.events")
4390
4088
  }),
4391
- eventEntries.length === 0 ? /* @__PURE__ */ jsx_runtime8.jsx("p", {
4089
+ eventEntries.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx("p", {
4392
4090
  className: event_log_module_default.empty,
4393
4091
  "data-event-log-empty-section": "events",
4394
4092
  children: t("event-log.empty.events")
4395
- }) : /* @__PURE__ */ jsx_runtime8.jsx("ul", {
4093
+ }) : /* @__PURE__ */ jsx_runtime10.jsx("ul", {
4396
4094
  className: event_log_module_default.rowList,
4397
4095
  "data-event-log-list": "events",
4398
- children: eventEntries.map((entry) => /* @__PURE__ */ jsx_runtime8.jsx(EventLogEventRow, {
4096
+ children: eventEntries.map((entry) => /* @__PURE__ */ jsx_runtime10.jsx(EventLogEventRow, {
4399
4097
  entry,
4400
4098
  source: eventById.get(entry.id),
4401
4099
  t
@@ -4403,24 +4101,24 @@ function EventLogPage({ view, t }) {
4403
4101
  })
4404
4102
  ]
4405
4103
  }),
4406
- /* @__PURE__ */ jsx_runtime8.jsxs("section", {
4104
+ /* @__PURE__ */ jsx_runtime10.jsxs("section", {
4407
4105
  className: event_log_module_default.section,
4408
4106
  "data-event-log-section": "violations",
4409
4107
  "data-event-log-section-count": violationEntries.length,
4410
4108
  children: [
4411
- /* @__PURE__ */ jsx_runtime8.jsx("h2", {
4109
+ /* @__PURE__ */ jsx_runtime10.jsx("h2", {
4412
4110
  className: event_log_module_default.sectionTitle,
4413
4111
  "data-event-log-section-title": true,
4414
4112
  children: t("event-log.section.violations")
4415
4113
  }),
4416
- violationEntries.length === 0 ? /* @__PURE__ */ jsx_runtime8.jsx("p", {
4114
+ violationEntries.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx("p", {
4417
4115
  className: event_log_module_default.empty,
4418
4116
  "data-event-log-empty-section": "violations",
4419
4117
  children: t("event-log.empty.violations")
4420
- }) : /* @__PURE__ */ jsx_runtime8.jsx("ul", {
4118
+ }) : /* @__PURE__ */ jsx_runtime10.jsx("ul", {
4421
4119
  className: event_log_module_default.rowList,
4422
4120
  "data-event-log-list": "violations",
4423
- children: violationEntries.map((entry) => /* @__PURE__ */ jsx_runtime8.jsx(ViolationRow, {
4121
+ children: violationEntries.map((entry) => /* @__PURE__ */ jsx_runtime10.jsx(ViolationRow, {
4424
4122
  entry,
4425
4123
  t
4426
4124
  }, entry.id))
@@ -4433,7 +4131,7 @@ function EventLogPage({ view, t }) {
4433
4131
 
4434
4132
  // src/client/panel/zones/TaskBoard.tsx
4435
4133
  var React = __toESM(require("react"));
4436
- var jsx_runtime9 = require("react/jsx-runtime");
4134
+ var jsx_runtime11 = require("react/jsx-runtime");
4437
4135
  var COLUMN_TITLE = {
4438
4136
  Todo: "zone.state.Todo",
4439
4137
  InProgress: "zone.state.InProgress",
@@ -4466,97 +4164,93 @@ function TaskBoard({ view, t }) {
4466
4164
  const empty = view.total === 0;
4467
4165
  const [expanded, setExpanded] = React.useState(new Set);
4468
4166
  const toggle = (id) => setExpanded((prev) => toggleKanbanExpanded(prev, id));
4469
- return /* @__PURE__ */ jsx_runtime9.jsxs("section", {
4167
+ return /* @__PURE__ */ jsx_runtime11.jsxs("section", {
4470
4168
  className: zones_module_default.zone,
4471
4169
  "data-zone": "tasks",
4472
4170
  children: [
4473
- /* @__PURE__ */ jsx_runtime9.jsxs("header", {
4171
+ /* @__PURE__ */ jsx_runtime11.jsxs("header", {
4474
4172
  className: zones_module_default.tasksHeader,
4475
4173
  "data-zone-header": true,
4476
4174
  children: [
4477
- /* @__PURE__ */ jsx_runtime9.jsx("h2", {
4175
+ /* @__PURE__ */ jsx_runtime11.jsx("h2", {
4478
4176
  className: zones_module_default.zoneHeader,
4479
4177
  children: t("zone.tasks.title")
4480
4178
  }),
4481
- /* @__PURE__ */ jsx_runtime9.jsx("span", {
4179
+ /* @__PURE__ */ jsx_runtime11.jsx("span", {
4482
4180
  className: zones_module_default.tasksTotal,
4483
4181
  "data-tasks-total": view.total,
4484
4182
  children: t("zone.tasks.total", { count: String(view.total) })
4485
4183
  })
4486
4184
  ]
4487
4185
  }),
4488
- empty && /* @__PURE__ */ jsx_runtime9.jsx("p", {
4186
+ empty && /* @__PURE__ */ jsx_runtime11.jsx("p", {
4489
4187
  className: zones_module_default.zoneEmpty,
4490
4188
  "data-zone-empty": "no-plans",
4491
4189
  children: t("zone.tasks.no-plans")
4492
4190
  }),
4493
- /* @__PURE__ */ jsx_runtime9.jsx("div", {
4494
- className: zones_module_default.kanban,
4191
+ /* @__PURE__ */ jsx_runtime11.jsx("div", {
4192
+ className: `${zones_module_default.kanban} ${panel_module_default.groupGrid}`,
4495
4193
  "data-mstar-kanban": true,
4496
- children: columns.map((column, i) => {
4497
- const arrow = i > 0 ? leadingArrow(column.id) : null;
4194
+ children: columns.map((column) => {
4195
+ const arrow = leadingArrow(column.id);
4498
4196
  const isExpanded = expanded.has(column.id);
4499
4197
  const shown = visibleKanbanPlans(column, isExpanded);
4500
4198
  const overflow = column.capped === null ? 0 : column.count - column.capped;
4501
- return /* @__PURE__ */ jsx_runtime9.jsxs(React.Fragment, {
4199
+ return /* @__PURE__ */ jsx_runtime11.jsxs("div", {
4200
+ className: zones_module_default.kanbanColumn,
4201
+ "data-kanban-column": column.id,
4502
4202
  children: [
4503
- arrow !== null && /* @__PURE__ */ jsx_runtime9.jsx("span", {
4504
- className: zones_module_default.kanbanArrow,
4505
- "data-kanban-arrow": arrow.label,
4506
- "aria-hidden": "true",
4507
- children: arrow.glyph
4203
+ /* @__PURE__ */ jsx_runtime11.jsxs("header", {
4204
+ className: zones_module_default.kanbanColumnHeader,
4205
+ children: [
4206
+ arrow !== null && /* @__PURE__ */ jsx_runtime11.jsx("span", {
4207
+ className: zones_module_default.kanbanArrow,
4208
+ "data-kanban-arrow": arrow.label,
4209
+ "aria-hidden": "true",
4210
+ children: arrow.glyph
4211
+ }),
4212
+ /* @__PURE__ */ jsx_runtime11.jsx("span", {
4213
+ className: zones_module_default.kanbanColumnTitle,
4214
+ children: t(COLUMN_TITLE[column.id])
4215
+ }),
4216
+ /* @__PURE__ */ jsx_runtime11.jsx("span", {
4217
+ className: zones_module_default.kanbanCount,
4218
+ "data-kanban-count": column.count,
4219
+ children: column.count
4220
+ })
4221
+ ]
4508
4222
  }),
4509
- /* @__PURE__ */ jsx_runtime9.jsxs("div", {
4510
- className: zones_module_default.kanbanColumn,
4511
- "data-kanban-column": column.id,
4223
+ /* @__PURE__ */ jsx_runtime11.jsxs("ul", {
4224
+ className: zones_module_default.kanbanCards,
4225
+ id: `kanban-cards-${column.id}`,
4512
4226
  children: [
4513
- /* @__PURE__ */ jsx_runtime9.jsxs("header", {
4514
- className: zones_module_default.kanbanColumnHeader,
4227
+ shown.map((plan, j) => /* @__PURE__ */ jsx_runtime11.jsxs("li", {
4228
+ className: zones_module_default.planCard,
4229
+ "data-plan-id": plan.id,
4230
+ "data-plan-status": plan.status,
4515
4231
  children: [
4516
- /* @__PURE__ */ jsx_runtime9.jsx("span", {
4517
- className: zones_module_default.kanbanColumnTitle,
4518
- children: t(COLUMN_TITLE[column.id])
4232
+ /* @__PURE__ */ jsx_runtime11.jsx("code", {
4233
+ className: zones_module_default.planCardId,
4234
+ children: plan.id
4519
4235
  }),
4520
- /* @__PURE__ */ jsx_runtime9.jsx("span", {
4521
- className: zones_module_default.kanbanCount,
4522
- "data-kanban-count": column.count,
4523
- children: column.count
4524
- })
4525
- ]
4526
- }),
4527
- /* @__PURE__ */ jsx_runtime9.jsxs("ul", {
4528
- className: zones_module_default.kanbanCards,
4529
- id: `kanban-cards-${column.id}`,
4530
- children: [
4531
- shown.map((plan, j) => /* @__PURE__ */ jsx_runtime9.jsxs("li", {
4532
- className: zones_module_default.planCard,
4533
- "data-plan-id": plan.id,
4534
- "data-plan-status": plan.status,
4535
- children: [
4536
- /* @__PURE__ */ jsx_runtime9.jsx("code", {
4537
- className: zones_module_default.planCardId,
4538
- children: plan.id
4539
- }),
4540
- /* @__PURE__ */ jsx_runtime9.jsx("span", {
4541
- className: zones_module_default.planCardStatus,
4542
- "data-status": plan.status,
4543
- children: plan.status
4544
- })
4545
- ]
4546
- }, plan.id === "" ? `card-${j}` : plan.id)),
4547
- overflow > 0 && /* @__PURE__ */ jsx_runtime9.jsx("li", {
4548
- className: zones_module_default.kanbanMore,
4549
- children: /* @__PURE__ */ jsx_runtime9.jsx("button", {
4550
- type: "button",
4551
- className: zones_module_default.kanbanMoreButton,
4552
- "data-kanban-more": isExpanded ? "collapse" : "expand",
4553
- "aria-expanded": isExpanded,
4554
- "aria-controls": `kanban-cards-${column.id}`,
4555
- onClick: () => toggle(column.id),
4556
- children: isExpanded ? t("zone.tasks.collapse") : t("zone.tasks.more", { count: String(overflow) })
4557
- })
4236
+ /* @__PURE__ */ jsx_runtime11.jsx("span", {
4237
+ className: zones_module_default.planCardStatus,
4238
+ "data-status": plan.status,
4239
+ children: plan.status
4558
4240
  })
4559
4241
  ]
4242
+ }, plan.id === "" ? `card-${j}` : plan.id)),
4243
+ overflow > 0 && /* @__PURE__ */ jsx_runtime11.jsx("li", {
4244
+ className: zones_module_default.kanbanMore,
4245
+ children: /* @__PURE__ */ jsx_runtime11.jsx("button", {
4246
+ type: "button",
4247
+ className: zones_module_default.kanbanMoreButton,
4248
+ "data-kanban-more": isExpanded ? "collapse" : "expand",
4249
+ "aria-expanded": isExpanded,
4250
+ "aria-controls": `kanban-cards-${column.id}`,
4251
+ onClick: () => toggle(column.id),
4252
+ children: isExpanded ? t("zone.tasks.collapse") : t("zone.tasks.more", { count: String(overflow) })
4253
+ })
4560
4254
  })
4561
4255
  ]
4562
4256
  })
@@ -4569,64 +4263,64 @@ function TaskBoard({ view, t }) {
4569
4263
  }
4570
4264
 
4571
4265
  // src/client/panel/zones/ProjectRollup.tsx
4572
- var jsx_runtime10 = require("react/jsx-runtime");
4266
+ var jsx_runtime12 = require("react/jsx-runtime");
4573
4267
  function ProjectRollup({ view, t }) {
4574
4268
  const { milestones, openResiduals } = view;
4575
- return /* @__PURE__ */ jsx_runtime10.jsxs("section", {
4269
+ return /* @__PURE__ */ jsx_runtime12.jsxs("section", {
4576
4270
  className: zones_module_default.zone,
4577
4271
  "data-zone": "project",
4578
4272
  children: [
4579
- /* @__PURE__ */ jsx_runtime10.jsx("header", {
4273
+ /* @__PURE__ */ jsx_runtime12.jsx("header", {
4580
4274
  className: zones_module_default.tasksHeader,
4581
4275
  "data-zone-header": true,
4582
- children: /* @__PURE__ */ jsx_runtime10.jsx("h2", {
4276
+ children: /* @__PURE__ */ jsx_runtime12.jsx("h2", {
4583
4277
  className: zones_module_default.zoneHeader,
4584
4278
  children: t("zone.project.title")
4585
4279
  })
4586
4280
  }),
4587
- /* @__PURE__ */ jsx_runtime10.jsx("h3", {
4281
+ /* @__PURE__ */ jsx_runtime12.jsx("h3", {
4588
4282
  className: zones_module_default.zoneTitle,
4589
4283
  "data-project-milestones-title": true,
4590
4284
  children: t("zone.project.milestones")
4591
4285
  }),
4592
- milestones.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx("p", {
4286
+ milestones.length === 0 ? /* @__PURE__ */ jsx_runtime12.jsx("p", {
4593
4287
  className: zones_module_default.zoneEmpty,
4594
4288
  "data-mstar-empty": "no-milestones",
4595
4289
  children: t("zone.project.none")
4596
- }) : /* @__PURE__ */ jsx_runtime10.jsx("ul", {
4290
+ }) : /* @__PURE__ */ jsx_runtime12.jsx("ul", {
4597
4291
  className: zones_module_default.rollupList,
4598
4292
  "data-project-milestones": true,
4599
- children: milestones.map((milestone, i) => /* @__PURE__ */ jsx_runtime10.jsx("li", {
4293
+ children: milestones.map((milestone, i) => /* @__PURE__ */ jsx_runtime12.jsx("li", {
4600
4294
  className: zones_module_default.rollupItem,
4601
4295
  "data-project-milestone": true,
4602
- children: /* @__PURE__ */ jsx_runtime10.jsx("span", {
4296
+ children: /* @__PURE__ */ jsx_runtime12.jsx("span", {
4603
4297
  className: zones_module_default.rollupMilestone,
4604
4298
  children: milestone
4605
4299
  })
4606
4300
  }, `${milestone}-${i}`))
4607
4301
  }),
4608
- /* @__PURE__ */ jsx_runtime10.jsx("h3", {
4302
+ /* @__PURE__ */ jsx_runtime12.jsx("h3", {
4609
4303
  className: zones_module_default.zoneTitle,
4610
4304
  "data-project-residuals-title": true,
4611
4305
  children: t("zone.project.residuals")
4612
4306
  }),
4613
- openResiduals.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx("p", {
4307
+ openResiduals.length === 0 ? /* @__PURE__ */ jsx_runtime12.jsx("p", {
4614
4308
  className: zones_module_default.zoneEmpty,
4615
4309
  "data-mstar-empty": "no-project-residuals",
4616
4310
  children: t("zone.project.none")
4617
- }) : /* @__PURE__ */ jsx_runtime10.jsx("ul", {
4311
+ }) : /* @__PURE__ */ jsx_runtime12.jsx("ul", {
4618
4312
  className: zones_module_default.rollupList,
4619
4313
  "data-project-residuals": true,
4620
- children: openResiduals.map((row, i) => /* @__PURE__ */ jsx_runtime10.jsxs("li", {
4314
+ children: openResiduals.map((row, i) => /* @__PURE__ */ jsx_runtime12.jsxs("li", {
4621
4315
  className: zones_module_default.rollupItem,
4622
4316
  "data-project-residual": true,
4623
4317
  children: [
4624
- /* @__PURE__ */ jsx_runtime10.jsx("span", {
4318
+ /* @__PURE__ */ jsx_runtime12.jsx("span", {
4625
4319
  className: zones_module_default.severityChip,
4626
4320
  "data-severity": row.severity,
4627
4321
  children: row.severity
4628
4322
  }),
4629
- /* @__PURE__ */ jsx_runtime10.jsx("span", {
4323
+ /* @__PURE__ */ jsx_runtime12.jsx("span", {
4630
4324
  className: zones_module_default.rollupCount,
4631
4325
  "data-project-residual-count": row.count,
4632
4326
  children: row.count
@@ -4639,25 +4333,24 @@ function ProjectRollup({ view, t }) {
4639
4333
  }
4640
4334
 
4641
4335
  // src/client/panel/pages/IterationTaskPage.tsx
4642
- var jsx_runtime11 = require("react/jsx-runtime");
4336
+ var jsx_runtime13 = require("react/jsx-runtime");
4643
4337
  function IterationTaskPage({ view, t }) {
4644
- return /* @__PURE__ */ jsx_runtime11.jsxs("div", {
4338
+ return /* @__PURE__ */ jsx_runtime13.jsxs("div", {
4645
4339
  className: panel_module_default.iterationPage,
4646
4340
  "data-mstar-page": "tasks",
4647
4341
  children: [
4648
- /* @__PURE__ */ jsx_runtime11.jsx(IterationInfoSection, {
4342
+ /* @__PURE__ */ jsx_runtime13.jsx(IterationInfoSection, {
4649
4343
  iteration: view.iteration,
4650
4344
  t
4651
4345
  }),
4652
- /* @__PURE__ */ jsx_runtime11.jsxs("div", {
4346
+ /* @__PURE__ */ jsx_runtime13.jsxs("div", {
4653
4347
  className: panel_module_default.iterationTasks,
4654
- "data-mstar-tasks-scroll": true,
4655
4348
  children: [
4656
- /* @__PURE__ */ jsx_runtime11.jsx(TaskBoard, {
4349
+ /* @__PURE__ */ jsx_runtime13.jsx(TaskBoard, {
4657
4350
  view: view.tasks,
4658
4351
  t
4659
4352
  }),
4660
- /* @__PURE__ */ jsx_runtime11.jsx(ProjectRollup, {
4353
+ /* @__PURE__ */ jsx_runtime13.jsx(ProjectRollup, {
4661
4354
  view: view.project,
4662
4355
  t
4663
4356
  })
@@ -4668,106 +4361,185 @@ function IterationTaskPage({ view, t }) {
4668
4361
  }
4669
4362
 
4670
4363
  // src/client/panel/use-mstar-engine-status.ts
4671
- var EMPTY = { source: null, lastUpdated: null };
4364
+ var import_react3 = require("react");
4365
+ var EMPTY_SNAPSHOT = { entries: new Map };
4366
+ var NO_SUBSCRIBE = () => () => {};
4367
+ var readEmptySnapshot = () => EMPTY_SNAPSHOT;
4368
+ var ANCHOR_PLUGIN = "mstar-engine";
4369
+ var LEGACY_ANCHOR_PLUGIN = "mstar-engine-status";
4672
4370
  function latestEngineStatusRow(nodes) {
4673
4371
  for (let i = nodes.length - 1;i >= 0; i--) {
4674
4372
  const node = nodes[i];
4675
4373
  if (node.kind !== "context" || node.form !== "catalog")
4676
4374
  continue;
4677
4375
  const source = node.source;
4678
- if (source?.kind === "mstar-engine-status")
4376
+ if (source?.kind === "plugin" && (source.plugin === ANCHOR_PLUGIN || source.plugin === LEGACY_ANCHOR_PLUGIN)) {
4679
4377
  return node;
4378
+ }
4680
4379
  }
4681
4380
  return null;
4682
4381
  }
4683
- function sameView(a, b) {
4684
- return a.source === b.source && a.lastUpdated === b.lastUpdated;
4685
- }
4686
- function selectEngineStatus(snapshot) {
4382
+ function selectAnchorTime(snapshot) {
4687
4383
  try {
4688
- const row = latestEngineStatusRow(snapshot.legacy.nodes);
4689
- if (row === null)
4690
- return EMPTY;
4691
- return { source: row.source, lastUpdated: row.time };
4384
+ const row = latestEngineStatusRow(snapshot?.legacy?.nodes ?? []);
4385
+ return row === null ? null : row.time;
4692
4386
  } catch {
4693
- return EMPTY;
4387
+ return null;
4694
4388
  }
4695
4389
  }
4696
- function useMstarEngineStatus(useChat) {
4390
+ function selectSessionCwd(sessionId) {
4391
+ return (state) => {
4392
+ try {
4393
+ if (sessionId === undefined)
4394
+ return null;
4395
+ const cwd = state?.byId?.[sessionId]?.cwd;
4396
+ return typeof cwd === "string" && cwd !== "" ? cwd : null;
4397
+ } catch {
4398
+ return null;
4399
+ }
4400
+ };
4401
+ }
4402
+ var WAITING = { state: "waiting", anchorTime: null, payload: null, at: null, turn: null, reason: null };
4403
+ function unavailable2(anchorTime, reason) {
4404
+ return { state: "unavailable", anchorTime, payload: null, at: null, turn: null, reason };
4405
+ }
4406
+ function useMstarEngineStatus(seats) {
4407
+ const { useChat, useSessions, sessionId, engineStatus } = seats;
4408
+ let anchorTime = null;
4409
+ let cwd = null;
4697
4410
  try {
4698
- const view = useChat(selectEngineStatus, sameView);
4699
- return view ?? EMPTY;
4411
+ anchorTime = useChat(selectAnchorTime);
4700
4412
  } catch {
4701
- return EMPTY;
4413
+ anchorTime = null;
4702
4414
  }
4415
+ try {
4416
+ cwd = useSessions === undefined ? null : useSessions(selectSessionCwd(sessionId));
4417
+ } catch {
4418
+ cwd = null;
4419
+ }
4420
+ const snapshot = import_react3.useSyncExternalStore(engineStatus?.subscribe ?? NO_SUBSCRIBE, engineStatus?.getSnapshot ?? readEmptySnapshot, engineStatus?.getSnapshot ?? readEmptySnapshot);
4421
+ if (anchorTime === null)
4422
+ return WAITING;
4423
+ if (engineStatus !== undefined && sessionId !== undefined && cwd !== null) {
4424
+ try {
4425
+ engineStatus.ensure(String(sessionId), cwd, anchorTime);
4426
+ } catch {}
4427
+ }
4428
+ const entry = sessionId === undefined ? undefined : snapshot.entries.get(String(sessionId));
4429
+ if (entry === undefined) {
4430
+ if (engineStatus === undefined)
4431
+ return unavailable2(anchorTime, "no-connection");
4432
+ if (sessionId === undefined)
4433
+ return unavailable2(anchorTime, "session-unknown");
4434
+ if (cwd === null)
4435
+ return unavailable2(anchorTime, "session-cwd-unknown");
4436
+ return { state: "loading", anchorTime, payload: null, at: null, turn: null, reason: null };
4437
+ }
4438
+ if (entry.fetch.status === "unavailable")
4439
+ return unavailable2(anchorTime, entry.fetch.reason);
4440
+ return { state: "ok", anchorTime, payload: entry.fetch.payload, at: entry.fetch.at, turn: entry.fetch.turn, reason: null };
4703
4441
  }
4704
4442
 
4705
4443
  // src/client/panel/PanelView.tsx
4706
- var jsx_runtime12 = require("react/jsx-runtime");
4707
- function formatTime(ms) {
4708
- return new Date(ms).toLocaleTimeString("en-GB");
4709
- }
4710
- function PanelContent({ tab, source, t }) {
4711
- if (tab === "agents") {
4712
- const view = projectGraph(source);
4713
- return /* @__PURE__ */ jsx_runtime12.jsx(AgentCanvasPage, {
4444
+ var jsx_runtime14 = require("react/jsx-runtime");
4445
+ function formatSnapshotTime(at) {
4446
+ const ms = Date.parse(at);
4447
+ return Number.isNaN(ms) ? null : new Date(ms).toLocaleTimeString("en-GB");
4448
+ }
4449
+ function PanelContent({ section, source, t }) {
4450
+ const view = React2.useMemo(() => projectGraph(source), [source]);
4451
+ if (section === "agents") {
4452
+ return /* @__PURE__ */ jsx_runtime14.jsx(AgentListPage, {
4714
4453
  view: view.agents,
4715
4454
  iteration: view.iteration,
4716
4455
  t
4717
4456
  });
4718
4457
  }
4719
- if (tab === "events")
4720
- return /* @__PURE__ */ jsx_runtime12.jsx(EventLogPage, {
4721
- view: projectGraph(source),
4458
+ if (section === "events")
4459
+ return /* @__PURE__ */ jsx_runtime14.jsx(EventLogPage, {
4460
+ view,
4722
4461
  t
4723
4462
  });
4724
- return /* @__PURE__ */ jsx_runtime12.jsx(IterationTaskPage, {
4725
- view: projectGraph(source),
4463
+ return /* @__PURE__ */ jsx_runtime14.jsx(IterationTaskPage, {
4464
+ view,
4726
4465
  t
4727
4466
  });
4728
4467
  }
4729
- function PanelView({ t, useChat }) {
4730
- const { source, lastUpdated } = useMstarEngineStatus(useChat);
4731
- const [tab, setTab] = import_react3.useState("tasks");
4732
- if (source === null || source === undefined) {
4733
- return /* @__PURE__ */ jsx_runtime12.jsx("div", {
4468
+ function PanelView({ t, useChat, useSessions, sessionId, engineStatus, useTabInfo, useStore, actions }) {
4469
+ const view = useMstarEngineStatus({ useChat, useSessions, sessionId, engineStatus });
4470
+ const tabInfo = useTabInfo();
4471
+ const tabId = tabInfo.tab.id;
4472
+ const section = useStore((s) => s.byTab[tabId]) ?? "tasks";
4473
+ if (!tabInfo.tab.visible)
4474
+ return null;
4475
+ const selectSection = (next) => {
4476
+ actions.select(tabId, next);
4477
+ };
4478
+ if (view.state === "waiting") {
4479
+ return /* @__PURE__ */ jsx_runtime14.jsx("div", {
4734
4480
  className: panel_module_default.emptyRoot,
4735
4481
  "data-mstar-panel": "waiting",
4736
- "data-conversation-composer-overlay": "",
4737
- children: /* @__PURE__ */ jsx_runtime12.jsx("p", {
4482
+ children: /* @__PURE__ */ jsx_runtime14.jsx("p", {
4738
4483
  className: panel_module_default.empty,
4739
4484
  "data-mstar-empty": "waiting",
4740
4485
  children: t("empty.waiting")
4741
4486
  })
4742
4487
  });
4743
4488
  }
4489
+ if (view.state === "loading") {
4490
+ return /* @__PURE__ */ jsx_runtime14.jsx("div", {
4491
+ className: panel_module_default.emptyRoot,
4492
+ "data-mstar-panel": "loading",
4493
+ children: /* @__PURE__ */ jsx_runtime14.jsx("p", {
4494
+ className: panel_module_default.empty,
4495
+ "data-mstar-empty": "loading",
4496
+ children: t("empty.loading")
4497
+ })
4498
+ });
4499
+ }
4500
+ if (view.state === "unavailable") {
4501
+ return /* @__PURE__ */ jsx_runtime14.jsx("div", {
4502
+ className: panel_module_default.emptyRoot,
4503
+ "data-mstar-panel": "unavailable",
4504
+ children: /* @__PURE__ */ jsx_runtime14.jsx("p", {
4505
+ className: panel_module_default.empty,
4506
+ "data-mstar-empty": "unavailable",
4507
+ "data-mstar-unavailable-reason": view.reason,
4508
+ children: t("empty.unavailable", { reason: view.reason })
4509
+ })
4510
+ });
4511
+ }
4512
+ const source = view.payload;
4513
+ const snapshotTime = formatSnapshotTime(view.at);
4744
4514
  const noHarness = source.harnessDir === null && source.state === null && source.iteration == null;
4745
- const freshness = /* @__PURE__ */ jsx_runtime12.jsxs("footer", {
4515
+ const freshness = /* @__PURE__ */ jsx_runtime14.jsxs("footer", {
4746
4516
  className: panel_module_default.freshness,
4747
4517
  "data-mstar-freshness": true,
4748
4518
  children: [
4749
- typeof lastUpdated === "number" ? /* @__PURE__ */ jsx_runtime12.jsx("span", {
4750
- children: t("freshness.last-updated", { time: formatTime(lastUpdated) })
4751
- }) : null,
4752
- /* @__PURE__ */ jsx_runtime12.jsx("span", {
4519
+ snapshotTime === null ? null : /* @__PURE__ */ jsx_runtime14.jsx("span", {
4520
+ "data-mstar-freshness-at": view.at,
4521
+ "data-mstar-freshness-turn": String(view.turn),
4522
+ children: t("freshness.last-updated", { time: snapshotTime, turn: String(view.turn) })
4523
+ }),
4524
+ /* @__PURE__ */ jsx_runtime14.jsx("span", {
4753
4525
  children: t("freshness.refresh-note")
4754
4526
  })
4755
4527
  ]
4756
4528
  });
4757
4529
  if (noHarness) {
4758
- return /* @__PURE__ */ jsx_runtime12.jsx("div", {
4530
+ return /* @__PURE__ */ jsx_runtime14.jsx("div", {
4759
4531
  className: panel_module_default.root,
4760
4532
  "data-mstar-panel": "no-harness",
4761
- "data-conversation-composer-overlay": "",
4762
- children: /* @__PURE__ */ jsx_runtime12.jsxs("main", {
4763
- className: panel_module_default.main,
4533
+ children: /* @__PURE__ */ jsx_runtime14.jsxs("div", {
4534
+ className: panel_module_default.scroll,
4535
+ "data-mstar-scroll": true,
4764
4536
  "data-mstar-graph": true,
4765
4537
  children: [
4766
- /* @__PURE__ */ jsx_runtime12.jsxs("div", {
4538
+ /* @__PURE__ */ jsx_runtime14.jsxs("div", {
4767
4539
  className: panel_module_default.noHarnessCard,
4768
4540
  "data-mstar-empty-card": true,
4769
4541
  children: [
4770
- /* @__PURE__ */ jsx_runtime12.jsxs("svg", {
4542
+ /* @__PURE__ */ jsx_runtime14.jsxs("svg", {
4771
4543
  className: panel_module_default.noHarnessIcon,
4772
4544
  "data-mstar-empty-icon": true,
4773
4545
  width: "32",
@@ -4780,25 +4552,25 @@ function PanelView({ t, useChat }) {
4780
4552
  strokeLinejoin: "round",
4781
4553
  "aria-hidden": "true",
4782
4554
  children: [
4783
- /* @__PURE__ */ jsx_runtime12.jsx("path", {
4555
+ /* @__PURE__ */ jsx_runtime14.jsx("path", {
4784
4556
  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"
4785
4557
  }),
4786
- /* @__PURE__ */ jsx_runtime12.jsx("path", {
4558
+ /* @__PURE__ */ jsx_runtime14.jsx("path", {
4787
4559
  d: "M9.7 9.4a2.4 2.4 0 1 1 3.4 2.2c-.7.3-1 .8-1 1.5"
4788
4560
  }),
4789
- /* @__PURE__ */ jsx_runtime12.jsx("circle", {
4561
+ /* @__PURE__ */ jsx_runtime14.jsx("circle", {
4790
4562
  cx: "12",
4791
4563
  cy: "16.4",
4792
4564
  r: "0.6"
4793
4565
  })
4794
4566
  ]
4795
4567
  }),
4796
- /* @__PURE__ */ jsx_runtime12.jsx("p", {
4568
+ /* @__PURE__ */ jsx_runtime14.jsx("p", {
4797
4569
  className: panel_module_default.noHarnessTitle,
4798
4570
  "data-mstar-empty": "no-harness",
4799
4571
  children: t("empty.no-harness")
4800
4572
  }),
4801
- /* @__PURE__ */ jsx_runtime12.jsx("p", {
4573
+ /* @__PURE__ */ jsx_runtime14.jsx("p", {
4802
4574
  className: panel_module_default.noHarnessHint,
4803
4575
  children: t("empty.no-harness-hint")
4804
4576
  })
@@ -4809,34 +4581,35 @@ function PanelView({ t, useChat }) {
4809
4581
  })
4810
4582
  });
4811
4583
  }
4812
- return /* @__PURE__ */ jsx_runtime12.jsxs("div", {
4584
+ return /* @__PURE__ */ jsx_runtime14.jsxs("div", {
4813
4585
  className: panel_module_default.root,
4814
4586
  "data-mstar-panel": "panel",
4815
- "data-conversation-composer-overlay": "",
4816
4587
  children: [
4817
- /* @__PURE__ */ jsx_runtime12.jsxs("main", {
4818
- className: panel_module_default.main,
4588
+ /* @__PURE__ */ jsx_runtime14.jsx(TabNav, {
4589
+ active: section,
4590
+ onChange: selectSection,
4591
+ t
4592
+ }),
4593
+ /* @__PURE__ */ jsx_runtime14.jsxs("div", {
4594
+ className: panel_module_default.scroll,
4595
+ "data-mstar-scroll": true,
4596
+ "data-mstar-graph": true,
4819
4597
  children: [
4820
- /* @__PURE__ */ jsx_runtime12.jsx(TabNav, {
4821
- active: tab,
4822
- onChange: setTab,
4598
+ /* @__PURE__ */ jsx_runtime14.jsx(PanelContent, {
4599
+ section,
4600
+ source,
4823
4601
  t
4824
4602
  }),
4825
- /* @__PURE__ */ jsx_runtime12.jsx("div", {
4826
- className: panel_module_default.content,
4827
- "data-mstar-graph": true,
4828
- children: /* @__PURE__ */ jsx_runtime12.jsx(PanelContent, {
4829
- tab,
4830
- source,
4831
- t
4832
- })
4603
+ /* @__PURE__ */ jsx_runtime14.jsx(Sidebar, {
4604
+ t,
4605
+ state: source.state,
4606
+ source
4833
4607
  }),
4834
4608
  freshness
4835
4609
  ]
4836
4610
  }),
4837
- /* @__PURE__ */ jsx_runtime12.jsx(Sidebar, {
4611
+ /* @__PURE__ */ jsx_runtime14.jsx(PanelMeta, {
4838
4612
  t,
4839
- state: source.state,
4840
4613
  source
4841
4614
  })
4842
4615
  ]
@@ -4844,16 +4617,24 @@ function PanelView({ t, useChat }) {
4844
4617
  }
4845
4618
 
4846
4619
  // src/client/index.ts
4847
- var inject = ["slots", "sessions", "locale"];
4620
+ var inject = ["slots", "sessions", "locale", "connection", "sidebarRightTabs"];
4848
4621
  function apply(ctx) {
4622
+ const engineStatus = new MstarEngineStatusClient(ctx.connection);
4623
+ ctx.effect(() => () => engineStatus.dispose(), "ui-mstar-panel: engine-status client");
4624
+ const t = ctx.locale.bind(NS);
4849
4625
  ctx.effect(() => ctx.locale.register(NS, { zh, en }), "ui-mstar-panel: dictionaries");
4850
- ctx.slots.inject("conversation.view", () => ctx.slots.register({
4851
- name: "conversation.view",
4852
- id: "mstar-workflow",
4853
- order: 20,
4854
- label: () => ctx.locale.bind(NS)("view.mstar-workflow"),
4855
- locale: NS
4856
- }, PanelView));
4626
+ ctx.effect(() => ctx.sidebarRightTabs.register(mstarPanelDefinition(t)), "ui-mstar-panel: tab type");
4627
+ const panelStore = createPanelStore();
4628
+ ctx.effect(() => ctx.slots.inject("sidebar.right.pane.tab", () => ctx.slots.register({
4629
+ name: "sidebar.right.pane.tab",
4630
+ key: MSTAR_PANEL_ID,
4631
+ locale: NS,
4632
+ store: panelStore
4633
+ }, (props) => PanelView({ ...props, engineStatus }))), "ui-mstar-panel: panel body");
4634
+ ctx.effect(() => ctx.slots.inject("sidebar.right.pane.tab.title", () => ctx.slots.register({
4635
+ name: "sidebar.right.pane.tab.title",
4636
+ key: MSTAR_PANEL_ID
4637
+ }, MstarPanelTitle)), "ui-mstar-panel: panel chip title");
4857
4638
  }
4858
4639
 
4859
4640
  return module.exports; } });