@mstar-harness/dsh 3.8.0 → 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.
@@ -1,60 +1,67 @@
1
1
  /**
2
- * Morning Star workflow panel page — the `conversation.view` tab component
3
- * (spec §4.2): render of the session's engine-status snapshot.
2
+ * Morning Star workflow panel page — the right-Sidebar pane body (the keyed
3
+ * `sidebar.right.pane.tab` seat component, plan sidebar §L1.5): render of the
4
+ * session's engine-status snapshot.
4
5
  *
5
- * Inputs: the session standard kit (`ConvViewProps` + the session-list seat),
6
- * the plugin's engine-status client (bound to the client `connection` service
7
- * by the plugin entry) and the typed `t` seat (`locale: 'mstar-panel'`). The
8
- * `useMstarEngineStatus()` hook turns the anchor row + the served snapshot
9
- * into ONE explicit render state (spec §5) — the render body is a pure
10
- * function of (state, payload, snapshot `at`, t).
6
+ * Inputs: the sidebar seat's props (`MstarPanelBodyProps` — the seat's
7
+ * runtime share incl. the framework-injected `useTabInfo()` + the session
8
+ * standard kit + the entry store share (`useStore` + baked `select`, backed
9
+ * by the registration's `store` option) + the plugin's engine-status client
10
+ * bound by the plugin entry + the typed `t` seat (`locale: 'mstar-panel'`)).
11
+ * The `useMstarEngineStatus()` hook turns the anchor row + the served
12
+ * snapshot into ONE explicit render state (spec §5) — the render body is a
13
+ * pure function of (state, payload, snapshot `at`, t).
11
14
  *
12
- * Layout (spec panel-tabs §2): root grid
13
- * `"main sidebar"` fills the Tab (height 100%, overflow hidden — the page
14
- * never scrolls); the right sidebar is RESIDENT (all tabs share it, its props
15
- * `{ t, state, source }` unchanged); main = the fixed header nav (TabNav, 3
16
- * MenuTabs) + the content region (switches per tab) + the freshness footer.
17
- * The `data-mstar-graph` anchor now marks the CONTENT container (spec §6.1 —
18
- * previously the canvas container), so tests pin the layout contract, not the
19
- * per-tab page internals.
15
+ * Visibility (plan sidebar §L2.6): a docked body is projected only while its
16
+ * sidebar column is expanded and the tab is active —
17
+ * `useTabInfo().tab.visible` — so a collapsed column renders NOTHING (no
18
+ * projection, no DOM). A floating pane is always visible.
20
19
  *
21
- * Tab state (spec §6.2): local `useState<PanelTab>` (default 'tasks', D1, no
22
- * routing) — `renderToStaticMarkup` renders the default tasks page, keeping
23
- * SSR assertions stable. The tasks tab renders the IterationTaskPage (Content
24
- * Head + Steps 横排/收拢 + full-width kanban, spec §3 —
25
- * replacing the WorkflowCanvas zone dashboard); the agents tab renders the
26
- * draggable AgentCanvasPage (spec §4 — replacing the muted placeholder + the AgentFlowZone); the events tab
27
- * renders the EventLogPage (spec §5 — the non-canvas log page with per-row
28
- * `<details>` expansion, replacing
29
- * the muted placeholder AND the AgentEventDock — 无双份日志).
20
+ * Layout (plan sidebar §L2.1): the narrow-column shell is a single flex
21
+ * column with exactly three zones — the section nav (`flex: none`), the
22
+ * panel-owned scroll body (`[data-mstar-scroll]`, flex: 1 1 auto ·
23
+ * min-height: 0 · the ONLY `overflow-y: auto` element in the panel; it also
24
+ * carries the `data-mstar-graph` content-container anchor), and the pinned
25
+ * meta dock (`flex: none`). The workspace-state digest renders IN FLOW at the
26
+ * end of the scroll body (the old 300px sibling column and its nested
27
+ * scroller are gone); the freshness footer follows it in the same flow.
30
28
  *
31
- * Empty branches (spec §2): waiting / loading / unavailable / no-harness render
32
- * no tabs and no sidebar — each with its OWN anchor and copy, so a degraded
33
- * read is never mistakable for an empty workspace. Waiting keeps the muted
34
- * hint; loading states the pending read; unavailable carries the
35
- * machine-readable reason; the no-harness branch renders a CENTERED
36
- * inactive-state card (icon + title + hint) with the freshness footer, and its
37
- * main keeps `data-mstar-graph` on the content container. Degradation stays
38
- * total: `projectGraph` never throws; no iteration → the IterationTaskPage's
39
- * collapsed muted head (spec §8); `state` null / plans missing → muted kanban
40
- * skeleton.
29
+ * Section state (plan sidebar §L2.4): the entry store, keyed by
30
+ * `tabInfo.tab.id` (default `'tasks'`, D1) — it survives the body's unmount
31
+ * when another pane tab activates, which `useState` cannot. The render is
32
+ * SSR-stable: an untouched store reads `undefined` → the default tasks page.
33
+ *
34
+ * Empty branches (spec §2): waiting / loading / unavailable / no-harness
35
+ * render no tabs, no digest and no meta dock — each with its OWN anchor and
36
+ * copy, so a degraded read is never mistakable for an empty workspace.
37
+ * Degradation stays total: `projectGraph` never throws; no iteration → the
38
+ * IterationTaskPage's collapsed muted head (spec §8); `state` null / plans
39
+ * missing → muted kanban skeleton.
41
40
  */
42
41
  import * as React from 'react';
43
- import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
44
- import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
42
+ import type { PropsLocale, PropsRuntime, TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
45
43
  import type { SessionId } from '@deepseek-ai/dsh-session';
46
44
  import type { MstarEngineStatusPayload } from '../../types.ts';
45
+ import type { PropsStore } from '@deepseek-ai/dsh-client-store';
47
46
  import type { MstarEngineStatusClient } from './engine-status-client.ts';
48
- import { type PanelTab } from './TabNav.tsx';
49
47
  import { type UseSessions } from './use-mstar-engine-status.ts';
50
- export interface MstarPanelViewProps extends ConvViewProps {
48
+ import { createPanelStore, type PanelSection } from './panel-store.ts';
49
+ /**
50
+ * The sidebar body seat's props (plan sidebar §L1.5): the seat's runtime
51
+ * share (owner + keyed + the seat's inject face — `useTabInfo()` — + the
52
+ * session standard kit, incl. the ui-chat-merged `useChat`) + the entry
53
+ * store share (plan §L2.4 — the registration's `store` option) + the typed
54
+ * `t` seat from the registration's `locale:` option.
55
+ */
56
+ export interface MstarPanelBodyProps extends PropsRuntime<'sidebar.right.pane.tab'>, PropsStore<ReturnType<typeof createPanelStore>>, PropsLocale<'mstar-panel'> {
51
57
  /** Namespace-bound translate seat (`locale: 'mstar-panel'`). */
52
58
  t: TranslateNS<'mstar-panel'>;
53
59
  /**
54
60
  * Current session identity — the session standard kit's own prop. Declared
55
61
  * here (rather than inherited) because this package does not depend on the
56
62
  * ui-session adapter that merges the session-kit declarations into
57
- * `ConvViewProps`; the view ring always supplies it at runtime.
63
+ * `SessionStandardProps`; the seat's session scope always supplies it at
64
+ * runtime.
58
65
  */
59
66
  sessionId?: SessionId;
60
67
  /** Host session-list selector hook (the global standard seat, same reason). */
@@ -67,20 +74,17 @@ export interface MstarPanelViewProps extends ConvViewProps {
67
74
  engineStatus?: MstarEngineStatusClient;
68
75
  }
69
76
  export interface PanelContentProps {
70
- tab: PanelTab;
77
+ /** The active panel section (plan sidebar §L1.5 vocabulary — not a sidebar tab record). */
78
+ section: PanelSection;
71
79
  source: MstarEngineStatusPayload;
72
80
  t: TranslateNS<'mstar-panel'>;
73
81
  }
74
82
  /**
75
- * Tab → page mapping (spec §6.2): the only per-tab-switching part of the
76
- * layout. tasks = the IterationTaskPage (spec §3 — Content Head + Steps
77
- * 横排/收拢 + full-width kanban, it replaced the
78
- * WorkflowCanvas zone dashboard, whose file is removed by the plan close);
79
- * agents = the draggable AgentCanvasPage (spec §4 — full KNOWN_AGENTS roster
80
- * + idle states + AgentEdge collaboration edges; it replaced the muted placeholder and the AgentFlowZone); events =
81
- * the real EventLogPage (spec §5 — non-canvas log page: Agent 流转事件 +
82
- * 违规记录 partitions with per-row `<details>` expansion; it replaced the muted placeholder AND the
83
- * AgentEventDock — 无双份日志, the dock is removed with this plan).
83
+ * Section → page mapping (spec §6.2): the only per-section-switching part of
84
+ * the layout. tasks = the IterationTaskPage (spec §3 — Content Head + Steps
85
+ * + the plan board); agents = the AgentListPage (spec §4 — the vertical
86
+ * grouped list, plan sidebar §L3); events = the EventLogPage (spec §5 — the
87
+ * log page with per-row `<details>` expansion).
84
88
  */
85
- export declare function PanelContent({ tab, source, t }: PanelContentProps): React.JSX.Element;
86
- export declare function PanelView({ t, useChat, useSessions, sessionId, engineStatus }: MstarPanelViewProps): React.JSX.Element;
89
+ export declare function PanelContent({ section, source, t }: PanelContentProps): React.JSX.Element;
90
+ export declare function PanelView({ t, useChat, useSessions, sessionId, engineStatus, useTabInfo, useStore, actions }: MstarPanelBodyProps): React.JSX.Element | null;
@@ -1,28 +1,31 @@
1
1
  /**
2
2
  * TabNav (spec panel-tabs §2/§6.1) —
3
- * the fixed header nav: 3 MenuTabs (任务迭代 / 代理执行 / 事件记录, F1.2)
4
- * switching the main content. Tab state is owned by PanelView
5
- * (`useState<PanelTab>`, default 'tasks', no routing — SSR-stable under
6
- * `renderToStaticMarkup`); TabNav is a controlled component receiving
7
- * `active` + `onChange` (spec §6.1 interface contract).
3
+ * the section nav, the shell's first flex zone (`flex: none`): the three
4
+ * internal sections (任务迭代 / 代理执行 / 事件记录) of the one sidebar tab.
5
+ * Section state is owned by the panel entry store (plan sidebar §L2.4 —
6
+ * keyed by the sidebar tab record, default 'tasks', no routing); TabNav is a
7
+ * controlled component receiving `active` + `onChange` (spec §6.1 interface
8
+ * contract).
8
9
  *
9
10
  * Anchors: `data-mstar-tab-nav` (the nav frame), `data-mstar-tab="{id}"` on
10
11
  * every tab and `data-mstar-tab-active="true|false"` (activation state). The
11
12
  * active tab gets the business-token underline; inactive tabs stay secondary.
13
+ * Visual language (plan sidebar §L2.3): the strip ABOVE this nav is the dsh
14
+ * tab chrome (chips with borders — the host's, untouched); this nav is
15
+ * content — `role="tablist"`, `role="tab"` + `aria-selected`, the underline
16
+ * via `box-shadow`, no borders on the tabs.
12
17
  *
13
- * A11y: the nav is a WAI-ARIA tablist and each tab is a
14
- * `role="tab"` button with `aria-selected` (APG Tabs pattern, replacing the
15
- * former `aria-pressed` toggle). Deliberately minimal: every tab stays Tab-
16
- * reachable (no roving tabindex / arrow-key handling — that behavior would
17
- * be scope creep without an explicit keyboard contract).
18
+ * A11y: WAI-ARIA tablist, each tab a `role="tab"` button with
19
+ * `aria-selected` (APG Tabs pattern). Deliberately minimal: every tab stays
20
+ * Tab-reachable (no roving tabindex / arrow-key handling — that behavior
21
+ * would be scope creep without an explicit keyboard contract).
18
22
  */
19
23
  import * as React from 'react';
20
24
  import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
21
- /** The three fixed panel tabs (spec §2 — D1 default = 'tasks'). */
22
- export type PanelTab = 'tasks' | 'agents' | 'events';
25
+ import type { PanelSection } from './panel-store.ts';
23
26
  export interface TabNavProps {
24
- active: PanelTab;
25
- onChange: (tab: PanelTab) => void;
27
+ active: PanelSection;
28
+ onChange: (tab: PanelSection) => void;
26
29
  t: TranslateNS<'mstar-panel'>;
27
30
  }
28
31
  export declare function TabNav({ active, onChange, t }: TabNavProps): React.JSX.Element;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The panel's right-Sidebar tab-type definition (plan sidebar §L1.2) — stage
3
+ * one of the two-stage seat registration: what the panel IS in the tab
4
+ * system. Stage two (the keyed `sidebar.right.pane.tab` body and
5
+ * `sidebar.right.pane.tab.title` chip under the same `id`) lives in the
6
+ * plugin entry (`src/client/index.ts`).
7
+ *
8
+ * A page type: `patterns`/`canOpen` omitted (it recognizes no resource
9
+ * address — it is opened by `kind`), `priority` omitted (defaults to the
10
+ * `extension` band, the right band for a type from outside the product), and
11
+ * exactly one guide entry so the start page carries the MStar capsule. The
12
+ * `title` thunk is re-read on every use, so the guide capsule follows the
13
+ * current locale; the chip's copy is captured at open time by the host.
14
+ */
15
+ import type { SidebarRightTabDefinition } from '@deepseek-ai/dsh-client-ui-sidebar-right/client';
16
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
17
+ /** This implementation's identity in the tab system — the key its body and title register under. */
18
+ export declare const MSTAR_PANEL_ID = "@mstar-harness/dsh";
19
+ /** The page kind the panel owns (U2: one sidebar tab). */
20
+ export declare const MSTAR_PANEL_KIND = "mstar-workflow";
21
+ /** The guide capsule's position among every registered type's entries (files ships order 10). */
22
+ export declare const MSTAR_GUIDE_ORDER = 20;
23
+ export declare function mstarPanelDefinition(t: TranslateNS<'mstar-panel'>): SidebarRightTabDefinition;
@@ -35,8 +35,7 @@
35
35
  * (the stage skeleton + entities/edges now live in the `agents` projection —
36
36
  * spec §4);
37
37
  * - added: `iteration.steps / currentStep / branches`, `tasks.columns / total
38
- * / truncated`, `agents` (entities + actual/supervise edges + executing/
39
- * pending counts — spec §4).
38
+ * / truncated`, `agents` (entities + executing/pending counts — spec §4).
40
39
  *
41
40
  * Agent-entity semantics (the per-role aggregation): entities aggregate by ROLE, not by session
42
41
  * — a KNOWN_AGENTS roster role keys its own card (same role across sessions
@@ -48,8 +47,8 @@
48
47
  * RENDER places `zone: 'general'` entities in an unknown sub-partition at
49
48
  * the bottom of the LAST column (the standalone rightmost unknown column
50
49
  * is superseded: 4 columns total). The SDD loop back-edge (sdd-implement →
51
- * general) stays REMOVED from the projection; the supervise line is a SEPARATE sub-bucket edge
52
- * (`kind: 'supervise'`, see `superviseEdges`). The event-log `unexpected`
50
+ * general) and the sub-bucket supervise line are both REMOVED from the
51
+ * projection — the agents zone projects entities only. The event-log `unexpected`
53
52
  * badge is a SEPARATE, unchanged semantic (`expected` ⟺ role ∈
54
53
  * EXPECTED_ROLE_FLOW union). The `sdd-implement` column is further split
55
54
  * into implementor / reviewer SUB-BUCKETS: every entity carries a projected `bucket` field ('implementor' /
@@ -215,7 +214,7 @@ export interface AgentEntityView {
215
214
  * non-roster dispatch); the KNOWN_AGENTS role id for idle cards. INVARIANT
216
215
  * (spec §6.2): keys are UNIQUE across the whole `entities` array —
217
216
  * an evidence-derived `general` key suppresses the idle general twin in
218
- * `idleEntities`, so the React `key` / `layoutAgents` `cards.set` never see
217
+ * `idleEntities`, so the render layer's entity `key` space never sees
219
218
  * duplicates.
220
219
  */
221
220
  key: string;
@@ -291,44 +290,6 @@ export type AgentEmphasis = 'current' | 'next' | 'off' | null;
291
290
  export type AgentEntityStatus = 'running' | 'settled' | 'error' | 'denied'
292
291
  /** Retained for shape compat; the derivation (entityStatus) no longer emits it. */
293
292
  | 'advisory' | 'idle';
294
- /** Edge kinds (spec §4 — the finalized line semantics, design doc §2.2): handoff / sub-bucket
295
- * supervision arrows. `expected` (stage skeleton) and `next` (running
296
- * animation) are REMOVED — the column order implies the flow, the running
297
- * card glow/status point carries the position. */
298
- export type AgentEdgeKind = 'actual' | 'supervise';
299
- /**
300
- * One agents-zone arrow (spec §4):
301
- * - `actual`: same-plan handoff between ts-adjacent dispatch ENTITY keys
302
- * (source/target = entity key — role-based). The line set filters
303
- * general-bucket endpoints
304
- * (a general handoff is noise, not a meaningful transfer) and keeps at most
305
- * ONE edge per entity-key pair (the latest direction) — design doc §2.2;
306
- * - `supervise`: ONE static sub-bucket line inside the `sdd-implement`
307
- * column — implementor ↔ reviewer mutual supervision (the mstar-sdd
308
- * mutual-supervision contract; the render draws it as a bidirectional
309
- * double arrow).
310
- * source/target embed the column id as an anchor prefix:
311
- * `<stage-id>:implementor` / `<stage-id>:reviewer`. NOT per-entity pairs —
312
- * drawing per-role pairs would fabricate concrete supervision relations
313
- * where no evidence exists (evidence-level handoffs are covered by
314
- * `actualEdges`). STATIC presence (design knowledge) + evidence-driven
315
- * lighting via `evidenced` (dim without implement/review dispatch
316
- * evidence, lit with it — never a fabricated activation).
317
- */
318
- export interface AgentEdge {
319
- kind: AgentEdgeKind;
320
- /** actual: entity key; supervise: `<stage-id>:implementor|reviewer`. */
321
- source: string;
322
- target: string;
323
- /** Unused by the line edge set (the removed `next` arrow carried the
324
- * running entity key); kept for shape stability — always null. */
325
- entityKey: string | null;
326
- /** Supervise edges only:
327
- * evidence-driven lighting — true when any dispatch row's role belongs to
328
- * an SDD sub-bucket (implementor ∪ reviewer), false otherwise (dim).
329
- * Absent (undefined) for actual. */
330
- evidenced?: boolean;
331
- }
332
293
  /**
333
294
  * The canvas degradation-note classification (spec §8): the projection
334
295
  * decides the note from the RAW ledger (never a UI-side heuristic on the
@@ -341,8 +302,8 @@ export interface AgentEdge {
341
302
  export type AgentZoneNote = 'empty' | 'settle-only' | null;
342
303
  /**
343
304
  * The projected agents zone (spec §4 + §6.2): the EXPECTED_ROLE_FLOW stage
344
- * skeleton plus the dispatch-derived entity cards and the actual/supervise
345
- * arrows. Total function — NEVER throws and NEVER fabricates: the KNOWN_AGENTS
305
+ * skeleton plus the dispatch-derived entity cards. Total function — NEVER
306
+ * throws and NEVER fabricates: the KNOWN_AGENTS
346
307
  * roster always projects as entities (idle cards when there is no evidence) —
347
308
  * agentFlow missing/unreadable → `degraded` (full idle roster + no
348
309
  * executing/pending claims); 0 events → `empty` (full idle roster + pending
@@ -360,8 +321,6 @@ export interface AgentZoneView {
360
321
  note: AgentZoneNote;
361
322
  /** Evidence-derived dispatch entities ∪ idle KNOWN_AGENTS cards — the full roster is NEVER hidden (spec §6.2). */
362
323
  entities: readonly AgentEntityView[];
363
- /** expected (stage skeleton) + actual (same-plan handoffs) + at most one next (latest running). */
364
- edges: readonly AgentEdge[];
365
324
  /** `running` entity count — the summary "N 执行中" (idle cards never count). */
366
325
  executing: number;
367
326
  /** Sum of expected roles of stages with no dispatch evidence — the summary "M 待执行". */
@@ -458,8 +417,7 @@ export declare function projectGraph(source: MstarEngineStatusPayload | null): Z
458
417
  * role is pending);
459
418
  * - otherwise: entities aggregated from dispatch rows (with `idle: false`),
460
419
  * statuses via the shared pairing walk, the un-evidenced KNOWN_AGENTS
461
- * members appended as idle cards, actual/supervise edges (design doc §2.2 —
462
- * the `expected` skeleton and `next` animation edges are REMOVED), and the
420
+ * members appended as idle cards, and the
463
421
  * executing (running entities — idle never counts) / pending
464
422
  * (un-evidenced stage roles) counts.
465
423
  *
@@ -468,8 +426,8 @@ export declare function projectGraph(source: MstarEngineStatusPayload | null): Z
468
426
  * suppresses a known role's idle card when its id already exists as an
469
427
  * evidence-derived entity key (a NON-roster dispatch produces a lit `general`
470
428
  * key while the roster `general` id stays un-evidenced — the twin is
471
- * suppressed via `litKeys`), so the render layer's `key`/`cards.set` never
472
- * collide.
429
+ * suppressed via `litKeys`), so the render layer's entity `key` space never
430
+ * collides.
473
431
  *
474
432
  * Canvas note: `note` classifies the readable ledger in
475
433
  * the projection ('empty' / 'settle-only' / null — see `AgentZoneNote`); the
@@ -82,8 +82,7 @@ export declare const TRANSITION_TO_PHASE: Readonly<Record<string, PhaseId>>;
82
82
  * placement (BOTTOM INSIDE the `sdd-implement` column bucket) is
83
83
  * superseded by the F5; the former SDD implement ↔ review
84
84
  * skeleton EDGE (sdd-implement → general back-edge, the `loop: true` arrow)
85
- * stays REMOVED from the projection ; the F5 supervise line is a SEPARATE sub-bucket edge (see
86
- * project-graph.ts `superviseEdges`).
85
+ * and the F5 sub-bucket supervise line are both REMOVED from the projection.
87
86
  *
88
87
  * Matching rules (spec §2.3 — implemented by `projectGraph`'s flow
89
88
  * projection): `expected` ⟺ `event.role` ∈ the union of ALL `roles` below
@@ -122,7 +122,7 @@ import type { LocaleDictOf } from '@deepseek-ai/dsh-client-ui-slots';
122
122
  /** Locale namespace id for the workflow-viz panel. */
123
123
  export declare const NS = "mstar-panel";
124
124
  /** Panel dictionary keys (union of every translatable string the panel renders). */
125
- export type PanelKey = 'view.mstar-workflow' | 'tab.tasks' | 'tab.agents' | 'tab.events' | 'page.iteration.not-started' | 'page.iteration.expand' | 'page.iteration.collapse' | 'event-log.section.events' | 'event-log.section.violations' | 'event-log.empty' | 'event-log.empty.events' | 'event-log.empty.violations' | 'event-log.field.role' | 'event-log.field.agent' | 'event-log.field.stage' | 'event-log.field.plan' | 'event-log.field.task' | 'event-log.field.category' | 'event-log.field.time' | 'event-log.field.kind' | 'event-log.field.status' | 'event-log.field.expected' | 'event-log.field.settled' | 'event-log.field.duration' | 'event-log.field.run-id' | 'event-log.field.name' | 'event-log.field.members' | 'event-log.field.stop-reason' | 'event-log.field.severity' | 'event-log.field.code' | 'event-log.field.message' | 'event-log.kind.dispatch' | 'event-log.kind.settle' | 'event-log.yes' | 'event-log.no' | 'empty.waiting' | 'empty.loading' | 'empty.unavailable' | 'empty.no-harness' | 'empty.no-harness-hint' | 'watermark.version' | 'watermark.harness' | 'watermark.none' | 'panel.unknown' | 'graph.pass' | 'graph.fail' | 'zone.legend.title' | 'zone.legend.agent-running' | 'zone.legend.agent-settled' | 'zone.legend.agent-idle' | 'zone.iteration.step-label' | 'zone.iteration.step-badge' | 'zone.iteration.step.current' | 'zone.iteration.step.next' | 'zone.iteration.step.done' | 'zone.iteration.step.idle' | 'zone.phase.iteration-start' | 'zone.phase.autonomous-execute' | 'zone.phase.iteration-close' | 'zone.phase.pr-delivery' | 'zone.phase.merge-ready' | 'zone.branches.title' | 'zone.branches.iteration-base' | 'zone.branches.target' | 'zone.branches.spec-integration' | 'zone.tasks.title' | 'zone.tasks.total' | 'zone.tasks.no-plans' | 'zone.tasks.more' | 'zone.tasks.collapse' | 'zone.project.title' | 'zone.project.milestones' | 'zone.project.residuals' | 'zone.project.none' | 'zone.state.Todo' | 'zone.state.InProgress' | 'zone.state.InReview' | 'zone.state.Done' | 'zone.state.blocked-unknown' | 'zone.agents.title' | 'zone.agents.summary' | 'zone.agents.on-demand' | 'zone.agents.unknown-sub' | 'zone.agents.bucket.implementor' | 'zone.agents.bucket.reviewer' | 'zone.agents.group.phase-1' | 'zone.agents.group.phase-2' | 'zone.agents.group.phase-n' | 'zone.agents.group.plan' | 'zone.agents.group.no-plan' | 'zone.agents.group.plan-more' | 'flow.empty' | 'flow.settle-only' | 'flow.degraded' | 'flow.unexpected' | 'flow.in-flight' | 'flow.settled-ok' | 'flow.error' | 'flow.advisory' | 'flow.denied' | 'state.title' | 'state.selection' | 'state.selection.history' | 'state.plans' | 'state.residuals' | 'state.policy' | 'state.leases' | 'state.knowledge' | 'state.direction' | 'state.none' | 'state.enforcement' | 'state.enforcement.hard' | 'state.enforcement.soft' | 'state.plans.more' | 'state.residual.more' | 'state.policy.push' | 'state.policy.worktree' | 'state.policy.control-worktree' | 'state.knowledge.docs' | 'freshness.last-updated' | 'freshness.refresh-note';
125
+ export type PanelKey = 'view.mstar-workflow' | 'guide.description' | 'tab.tasks' | 'tab.agents' | 'tab.events' | 'page.iteration.not-started' | 'page.iteration.expand' | 'page.iteration.collapse' | 'event-log.section.events' | 'event-log.section.violations' | 'event-log.empty' | 'event-log.empty.events' | 'event-log.empty.violations' | 'event-log.field.role' | 'event-log.field.agent' | 'event-log.field.stage' | 'event-log.field.plan' | 'event-log.field.task' | 'event-log.field.category' | 'event-log.field.time' | 'event-log.field.kind' | 'event-log.field.status' | 'event-log.field.expected' | 'event-log.field.settled' | 'event-log.field.duration' | 'event-log.field.run-id' | 'event-log.field.name' | 'event-log.field.members' | 'event-log.field.stop-reason' | 'event-log.field.severity' | 'event-log.field.code' | 'event-log.field.message' | 'event-log.kind.dispatch' | 'event-log.kind.settle' | 'event-log.yes' | 'event-log.no' | 'empty.waiting' | 'empty.loading' | 'empty.unavailable' | 'empty.no-harness' | 'empty.no-harness-hint' | 'watermark.version' | 'watermark.harness' | 'watermark.none' | 'panel.unknown' | 'graph.pass' | 'graph.fail' | 'zone.legend.title' | 'zone.legend.agent-running' | 'zone.legend.agent-settled' | 'zone.legend.agent-idle' | 'zone.iteration.step-label' | 'zone.iteration.step-badge' | 'zone.iteration.step.current' | 'zone.iteration.step.next' | 'zone.iteration.step.done' | 'zone.iteration.step.idle' | 'zone.phase.iteration-start' | 'zone.phase.autonomous-execute' | 'zone.phase.iteration-close' | 'zone.phase.pr-delivery' | 'zone.phase.merge-ready' | 'zone.branches.title' | 'zone.branches.iteration-base' | 'zone.branches.target' | 'zone.branches.spec-integration' | 'zone.tasks.title' | 'zone.tasks.total' | 'zone.tasks.no-plans' | 'zone.tasks.more' | 'zone.tasks.collapse' | 'zone.project.title' | 'zone.project.milestones' | 'zone.project.residuals' | 'zone.project.none' | 'zone.state.Todo' | 'zone.state.InProgress' | 'zone.state.InReview' | 'zone.state.Done' | 'zone.state.blocked-unknown' | 'zone.agents.title' | 'zone.agents.summary' | 'zone.agents.on-demand' | 'zone.agents.unknown-sub' | 'zone.agents.bucket.implementor' | 'zone.agents.bucket.reviewer' | 'zone.agents.group.phase-1' | 'zone.agents.group.phase-2' | 'zone.agents.group.phase-n' | 'zone.agents.group.plan' | 'zone.agents.group.no-plan' | 'zone.agents.group.plan-more' | 'flow.empty' | 'flow.settle-only' | 'flow.degraded' | 'flow.unexpected' | 'flow.in-flight' | 'flow.settled-ok' | 'flow.error' | 'flow.advisory' | 'flow.denied' | 'state.title' | 'state.selection' | 'state.selection.history' | 'state.plans' | 'state.residuals' | 'state.policy' | 'state.leases' | 'state.knowledge' | 'state.direction' | 'state.none' | 'state.enforcement' | 'state.enforcement.hard' | 'state.enforcement.soft' | 'state.plans.more' | 'state.residual.more' | 'state.policy.push' | 'state.policy.worktree' | 'state.policy.control-worktree' | 'state.knowledge.docs' | 'freshness.last-updated' | 'freshness.refresh-note';
126
126
  declare module '@deepseek-ai/dsh-client-ui-slots' {
127
127
  interface LocaleNamespaceMap {
128
128
  'mstar-panel': PanelKey;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The panel's own inline glyph (plan sidebar §L1.3): the icon the guide
3
+ * capsule draws before its title, and the chip title seat draws before the
4
+ * captured tab title. Deliberately NOT imported from
5
+ * `@deepseek-ai/dsh-client-ui-primitives` — dynamic client plugins may not
6
+ * import runtime values from other client plugins (types only), and the
7
+ * client bundle's purity gate rejects `@deepseek-ai/*` value imports — so the
8
+ * glyph is our own `<svg>` on `currentColor`, `IconProps`-shaped like the
9
+ * shipped `CompassGlyph`/`CubeGlyph`.
10
+ */
11
+ import type { IconProps } from '@deepseek-ai/dsh-client-ui-primitives';
12
+ /**
13
+ * The brand star on `currentColor` — the plugin's mark at guide and chip
14
+ * sizes (14–16px). `size` defaults to 16 (the guide-capsule size — the
15
+ * definition registers this component with no props); the chip title seat
16
+ * passes 14 explicitly. The geometry is the brand mark from the repo's
17
+ * `assets/` logos (`logo.svg` / `logo-dark.svg`): the star path reused
18
+ * verbatim (viewBox 512), the assets' colored rounded tile dropped — no
19
+ * tile, no hardcoded colors — `fill='currentColor'` so the host's chip/guide
20
+ * styling themes the mark.
21
+ */
22
+ export declare function MstarGlyph({ size, className }: IconProps): import("react").JSX.Element;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * AgentListPage (plan sidebar §L3) — the 代理执行 tab: a VERTICAL GROUPED
3
+ * LIST. Replaces the deleted absolutely-positioned agent canvas: every
4
+ * geometry concept (the coordinate-space content layer, the pointer pan, the
5
+ * stage columns, the card boxes, the SVG edge layer, the card ports) is
6
+ * gone — the flow itself is carried by the group/stage/sub-bucket headings
7
+ * in constant order, exactly as the column order did before.
8
+ *
9
+ * Grouping (plan sidebar §L3.2 — locked, PROJECTION-driven, never a render
10
+ * guess): two levels. The OUTER group is the phase of the entity's stage
11
+ * (`entity.stage.phase`, or `entity.zone` when `stage === null`), in the
12
+ * `EXPECTED_ROLE_FLOW`/`view.stages` constant order — Phase 1
13
+ * (iteration-start: the sequential review-edit-chain) then Phase 2
14
+ * (autonomous-execute: the iterative plan loop, annotated with the current
15
+ * `activePlanId`). The INNER group is the stage with the implementor stage
16
+ * split by the PROJECTED `entity.bucket`: the implementor partition above
17
+ * (flow roles in `SDD_BUCKET_ROLES.implementor` order, then the on-demand
18
+ * roles, carrying the on-demand badge) and the reviewer partition below —
19
+ * plus the「unknown / 未匹配角色」sub-bucket at the bottom of the LAST stage
20
+ * group for `zone: 'general'` entities, rendered only when it has members
21
+ * (the canvas's placement rule, unchanged). Every stage group always
22
+ * renders, because the projection always yields the full 14-role roster as
23
+ * cards (idle at minimum). The implementor-partition host stage is DERIVED
24
+ * from the projected skeleton (the stage whose expected roles intersect
25
+ * `SDD_BUCKET_ROLES.implementor`), so a phase/stage rename can never
26
+ * silently orphan the sub-buckets; absent that stage the LAST stage group is
27
+ * the total-function sink (never a throw).
28
+ *
29
+ * Card anatomy (plan sidebar §L3.3): each entity is a FULL-WIDTH FLOW ROW —
30
+ * no inline box style, no absolute positioning, no ports. The status point,
31
+ * done-✓ restriction (`status === 'settled' && emphasis !== 'off'`), the
32
+ * title rule, the ×N count, the role chip, the record line and the on-demand
33
+ * badge are all carried over unchanged.
34
+ *
35
+ * Emphasis tiers (design doc §3): the projected `data-agent-emphasis` tier
36
+ * fades the card CHROME only (chrome colors mix toward the layer background
37
+ * by tier — current 100% / next 75% / off 45%, theme-independent per
38
+ * `DESIGN.md` §3.5) — NEVER a whole-card opacity, so the status point and
39
+ * the ✓ never fade.
40
+ *
41
+ * Shared iteration section: the page renders the SAME `IterationInfoSection`
42
+ * the tasks tab uses, from the SAME `view.iteration` data — 两个 tab 显示同一
43
+ * 迭代信息块. The degradation note (degraded / empty / settle-only) is
44
+ * PROJECTED metadata, never inferred from the entity list, and the `Legend`
45
+ * (the 3 role-card status treatments) sits in flow BELOW the list.
46
+ *
47
+ * Scrolling (plan sidebar §L2.2): the page owns NO scroller — the rows grow
48
+ * the panel's single scroll body (`[data-mstar-scroll]`). The phase groups
49
+ * ride the shell's shared `.groupGrid` class (one column below the 720px
50
+ * container breakpoint, the two-column spread above it is that rule's).
51
+ */
52
+ import * as React from 'react';
53
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
54
+ import type { ZoneView } from '../graph/project-graph.ts';
55
+ export interface AgentListPageProps {
56
+ /** The projected agents zone (spec §6.2 — `ZoneView['agents']`). */
57
+ view: ZoneView['agents'];
58
+ /** The projected iteration zone (spec §3) — the SHARED iteration info
59
+ * block: BOTH the tasks tab and this page render the SAME
60
+ * `IterationInfoSection` from the SAME `view.iteration` data. */
61
+ iteration: ZoneView['iteration'];
62
+ t: TranslateNS<'mstar-panel'>;
63
+ }
64
+ /**
65
+ * The unknown sub-bucket id : `zone: 'general'` entities render in the
66
+ * 「unknown / 未匹配角色」sub-bucket at the bottom of the LAST stage group,
67
+ * marked `data-sub-bucket="unknown"`. The constant survives the canvas
68
+ * deletion — it names the sub-bucket VALUE, not a column.
69
+ */
70
+ export declare const UNKNOWN_COLUMN = "unknown";
71
+ export declare function AgentListPage({ view, iteration, t }: AgentListPageProps): React.JSX.Element;
@@ -10,10 +10,13 @@
10
10
  * keyboard-accessible, SSR-stable) whose body shows the FULL catalog fields;
11
11
  * a missing field renders「—」— never a guessed value (spec §5/§8).
12
12
  *
13
- * Layout (user feedback「左右
14
- * 排两列 + 锁定一个高内部滚动」): the two partitions render side by side in a
15
- * locked-height two-column grid; the page never scrolls as a whole — each
16
- * partition pins its title and scrolls internally (`event-log.module.css`).
13
+ * Layout (plan sidebar §L2.5/§L4.1): the two partitions are FLOW ROWS in
14
+ * the panel's single scroll body (`[data-mstar-scroll]`) — the old
15
+ * locked-height two-column grid and both per-partition internal scrollers
16
+ * are retired; rows grow the scroll body instead of owning a scrollbar.
17
+ * The grid rides the shell's shared `.groupGrid` class, so the ≥720px
18
+ * container spread is the shell's one rule. The iteration head is NOT
19
+ * rendered in this section.
17
20
  *
18
21
  * Dock migration decision (spec §5 — 无双份日志): the AgentEventDock is
19
22
  * REMOVED, not degraded. The dock's content (row layout + status chips)
@@ -2,9 +2,10 @@
2
2
  * IterationInfoSection (spec panel-tabs §3
3
3
  * — the SHARED iteration info block): the
4
4
  * Content Head — iteration summary (the collapsible toggle row) + the 5
5
- * horizontal iteration steps + the branches panel — rendered by BOTH tabs
5
+ * iteration steps stacked VERTICALLY + the branches panel — rendered by BOTH
6
+ * tabs
6
7
  * from the SAME `view.iteration` data (the tasks tab inside IterationTaskPage
7
- * above the kanban, the agents tab inside AgentCanvasPage above the canvas).
8
+ * above the board, the agents tab inside AgentListPage above the list).
8
9
  * One implementation, two mounts — 任务迭代与代理执行共用同一迭代信息块.
9
10
  *
10
11
  * The component is extracted VERBATIM from the former inline head of
@@ -13,18 +14,20 @@
13
14
  * - Content Head (spec §3): the iteration info (iterationId / gate verdict /
14
15
  * status note) rides the summary row, which IS the toggle (a native button
15
16
  * with aria-expanded + aria-controls pointing at the body). The
16
- * expanded body renders the Steps HORIZONTALLY as 5 EQUAL full-width unit
17
- * blocks (badge/phase/chip
18
- * centered, --mstar-space-* gap; no connector bars) with the current step
19
- * highlighted on the block itself (the same honesty as the zone stepper:
20
- * no "completed" checkmarks) plus the branch panel (rendered ONLY while the
21
- * iteration is active, spec §3). Plan (spec panel-f4 §2.3 R8/R9): the expanded body is a LEFT-RIGHT
22
- * SPLIT — branches (small half, DOM-first) + steps (large half), with the
23
- * `data-iteration-head-split` container present only while branches render;
17
+ * expanded body renders the Steps as a VERTICAL 5-item stacked stepper
18
+ * (one row per step: badge · phase · chip · verdict seat; plan sidebar
19
+ * §L4.2 — the horizontal row cannot fit the 300px column) with the current
20
+ * step highlighted on the block itself (the same honesty as the zone
21
+ * stepper: no "completed" checkmarks) plus the branch panel (rendered ONLY
22
+ * while the iteration is active, spec §3). Plan (spec panel-f4 §2.3
23
+ * R8/R9, re-shaped by plan sidebar §L4.2): the expanded body STACKS —
24
+ * branches (DOM-first) above the steps; the `data-iteration-head-split`
25
+ * container is present only while branches render;
24
26
  * each step reserves the fixed-height verdict seat (`data-step-verdict-seat`)
25
27
  * and the PASS/FAIL badge renders only for a current step with a real gate
26
28
  * verdict (`state === 'current' && verdict !== 'unknown'` — Phase 1 renders
27
- * no badge), so the centered content groups align across steps.
29
+ * no badge), so every step row has the SAME children (badge/phase/chip/seat)
30
+ * and the rows align across steps.
28
31
  *
29
32
  * Collapse/expand (spec §3): a local `useState` defaulted to
30
33
  * the iteration state — `active === false` → collapsed to a one-line summary
@@ -68,9 +71,9 @@ export declare function nextExpandedOnActivation(prev: boolean, prevActive: bool
68
71
  * — exported pure for the render tests, the `nextExpandedOnActivation`
69
72
  * precedent): the `data-iteration-head-split` container renders ONLY while
70
73
  * the branch panel renders (`active && branches !== null`); otherwise the
71
- * expanded body renders the steps row ALONE — the expanded-inactive fallback
74
+ * expanded body renders the steps stack ALONE — the expanded-inactive fallback
72
75
  * (a user manually expands an inactive head → the 5-step idle skeleton
73
- * without the split). The `active + branches null` arm is projection-
76
+ * without the wrapper). The `active + branches null` arm is projection-
74
77
  * unreachable (branches are always projected non-null while active), but the
75
78
  * predicate keeps the decision a single, testable source of truth.
76
79
  */
@@ -1,31 +1,30 @@
1
1
  /**
2
2
  * IterationTaskPage (spec panel-tabs §3
3
3
  * — the 任务迭代 tab: the SHARED IterationInfoSection (iteration
4
- * summary + the 5 horizontal iteration steps + branches — the same block the
4
+ * summary + the vertical 5-step stepper + branches — the same block the
5
5
  * agents tab renders, user
6
- * 2026-08-12 feedback #4) above the full-width standard kanban. Replaces the
6
+ * 2026-08-12 feedback #4) above the stacked plan board. Replaces the
7
7
  * WorkflowCanvas zone dashboard on the tasks tab (WorkflowCanvas is removed
8
8
  * by the plan close; its zone-level components stay untouched here).
9
9
  *
10
- * The head (collapse/expand, steps row, branches, verdict seats) lives in
11
- * `IterationInfoSection.tsx` — extracted from this page by Task 8 so BOTH
10
+ * The head (collapse/expand, vertical steps, branches, verdict seats) lives
11
+ * in `IterationInfoSection.tsx` — extracted from this page by Task 8 so BOTH
12
12
  * tabs render the SAME iteration info block from the SAME `view.iteration`
13
13
  * data (one implementation, two mounts; the anchor family `data-iteration-*`
14
14
  * is unchanged).
15
15
  *
16
- * Task area (spec §3/D2): the standard 5-column kanban (Todo / InProgress /
17
- * InReview / Done / blocked-unknown — Blocked + unknown merged) via the
18
- * REUSED TaskBoard
19
- * (`view.tasks`) — the Done overflow stays the projection's PLAN_CAP
20
- * handling (TaskBoard only surfaces the `+N more` hint). The page fills the
21
- * content region as a flex column: the head is flex:none (fixed), the tasks
22
- * area (`data-mstar-tasks-scroll`) is the page's independent vertical scroll
23
- * body (flex:1, min-height:0, overflow-y:auto) — the kanban spreads
24
- * full-width and is never compressed into a small box by a canvas height.
16
+ * Task area (plan sidebar §L4.2): the standard 5-group board (Todo /
17
+ * InProgress / InReview / Done / blocked-unknown — Blocked + unknown merged)
18
+ * via the REUSED TaskBoard (`view.tasks`) — the Done overflow stays the
19
+ * projection's PLAN_CAP handling (TaskBoard only surfaces the `+N more`
20
+ * hint). The page is FLOW CONTENT inside the panel's single scroll body
21
+ * (`[data-mstar-scroll]`, plan sidebar §L2.2 — the page-owned scroll body is
22
+ * retired): the board stacks as five groups, then the project rollup, then
23
+ * the in-flow digest.
25
24
  *
26
25
  * Degradation (spec §8): the projection never throws — an inactive/missing
27
26
  * iteration renders the collapsed muted summary; state/plans missing render
28
- * the muted 5-column kanban skeleton (TaskBoard) — never an orange warn box.
27
+ * the muted 5-group kanban skeleton (TaskBoard) — never an orange warn box.
29
28
  */
30
29
  import * as React from 'react';
31
30
  import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The workflow panel's entry store (plan sidebar §L2.4): the selected
3
+ * internal section, keyed by the sidebar tab record's id.
4
+ *
5
+ * Why a slot store and not `useState`: a docked sidebar body is UNMOUNTED
6
+ * whenever another tab in the pane becomes active (and the sidebar layout is
7
+ * memory-only), so component state would silently reset the section on every
8
+ * glance at the file tree. The store instance is framework-cached per
9
+ * (entry, session) and survives the unmount by construction; keying inside
10
+ * the state by `tab.id` keeps two panes showing the panel independent. The
11
+ * registration passes the handle as the seat's `store` option, so the body
12
+ * receives `useStore` + the baked `select` action through its props share.
13
+ */
14
+ /** The panel's three internal sections (one sidebar tab, three sections). */
15
+ export type PanelSection = 'tasks' | 'agents' | 'events';
16
+ /** The entry-store state: the selected section per sidebar tab record. */
17
+ export interface PanelStoreState {
18
+ byTab: Record<string, PanelSection | undefined>;
19
+ }
20
+ /**
21
+ * The panel entry store handle. `undefined` reads as the `'tasks'` default —
22
+ * the body applies `?? 'tasks'` at the read site, so nothing writes the
23
+ * default into the state.
24
+ */
25
+ export declare function createPanelStore(): import("@deepseek-ai/dsh-client-store").EngineStoreHandle<PanelStoreState, {
26
+ select(d: PanelStoreState, tabId: string, section: PanelSection): void;
27
+ }>;
28
+ export type PanelStore = ReturnType<typeof createPanelStore>;