@mstar-harness/dsh 3.6.3 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/README.zh.md +3 -3
- package/dist/client/panel/PanelView.d.ts +8 -11
- package/dist/client/panel/TabNav.d.ts +2 -2
- package/dist/client/panel/graph/event-log.d.ts +5 -9
- package/dist/client/panel/graph/project-graph.d.ts +53 -72
- package/dist/client/panel/graph/schema.d.ts +31 -37
- package/dist/client/panel/locale.d.ts +19 -19
- package/dist/client/panel/pages/AgentCanvasPage.d.ts +40 -58
- package/dist/client/panel/pages/EventLogPage.d.ts +6 -6
- package/dist/client/panel/pages/IterationInfoSection.d.ts +9 -11
- package/dist/client/panel/pages/IterationTaskPage.d.ts +3 -3
- package/dist/client/panel/plan-sort.d.ts +3 -6
- package/dist/client/panel/state-section.d.ts +1 -1
- package/dist/client/panel/zones/Legend.d.ts +2 -2
- package/dist/client/panel/zones/ProjectRollup.d.ts +1 -2
- package/dist/client/panel/zones/TaskBoard.d.ts +1 -2
- package/dist/gates/_shared.d.ts +7 -10
- package/dist/gates/adapter.d.ts +6 -9
- package/dist/gates/agent-flow.d.ts +49 -59
- package/dist/gates/agent-personas.d.ts +1 -2
- package/dist/gates/catalog.d.ts +2 -5
- package/dist/gates/dispatch.d.ts +9 -11
- package/dist/gates/fallbacks-advisory.d.ts +2 -3
- package/dist/gates/fallbacks-probe.d.ts +2 -2
- package/dist/gates/fallbacks-seeds.d.ts +1 -1
- package/dist/gates/fallbacks-structural.d.ts +1 -1
- package/dist/gates/goal-bridge.d.ts +6 -9
- package/dist/gates/role-persona.d.ts +2 -3
- package/dist/gates/skill-lint.d.ts +19 -2
- package/dist/gates/system-prompt.d.ts +7 -11
- package/dist/gates/tools.d.ts +1 -1
- package/dist/gates/workflow-ledger.d.ts +21 -28
- package/dist/gates/workflow-policy.d.ts +15 -19
- package/dist/gates/workflow-selection.d.ts +3 -3
- package/dist/index.js +215 -33
- package/dist/types.d.ts +4 -7
- package/harness-commands/iteration-drive.md +6 -6
- package/harness-commands/iteration-loop.md +7 -7
- package/harness-commands/iteration-start.md +8 -8
- package/harness-skills/mstar-coding-behavior/SKILL.md +3 -20
- package/harness-skills/mstar-dispatch-gates/SKILL.md +7 -13
- package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +1 -1
- package/harness-skills/mstar-harness-core/SKILL.md +9 -53
- package/harness-skills/mstar-host/references/zcode.md +1 -0
- package/harness-skills/mstar-iteration/SKILL.md +32 -318
- package/harness-skills/mstar-iteration/references/command-shared-invariants.md +1 -1
- package/harness-skills/mstar-iteration/references/phase-1-prepare.md +155 -0
- package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +113 -3
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +1 -1
- package/harness-skills/mstar-roles/SKILL.md +14 -12
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +5 -6
- package/harness-skills/mstar-roles/references/architect.md +1 -1
- package/harness-skills/mstar-roles/references/code-reviewer.md +11 -1
- package/harness-skills/mstar-roles/references/frontend-dev.md +1 -1
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +1 -1
- package/harness-skills/mstar-roles/references/ops-engineer.md +1 -1
- package/harness-skills/mstar-roles/references/product-manager.md +1 -1
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +4 -0
- package/harness-skills/mstar-roles/references/project-manager.md +6 -4
- package/harness-skills/mstar-roles/references/prompt-engineer.md +1 -1
- package/harness-skills/mstar-roles/references/qa-engineer.md +1 -1
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +1 -1
- package/harness-skills/mstar-roles/references/writing-specialist.md +1 -1
- package/harness-skills/mstar-sdd/references/file-handoffs.md +40 -7
- package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +9 -0
- package/harness-skills/mstar-sdd/references/implementer-prompt.md +9 -0
- package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ dsh plugin --profile web add dsh-llm-fallbacks
|
|
|
39
39
|
|
|
40
40
|
The **two-command install is the contract** — folding a `dsh-llm-fallbacks` row into this bundle's patch is explicitly rejected (roadmap §8.3 F4): the loader has no insert-if-absent semantics, so a same-`id` insert is a `duplicate loader entry id` boot failure (the whole dsh session fails to start), and a different-`id` insert mounts the plugin twice — two `apply()` runs with split fallback state (per-context state stores, double listeners, config-override lottery) for anyone who also installs the package directly. Layer order is the reconcile append order: `dsh-llm-fallbacks` lands **after `dsh-base`/`llm-retry`** (its hard ordering requirement) and after the mstar row. Single-command multi-activation is an upstream feature gap (reconcile dedup or insert-if-absent patch semantics), not actionable from this repo.
|
|
41
41
|
|
|
42
|
-
**What you get with zero configuration** — with BOTH rows installed (via the CLI entry or the two commands above), the mstar plugin declares the 13 `mode: subagent` mstar role seeds (derived from the bundled `harness-agents/` mirror, `project-manager` excluded) into the fallbacks taxonomy at boot: each seeded role's persona defaults to its mirror `description` plus the mandatory role-loading guidance line, the seeded state stays revertible (the `fallbacks/revert-seed` gateway / the settings rollback button), and the runtime advisory reports missing ids and persona overrides. The seeds mechanism is B4
|
|
42
|
+
**What you get with zero configuration** — with BOTH rows installed (via the CLI entry or the two commands above), the mstar plugin declares the 13 `mode: subagent` mstar role seeds (derived from the bundled `harness-agents/` mirror, `project-manager` excluded) into the fallbacks taxonomy at boot: each seeded role's persona defaults to its mirror `description` plus the mandatory role-loading guidance line, the seeded state stays revertible (the `fallbacks/revert-seed` gateway / the settings rollback button), and the runtime advisory reports missing ids and persona overrides. The seeds mechanism is B4 — the installed-deployment e2e (`tests/install-e2e.spec.ts`) closes the verification loop: a real `init --target dsh` install into a temp `DSH_HOME`, booted from the installed artifacts, asserts all 13 ids present in the effective taxonomy with non-empty personas. Not included: model routing, automatch dispatch, or the dsh TUI.
|
|
43
43
|
|
|
44
44
|
> **Fresh-publish age window**: pnpm's `minimumReleaseAge` gate can make a `dsh plugin add <spec>` range resolution pick an older published version (without the seeds surface) for up to ~24h after a fresh publish — re-run `npx @mstar-harness/cli init --target dsh` after the window (or pin the version) to converge on the latest surface.
|
|
45
45
|
|
|
@@ -512,10 +512,8 @@ back-scan of a resumed long log (the server re-emits the row at every turn's
|
|
|
512
512
|
first step, digest-gated); no custom top-level slot (the `conversation.view`
|
|
513
513
|
tab is the only session-level panel seat available without dsh-private layout
|
|
514
514
|
changes — spec §1). Panel acceptance is dual-track: in-loop browser harness
|
|
515
|
-
verification against the rebuilt bundle
|
|
516
|
-
|
|
517
|
-
rerun steps in the install-verification guide §8. R1 (browser observation)
|
|
518
|
-
closed and archived 2026-08-10.
|
|
515
|
+
verification against the rebuilt bundle plus user-restart final GUI acceptance —
|
|
516
|
+
rerun steps in the install-verification guide §8.
|
|
519
517
|
|
|
520
518
|
## Development
|
|
521
519
|
|
|
@@ -578,7 +576,7 @@ The catalog row is appended at the END of the composed step messages, after dele
|
|
|
578
576
|
- **Iteration stepper: Step 1 is compass-driven, Step 5 is schema-driven** — the zone dashboard's Step 1 (iteration-start) is the current step while the steering compass is `status: active` (Phase 1 in flight — no gate verdict, so no PASS/FAIL badge); Step 5 (merge-ready) is a schema constant the engine gate never lights as current (transition covers Phase 2→3→4 only), so it always renders idle — recorded in the iteration guide, not a defect. The full panel-limitation list lives in the Web client plugin section.
|
|
579
577
|
- **`dsh-llm-fallbacks` is an optional dev-time-only dependency** — dsh natively covers subagent customization, so fallbacks is strictly optional: `src/` carries zero imports of it (runtime and type — the consumed surface is the local structural mirror `fallbacks-structural.ts`, kept in sync by the probe's exact-keys drift gate plus the `typecheck:tests` real → view assignability check), `package.json` carries it only under `devDependencies` (type mirroring + the real-package test harness), and `dist/` carries no import and no type reference (only ONE string literal naming the package — the probe's loader-entry match; the advisory logs say `fallbacks`). Activation is a SEPARATE explicit install (two-command contract), never transitive; there is no `--external` guard anymore — a future value import must re-add a runtime dependency by design.
|
|
580
578
|
- **Role→model override NOT delivered this batch** — routing a role to a fallbacks `model` (or persona via fallbacks rules) would require rewriting the child's `agentOptions` on the start request, but start-request options are caller-controlled (tool-subagent's own Config; call args are `description`/`prompt`/`run_in_background` only, deep-frozen). Awaits upstream `fallbacks-explicit-role-tool` or the N-B1 systemPrompt adoption (roadmap §10.4).
|
|
581
|
-
- **Persona delivery is dsh-native — no additive section** — the role persona merges into `SubagentStartRequest.persona` (one-shot `start` AND the opt-in continuable `startContinuable`) and SHADOWS the deployment persona for role-matched children (child embodies the role; persisted + reapplied on resume). There is NO `mstar:role-persona` system-prompt section anymore
|
|
579
|
+
- **Persona delivery is dsh-native — no additive section** — the role persona merges into `SubagentStartRequest.persona` (one-shot `start` AND the opt-in continuable `startContinuable`) and SHADOWS the deployment persona for role-matched children (child embodies the role; persisted + reapplied on resume). There is NO `mstar:role-persona` system-prompt section anymore.
|
|
582
580
|
- **Persona injection is fallbacks-independent** — `dsh-llm-fallbacks` only routes LLM failures; it is never required for persona delivery. Unmounted → the same persona lands via the native channel with the single delivery debug log (AC-4). One-shot starts for providers without the native `persona` capability (out-of-process) skip the persona with one contained debug log; continuable starts for providers without `prepareContinuable` skip it the same way (the native start fails loud on its own) — the start is never failed by the channel for either.
|
|
583
581
|
- **Fork gating is default-only; explicit `dispatchTools` can omit `subagent_fork`** — a custom `dispatchTools` list overrides the default wholesale (pre-existing rename pattern), so a deployment that declares its own list must include `subagent_fork` to keep fork dispatches gated.
|
|
584
582
|
- **Persona values must not contain `{{...}}`** — dsh system-prompt renders persona text with strict `{{variable}}` interpolation and throws on a `{{` paired with a later `}}` (unknown/malformed/undefined reference), which would break child prompt assembly for every role-matched dispatch. The Config schema rejects such `rolePersonas` values at plugin mount with a clear error; the escape rule is single braces or rewording (a lone `{{` with no later `}}` renders as literal prose).
|
package/README.zh.md
CHANGED
|
@@ -39,7 +39,7 @@ dsh plugin --profile web add dsh-llm-fallbacks
|
|
|
39
39
|
|
|
40
40
|
**双命令安装即契约**——把 `dsh-llm-fallbacks` 行折叠进本 bundle 的补丁**明确否决**(roadmap §8.3 F4):loader 没有 insert-if-absent 语义,因此同 `id` 插入是 `duplicate loader entry id` 启动失败(整个 dsh 会话无法启动);异 `id` 插入则插件被挂载两次——对同时直接安装该包的人,会出现两次 `apply()` 与分裂的 fallback 状态(各自独立的 state store、双份监听器、配置覆盖抽签)。层序为 reconcile 追加序:`dsh-llm-fallbacks` 落在 **`dsh-base`/`llm-retry` 之后**(其硬性排序要求)并位于 mstar 行之后。单命令多激活是上游功能缺口(reconcile 去重或 insert-if-absent 补丁语义),本仓库无法实施。
|
|
41
41
|
|
|
42
|
-
**零配置获得什么**——两条行都装上后(经 CLI 入口或上面两条命令),mstar 插件在 boot 时把 13 个 `mode: subagent` 的 mstar 角色种子(从打包的 `harness-agents/` 镜像派生,排除 `project-manager`)声明进 fallbacks taxonomy:每个 seeded 角色的 persona 默认取其镜像 `description` 外加一行强制角色加载引导;seeded 状态保持可 revert(`fallbacks/revert-seed` 网关 / settings 回滚按钮);运行时 advisory 报告缺失 id 与 persona 覆盖。该 seeds 机制即 B4
|
|
42
|
+
**零配置获得什么**——两条行都装上后(经 CLI 入口或上面两条命令),mstar 插件在 boot 时把 13 个 `mode: subagent` 的 mstar 角色种子(从打包的 `harness-agents/` 镜像派生,排除 `project-manager`)声明进 fallbacks taxonomy:每个 seeded 角色的 persona 默认取其镜像 `description` 外加一行强制角色加载引导;seeded 状态保持可 revert(`fallbacks/revert-seed` 网关 / settings 回滚按钮);运行时 advisory 报告缺失 id 与 persona 覆盖。该 seeds 机制即 B4——installed-deployment e2e(`tests/install-e2e.spec.ts`)本轮把验证闭环:真实 `init --target dsh` 安装进临时 `DSH_HOME`、从安装产物 boot,断言 13 个 id 全部出现在 effective taxonomy 且 persona 非空。不含模型路由、不含 automatch 派发、不含 dsh-tui。
|
|
43
43
|
|
|
44
44
|
> **fresh publish 年龄窗口提示**:pnpm 的 `minimumReleaseAge` 门禁可能让 `dsh plugin add <spec>` 的 range 解析在全新发布后约 24h 内选中旧版本(不含 seeds surface)——窗口过后重跑 `npx @mstar-harness/cli init --target dsh`(或显式 pin 版本)即可收敛到最新 surface。
|
|
45
45
|
|
|
@@ -290,7 +290,7 @@ dsh web # 启动 → 服务 /plugins/@mstar-harness/dsh/clie
|
|
|
290
290
|
|
|
291
291
|
本地已验证(install-verification guide):boot 图包含客户端 entry(`@mstar-harness/dsh` 携声明的 inject 面)、`/plugins/<id>/client.js` 路由服务的正是构建产物(rev = 内容 sha1)、浏览器握手 materialize 出插件入口(`inject` + `apply` + CSS 注入,经典脚本语义)——见 panel-beautify 迭代的 `install-verification.md` guide(本地 harness root)。
|
|
292
292
|
|
|
293
|
-
**Known Limitations**(本迭代):迭代 stepper 的 Step 1(iteration-start)在 steering compass `status: active`(Phase 1 进行中——catalog `compassStatus` 字段)时为**当前步**,且不携带 PASS/FAIL 徽标(Phase 1 无 gate 判定);Step 5(merge-ready)**永远不会是当前步**——engine 相位门只评估 Phase 2→3→4(merge-ready 从不是 gate transition);仅当 Step 4(pr-delivery)为当前步时渲染 `next`,其余为 idle;当前步跟随 TTL 刷新的 `compassStatus`——会话中途 `active`→`locked` 翻转后最多落后一个 catalog 间隔(60 秒)(有界、已记录的陈旧;绝不给出错误判定);代理实体状态按**精确配对**派生(paired settle 携带的 `(agent, role, planId, taskId)` 标识精确配对到对应派发——QC tri N=3 并发下各卡各自结算;未配对派发保持 running,绝不捏造);无 steering compass 时的「当前迭代」过滤按 plan id(8 位日期前缀)+ doneAt 推导迭代——确定性、已记录的启发式,且只丢弃可证明跨迭代的事件);不回溯 resumed 长日志的历史行(服务端每 turn 首步必重发,digest 门控);无自定义顶层槽位(不改 dsh-private 布局的前提下,`conversation.view` tab 是唯一的会话级面板位——spec §1)。面板验收为双轨:in-loop 浏览器 harness 验证(对重建 bundle
|
|
293
|
+
**Known Limitations**(本迭代):迭代 stepper 的 Step 1(iteration-start)在 steering compass `status: active`(Phase 1 进行中——catalog `compassStatus` 字段)时为**当前步**,且不携带 PASS/FAIL 徽标(Phase 1 无 gate 判定);Step 5(merge-ready)**永远不会是当前步**——engine 相位门只评估 Phase 2→3→4(merge-ready 从不是 gate transition);仅当 Step 4(pr-delivery)为当前步时渲染 `next`,其余为 idle;当前步跟随 TTL 刷新的 `compassStatus`——会话中途 `active`→`locked` 翻转后最多落后一个 catalog 间隔(60 秒)(有界、已记录的陈旧;绝不给出错误判定);代理实体状态按**精确配对**派生(paired settle 携带的 `(agent, role, planId, taskId)` 标识精确配对到对应派发——QC tri N=3 并发下各卡各自结算;未配对派发保持 running,绝不捏造);无 steering compass 时的「当前迭代」过滤按 plan id(8 位日期前缀)+ doneAt 推导迭代——确定性、已记录的启发式,且只丢弃可证明跨迭代的事件);不回溯 resumed 长日志的历史行(服务端每 turn 首步必重发,digest 门控);无自定义顶层槽位(不改 dsh-private 布局的前提下,`conversation.view` tab 是唯一的会话级面板位——spec §1)。面板验收为双轨:in-loop 浏览器 harness 验证(对重建 bundle)+ 用户重启后 GUI 终验——重跑步骤见 install-verification guide §8。
|
|
294
294
|
|
|
295
295
|
## Development
|
|
296
296
|
|
|
@@ -350,7 +350,7 @@ catalog 行在委托之后追加到组合步骤消息的**末尾**——请求
|
|
|
350
350
|
- **迭代 stepper:Step 1 为 compass 驱动,Step 5 为 schema 驱动**——zone dashboard 的 Step 1(iteration-start)在 steering compass `status: active`(Phase 1 进行中)时为当前步(无 gate 判定 → 无 PASS/FAIL 徽标);Step 5(merge-ready)是 engine 闸门永不点亮为当前的 schema 常量(transition 只覆盖 Phase 2→3→4,merge-ready 从不是 gate transition);仅当 Step 4 为当前步时作为 `next` 渲染,其余为 idle——已记录于迭代 guide,非缺陷。完整面板限制清单见 Web 客户端插件一节。
|
|
351
351
|
- **`dsh-llm-fallbacks` 为可选的开发期依赖**——dsh 原生覆盖 subagent 定制,fallbacks 因此严格可选:`src/` 对其零导入(运行时与类型——被消费面是本地结构镜像 `fallbacks-structural.ts`,由探测的 exact-keys 漂移闸门 + `typecheck:tests` 的 real → view 可赋值检查保持同步),`package.json` 仅在 `devDependencies` 携带它(类型镜像 + 真实包测试 harness),`dist/` 无导入也无类型引用(仅 1 处命名该包的字符串字面量——探测的 loader 条目匹配;建议日志写作 `fallbacks`)。激活是**单独显式安装**(双命令契约),绝不传递;不再有 `--external` 护栏——未来的值导入必须按设计重新加入运行时依赖。
|
|
352
352
|
- **本批次未交付角色→模型覆盖**——把角色路由到 fallbacks `model`(或经 fallbacks 规则路由 persona)需要改写启动请求上的子会话 `agentOptions`,但启动请求选项由调用方控制(tool-subagent 自己的 Config;调用参数仅为 `description`/`prompt`/`run_in_background`,且深度冻结)。等待上游 `fallbacks-explicit-role-tool` 或 N-B1 systemPrompt 采纳(roadmap §10.4)。
|
|
353
|
-
- **persona 交付为 dsh 原生——不再有附加段**——角色 persona 合入 `SubagentStartRequest.persona`(一次性 `start` 与可选的 continuable `startContinuable` 两个启动面),对角色匹配的子会话**遮蔽**部署 persona(子会话体现角色;持久化并在 resume 时重放)。`mstar:role-persona` system-prompt
|
|
353
|
+
- **persona 交付为 dsh 原生——不再有附加段**——角色 persona 合入 `SubagentStartRequest.persona`(一次性 `start` 与可选的 continuable `startContinuable` 两个启动面),对角色匹配的子会话**遮蔽**部署 persona(子会话体现角色;持久化并在 resume 时重放)。`mstar:role-persona` system-prompt 段已不复存在。
|
|
354
354
|
- **persona 注入与 fallbacks 无关**——`dsh-llm-fallbacks` 只路由 LLM 失败;persona 交付从不依赖它。未挂载 → 同一 persona 经原生通道交付,仅一条交付 debug 日志(AC-4)。一次性 start 中不具备原生 `persona` 能力的提供者(进程外)以一条受控 debug 日志跳过 persona;continuable start 中不具备 `prepareContinuable` 的提供者同样跳过(原生 start 会自行 fail loud)——通道绝不因两者使 start 失败。
|
|
355
355
|
- **fork 门禁仅默认开启;显式 `dispatchTools` 可省略 `subagent_fork`**——自定义 `dispatchTools` 列表整体覆盖默认(既有重命名模式),因此自行声明列表的部署须包含 `subagent_fork` 才能继续门禁 fork 派发。
|
|
356
356
|
- **persona 值绝不能包含 `{{...}}`**——dsh system-prompt 以严格 `{{variable}}` 插值渲染 persona 文本,对与后文 `}}` 配对的 `{{`(未知/畸形/未定义引用)直接抛错,会破坏每一次角色匹配派发的子会话提示组装。Config schema 在插件挂载时以清晰报错拒绝此类 `rolePersonas` 值;转义规则是改用单花括号或改写措辞(不带后续 `}}` 的孤立 `{{` 按字面散文渲染)。
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* `useMstarEngineStatus()` hook riding the kit's `useChat` selector (spec
|
|
8
8
|
* §5) — the render body is a pure function of (source, lastUpdated, t).
|
|
9
9
|
*
|
|
10
|
-
* Layout (spec panel-tabs §2
|
|
10
|
+
* Layout (spec panel-tabs §2): root grid
|
|
11
11
|
* `"main sidebar"` fills the Tab (height 100%, overflow hidden — the page
|
|
12
12
|
* never scrolls); the right sidebar is RESIDENT (all tabs share it, its props
|
|
13
13
|
* `{ t, state, source }` unchanged); main = the fixed header nav (TabNav, 3
|
|
@@ -19,18 +19,17 @@
|
|
|
19
19
|
* Tab state (spec §6.2): local `useState<PanelTab>` (default 'tasks', D1, no
|
|
20
20
|
* routing) — `renderToStaticMarkup` renders the default tasks page, keeping
|
|
21
21
|
* SSR assertions stable. The tasks tab renders the IterationTaskPage (Content
|
|
22
|
-
* Head + Steps 横排/收拢 + full-width kanban, spec §3 —
|
|
22
|
+
* Head + Steps 横排/收拢 + full-width kanban, spec §3 —
|
|
23
23
|
* replacing the WorkflowCanvas zone dashboard); the agents tab renders the
|
|
24
|
-
* draggable AgentCanvasPage (spec §4 —
|
|
25
|
-
* replacing the muted placeholder + the AgentFlowZone); the events tab
|
|
24
|
+
* draggable AgentCanvasPage (spec §4 — replacing the muted placeholder + the AgentFlowZone); the events tab
|
|
26
25
|
* renders the EventLogPage (spec §5 — the non-canvas log page with per-row
|
|
27
|
-
* `<details>` expansion,
|
|
26
|
+
* `<details>` expansion, replacing
|
|
28
27
|
* the muted placeholder AND the AgentEventDock — 无双份日志).
|
|
29
28
|
*
|
|
30
29
|
* Empty branches (spec §2): waiting / no-harness render no tabs / no
|
|
31
30
|
* sidebar. Waiting keeps the muted hint; the no-harness branch renders a
|
|
32
31
|
* CENTERED inactive-state card (icon + title + hint, plan
|
|
33
|
-
*
|
|
32
|
+
* T3 — replaces the left-aligned hint) with
|
|
34
33
|
* the freshness footer; the no-harness main keeps `data-mstar-graph` on its
|
|
35
34
|
* content container. Degradation stays total: `projectGraph` never throws;
|
|
36
35
|
* no iteration → the IterationTaskPage's collapsed muted head (spec §8);
|
|
@@ -53,14 +52,12 @@ export interface PanelContentProps {
|
|
|
53
52
|
/**
|
|
54
53
|
* Tab → page mapping (spec §6.2): the only per-tab-switching part of the
|
|
55
54
|
* layout. tasks = the IterationTaskPage (spec §3 — Content Head + Steps
|
|
56
|
-
* 横排/收拢 + full-width kanban,
|
|
55
|
+
* 横排/收拢 + full-width kanban, it replaced the
|
|
57
56
|
* WorkflowCanvas zone dashboard, whose file is removed by the plan close);
|
|
58
57
|
* agents = the draggable AgentCanvasPage (spec §4 — full KNOWN_AGENTS roster
|
|
59
|
-
* + idle states + AgentEdge collaboration edges
|
|
60
|
-
* plan; it replaced the muted placeholder and the AgentFlowZone); events =
|
|
58
|
+
* + idle states + AgentEdge collaboration edges; it replaced the muted placeholder and the AgentFlowZone); events =
|
|
61
59
|
* the real EventLogPage (spec §5 — non-canvas log page: Agent 流转事件 +
|
|
62
|
-
* 违规记录 partitions with per-row `<details>` expansion
|
|
63
|
-
* event-log plan Task 2; it replaced the muted placeholder AND the
|
|
60
|
+
* 违规记录 partitions with per-row `<details>` expansion; it replaced the muted placeholder AND the
|
|
64
61
|
* AgentEventDock — 无双份日志, the dock is removed with this plan).
|
|
65
62
|
*/
|
|
66
63
|
export declare function PanelContent({ tab, source, t }: PanelContentProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TabNav (spec panel-tabs §2/§6.1
|
|
2
|
+
* TabNav (spec panel-tabs §2/§6.1) —
|
|
3
3
|
* the fixed header nav: 3 MenuTabs (任务迭代 / 代理执行 / 事件记录, F1.2)
|
|
4
4
|
* switching the main content. Tab state is owned by PanelView
|
|
5
5
|
* (`useState<PanelTab>`, default 'tasks', no routing — SSR-stable under
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* every tab and `data-mstar-tab-active="true|false"` (activation state). The
|
|
11
11
|
* active tab gets the business-token underline; inactive tabs stay secondary.
|
|
12
12
|
*
|
|
13
|
-
* A11y
|
|
13
|
+
* A11y: the nav is a WAI-ARIA tablist and each tab is a
|
|
14
14
|
* `role="tab"` button with `aria-selected` (APG Tabs pattern, replacing the
|
|
15
15
|
* former `aria-pressed` toggle). Deliberately minimal: every tab stays Tab-
|
|
16
16
|
* reachable (no roving tabindex / arrow-key handling — that behavior would
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Event-log entry assembly (spec panel-tabs §5
|
|
3
|
-
* Task 1): `eventLogEntries(view)` turns the projected `ZoneView` slices
|
|
2
|
+
* Event-log entry assembly (spec panel-tabs §5): `eventLogEntries(view)` turns the projected `ZoneView` slices
|
|
4
3
|
* (`events` / `violations`) into display-ready log entries for the 事件记录
|
|
5
|
-
* tab (`EventLogPage
|
|
4
|
+
* tab (`EventLogPage`). A pure function over the projection output —
|
|
6
5
|
* the projection interfaces (`ZoneView` / `FlowEventView` / `GraphViolation`)
|
|
7
6
|
* are consumed unchanged, ZERO projection changes.
|
|
8
7
|
*
|
|
@@ -17,8 +16,7 @@
|
|
|
17
16
|
* re-implemented). Off-pipeline (unexpected) DISPATCHES fold in via
|
|
18
17
|
* `expected: false`: `view.unexpected` is a RE-LIST of rows already inside
|
|
19
18
|
* `view.events`, so reading it here would double-append — the page decides
|
|
20
|
-
* how to section/badge them. Workflow rows (
|
|
21
|
-
* Task 4) carry the run identity (`runId` / `name` — agent/end rows resolve
|
|
19
|
+
* how to section/badge them. Workflow rows carry the run identity (`runId` / `name` — agent/end rows resolve
|
|
22
20
|
* the run's name from the window's workflow-run row); unknown kinds pass
|
|
23
21
|
* through as generic rows (`name` '' — never fabricated).
|
|
24
22
|
* - `violation` rows — `view.violations` (gate violations, str()-guarded)
|
|
@@ -26,8 +24,7 @@
|
|
|
26
24
|
* partition.
|
|
27
25
|
*/
|
|
28
26
|
import type { FlowEventStatus, FlowEventView, ZoneView } from './project-graph.ts';
|
|
29
|
-
/** The three workflow ledger kinds (
|
|
30
|
-
export declare function isWorkflowKind(kind: FlowEventView['kind']): boolean;
|
|
27
|
+
/** The three workflow ledger kinds */ export declare function isWorkflowKind(kind: FlowEventView['kind']): boolean;
|
|
31
28
|
/** One agent-flow event row: the log's 流转事件 partition (spec §5). */
|
|
32
29
|
export interface EventLogEventEntry {
|
|
33
30
|
/** Entry discriminator — this row is an agent-flow event. */
|
|
@@ -57,8 +54,7 @@ export interface EventLogEventEntry {
|
|
|
57
54
|
/** Workflow run id (workflow-* + unknown rows, when carried); '' otherwise. */
|
|
58
55
|
runId: string;
|
|
59
56
|
/**
|
|
60
|
-
* The workflow run's display name
|
|
61
|
-
* Task 4): the workflow-run row carries its own name; workflow-agent /
|
|
57
|
+
* The workflow run's display name : the workflow-run row carries its own name; workflow-agent /
|
|
62
58
|
* workflow-run-end rows resolve the run's name from the window's
|
|
63
59
|
* workflow-run row (same runId — honest, the ledger row itself carries no
|
|
64
60
|
* name); '' when not a workflow row or the run row is truncated out.
|
|
@@ -9,18 +9,16 @@
|
|
|
9
9
|
* Two strictly separated inputs (spec §3):
|
|
10
10
|
* - schema constants (`./schema.ts`) — the 5 iteration steps (PHASE_IDS), the
|
|
11
11
|
* 5 kanban buckets (PLAN_STATE_IDS — Blocked/unknown merged into
|
|
12
|
-
* `blocked-unknown
|
|
12
|
+
* `blocked-unknown`) and the
|
|
13
13
|
* expected role pipeline (EXPECTED_ROLE_FLOW), all client-side design
|
|
14
14
|
* knowledge;
|
|
15
15
|
* - catalog evidence — `iteration.gate.transition` lights the current step
|
|
16
|
-
* (steps before it become `done`
|
|
17
|
-
* Task 1, its forward target becomes `next`), `gate.ok/violations` become
|
|
16
|
+
* (steps before it become `done`, its forward target becomes `next`), `gate.ok/violations` become
|
|
18
17
|
* the PASS/FAIL verdict + count, and `state.plans[].status` rows fall into
|
|
19
18
|
* the exact-match kanban buckets. `iteration.compassStatus` (the steering
|
|
20
19
|
* compass frontmatter `status`, `'active' | 'locked'` — spec panel-f4 §2.3
|
|
21
20
|
* R9 / §5 D5) re-derives the current step during Phase 1: `'active'` WITH a
|
|
22
|
-
* `phase-2-execute` transition (compass and gate mutually consistent
|
|
23
|
-
* wave F-001) → Step 1 (iteration-start) is current with verdict 'unknown'
|
|
21
|
+
* `phase-2-execute` transition (compass and gate mutually consistent) → Step 1 (iteration-start) is current with verdict 'unknown'
|
|
24
22
|
* (Phase 1 has no gate evaluation → no PASS/FAIL badge) + next Step 2;
|
|
25
23
|
* `'active'` with a transition past Phase 2 (an inconsistent harness
|
|
26
24
|
* state), `'locked'`, or missing → the transition-driven logic below
|
|
@@ -40,26 +38,21 @@
|
|
|
40
38
|
* / truncated`, `agents` (entities + actual/supervise edges + executing/
|
|
41
39
|
* pending counts — spec §4).
|
|
42
40
|
*
|
|
43
|
-
* Agent-entity semantics (
|
|
44
|
-
* per-role aggregation refactor): entities aggregate by ROLE, not by session
|
|
41
|
+
* Agent-entity semantics (the per-role aggregation): entities aggregate by ROLE, not by session
|
|
45
42
|
* — a KNOWN_AGENTS roster role keys its own card (same role across sessions
|
|
46
43
|
* folds into one card ×N), and EVERY non-roster dispatch (`scout`,
|
|
47
44
|
* unregistered roles, anonymous `role === ''`) folds into the single
|
|
48
45
|
* `general` bucket entity (key `'general'`, role shown `'general'`). The
|
|
49
46
|
* legacy `unexpected` zone is GONE — stage-null non-on-demand entities now
|
|
50
|
-
* project `zone: 'general'`. Placement
|
|
51
|
-
* Task 1, user 2026-08-12): the projection only declares the zone — the
|
|
47
|
+
* project `zone: 'general'`. Placement: the projection only declares the zone — the
|
|
52
48
|
* RENDER places `zone: 'general'` entities in an unknown sub-partition at
|
|
53
|
-
* the bottom of the LAST column (
|
|
54
|
-
* 5, user 2026-08-12 feedback #3 — the standalone rightmost unknown column
|
|
49
|
+
* the bottom of the LAST column (the standalone rightmost unknown column
|
|
55
50
|
* is superseded: 4 columns total). The SDD loop back-edge (sdd-implement →
|
|
56
|
-
* general) stays REMOVED from the projection
|
|
57
|
-
* Task 1); the F5 supervise line is a SEPARATE sub-bucket edge
|
|
51
|
+
* general) stays REMOVED from the projection; the supervise line is a SEPARATE sub-bucket edge
|
|
58
52
|
* (`kind: 'supervise'`, see `superviseEdges`). The event-log `unexpected`
|
|
59
53
|
* badge is a SEPARATE, unchanged semantic (`expected` ⟺ role ∈
|
|
60
54
|
* EXPECTED_ROLE_FLOW union). The `sdd-implement` column is further split
|
|
61
|
-
* into implementor / reviewer SUB-BUCKETS (
|
|
62
|
-
* Task 1): every entity carries a projected `bucket` field ('implementor' /
|
|
55
|
+
* into implementor / reviewer SUB-BUCKETS: every entity carries a projected `bucket` field ('implementor' /
|
|
63
56
|
* 'reviewer' / null via SDD_BUCKET_ROLES — a layout dimension ORTHOGONAL to
|
|
64
57
|
* expectedness: on-demand roles keep their `unexpected` badge inside the
|
|
65
58
|
* implementor bucket).
|
|
@@ -74,12 +67,11 @@
|
|
|
74
67
|
* missing/unreadable → agents roster + `degraded` (full KNOWN_AGENTS idle
|
|
75
68
|
* cards, no executing/pending claims); 0 events → `empty` (idle roster +
|
|
76
69
|
* pending skeleton). `state.project` missing/malformed → the additive
|
|
77
|
-
* project rollup zone
|
|
70
|
+
* project rollup zone degrades to empty aggregates — the
|
|
78
71
|
* four existing ZoneView shapes are unaffected. `iteration.compassStatus`
|
|
79
72
|
* missing, non-union (old catalog rows / fixtures — the field is OPTIONAL,
|
|
80
73
|
* spec D5), or `'active'`
|
|
81
|
-
* with a transition past Phase 2 (an inconsistent harness state
|
|
82
|
-
* F-001) degrades to the existing transition-driven current-step logic
|
|
74
|
+
* with a transition past Phase 2 (an inconsistent harness state) degrades to the existing transition-driven current-step logic
|
|
83
75
|
* (Step 2→4) — backward compatible, `active` semantics unchanged.
|
|
84
76
|
*/
|
|
85
77
|
import type { MstarEngineStatusSource } from '../../../types.ts';
|
|
@@ -96,8 +88,8 @@ export interface GraphViolation {
|
|
|
96
88
|
export type FlowEventStatus = 'dispatched' | 'advisory' | 'denied' | 'ok' | 'error' | 'unknown';
|
|
97
89
|
/**
|
|
98
90
|
* One projected agent-flow event (spec agent-flow-catalog-graph §2.4 —
|
|
99
|
-
* unchanged by the zone refactor;
|
|
100
|
-
*
|
|
91
|
+
* unchanged by the zone refactor; the workflow-ledger source adds the
|
|
92
|
+
* workflow kinds + the unknown-kind degradation path). Every field
|
|
101
93
|
* degrades individually via `guards.ts` — a missing/illegal value becomes
|
|
102
94
|
* `null`/''/`0`/a base status, never a throw and never a guessed value.
|
|
103
95
|
* Dispatch/settle rows keep their gate semantics; the three WORKFLOW kinds
|
|
@@ -128,7 +120,7 @@ export interface FlowEventView {
|
|
|
128
120
|
} | null;
|
|
129
121
|
/** dispatch: has an EXACT-identity-paired settle (exact pairing; an unpaired settle stays unpaired — honest); settle: always false. */
|
|
130
122
|
settled: boolean;
|
|
131
|
-
/** Settle rows only
|
|
123
|
+
/** Settle rows only: the settle carries the PAIRED dispatch's identity (exact pairing). */
|
|
132
124
|
paired?: boolean;
|
|
133
125
|
durationMs: number | null;
|
|
134
126
|
/** Workflow run identity (workflow-* + unknown rows, when carried; absent otherwise). */
|
|
@@ -149,10 +141,9 @@ export interface FlowEventView {
|
|
|
149
141
|
readonly stopReason?: string;
|
|
150
142
|
}
|
|
151
143
|
/**
|
|
152
|
-
* One iteration step (spec §3
|
|
153
|
-
* Task 1): the PHASE_IDS skeleton with current/next/done/idle lit by
|
|
144
|
+
* One iteration step (spec §3): the PHASE_IDS skeleton with current/next/done/idle lit by
|
|
154
145
|
* `gate.transition` evidence — the CURRENT step, its forward target (`next`)
|
|
155
|
-
* and every step BEFORE it (`done` — completed:
|
|
146
|
+
* and every step BEFORE it (`done` — completed: a finished
|
|
156
147
|
* Step 1 must not read as idle「待命」 while Step 2 is current). The `step`
|
|
157
148
|
* number is 1-based (1..5). `verdict` is carried by the CURRENT step only.
|
|
158
149
|
*/
|
|
@@ -167,7 +158,7 @@ export interface IterationStepView {
|
|
|
167
158
|
verdict: PhaseVerdict;
|
|
168
159
|
}
|
|
169
160
|
/**
|
|
170
|
-
* One kanban column (spec §3
|
|
161
|
+
* One kanban column (spec §3): the
|
|
171
162
|
* PLAN_STATE_IDS skeleton with plan rows bucketed by status — `Blocked` and
|
|
172
163
|
* any non-matching status (the former `unknown` catch-all) both fold into the
|
|
173
164
|
* single `blocked-unknown` column. `count` is the FULL column count; `plans`
|
|
@@ -209,7 +200,7 @@ export interface AgentZoneStage {
|
|
|
209
200
|
evidenced: boolean;
|
|
210
201
|
}
|
|
211
202
|
/**
|
|
212
|
-
* One agent entity card (spec §4 + §6.2
|
|
203
|
+
* One agent entity card (spec §4 + §6.2):
|
|
213
204
|
* either a ROLE aggregated across its dispatch rows (count + latest ts;
|
|
214
205
|
* identity fields reflect the LATEST dispatch — the same dispatch that
|
|
215
206
|
* decides the status; `agent` / `task` are record fields, never the title)
|
|
@@ -222,7 +213,7 @@ export interface AgentEntityView {
|
|
|
222
213
|
/**
|
|
223
214
|
* THE ROLE id for lit cards (KNOWN_AGENTS membership — `general` for every
|
|
224
215
|
* non-roster dispatch); the KNOWN_AGENTS role id for idle cards. INVARIANT
|
|
225
|
-
* (spec §6.2
|
|
216
|
+
* (spec §6.2): keys are UNIQUE across the whole `entities` array —
|
|
226
217
|
* an evidence-derived `general` key suppresses the idle general twin in
|
|
227
218
|
* `idleEntities`, so the React `key` / `layoutAgents` `cards.set` never see
|
|
228
219
|
* duplicates.
|
|
@@ -250,22 +241,20 @@ export interface AgentEntityView {
|
|
|
250
241
|
phase: PhaseId;
|
|
251
242
|
stage: string;
|
|
252
243
|
} | null;
|
|
253
|
-
/** Column zone (
|
|
244
|
+
/** Column zone (projection-owned,
|
|
254
245
|
* the render NEVER heuristically guesses): 'flow' (stage columns), 'on-demand'
|
|
255
246
|
* (ops-engineer / prompt-engineer — implementor-sub-bucket dispatches with
|
|
256
|
-
* an on-demand badge; the standalone on-demand column is REMOVED
|
|
257
|
-
*
|
|
258
|
-
* the
|
|
259
|
-
* cards, from the KnownAgent `zone` for idle cards. */
|
|
247
|
+
* an on-demand badge; the standalone on-demand column is REMOVED) or
|
|
248
|
+
* 'general' (the general bucket — the rightmost unknown column). Derived
|
|
249
|
+
* from the role for lit cards, from the KnownAgent `zone` for idle cards. */
|
|
260
250
|
zone: AgentZone;
|
|
261
|
-
/** SDD sub-bucket (
|
|
262
|
-
* projection-derived, the render ONLY consumes it): role ∈
|
|
251
|
+
/** SDD sub-bucket (projection-derived, the render ONLY consumes it): role ∈
|
|
263
252
|
* SDD_BUCKET_ROLES.implementor → 'implementor' (incl. on-demand roles),
|
|
264
253
|
* role ∈ SDD_BUCKET_ROLES.reviewer → 'reviewer' (code-reviewer); every
|
|
265
254
|
* other role (qc/qa/review-edit-chain/general) → null. Same rule for idle
|
|
266
255
|
* cards (KNOWN_AGENTS id → SDD_BUCKET_ROLES lookup). */
|
|
267
256
|
bucket: AgentBucket | null;
|
|
268
|
-
/** Transparency tier (
|
|
257
|
+
/** Transparency tier (the
|
|
269
258
|
* TIME dimension, design doc §3): the iteration's current phase vs the
|
|
270
259
|
* entity's pipeline-stage phase — 'current' (chrome full-strength), 'next'
|
|
271
260
|
* (mid transparency), 'off' (low transparency — passed phases, on-demand /
|
|
@@ -275,13 +264,13 @@ export interface AgentEntityView {
|
|
|
275
264
|
* point and the running ring/glow NEVER fade (design doc §3.4 HARD). */
|
|
276
265
|
emphasis: AgentEmphasis;
|
|
277
266
|
}
|
|
278
|
-
/** The SDD sub-bucket a role belongs to within the `sdd-implement` column
|
|
279
|
-
*
|
|
267
|
+
/** The SDD sub-bucket a role belongs to within the `sdd-implement` column:
|
|
268
|
+
* 'implementor' | 'reviewer';
|
|
280
269
|
* roles in neither bucket project `null`. The bucket is a LAYOUT dimension,
|
|
281
270
|
* ORTHOGONAL to expectedness (SDD_BUCKET_ROLES vs EXPECTED_ROLE_FLOW — an
|
|
282
271
|
* on-demand role in the implementor bucket stays OUTSIDE the expected union). */
|
|
283
272
|
export type AgentBucket = 'implementor' | 'reviewer';
|
|
284
|
-
/** Transparency tier (
|
|
273
|
+
/** Transparency tier (design
|
|
285
274
|
* doc §3.1): the TIME dimension of an entity — the iteration's current phase
|
|
286
275
|
* vs the entity's pipeline-stage phase. 'current' → chrome full-strength,
|
|
287
276
|
* 'next' → mid transparency (expected but not yet), 'off' → low transparency
|
|
@@ -289,8 +278,7 @@ export type AgentBucket = 'implementor' | 'reviewer';
|
|
|
289
278
|
* no iteration/plan (NO override — the render keeps the idle status quo). */
|
|
290
279
|
export type AgentEmphasis = 'current' | 'next' | 'off' | null;
|
|
291
280
|
/**
|
|
292
|
-
* Entity status (spec §4, hardcoded priority
|
|
293
|
-
* 20260813-panel-quick-fixes Task 2): `denied` comes from the LATEST dispatch's
|
|
281
|
+
* Entity status (spec §4, hardcoded priority): `denied` comes from the LATEST dispatch's
|
|
294
282
|
* verdict (the only terminal verdict — settle-independent); `error`/`settled`
|
|
295
283
|
* come from the settle paired with that dispatch; `running` = no paired settle
|
|
296
284
|
* yet (exact identity pairing — an unpaired settle stays unpaired, honest);
|
|
@@ -303,23 +291,22 @@ export type AgentEmphasis = 'current' | 'next' | 'off' | null;
|
|
|
303
291
|
export type AgentEntityStatus = 'running' | 'settled' | 'error' | 'denied'
|
|
304
292
|
/** Retained for shape compat; the derivation (entityStatus) no longer emits it. */
|
|
305
293
|
| 'advisory' | 'idle';
|
|
306
|
-
/** Edge kinds (spec §4
|
|
307
|
-
* 2026-08-12 finalized line semantics, design doc §2.2): handoff / sub-bucket
|
|
294
|
+
/** Edge kinds (spec §4 — the finalized line semantics, design doc §2.2): handoff / sub-bucket
|
|
308
295
|
* supervision arrows. `expected` (stage skeleton) and `next` (running
|
|
309
296
|
* animation) are REMOVED — the column order implies the flow, the running
|
|
310
|
-
* card glow/status point carries the position
|
|
297
|
+
* card glow/status point carries the position. */
|
|
311
298
|
export type AgentEdgeKind = 'actual' | 'supervise';
|
|
312
299
|
/**
|
|
313
|
-
* One agents-zone arrow (spec §4
|
|
314
|
-
* 1 + plan 20260812-panel-f5-design-system Task 5):
|
|
300
|
+
* One agents-zone arrow (spec §4):
|
|
315
301
|
* - `actual`: same-plan handoff between ts-adjacent dispatch ENTITY keys
|
|
316
|
-
* (source/target = entity key — role-based
|
|
317
|
-
*
|
|
302
|
+
* (source/target = entity key — role-based). The line set filters
|
|
303
|
+
* general-bucket endpoints
|
|
318
304
|
* (a general handoff is noise, not a meaningful transfer) and keeps at most
|
|
319
305
|
* ONE edge per entity-key pair (the latest direction) — design doc §2.2;
|
|
320
306
|
* - `supervise`: ONE static sub-bucket line inside the `sdd-implement`
|
|
321
|
-
* column — implementor ↔ reviewer mutual supervision (mstar-sdd
|
|
322
|
-
* the render draws it as a bidirectional
|
|
307
|
+
* column — implementor ↔ reviewer mutual supervision (the mstar-sdd
|
|
308
|
+
* mutual-supervision contract; the render draws it as a bidirectional
|
|
309
|
+
* double arrow).
|
|
323
310
|
* source/target embed the column id as an anchor prefix:
|
|
324
311
|
* `<stage-id>:implementor` / `<stage-id>:reviewer`. NOT per-entity pairs —
|
|
325
312
|
* drawing per-role pairs would fabricate concrete supervision relations
|
|
@@ -333,17 +320,17 @@ export interface AgentEdge {
|
|
|
333
320
|
/** actual: entity key; supervise: `<stage-id>:implementor|reviewer`. */
|
|
334
321
|
source: string;
|
|
335
322
|
target: string;
|
|
336
|
-
/** Unused by the
|
|
323
|
+
/** Unused by the line edge set (the removed `next` arrow carried the
|
|
337
324
|
* running entity key); kept for shape stability — always null. */
|
|
338
325
|
entityKey: string | null;
|
|
339
|
-
/** Supervise edges only
|
|
326
|
+
/** Supervise edges only:
|
|
340
327
|
* evidence-driven lighting — true when any dispatch row's role belongs to
|
|
341
328
|
* an SDD sub-bucket (implementor ∪ reviewer), false otherwise (dim).
|
|
342
329
|
* Absent (undefined) for actual. */
|
|
343
330
|
evidenced?: boolean;
|
|
344
331
|
}
|
|
345
332
|
/**
|
|
346
|
-
* The canvas degradation-note classification (spec §8
|
|
333
|
+
* The canvas degradation-note classification (spec §8): the projection
|
|
347
334
|
* decides the note from the RAW ledger (never a UI-side heuristic on the
|
|
348
335
|
* entity list): `empty` = 0 events; `settle-only` = events present but NO
|
|
349
336
|
* dispatch row (all settle / garbage rows — genuinely no dispatch evidence);
|
|
@@ -369,7 +356,7 @@ export interface AgentZoneView {
|
|
|
369
356
|
degraded: boolean;
|
|
370
357
|
/** `state.agentFlow` present but 0 events (recording started at plan merge). */
|
|
371
358
|
empty: boolean;
|
|
372
|
-
/** The projected canvas note (spec §8
|
|
359
|
+
/** The projected canvas note (spec §8 — see `AgentZoneNote`). */
|
|
373
360
|
note: AgentZoneNote;
|
|
374
361
|
/** Evidence-derived dispatch entities ∪ idle KNOWN_AGENTS cards — the full roster is NEVER hidden (spec §6.2). */
|
|
375
362
|
entities: readonly AgentEntityView[];
|
|
@@ -380,9 +367,8 @@ export interface AgentZoneView {
|
|
|
380
367
|
/** Sum of expected roles of stages with no dispatch evidence — the summary "M 待执行". */
|
|
381
368
|
pending: number;
|
|
382
369
|
/** The FIRST `state.plans[]` row with status 'InProgress' (catalog order);
|
|
383
|
-
* null when no plan is in progress (plan
|
|
384
|
-
*
|
|
385
|
-
* feedback #2). Total function: state/plans missing or no InProgress row →
|
|
370
|
+
* null when no plan is in progress (the current-plan group annotation).
|
|
371
|
+
* Total function: state/plans missing or no InProgress row →
|
|
386
372
|
* null (never fabricated). */
|
|
387
373
|
activePlanId: string | null;
|
|
388
374
|
/** How many `state.plans[]` rows are InProgress (the render shows
|
|
@@ -391,9 +377,8 @@ export interface AgentZoneView {
|
|
|
391
377
|
activePlanCount: number;
|
|
392
378
|
}
|
|
393
379
|
/**
|
|
394
|
-
* The additive project rollup zone (
|
|
395
|
-
*
|
|
396
|
-
* residuals) renders without changing the four existing ZoneView shapes"):
|
|
380
|
+
* The additive project rollup zone: additive project rollup (roadmap +
|
|
381
|
+
* residuals) renders without changing the four existing ZoneView shapes —
|
|
397
382
|
* roadmap milestones + open-residual severity counts from the project layer
|
|
398
383
|
* (`state.project` — produced by the catalog from `projects/<id>/roadmap.md`
|
|
399
384
|
* frontmatter `milestones[]` + `projects/<id>/residuals.json` registers).
|
|
@@ -438,7 +423,7 @@ export interface ZoneView {
|
|
|
438
423
|
truncated: boolean;
|
|
439
424
|
};
|
|
440
425
|
agents: AgentZoneView;
|
|
441
|
-
/** The additive project rollup zone (
|
|
426
|
+
/** The additive project rollup zone (roadmap milestones +
|
|
442
427
|
* open residual severity counts from `state.project`; additive, the four
|
|
443
428
|
* existing ZoneView shapes stay byte-compatible). */
|
|
444
429
|
project: ProjectRollupZoneView;
|
|
@@ -461,8 +446,7 @@ export declare function projectGraph(source: MstarEngineStatusSource | null): Zo
|
|
|
461
446
|
* `projectAgents(source, currentStep): AgentZoneView` — the agents zone (spec
|
|
462
447
|
* §4 + §6.2). `currentStep` is the ITERATION's current step (1-based into
|
|
463
448
|
* PHASE_IDS, null when inactive — already computed by `projectGraph`, spec
|
|
464
|
-
* §3): it drives each entity's `emphasis` tier (
|
|
465
|
-
* 20260812-panel-f5-design-system Task 4 — design doc §3.3; `null` → every
|
|
449
|
+
* §3): it drives each entity's `emphasis` tier (design doc §3.3; `null` → every
|
|
466
450
|
* entity `emphasis: null`, no override).
|
|
467
451
|
* Total function: NEVER throws and NEVER fabricates values:
|
|
468
452
|
*
|
|
@@ -475,12 +459,11 @@ export declare function projectGraph(source: MstarEngineStatusSource | null): Zo
|
|
|
475
459
|
* - otherwise: entities aggregated from dispatch rows (with `idle: false`),
|
|
476
460
|
* statuses via the shared pairing walk, the un-evidenced KNOWN_AGENTS
|
|
477
461
|
* members appended as idle cards, actual/supervise edges (design doc §2.2 —
|
|
478
|
-
* the `expected` skeleton and `next` animation edges are REMOVED
|
|
479
|
-
* 20260812-panel-f5-design-system Task 5), and the
|
|
462
|
+
* the `expected` skeleton and `next` animation edges are REMOVED), and the
|
|
480
463
|
* executing (running entities — idle never counts) / pending
|
|
481
464
|
* (un-evidenced stage roles) counts.
|
|
482
465
|
*
|
|
483
|
-
* Entity-key invariant
|
|
466
|
+
* Entity-key invariant: the concatenated key space
|
|
484
467
|
* (evidence keys ∪ idle role ids) is UNIQUE by construction — `idleEntities`
|
|
485
468
|
* suppresses a known role's idle card when its id already exists as an
|
|
486
469
|
* evidence-derived entity key (a NON-roster dispatch produces a lit `general`
|
|
@@ -488,20 +471,18 @@ export declare function projectGraph(source: MstarEngineStatusSource | null): Zo
|
|
|
488
471
|
* suppressed via `litKeys`), so the render layer's `key`/`cards.set` never
|
|
489
472
|
* collide.
|
|
490
473
|
*
|
|
491
|
-
* Canvas note
|
|
474
|
+
* Canvas note: `note` classifies the readable ledger in
|
|
492
475
|
* the projection ('empty' / 'settle-only' / null — see `AgentZoneNote`); the
|
|
493
476
|
* UI consumes it directly and never infers settle-only from the entity list
|
|
494
477
|
* (garbage rows would fake it).
|
|
495
478
|
*
|
|
496
|
-
*
|
|
497
|
-
* 2026-08-12 feedback #2): `activePlanId` / `activePlanCount` ride the
|
|
479
|
+
* Current-plan note: `activePlanId` / `activePlanCount` ride the
|
|
498
480
|
* `state.plans[]` InProgress rows (catalog order) — the Phase 2 group label
|
|
499
481
|
* annotates the current plan; degraded/empty branches include the note too
|
|
500
482
|
* (it is a state.plans annotation, independent of the ledger evidence).
|
|
501
483
|
*/
|
|
502
484
|
export declare function projectAgents(source: MstarEngineStatusSource | null, currentStep: number | null): AgentZoneView;
|
|
503
|
-
/** One row of the pairing walk — the identity a PAIRED settle carries (
|
|
504
|
-
* `20260811-panel-f4-timeliness` Task 1, spec R1: exact identity pairing,
|
|
485
|
+
/** One row of the pairing walk — the identity a PAIRED settle carries (spec R1: exact identity pairing,
|
|
505
486
|
* never owner+time guessing). The kind is the FULL projected kind union:
|
|
506
487
|
* workflow/unknown rows are walk no-ops (they carry no paired marker) —
|
|
507
488
|
* widened so the classify output feeds the walk unchanged. */
|
|
@@ -528,8 +509,8 @@ export declare function pairSettleIndexes(rows: readonly PairingRow[]): Readonly
|
|
|
528
509
|
* NEVER throws, NEVER fabricates values.
|
|
529
510
|
*
|
|
530
511
|
* - events: the actual events, latest first, ≤50 — dispatch, settle, the
|
|
531
|
-
* three workflow kinds (run identity: name / member count / stopReason
|
|
532
|
-
*
|
|
512
|
+
* three workflow kinds (run identity: name / member count / stopReason)
|
|
513
|
+
* and ANY unknown kind string
|
|
533
514
|
* as a generic row (degradation — never dropped, never guessed);
|
|
534
515
|
* - unexpected: DISPATCH events whose role is not in the expected role union
|
|
535
516
|
* (e.g. `general` / `explore` / `scout`). Settle rows are completion
|