@mstar-harness/dsh 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/README.i18n.yaml +7 -0
  2. package/README.md +448 -0
  3. package/README.zh.md +221 -0
  4. package/bundle/README.md +312 -0
  5. package/bundle/cordis.patch.yml +17 -0
  6. package/dist/client/index.d.ts +14 -0
  7. package/dist/client/panel/PanelView.d.ts +67 -0
  8. package/dist/client/panel/TabNav.d.ts +28 -0
  9. package/dist/client/panel/graph/event-log.d.ts +76 -0
  10. package/dist/client/panel/graph/project-graph.d.ts +499 -0
  11. package/dist/client/panel/graph/schema.d.ts +224 -0
  12. package/dist/client/panel/guards.d.ts +12 -0
  13. package/dist/client/panel/locale.d.ts +134 -0
  14. package/dist/client/panel/pages/AgentCanvasPage.d.ts +363 -0
  15. package/dist/client/panel/pages/EventLogPage.d.ts +48 -0
  16. package/dist/client/panel/pages/IterationInfoSection.d.ts +80 -0
  17. package/dist/client/panel/pages/IterationTaskPage.d.ts +37 -0
  18. package/dist/client/panel/panel-meta.d.ts +18 -0
  19. package/dist/client/panel/plan-sort.d.ts +54 -0
  20. package/dist/client/panel/sidebar.d.ts +17 -0
  21. package/dist/client/panel/state-section.d.ts +23 -0
  22. package/dist/client/panel/use-mstar-engine-status.d.ts +42 -0
  23. package/dist/client/panel/zones/Legend.d.ts +18 -0
  24. package/dist/client/panel/zones/TaskBoard.d.ts +40 -0
  25. package/dist/client.d.ts +1 -0
  26. package/dist/client.js +4486 -0
  27. package/dist/gates/_shared.d.ts +198 -0
  28. package/dist/gates/adapter.d.ts +131 -0
  29. package/dist/gates/agent-flow.d.ts +320 -0
  30. package/dist/gates/catalog.d.ts +118 -0
  31. package/dist/gates/dispatch.d.ts +152 -0
  32. package/dist/gates/seams.d.ts +152 -0
  33. package/dist/gates/skill-lint.d.ts +87 -0
  34. package/dist/gates/status.d.ts +81 -0
  35. package/dist/gates/tools.d.ts +37 -0
  36. package/dist/index.d.ts +107 -0
  37. package/dist/index.js +5748 -0
  38. package/dist/invariant.d.ts +15 -0
  39. package/dist/invariant.js +29 -0
  40. package/dist/service.d.ts +96 -0
  41. package/dist/types.d.ts +241 -0
  42. package/harness-commands/codebase-audit.md +40 -0
  43. package/harness-commands/iteration-drive.md +129 -0
  44. package/harness-commands/iteration-loop.md +139 -0
  45. package/harness-commands/iteration-start.md +179 -0
  46. package/harness-skills/grill-me/SKILL.md +10 -0
  47. package/harness-skills/mstar-audit/SKILL.md +183 -0
  48. package/harness-skills/mstar-audit/references/audit-playbook.md +130 -0
  49. package/harness-skills/mstar-audit/references/finding-format.md +65 -0
  50. package/harness-skills/mstar-branch-worktree/SKILL.md +219 -0
  51. package/harness-skills/mstar-branch-worktree/references/parallel-writable-pre-dispatch.md +68 -0
  52. package/harness-skills/mstar-coding-behavior/SKILL.md +147 -0
  53. package/harness-skills/mstar-compound/SKILL.md +105 -0
  54. package/harness-skills/mstar-compound/assets/resolution-template.md +94 -0
  55. package/harness-skills/mstar-compound/references/category-mapping.md +37 -0
  56. package/harness-skills/mstar-compound/references/compound-workflow.md +155 -0
  57. package/harness-skills/mstar-compound/references/concepts-vocabulary.md +44 -0
  58. package/harness-skills/mstar-compound/references/schema.yaml +122 -0
  59. package/harness-skills/mstar-compound-refresh/SKILL.md +140 -0
  60. package/harness-skills/mstar-compound-refresh/references/project-knowledge-bootstrap.md +164 -0
  61. package/harness-skills/mstar-design-md/SKILL.md +142 -0
  62. package/harness-skills/mstar-design-md/references/completeness-checklist.md +181 -0
  63. package/harness-skills/mstar-design-md/references/design-md-spec.md +508 -0
  64. package/harness-skills/mstar-design-md/references/vercel-example.md +200 -0
  65. package/harness-skills/mstar-design-md/templates/DESIGN.dark.md.template +354 -0
  66. package/harness-skills/mstar-design-md/templates/DESIGN.md.template +474 -0
  67. package/harness-skills/mstar-dispatch-gates/SKILL.md +128 -0
  68. package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +23 -0
  69. package/harness-skills/mstar-harness-core/SKILL.md +180 -0
  70. package/harness-skills/mstar-host/SKILL.md +78 -0
  71. package/harness-skills/mstar-host/references/_shared/host-role-binding-core.md +51 -0
  72. package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +91 -0
  73. package/harness-skills/mstar-host/references/codex.md +61 -0
  74. package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +159 -0
  75. package/harness-skills/mstar-host/references/cursor.md +183 -0
  76. package/harness-skills/mstar-host/references/dsh.md +502 -0
  77. package/harness-skills/mstar-host/references/kimi-plan-mode-bridge.md +36 -0
  78. package/harness-skills/mstar-host/references/kimi.md +136 -0
  79. package/harness-skills/mstar-host/references/omp-plan-mode-bridge.md +32 -0
  80. package/harness-skills/mstar-host/references/omp.md +244 -0
  81. package/harness-skills/mstar-host/references/opencode.md +76 -0
  82. package/harness-skills/mstar-host/references/parallel-dispatch.md +68 -0
  83. package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +36 -0
  84. package/harness-skills/mstar-host/references/zcode.md +129 -0
  85. package/harness-skills/mstar-iteration/SKILL.md +393 -0
  86. package/harness-skills/mstar-iteration/references/autonomous-direction-lock.md +90 -0
  87. package/harness-skills/mstar-iteration/references/iteration-artifact-boundaries.md +103 -0
  88. package/harness-skills/mstar-iteration/references/iteration-compass-template.md +142 -0
  89. package/harness-skills/mstar-iteration/references/iteration-corpus-hygiene.md +45 -0
  90. package/harness-skills/mstar-iteration/references/iteration-workspace-readme-template.md +27 -0
  91. package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +193 -0
  92. package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +95 -0
  93. package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +84 -0
  94. package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +24 -0
  95. package/harness-skills/mstar-phase-gates/SKILL.md +112 -0
  96. package/harness-skills/mstar-plan-artifacts/SKILL.md +46 -0
  97. package/harness-skills/mstar-plan-artifacts/references/done-compaction.md +88 -0
  98. package/harness-skills/mstar-plan-artifacts/references/knowledge-and-designs.md +100 -0
  99. package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +99 -0
  100. package/harness-skills/mstar-plan-artifacts/references/plan-quality-bar.md +99 -0
  101. package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +570 -0
  102. package/harness-skills/mstar-plan-artifacts/templates/README.md +9 -0
  103. package/harness-skills/mstar-plan-artifacts/templates/notes.empty.json +5 -0
  104. package/harness-skills/mstar-plan-artifacts/templates/plan.main.md +54 -0
  105. package/harness-skills/mstar-plan-artifacts/templates/plans-done.empty.json +3 -0
  106. package/harness-skills/mstar-plan-artifacts/templates/status.empty.json +7 -0
  107. package/harness-skills/mstar-plan-conventions/SKILL.md +165 -0
  108. package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +50 -0
  109. package/harness-skills/mstar-plan-conventions/references/effort-estimation.md +38 -0
  110. package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md +93 -0
  111. package/harness-skills/mstar-review-qc/SKILL.md +60 -0
  112. package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +54 -0
  113. package/harness-skills/mstar-roles/SKILL.md +86 -0
  114. package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +46 -0
  115. package/harness-skills/mstar-roles/references/architect.md +114 -0
  116. package/harness-skills/mstar-roles/references/code-reviewer.md +109 -0
  117. package/harness-skills/mstar-roles/references/frontend-dev.md +70 -0
  118. package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +89 -0
  119. package/harness-skills/mstar-roles/references/ops-engineer.md +78 -0
  120. package/harness-skills/mstar-roles/references/product-manager.md +107 -0
  121. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +198 -0
  122. package/harness-skills/mstar-roles/references/project-manager/plan-management.md +61 -0
  123. package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +56 -0
  124. package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +98 -0
  125. package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +99 -0
  126. package/harness-skills/mstar-roles/references/project-manager.md +310 -0
  127. package/harness-skills/mstar-roles/references/prompt-engineer.md +71 -0
  128. package/harness-skills/mstar-roles/references/qa-engineer/acceptance-gate.md +62 -0
  129. package/harness-skills/mstar-roles/references/qa-engineer.md +79 -0
  130. package/harness-skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +95 -0
  131. package/harness-skills/mstar-roles/references/qc-specialist/report-template.md +72 -0
  132. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-checklist.md +44 -0
  133. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +57 -0
  134. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +128 -0
  135. package/harness-skills/mstar-roles/references/writing-specialist.md +59 -0
  136. package/harness-skills/mstar-sdd/SKILL.md +133 -0
  137. package/harness-skills/mstar-sdd/references/file-handoffs.md +83 -0
  138. package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
  139. package/harness-skills/mstar-sdd/references/implementer-prompt.md +56 -0
  140. package/harness-skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
  141. package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +53 -0
  142. package/harness-skills/mstar-skill-authoring/SKILL.md +162 -0
  143. package/harness-skills/mstar-skill-authoring/references/skillsbench-authoring.md +117 -0
  144. package/harness-skills/mstar-strategy/SKILL.md +130 -0
  145. package/harness-skills/pm/SKILL.md +40 -0
  146. package/package.json +92 -0
@@ -0,0 +1,363 @@
1
+ /**
2
+ * AgentCanvasPage (spec panel-tabs §4/§6.2, plan 20260811-panel-agent-canvas
3
+ * Task 2) — the 代理执行 tab: a DRAGGABLE agent canvas. Replaces the muted
4
+ * placeholder page (tabs-shell Task 3) and the stage-column AgentFlowZone
5
+ * (deleted by this plan — the free canvas supersedes it).
6
+ *
7
+ * Canvas contract (spec §6.2 — zero third-party deps):
8
+ * - pan ONLY (translate, no zoom / pinch / rotate) via native pointer events
9
+ * (pointerdown / pointermove / pointerup + setPointerCapture) on the
10
+ * viewport; `touch-action: none` + `preventDefault` on pointerdown stop
11
+ * native scroll / text selection; during capture the entity cards never
12
+ * receive the pointer (no click-through); no pan bounds (free pan).
13
+ * - forced capture loss (window blur / alt-tab / element removal mid-gesture)
14
+ * fires `lostpointercapture` without pointerup — it binds the same end
15
+ * handler so `dragRef` never goes stale (review S-002).
16
+ * - the content layer carries `data-canvas-pan` and exposes the pan state as
17
+ * `transform: translate(xpx, ypx)`; the grid background moves WITH the
18
+ * content. Pan is instant (no animation), so `prefers-reduced-motion`
19
+ * needs no pan-specific handling; the next-edge dash flow and the running
20
+ * card pulse are CSS animations killed by the panel root's reduced-motion
21
+ * rule (`* { animation: none !important }`).
22
+ * - pan state `{ x, y }` is LOCAL useState; the drag math is extracted into
23
+ * the exported pure helpers (`panDragStart` / `panDragMove` / `panTransform`)
24
+ * so the pointer-event sequence is unit-testable without a DOM.
25
+ *
26
+ * Entities (spec §4/§6.2): every KNOWN_AGENTS roster member renders a card —
27
+ * title = the AGENT NAME (role id, or displayName for idle cards via
28
+ * `entity.name`); the session id / task tag are AUXILIARY record fields on
29
+ * `data-agent-record` (never the title). Idle (no dispatch evidence) cards
30
+ * are muted (`data-agent-idle`); lit cards follow the projection's status
31
+ * priority (running/settled/error/denied/advisory). Settled cards get a
32
+ * standalone GREEN DONE FRAME + green ✓ (Task 8 — user feedback #1/#3:
33
+ * `data-agent-done="true"`, the frame is a full-strength success ring on the
34
+ * rounded card body) ONLY when `emphasis !== 'off'` — an off-tier role
35
+ * (already-passed / stage-less on-demand + general) never shows the
36
+ * completion marker (the v3 leak: the ✓ survived the off-tier low
37
+ * transparency).
38
+ *
39
+ * Shared iteration section (Task 8 — user feedback #4): the page renders the
40
+ * SAME `IterationInfoSection` the tasks tab uses, from the SAME
41
+ * `view.iteration` data — 两个 tab 显示同一迭代信息块.
42
+ *
43
+ * Edges (spec §4 + plan 20260812-panel-f5-design-system Task 5 — the
44
+ * finalized 2026-08-12 line semantics, design doc §2): ONLY the actual
45
+ * handoffs (business entity→entity — role-keyed, general endpoints
46
+ * filtered, one edge per pair) and the supervise line (plan
47
+ * 20260812-panel-f5-agent-layout Task 2 — the static bidirectional
48
+ * implementor ↔ sdd-reviewer sub-bucket line inside the `sdd-implement`
49
+ * column, dim dashed by default, lit business when the projected
50
+ * `evidenced` flag is true — never a fabricated activation) — all drawn as
51
+ * SVG bezier `C` paths (design doc §2.6) over the layout computed by the
52
+ * exported pure `layoutAgents`. The `expected` stage skeleton and the
53
+ * animated `next` edge are REMOVED (user feedback #1/#5 — the column order
54
+ * implies the flow, the running card glow + status point carry the
55
+ * position). Every line anchors to a CARD PORT (4 fixed edge-midpoint
56
+ * ports, design doc §2.5 — hover-visible dots, static-invisible) or the
57
+ * supervise side-gap anchors (card right edge + 18px); the arrow tip sits
58
+ * at the STANDOFF point 10px off the target port (arrow along the endpoint
59
+ * tangent — H1) and no line crosses text (H2: standoff + side-gap routing
60
+ * for caption-crossing same-column flows + column-gap crossings). Col-skip
61
+ * cross-column edges (plan QC tri R1 — a source/target pair whose columns
62
+ * are separated by an intermediate column, e.g. writing-specialist →
63
+ * qc-specialist) reroute via a multi-`L` side-gap DETOUR below the
64
+ * intermediate card band instead of a direct bezier through the card bodies
65
+ * (H1).
66
+ *
67
+ * Layout (plan 20260812-panel-f5-agent-layout Task 2 + plan
68
+ * 20260812-panel-f5-design-system Task 5 + Task 8 — the F5 rework; plan
69
+ * 20260813-panel-agent-canvas-legend-layout Task 2 — the left-right
70
+ * rework): deterministic columns per EXPECTED_ROLE_FLOW stage
71
+ * (review-edit-chain → sdd-implement → qc-tri → qa-gate) — FOUR columns
72
+ * total (user 2026-08-12 feedback #3: the standalone rightmost UNKNOWN
73
+ * column is REMOVED; `zone: 'general'` entities render in an "unknown /
74
+ * 未匹配角色" SUB-PARTITION at the bottom of the LAST column,
75
+ * `data-sub-bucket="unknown"`), laid out in TWO SIDE-BY-SIDE PHASE GROUPS
76
+ * (Task 8 — user feedback #2; Task 2 — user 2026-08-13 feedback #2): the
77
+ * Phase 1 group LEFTMOST (review-edit-chain — the sequential Review & Edit
78
+ * chain: product-manager → architect → writing-specialist) and the Phase 2
79
+ * group to its RIGHT (sdd-implement → qc-tri → qa-gate — the iterative plan
80
+ * loop, annotated with the current `activePlanId` from the projected
81
+ * `state.plans[]` InProgress rows), top-aligned on ONE label row, each with
82
+ * its group label (`data-canvas-group`). The
83
+ * `sdd-implement` column is split into sub-buckets by the PROJECTED
84
+ * `entity.bucket` (never a render guess): the implementor partition above —
85
+ * flow roles in the stage's original order, then the on-demand roles
86
+ * (ops-engineer / prompt-engineer, carrying the on-demand badge) — and the
87
+ * reviewer partition (code-reviewer, idle included) below, with the
88
+ * implementor / sdd-reviewer caption labels. `zone: 'on-demand'` entities
89
+ * have NO standalone column anymore — they live in the implementor
90
+ * partition. The former F4.2 "general sinks to the bottom of
91
+ * the sdd-implement column" placement is superseded (Task 2), as is the
92
+ * Task-2 rightmost unknown column (Task 5); the former
93
+ * sdd-implement → general SDD loop back-edge stays REMOVED (the render
94
+ * draws no loop branch).
95
+ *
96
+ * Degradation (spec §8 — never throws / never orange): the projection always
97
+ * yields the full idle roster, so the canvas renders it with the muted
98
+ * `data-canvas-note` (degraded = ledger missing; empty = no events;
99
+ * settle-only = events but no dispatch rows — review T2-Imp-2 restored the
100
+ * old zone's distinct settle-only anchor; F-002: the empty/settle-only note
101
+ * is PROJECTED metadata, never inferred from the entity list). The Legend
102
+ * (idle / collaboration swatches, plan Task 3) sits BELOW the viewport
103
+ * (plan 20260813-panel-quick-fixes Task 3 — user 2026-08-13 feedback).
104
+ * `initialPan` is a deterministic SSR/test seed — the live page starts at the
105
+ * origin.
106
+ */
107
+ import * as React from 'react';
108
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
109
+ import type { AgentEdge, ZoneView } from '../graph/project-graph.ts';
110
+ import { type PhaseId } from '../graph/schema.ts';
111
+ export interface AgentCanvasPageProps {
112
+ /** The projected agents zone (spec §6.2 — `ZoneView['agents']`). */
113
+ view: ZoneView['agents'];
114
+ /** The projected iteration zone (spec §3) — the SHARED iteration info
115
+ * block (plan 20260812-panel-f5-design-system Task 8, user 2026-08-12
116
+ * feedback #4): BOTH the tasks tab and this page render the SAME
117
+ * `IterationInfoSection` from the SAME `view.iteration` data. */
118
+ iteration: ZoneView['iteration'];
119
+ t: TranslateNS<'mstar-panel'>;
120
+ /** Deterministic initial pan seed (SSR/tests); the live page starts at the origin. */
121
+ initialPan?: PanState;
122
+ }
123
+ /** Pan state: the content-layer translate (spec §6.2 — free pan, no bounds). */
124
+ export interface PanState {
125
+ x: number;
126
+ y: number;
127
+ }
128
+ /** A live drag gesture: the pan at pointerdown + the pointer start position. */
129
+ export interface PanDrag {
130
+ originX: number;
131
+ originY: number;
132
+ startX: number;
133
+ startY: number;
134
+ }
135
+ export declare const PAN_ORIGIN: PanState;
136
+ /** Open a drag gesture: remember the pan at pointerdown and the pointer seat. */
137
+ export declare function panDragStart(pan: PanState, x: number, y: number): PanDrag;
138
+ /** Follow the pointer: pan = origin + (current − start) — free pan (spec §6.2). */
139
+ export declare function panDragMove(drag: PanDrag, x: number, y: number): PanState;
140
+ /** The `data-canvas-pan` transform string (spec §6.2 — translate only). */
141
+ export declare function panTransform(pan: PanState): string;
142
+ /** One positioned box in the canvas coordinate space. */
143
+ export interface CanvasBox {
144
+ x: number;
145
+ y: number;
146
+ w: number;
147
+ h: number;
148
+ }
149
+ /** One stage column track (expected/next edge anchors + the column label). */
150
+ export interface CanvasColumn extends CanvasBox {
151
+ id: string;
152
+ }
153
+ /**
154
+ * One PHASE group of the canvas (plan 20260812-panel-f5-design-system Task 8
155
+ * — user 2026-08-12 feedback #2; plan
156
+ * 20260813-panel-agent-canvas-legend-layout Task 2 — the left-right
157
+ * rework): the stage columns split into two SIDE-BY-SIDE groups by iteration
158
+ * phase — **Phase 1** (review-edit-chain, the sequential Review & Edit
159
+ * chain: product-manager → architect → writing-specialist) LEFTMOST,
160
+ * **Phase 2** (sdd-implement → qc-tri → qa-gate, the iterative plan loop) to
161
+ * its RIGHT — every group label row TOP-ALIGNED at PAD_Y; the Phase-2 row
162
+ * additionally annotates the CURRENT PLAN (the projected `activePlanId` —
163
+ * the first InProgress `state.plans[]` row, design doc §1.2). Group order =
164
+ * first occurrence in the projected stage order (PHASE_IDS-aligned) —
165
+ * derived, never literal, so a phase/stage rename can never orphan the
166
+ * groups.
167
+ */
168
+ export interface CanvasGroup {
169
+ /** The group's iteration phase id. */
170
+ phase: PhaseId;
171
+ /** 1-based group ordinal in stage order (Phase 1 = 1, Phase 2 = 2). */
172
+ index: number;
173
+ /** The group label row seat (canvas coordinates; width = the group's
174
+ * content width — the Phase-2 current-plan chip rides the same row). */
175
+ label: {
176
+ x: number;
177
+ y: number;
178
+ w: number;
179
+ h: number;
180
+ };
181
+ /** The stage column ids of this group, stage order. */
182
+ columnIds: readonly string[];
183
+ /** Current-plan annotation host (design doc §1.2 — user feedback #2):
184
+ * true for the `autonomous-execute` phase group (the iterative plan loop)
185
+ * only. */
186
+ planNote: boolean;
187
+ }
188
+ /** The deterministic canvas geometry: stage columns + per-entity card boxes. */
189
+ export interface CanvasLayout {
190
+ width: number;
191
+ height: number;
192
+ columns: readonly CanvasColumn[];
193
+ cards: ReadonlyMap<string, CanvasBox>;
194
+ /** Sub-bucket geometry per column id (plan 20260812-panel-f5-agent-layout
195
+ * Task 2): the `sdd-implement` column's implementor/reviewer caption seats
196
+ * + card bands — the supervise line anchors to the band edges (the
197
+ * inter-partition gap; QC W-001).
198
+ * Columns without sub-buckets are absent from the map. */
199
+ subBuckets: ReadonlyMap<string, SubBucketGeometry>;
200
+ /** The unknown sub-partition at the bottom of the LAST column (plan
201
+ * 20260812-panel-f5-design-system Task 5 — user 2026-08-12 feedback #3:
202
+ * `zone: 'general'` entities sink into a qa-gate-column-bottom sub-partition
203
+ * instead of a standalone fifth column). The caption seat + card band;
204
+ * null when the layout has no columns (total function — never a throw). */
205
+ unknown: UnknownSubPartition | null;
206
+ /** The Phase groups (plan 20260812-panel-f5-design-system Task 8 — user
207
+ * 2026-08-12 feedback #2; plan
208
+ * 20260813-panel-agent-canvas-legend-layout Task 2): Phase 1 leftmost /
209
+ * Phase 2 right, top-aligned, each with its label seat; empty when the
210
+ * layout has no columns. */
211
+ groups: readonly CanvasGroup[];
212
+ }
213
+ /** The unknown sub-partition id (plan 20260812-panel-f5-design-system Task 5
214
+ * — design doc §1.2): `zone: 'general'` entities render in a bottom
215
+ * sub-partition of the LAST column titled「unknown / 未匹配角色」and marked
216
+ * `data-sub-bucket="unknown"`. The former standalone rightmost UNKNOWN column
217
+ * (plan 20260812-panel-f5-agent-layout Task 2) is REMOVED — the constant
218
+ * value survives as the sub-partition bucket id. */
219
+ export declare const UNKNOWN_COLUMN = "unknown";
220
+ /** One sub-bucket partition inside the `sdd-implement` column (plan
221
+ * 20260812-panel-f5-agent-layout Task 2): the caption seat + the cards'
222
+ * band — the supervise line anchors to the band's edge (implementor:
223
+ * bottom edge; reviewer: top edge — the inter-partition gap; QC W-001). */
224
+ export interface SubBucketPartition {
225
+ /** The caption row's top-left seat (canvas coordinates; width = the card
226
+ * row width so the dashed rule fills the row). */
227
+ label: {
228
+ x: number;
229
+ y: number;
230
+ w: number;
231
+ };
232
+ /** The bucket's card bounding band (canvas coordinates); null when the
233
+ * partition has no cards (total function — the caption and the supervise
234
+ * line skip). */
235
+ band: CanvasBox | null;
236
+ }
237
+ /** The sub-bucket geometry of one column (plan f5 Task 2): implementor +
238
+ * reviewer partitions. Present ONLY for the `sdd-implement` column — the
239
+ * supervise anchors read the bands. */
240
+ export interface SubBucketGeometry {
241
+ implementor: SubBucketPartition;
242
+ reviewer: SubBucketPartition;
243
+ }
244
+ /** The unknown sub-partition of the LAST column (plan 20260812-panel-f5-design-system
245
+ * Task 5 — design doc §1.2): the caption seat + the general cards' band. The
246
+ * caption row (SUB_LABEL_H) sits ROW_GAP below the last flow card; the
247
+ * general cards follow SUB_GAP below it. */
248
+ export interface UnknownSubPartition {
249
+ /** The caption row's top-left seat (canvas coordinates; width = the card
250
+ * row width so the dashed rule fills the row). */
251
+ label: {
252
+ x: number;
253
+ y: number;
254
+ w: number;
255
+ };
256
+ /** The unknown partition's card bounding band; null when the partition has
257
+ * no general card (total function — the caption renders only with cards). */
258
+ band: CanvasBox | null;
259
+ }
260
+ /**
261
+ * Deterministic canvas layout (spec §4 + plan 20260812-panel-f5-agent-layout
262
+ * Task 2 + plan 20260812-panel-f5-design-system Task 5 + Task 8 + plan
263
+ * 20260813-panel-agent-canvas-legend-layout Task 2 — the F5 rework + the
264
+ * left-right rework): one column per EXPECTED_ROLE_FLOW stage (view order:
265
+ * review-edit-chain → sdd-implement → qc-tri → qa-gate) — FOUR columns
266
+ * total, laid out in TWO SIDE-BY-SIDE PHASE GROUPS (Task 8, user 2026-08-12
267
+ * feedback #2; Task 2, user 2026-08-13 feedback #2): the **Phase 1 group
268
+ * LEFTMOST** (review-edit-chain — the sequential Review & Edit chain:
269
+ * product-manager → architect → writing-specialist) and the **Phase 2 group
270
+ * to its RIGHT** (sdd-implement → qc-tri → qa-gate — the iterative plan
271
+ * loop, annotated with the current `activePlanId`), every group label row
272
+ * TOP-ALIGNED at PAD_Y (design doc §1.2; the standalone rightmost unknown
273
+ * column is REMOVED — Task 5, user feedback #3). The `sdd-implement` column
274
+ * is split into sub-buckets by the
275
+ * PROJECTED `entity.bucket` (never a render-side guess): the implementor
276
+ * partition above — flow roles in the stage's original EXPECTED_ROLE_FLOW
277
+ * order, then the on-demand roles (ops-engineer / prompt-engineer — the
278
+ * standalone on-demand column is REMOVED) — and the reviewer partition
279
+ * (code-reviewer) below, with the implementor / sdd-reviewer caption seats +
280
+ * card bands recorded in `subBuckets` (the supervise-line anchors).
281
+ * `zone: 'general'` entities (the general bucket — unmatched / anonymous
282
+ * dispatches) render in the "unknown / 未匹配角色" SUB-PARTITION at the
283
+ * bottom of the LAST column (`layout.unknown` — design doc §1.2: caption row
284
+ * ROW_GAP below the last flow card, general cards SUB_GAP below it). The
285
+ * column bucket comes from the PROJECTED `entity.zone`: 'flow' → the
286
+ * entity's stage column, 'on-demand' → the sdd-implement column's implementor
287
+ * partition, 'general' → the last column's unknown partition. Total function —
288
+ * every entity gets a box; absent sdd-implement stage → on-demand falls back
289
+ * to the LAST column; unknown column ids fall back to the same sink; no
290
+ * stages → empty groups/columns; never a throw.
291
+ */
292
+ export declare function layoutAgents(view: ZoneView['agents']): CanvasLayout;
293
+ /** The fixed port points of a card box (design doc §2.5 — 4 edge-midpoint
294
+ * ports, no new tokens). */
295
+ export type PortId = 'north' | 'south' | 'west' | 'east';
296
+ /** One edge's bezier geometry (design doc §2.6): the `d` path + the
297
+ * endpoint coordinates (start = the source port, end = the target STANDOFF
298
+ * point — the arrow tip lands there, 10px off the card border H1). Null
299
+ * when an anchor is missing (total function). */
300
+ export interface EdgeGeometry {
301
+ /** The SVG path `d` — a single `C` cubic-bezier command for the standard
302
+ * curves, or the multi-command `M … L … L … L … L … L …` side-gap detour
303
+ * polyline for col-skip cross-column edges (plan QC tri R1). The render
304
+ * passes `d` through verbatim; `marker-end orient="auto"` follows the
305
+ * FINAL segment, so the arrow always rides the endpoint tangent (H1). */
306
+ d: string;
307
+ x1: number;
308
+ y1: number;
309
+ x2: number;
310
+ y2: number;
311
+ }
312
+ /**
313
+ * One edge's SVG bezier geometry (plan 20260812-panel-f5-design-system Task
314
+ * 5 — design doc §2.5/§2.6); null when an anchor is missing (total
315
+ * function).
316
+ *
317
+ * Port selection (design doc §2.5 — lines connect ports only, never through
318
+ * a card): forward (source column < target column) → source EAST → target
319
+ * WEST; reverse (source column > target column) → source WEST → target
320
+ * EAST; same column → the vertical flow (direction-aware, QC W-001). The
321
+ * path END stands off STANDOFF px from the target port along the endpoint
322
+ * tangent (arrow tip off the card, H1); the source starts AT its port (no
323
+ * arrow there).
324
+ *
325
+ * Direction-aware vertical endpoints (plan QC tri qc3 W-001): a same-column
326
+ * (or side-gap) flow whose SOURCE sits BELOW the target — the implement →
327
+ * review → rework cycle collapses to `code-reviewer → fullstack-dev` (the
328
+ * projection pair-dedupe keeps the LATEST direction) — must approach the
329
+ * target's SOUTH port, not its north: the arrow tip lands `standoff` below
330
+ * the target's bottom edge pointing UP into it. The old code put the tip
331
+ * above the target (pointing AWAY) and the center-x line ran through both
332
+ * card bodies (H1/H2 violations). Forward (source above) keeps source SOUTH
333
+ * → target NORTH. The reverse side-gap detour below is direction-aware by
334
+ * construction (it enters the target from its RIGHT side gap and lands 10px
335
+ * off the EAST edge, tip pointing LEFT into the card).
336
+ *
337
+ * Same-column flows whose center-x vertical line would cross a sub-bucket
338
+ * CAPTION row (the implementor↔reviewer flow crosses the "sdd-reviewer"
339
+ * caption, the qa-gate↔unknown flow crosses the「unknown / 未匹配角色」
340
+ * caption) OR another CARD body (a handoff between non-adjacent cards, e.g.
341
+ * fullstack-dev → frontend-dev skips the idle fullstack-dev-2 — the
342
+ * 2026-08-13 "线穿过卡片" report) route in the column's LEFT side gap instead
343
+ * (design doc §2.0 绕行策略 ② — 同列关系线移到卡片列外侧的间隙带): the vertical
344
+ * bezier hangs at `card left edge − SIDE_GAP`, clear of every text (H2) and
345
+ * every card body (H1).
346
+ *
347
+ * Inter-phase flows (plan 20260812-panel-f5-design-system Task 8 + plan
348
+ * 20260813-panel-agent-canvas-legend-layout Task 2 — the left-right
349
+ * layout): a Phase 1 → Phase 2 handoff (e.g. writing-specialist →
350
+ * fullstack-dev — a real same-plan Review&Edit→implement transfer) is a
351
+ * normal FORWARD horizontal bezier (source east → target west) — the groups
352
+ * sit side-by-side at one top-aligned y band, so no label row lies between
353
+ * the cards. The CARD-AWARE guard (plan QC tri R1 — 绕行策略 ③): a
354
+ * cross-column edge whose columns SKIP an intermediate column (e.g.
355
+ * writing-specialist → qc-specialist — a real docs-only / inline / QA-gate
356
+ * ledger chain) would run its direct horizontal bezier THROUGH the
357
+ * intermediate column's card bodies; when the direct bbox intersects ANY
358
+ * card box other than the source/target cards, the edge reroutes via the
359
+ * side-gap DETOUR (see `sideGapDetour`) — a polyline below the intermediate
360
+ * band, clear of every card (H1) and text seat (H2).
361
+ */
362
+ export declare function edgePath(edge: AgentEdge, layout: CanvasLayout): EdgeGeometry | null;
363
+ export declare function AgentCanvasPage({ view, iteration, t, initialPan }: AgentCanvasPageProps): React.JSX.Element;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * EventLogPage (spec panel-tabs §5, plan 20260811-panel-event-log Task 2) —
3
+ * the 事件记录 tab: a NON-canvas log page. Two partitions (spec §5):
4
+ * Agent 流转事件 (`view.events` ≤50 latest-first — unexpected dispatches
5
+ * fold in via the `expected` flag, NEVER double-appended; the unexpected
6
+ * badge is DISPATCH-only — settle rows are completion records whose
7
+ * projected `expected` is always false, they never flag as unexpected,
8
+ * F-001) and 违规记录
9
+ * (`view.violations`). Every row is an expandable native `<details>` (no-JS,
10
+ * keyboard-accessible, SSR-stable) whose body shows the FULL catalog fields;
11
+ * a missing field renders「—」— never a guessed value (spec §5/§8).
12
+ *
13
+ * Layout (plan 20260811-panel-f3-agent-general Task 2 — 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`).
17
+ *
18
+ * Dock migration decision (spec §5 — 无双份日志): the AgentEventDock is
19
+ * REMOVED, not degraded. The dock's content (row layout + status chips)
20
+ * moved into this page, and its host (the WorkflowCanvas canvas-corner)
21
+ * died with the tabs-shell plan — a dock-side "jump to 事件记录" entry would
22
+ * only duplicate the header TabNav, which already IS the jump to this tab.
23
+ * Zero `data-agent-event-dock` anchors remain repo-wide (Task 2 完成判据).
24
+ *
25
+ * Row data: `eventLogEntries(view)` (Task 1 — pure assembly; every field
26
+ * degrades individually). The `<details>` body backfills the FULL source
27
+ * fields (planId / taskId / taskCategory — not carried by the floor
28
+ * `EventLogEntry`) through a one-time id → `FlowEventView` map (T1-Min-3:
29
+ * the assembly function stays pure/unchanged; an unmatched id degrades the
30
+ * backfilled fields to「—」like any missing value).
31
+ *
32
+ * Anchors (spec §6.4 — the `data-event-log-*` family): the page root
33
+ * `data-mstar-page="events"`; `data-event-log-section` (+ `-section-count`)
34
+ * for the partitions; `data-event-log-row-kind` / `-row-id` per row;
35
+ * `data-event-log-details` per expandable row; `data-event-log-field` (+
36
+ * `data-event-log-missing="true"`) per detail-body field; `data-event-log-empty`
37
+ * (both-empty) / `data-event-log-empty-section` (mixed empty) for the muted
38
+ * empty states — never an orange warn frame (spec §8).
39
+ */
40
+ import * as React from 'react';
41
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
42
+ import type { ZoneView } from '../graph/project-graph.ts';
43
+ export interface EventLogPageProps {
44
+ /** The projected zone view — the events/violations slices + source rows. */
45
+ view: ZoneView;
46
+ t: TranslateNS<'mstar-panel'>;
47
+ }
48
+ export declare function EventLogPage({ view, t }: EventLogPageProps): React.JSX.Element;
@@ -0,0 +1,80 @@
1
+ /**
2
+ * IterationInfoSection (spec panel-tabs §3, plan 20260812-panel-f5-design-system
3
+ * Task 8 — the SHARED iteration info block, user 2026-08-12 feedback #4): the
4
+ * Content Head — iteration summary (the collapsible toggle row) + the 5
5
+ * horizontal iteration steps + the branches panel — rendered by BOTH tabs
6
+ * from the SAME `view.iteration` data (the tasks tab inside IterationTaskPage
7
+ * above the kanban, the agents tab inside AgentCanvasPage above the canvas).
8
+ * One implementation, two mounts — 任务迭代与代理执行共用同一迭代信息块.
9
+ *
10
+ * The component is extracted VERBATIM from the former inline head of
11
+ * IterationTaskPage (its history, contracts and anchors stay unchanged):
12
+ *
13
+ * - Content Head (spec §3): the iteration info (iterationId / gate verdict /
14
+ * status note) rides the summary row, which IS the toggle (a native button
15
+ * with aria-expanded + aria-controls pointing at the body — QC wave). The
16
+ * expanded body renders the Steps HORIZONTALLY as 5 EQUAL full-width unit
17
+ * blocks (plan 20260811-panel-f2-quickfix Item 1 — 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 20260811-panel-f4-iteration-zone
22
+ * Task 2 (spec panel-f4 §2.3 R8/R9): the expanded body is a LEFT-RIGHT
23
+ * SPLIT — branches (small half, DOM-first) + steps (large half), with the
24
+ * `data-iteration-head-split` container present only while branches render;
25
+ * each step reserves the fixed-height verdict seat (`data-step-verdict-seat`)
26
+ * and the PASS/FAIL badge renders only for a current step with a real gate
27
+ * verdict (`state === 'current' && verdict !== 'unknown'` — Phase 1 renders
28
+ * no badge), so the centered content groups align across steps.
29
+ *
30
+ * Collapse/expand (spec §3 / Task 2 brief): a local `useState` defaulted to
31
+ * the iteration state — `active === false` → collapsed to a one-line summary
32
+ * (iterationId/verdict + the muted "not started" note, expandable to the idle
33
+ * 5-step skeleton); `active === true` → expanded. SSR-stable: the default is
34
+ * data-derived, so `renderToStaticMarkup` renders a deterministic state per
35
+ * row that tests can pin statically. Live re-sync (Task 2 review
36
+ * Important-1): a useEffect re-expands the head when the SAME mounted
37
+ * instance sees `active` flip false→true on a catalog update (started
38
+ * iterations must show the expanded steps, spec §3); the transition is
39
+ * one-way — user collapse while already active is never overridden.
40
+ *
41
+ * Degradation (spec §8): the projection never throws — an inactive/missing
42
+ * iteration renders the collapsed muted summary; the head is a pure render of
43
+ * the projected `iteration` object (never guesses values).
44
+ */
45
+ import * as React from 'react';
46
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
47
+ import type { ZoneView } from '../graph/project-graph.ts';
48
+ export interface IterationInfoSectionProps {
49
+ /** The projected iteration zone (spec §3 — the SAME data both tabs show). */
50
+ iteration: ZoneView['iteration'];
51
+ t: TranslateNS<'mstar-panel'>;
52
+ }
53
+ /**
54
+ * Activation re-sync (Task 2 review Important-1): the collapse/expand state
55
+ * must follow a LIVE `active` flip on the SAME mounted instance — spec §3
56
+ * says 启动迭代才展开 (an active iteration shows the expanded steps), and a
57
+ * fresh catalog row can flip `iteration.active` false→true without a remount.
58
+ * The transition is one-way: only the INACTIVE → ACTIVE edge forces expand;
59
+ * a user collapse while already active is never overridden, and a live
60
+ * true→false deactivation keeps the user's current view (the muted
61
+ * "not started" note + collapsed affordance still render per `active`).
62
+ *
63
+ * Pure transition (exported for the render-test transition table): the head
64
+ * expands iff the iteration just became active; otherwise the user's state
65
+ * wins.
66
+ */
67
+ export declare function nextExpandedOnActivation(prev: boolean, prevActive: boolean, nextActive: boolean): boolean;
68
+ /**
69
+ * The split-layout wrapper decision (spec panel-f4 §2.3 R8, plan f4.3 Task 2
70
+ * — exported pure for the render tests, the `nextExpandedOnActivation`
71
+ * precedent): the `data-iteration-head-split` container renders ONLY while
72
+ * the branch panel renders (`active && branches !== null`); otherwise the
73
+ * expanded body renders the steps row ALONE — the expanded-inactive fallback
74
+ * (a user manually expands an inactive head → the 5-step idle skeleton
75
+ * without the split). The `active + branches null` arm is projection-
76
+ * unreachable (branches are always projected non-null while active), but the
77
+ * predicate keeps the decision a single, testable source of truth.
78
+ */
79
+ export declare function iterationSplitActive(active: boolean, branches: ZoneView['iteration']['branches']): boolean;
80
+ export declare function IterationInfoSection({ iteration, t }: IterationInfoSectionProps): React.JSX.Element;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * IterationTaskPage (spec panel-tabs §3, plan 20260811-panel-tabs-shell
3
+ * Task 2) — the 任务迭代 tab: the SHARED IterationInfoSection (iteration
4
+ * summary + the 5 horizontal iteration steps + branches — the same block the
5
+ * agents tab renders, plan 20260812-panel-f5-design-system Task 8, user
6
+ * 2026-08-12 feedback #4) above the full-width standard kanban. Replaces the
7
+ * WorkflowCanvas zone dashboard on the tasks tab (WorkflowCanvas is removed
8
+ * by the plan close; its zone-level components stay untouched here).
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
12
+ * tabs render the SAME iteration info block from the SAME `view.iteration`
13
+ * data (one implementation, two mounts; the anchor family `data-iteration-*`
14
+ * is unchanged).
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.
25
+ *
26
+ * Degradation (spec §8): the projection never throws — an inactive/missing
27
+ * iteration renders the collapsed muted summary; state/plans missing render
28
+ * the muted 5-column kanban skeleton (TaskBoard) — never an orange warn box.
29
+ */
30
+ import * as React from 'react';
31
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
32
+ import type { ZoneView } from '../graph/project-graph.ts';
33
+ export interface IterationTaskPageProps {
34
+ view: ZoneView;
35
+ t: TranslateNS<'mstar-panel'>;
36
+ }
37
+ export declare function IterationTaskPage({ view, t }: IterationTaskPageProps): React.JSX.Element;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Sidebar bottom meta dock (spec panel-zones §5): the durable identity line —
3
+ * mstar version + harness dir — in a small muted panel pinned below the
4
+ * scrolling digest (hairline-separated, does NOT scroll with the sidebar).
5
+ *
6
+ * The `watermark.*` locale values (reused from the removed header) render the
7
+ * two lines; `data-mstar-watermark` is preserved here so existing degradation
8
+ * anchors keep working. Degradation stays total: missing version → `unknown`,
9
+ * null harness dir → `none` (never a crash, never a guessed value).
10
+ */
11
+ import * as React from 'react';
12
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
13
+ import type { MstarEngineStatusSource } from '../../types.ts';
14
+ export interface PanelMetaProps {
15
+ t: TranslateNS<'mstar-panel'>;
16
+ source: MstarEngineStatusSource;
17
+ }
18
+ export declare function PanelMeta({ t, source }: PanelMetaProps): React.JSX.Element;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Sidebar / Done-column plan ordering (spec panel-zones §3): the hard-coded
3
+ * digitized sort keys shared by the sidebar plan board (this plan, Task 3)
4
+ * and the canvas Done column (plan 20260810-panel-canvas-zones reuses the
5
+ * same rule). Pure function — no rendering, no state.
6
+ *
7
+ * Keys, compared in order (all DESC):
8
+ * 1. `doneAt` matching /^\d{4}-\d{2}-\d{2}$/ → '.replaceAll('-','')'
9
+ * digitized (e.g. '2026-08-08' → '20260808'); non-matching (missing /
10
+ * garbage) → empty key (sorts last).
11
+ * 2. fallback: `id` first 8 chars when /^\d{8}/ → that 8-digit key, DESC.
12
+ * 3. tie-break: `id` lexicographic DESC (deterministic, testable).
13
+ */
14
+ /** Sidebar plan cap (spec §5): show ≤5 rows + `+N more`. */
15
+ export declare const PLAN_CAP = 5;
16
+ /** Residual findings cap (spec §5): show ≤10 rows + overflow hint. */
17
+ export declare const FINDINGS_CAP = 10;
18
+ /**
19
+ * Spec §3 comparator (all keys DESC). The digitized keys are 8-digit strings,
20
+ * so plain string DESC comparison is numeric-correct; the id tie-break is
21
+ * plain lexicographic DESC.
22
+ */
23
+ export declare function comparePlans(a: {
24
+ readonly id: string;
25
+ readonly doneAt: string | null;
26
+ }, b: {
27
+ readonly id: string;
28
+ readonly doneAt: string | null;
29
+ }): number;
30
+ /**
31
+ * Sorted copy in spec §3 order (stable — input order preserved within equal
32
+ * keys, so the result is deterministic for any input).
33
+ */
34
+ export declare function sortPlans<T extends {
35
+ readonly id: string;
36
+ readonly doneAt: string | null;
37
+ }>(plans: readonly T[]): T[];
38
+ /**
39
+ * The「最近一次迭代」recency comparator (plan 20260813-panel-quick-fixes Task
40
+ * 2 — shared by the current-iteration filter in `project-graph.ts`, which
41
+ * previously duplicated this order as a local `moreRecentPlan`). DIFFERENT
42
+ * key order from {@link comparePlans}: the 8-digit id-date prefix is PRIMARY,
43
+ * doneAt SECONDARY — the projection's former `moreRecentPlan` behavior, kept
44
+ * EXACTLY. All keys DESC: `< 0` means `a` is more recent than `b` (id-date
45
+ * prefix, then digitized doneAt, then id lexicographic DESC for
46
+ * determinism).
47
+ */
48
+ export declare function comparePlansByIterationRecency(a: {
49
+ readonly id: string;
50
+ readonly doneAt: string | null;
51
+ }, b: {
52
+ readonly id: string;
53
+ readonly doneAt: string | null;
54
+ }): number;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Panel right sidebar (spec panel-zones §5): fixed 300px column, full height,
3
+ * flex column — the workspace-state digest scrolls in its own region
4
+ * (`flex: 1; min-height: 0; overflow-y: auto`), while the bottom meta dock
5
+ * (version + harness dir) stays pinned and does NOT scroll with the digest.
6
+ * Degradation: `state === null` renders the no-state note instead of the
7
+ * digest (never a crash); the meta dock still renders from the source.
8
+ */
9
+ import * as React from 'react';
10
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
11
+ import type { MstarEngineStatusSource, MstarHarnessState } from '../../types.ts';
12
+ export interface SidebarProps {
13
+ t: TranslateNS<'mstar-panel'>;
14
+ state: MstarHarnessState | null;
15
+ source: MstarEngineStatusSource;
16
+ }
17
+ export declare function Sidebar({ t, state, source }: SidebarProps): React.JSX.Element;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Workspace-state section (spec panel-zones §5): plan board (≤5 in spec §3
3
+ * time-desc order + `+N more`), open residual findings (≤10 — R# + severity
4
+ * chip + title/planId + overflow hint), policy anchors with enforcement
5
+ * FIRST (from `source.enforcement` — top level, not state), lease anchors,
6
+ * knowledge digest and the direction one-liner. Pure render with per-field
7
+ * degradation — missing fields render `none` / `unknown`, empty lists render
8
+ * `none`, never crash.
9
+ *
10
+ * The branches block was removed from the sidebar in this task (moved to the
11
+ * iteration zone, plan 20260810-panel-canvas-zones); the branch anchor fields
12
+ * stay in the catalog source (the iteration zone consumes them).
13
+ */
14
+ import * as React from 'react';
15
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
16
+ import type { MstarEngineStatusSource, MstarHarnessState } from '../../types.ts';
17
+ export interface StateSectionProps {
18
+ t: TranslateNS<'mstar-panel'>;
19
+ state: MstarHarnessState;
20
+ /** Top-level enforcement flag (spec §2.1) — NOT part of the state digest. */
21
+ enforcement: MstarEngineStatusSource['enforcement'];
22
+ }
23
+ export declare function StateSection({ t, state, enforcement }: StateSectionProps): React.JSX.Element;