dsh-workflow-canvas 1.5.5 → 1.6.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/docs/DETAIL.md CHANGED
@@ -81,12 +81,16 @@ run), `cancel: true` (cleanly stop an active or paused `need-lead` run),
81
81
  failed/target segments plus downstream), and `clearMemory: true` (forget saved
82
82
  `keepSession` memories). While enabled, a per-session runtime context notifies
83
83
  the agent automatically. While running or paused at an intermediate Lead node,
84
- a unified red **`⏹ Stop`** button appears beside `● ON` and on the Entry Lead
85
- card to interrupt all running subagents, cancel the root turn, and clear any
84
+ a unified **`⏹ Stop`** button stays visible beside `● ON` (muted when idle, lighting up red alongside a compact `⏹` on the Entry Lead card while running or paused at an intermediate Lead) to interrupt all running subagents, cancel the root turn, and clear any
86
85
  Lead pause via `/canvas-stop`. Intermediate Lead nodes pause with
87
86
  `status: "need-lead"` and report `decisions` / `branchSkipped` / `failed` /
88
87
  `emptyOutputs` plus `session` handovers and merged `refs`; a terminal Lead
89
- completes directly with `status: "done"` and `finalLead`.
88
+ completes directly with `status: "done"` and `finalLead`. Once a run begins, a
89
+ compact bottom-left **Summary** pill (and `⋯ → 📊 Run summary`) displays live
90
+ elapsed time, per-node duration bars, fallback/session-continuation badges,
91
+ condition verdicts, and loop retry history with node focus, child-chat jump,
92
+ and Markdown copy — computed strictly from `.run.json` telemetry with zero
93
+ extra tokens.
90
94
 
91
95
  ## Memory
92
96
 
package/docs/MECHANISM.md CHANGED
@@ -122,8 +122,8 @@ The three link types are distinct runtime channels, not just visual colour codin
122
122
  ## 5. Live Status Pills & Click-to-Open Subagent Chats
123
123
 
124
124
  1. **Node tagging**: `spawnOnce` tags every spawned child with `label: "<node.label>#<node.id>"`.
125
- 2. **Catalog & run-state telemetry tracking**: While a turn runs (every 700ms, plus on mount and turn completion), the client reads `subagentCatalog` and `subagentTiming` from `sessions.list`, matching `/#([^\s#]+)$/` to map each child back to its canvas node (`running` takes strict priority over historical rounds) and latest `childId`, while also polling `<workspace>/.dsh/canvas/<sid>.run.json` for condition `decisions`, `pruned` nodes, `blockedEdges`, live retry counts (`loopCounts` / `nodeAttempts`), and `waitingLead`.
126
- 3. **Authoritative Lead `⏸ Ready` state & unified Stop**: Authoritative `.run.json` status takes precedence (`need-lead` highlights **`⏸ Ready`**; `halted` / `done` / `idle` never re-lock from historical subagent statuses), falling back to forward-edge heuristics only when `.run.json` is absent. Both running and awaiting-Lead states expose the unified **`⏹ Stop`** button.
125
+ 2. **Catalog & run-state telemetry tracking**: While a turn runs (every 700ms, plus on mount and turn completion), the client reads `subagentCatalog` and `subagentTiming` from `sessions.list`, matching `/#([^\s#]+)$/` to map each child back to its canvas node (`running` takes strict priority over historical rounds) and latest `childId`, while also polling `<workspace>/.dsh/canvas/<sid>.run.json` for condition `decisions`, `pruned` nodes, `blockedEdges`, live retry counts (`loopCounts` / `nodeAttempts`), `waitingLead`, and the zero-token `summary` payload (per-node timestamps/durations, fallback/session badges, loop history — never injected into model prompts).
126
+ 3. **Authoritative Lead `⏸ Ready` state, unified Stop & Run Summary**: Authoritative `.run.json` status takes precedence (`need-lead` highlights **`⏸ Ready`**; `halted` / `done` / `idle` never re-lock from historical subagent statuses), falling back to forward-edge heuristics only when `.run.json` is absent. The top-left **`⏹ Stop`** pill stays visible (muted when idle, red when active); once run telemetry exists, a bottom-left **Summary** pill (and `⋯ → 📊 Run summary`) renders the local timing/branch/loop breakdown with Markdown export.
127
127
  4. **Jump to live chat**: Clicking any subagent's bottom-left status pill (e.g. `Running ↗`, `Done ↗`) opens `dsh-resource://subagentchat/session/<childId>?parent=<sessionId>&mode=<mode>` via `sidebarRight.openResource(..., { kind: 'subagentchat', preferNewPane: true })`.
128
128
 
129
129
  ---
@@ -119,8 +119,8 @@ sequenceDiagram
119
119
  ## 5. 实时状态胶囊与点击直达子会话
120
120
 
121
121
  1. **节点反查标记**:`spawnOnce` 启动子代理时,固定把 `spec.label` 设为 `<节点名>#<nodeId>`。
122
- 2. **状态与遥测实时追踪**:客户端在对话运行期间每 700ms(以及挂载与每轮结束时)读取 `sessions.list` 投影中的 `subagentCatalog` 与 `subagentTiming`,用末尾正则 `/#([^\s#]+)$/` 精准反查子代理状态(`running` 具最高优先级,避免多轮重试被历史记录覆盖)与 `childId`;同时轮询 Host 写入的 `<workspace>/.dsh/canvas/<sid>.run.json` 获取条件判决(`decisions`)、剪枝集(`pruned`)、阻断边(`blockedEdges`)、回环实时轮次(`loopCounts` / `nodeAttempts`)与待拍板状态(`waitingLead`)。
123
- 3. **Lead「待拍板」权威状态与统一终止**:优先以 `.run.json` 报告的权威状态为准(`need-lead` 高亮 **`⏸ 待拍板`**,`halted` / `done` / `idle` 绝不误回弹锁死),仅在缺失 `.run.json` 时回退到前向边启发式推导;运行中或待拍板时均显示 **`⏹ 终止`** 按钮。
122
+ 2. **状态与遥测实时追踪**:客户端在对话运行期间每 700ms(以及挂载与每轮结束时)读取 `sessions.list` 投影中的 `subagentCatalog` 与 `subagentTiming`,用末尾正则 `/#([^\s#]+)$/` 精准反查子代理状态(`running` 具最高优先级,避免多轮重试被历史记录覆盖)与 `childId`;同时轮询 Host 写入的 `<workspace>/.dsh/canvas/<sid>.run.json` 获取条件判决(`decisions`)、剪枝集(`pruned`)、阻断边(`blockedEdges`)、回环实时轮次(`loopCounts` / `nodeAttempts`)、待拍板状态(`waitingLead`)以及零 Token 复盘快照(`summary`:各节点耗时、回退/续接标记与回环历史,绝不注入模型上下文)。
123
+ 3. **Lead「待拍板」权威状态、统一终止与执行复盘**:优先以 `.run.json` 报告的权威状态为准(`need-lead` 高亮 **`⏸ 待拍板`**,`halted` / `done` / `idle` 绝不误回弹锁死),仅在缺失 `.run.json` 时回退到前向边启发式推导;左上角 **`⏹ 终止`** 按钮常态可见(空闲灰标、运行或待拍板亮红);存在运行遥测时,左下角同步出现 **复盘** 胶囊(及 `⋯ → 📊 执行复盘`)展示本地统计与一键导出 Markdown。
124
124
  4. **一键直达真实子对话**:点击任意子代理节点左下角状态胶囊(如 `进行中 ↗` / `已完成 ↗`),客户端调用 `sidebarRight.openResource('dsh-resource://subagentchat/session/<childId>?parent=<sessionId>&mode=<mode>', { kind: 'subagentchat', preferNewPane: true })`,直接在新侧边窗格打开该子代理的真实对话记录。
125
125
 
126
126
  ---