Repository navigation
Releases
v1.7.4
中文更新说明
本次 v1.7.4 聚焦侧栏画布的宿主语言自动跟随与交互细节打磨:
新特性与体验优化
- 自动跟随 DSH 宿主语言(三态切换):默认通过
ctx.get('locale')/locale/change自动跟随 DSH 客户端语言(零新增dsh.client.inject依赖,兼容旧版宿主,并回退至<html lang>/navigator.language);⋯菜单支持跟随 DSH (中文/EN)→中文→EN三态循环,并通过同窗口事件实时同步至所有已挂载会话。 - 预设菜单升级:
- 自定义预设达到 4 个及以上时自动显示搜索框,支持按预设名、示例名及内部节点名实时过滤;
- 内置示例模板支持一键折叠/展开(记住折叠偏好,右侧统一
▾图标,搜索时自动展开); - 固定预设菜单宽度为
272px并移除冗余手动刷新按钮,搜索或折叠不再引起宽度抖动; - 统一精简 5 个内置示例模板的中英文命名(
主题:三步核心流),在菜单内完整显示不再截断。
- 全新三标签使用说明 & 放大弹窗:
- 将原先的长文本使用说明重构为
🚀 快速上手/🔗 节点与连线/⌨ 快捷键与技巧三个清晰标签页,补充框选/Shift 多选、复制/删除等操作说明,并支持一键直达快捷键设置; - 放大使用说明与快捷键设置弹窗及字号,阅读更轻松。
- 将原先的长文本使用说明重构为
- 工具栏与悬浮条视觉微调:
- 对齐插件顶栏底部分割线与 DSH 主对话
对话 | 轨迹分割线; - 固定
⋯设置菜单宽高及开关胶囊最小宽度(58px),切换中英文或ON/OFF时零抖动; - 将同步/操作提示移至
⏹ 终止按钮右侧作为纯临时悬浮胶囊(3.2 秒后自动消失,pointer-events: none不挡画布操作),中英文长通知均完整显示不截断; - 修复节点卡片顶部彩色色条在放大视图下的圆角贴合瑕疵(改用全高内圆角裁切容器匹配 1px/1.5px/2px 边框内弧)。
- 对齐插件顶栏底部分割线与 DSH 主对话
English Release Notes
v1.7.4 focuses on DSH host locale auto-follow and sidebar UI/UX polish:
Highlights
- Automatic DSH Locale Following (3-State Toggle): Follows the DSH client language automatically via optional
ctx.get('locale')/locale/change(no new harddsh.client.injectrequirement, with<html lang>andnavigator.languagefallbacks). The⋯menu cycles throughFollow DSH (ZH/EN)→中文→ENand syncs across all mounted sessions via a same-window event. - Presets Menu Polish:
- Live search bar appears automatically once you have 4+ saved presets, filtering by preset name, starter template name, or inner node labels;
- Collapsible Starter Templates section (persisted preference, right-aligned
▾caret, auto-expanded while searching); - Fixed
272pxmenu width and removed redundant manual refresh button so typing or collapsing never jitters the menu width; - Unified, concise bilingual names for all 5 starter templates so none truncate in the dropdown.
- Redesigned 3-Tab Help & Larger Modals:
- Replaced the long help text wall with 3 visual tabs (
🚀 Quick Start,🔗 Nodes & Links,⌨ Shortcuts & Tips), documenting box-select / Shift multi-select, duplicate/delete, and linking directly to shortcut settings; - Enlarged Help and Shortcuts modals and typography for better readability.
- Replaced the long help text wall with 3 visual tabs (
- Toolbar & Floating Pill Refinement:
- Aligned the canvas toolbar's bottom divider with DSH's
Chat | Traceheader divider; - Locked
⋯menu dimensions and toggle pillminWidth(58px) for zero width/height jitter when switching languages or togglingON/OFF; - Moved action/sync feedback out of the top toolbar into a pure temporary floating toast pill beside
⏹ Stop(auto-dismisses after 3.2s,pointer-events: none), displaying long Chinese and English notices in full without truncation; - Fixed subpixel corner clipping on node top accent bars when zoomed in by clipping the bar inside an inner border-radius container matched to 1px/1.5px/2px card borders.
- Aligned the canvas toolbar's bottom divider with DSH's
v1.7.3 — Paused-Lead Hot-Edit Preservation
中文更新说明
✨ 核心新特性
- Lead 暂停态热改下游(Paused-Lead Hot-Edit):当工作流暂停在中间 Lead 节点(
⏸ 待拍板)时,可以直接在侧边栏修改/增删下游节点、提示词、模型、连线、条件分支/回环或注释,或让 AI 调用canvas_patch原地调整下游——后端通过reconcilePausedLeadState自动保留已完成上游节点的缓存结果与等待拍板状态,恢复执行时立即按新下游拓扑运行,无需从头重跑。 - 暂停态智能失效保护:若在暂停期间修改了已完成上游节点的配置/输入边、修改或清空了入口总任务、修改了全局参考
refs、切换了预设、删除了待拍板 Lead、给待拍板 Lead 新增了未执行前置依赖,或将回环上限调低于已用次数,系统会自动回退到idle并拒绝误用旧的leadResult跳过审核;canvas_patch也会明确返回preservedPausedLead/resetPausedLead状态提示。 - 前端暂停态同步体验升级:放开
need-lead状态下有未同步改动时的自动同步,同步后自动保留上游已完成绿标并主动唤醒.run.json状态对齐。
🛠 稳定性与质检修复
- 修复
.run.json转为权威status: "idle"时前端误清为null导致旧上游状态将 Lead 重新锁成⏸ 待拍板的问题。 - 修复条件汇聚菱形图(
C → A/B → Lead)在暂停态热改下游时被误判为存在未执行前置依赖的问题,并统一复用共享的computePrunedIds剪枝算法。 - 修复热改新增更靠前的并行 Lead 时可能抢占原
waitingLead的leadResult、失败条件节点新增出边未阻塞、删除回环边后残留loopFeedback/nodeAttempts、canvas_patch回写清空上游已完成绿标及远端预设名不同步等边界问题。 - 加固 Cordis
commands子作用域下resolveService对.get()的安全解析,并为canvas_generate/canvas_patch补齐运行中防并发修改守卫与单调递增.run.json时间戳。
English Release Notes
✨ Highlights
- Paused-Lead Hot-Edit Preservation: While a workflow is paused at an intermediate Lead node (
⏸ Ready), you can now edit, add, or rewire downstream nodes, prompts, models, edges, condition branches/loops, or comments — either directly in the sidebar or viacanvas_patch. Completed upstream outputs andwaitingLeadstay preserved viareconcilePausedLeadState, and your updated downstream applies immediately on resume. - Safe Invalidation Guards: Editing a completed upstream node or its inputs, changing/clearing the entry
task, modifying globalrefs, switching presets, deleting the waiting Lead, wiring a new unexecuted dependency into the waiting Lead, or lowering a loop'smaxIterationsbelow its used count cleanly resets toidleand rejects staleleadResultcalls instead of silently bypassing review.canvas_patchexplicitly reportspreservedPausedLead/resetPausedLead. - Smoother Client Sync While Paused: Turn-start auto-sync now runs safely for dirty edits during
need-lead, preserves completed upstreamDonebadges acrosscanvas_patchmerges, and immediately wakes.run.jsonpolling to reflect authoritative host state.
🛠 Reliability & Audit Fixes
- Fixed authoritative
.run.jsonstatus: "idle"being erased tonullon the client, which could previously re-lock the UI into⏸ Awaiting Leadfrom historical subagent statuses. - Fixed false invalidation on conditional diamond graphs converging into a paused Lead (
C → A/B → Lead) and unified branch pruning onto a single sharedcomputePrunedIdshelper. - Fixed parallel Lead insertion stealing
leadResultfrom the activewaitingLead, unblocked new outgoing edges off failed condition judges, staleloopFeedback/nodeAttemptsafter deleting a loop edge, and remotepresetNamesync drift. - Hardened Cordis
resolveServiceto rely strictly on.get(name)on Cordis contexts, added active-run guards tocanvas_generate/canvas_patch, and made.run.jsontimestamps monotonic.
v1.7.2 — Stabilization, Template Parity & Sharper Agent Skill
中文更新说明
本次 v1.7.2 为稳定期加固与一致性维护版(零新功能膨胀),聚焦修复前后端隐性漂移、明确回环×记忆边界语义,以及提纯 AI 技能提示与文档体验。
修复与加固
- 修复前后端内置模板漂移(
lib/presets.js↔client.js):将canvas_preset后端 5 套内置模板(tpl-swe、tpl-prd、tpl-ab、tpl-cond、tpl-loop)与侧边栏 UI 逐节点、逐连线完全对齐(补齐tpl-prd10 节点/13 边、tpl-swe缺失的session-ref紫线与structured连线、tpl-loop的refs与keepSession等),确保 AI 切换模板与手点侧边栏完全一致。 - 修复并定稿「记忆钉选
memoryChildId× 回环重试」语义:首轮进入钉选/记忆会话;若首轮健康完成,重试轮复用同一热会话发送增量修正;若首轮崩溃、空输出或热会话被拒绝,该重试轮跳过memoryChildId/keepSession改开干净新会话重做,不再陷回损坏上下文。 - 修复前端
normalizeRefsUI漂移:与后端lib/graph.js:normalizeRefs对齐,兼容{ path } / { text }对象条目。
Agent 提示与文档优化
- 精简并补强
skills/workflow-canvas/SKILL.md与SKILL_DESCRIPTION:补齐注释 / annotate触发词,压缩冗长的剪枝状态机规格描述,新增 4 行故障恢复速查表(need-lead/retryFailed/fromNodes/reset),并在npm run check加入自动一致性门禁(14/14)。 - README 首屏瘦身 & 架构文档同步:将中英文 README 中高密度的无效节点/无出边规格说明引流至
docs/MECHANISM*.md,同步更新 5 个canvas_*工具、注释同步与常驻灰色复盘胶囊说明。 - 公共仓库清理:将维护者私人发版规则与本地审查技能移至本地
.gitignore,公共AGENTS.md仅保留面向所有贡献者的架构与不变量规范。
测试与工程质量
- 测试套件模块化拆分:按职责拆分为
executor/loops/tools/parity/client5 个并行测试文件 +helpers.mjs,总计 119/119 全部通过(新增前后端全量共享逻辑与 5 套内置模板对拍,以及 7 组高危交互竞态矩阵测试)。 npm run check:14/14 全部通过(打包体积 200.7 KB)。
English Release Notes
v1.7.2 is a stabilization & consistency hardening release (no feature bloat), fixing subtle client/backend drifts, finalizing loop × pinned-memory retry semantics, and streamlining agent skill prompts and documentation.
Fixes & Hardening
- Built-in Starter Template Parity (
lib/presets.js↔client.js): Aligned all 5 backend built-in templates (tpl-swe,tpl-prd,tpl-ab,tpl-cond,tpl-loop) node-for-node and edge-for-edge with the sidebar UI socanvas_preset({ action: "apply" })always produces the exact same graph as clicking a template in the sidebar. - Pinned Memory (
memoryChildId) × Loop Retry Semantics: Documented and enforced exact priority — Round 1 enters the pinned/saved memory session; healthy Round 1 continues that warm session with incremental feedback; if Round 1 crashes, returns empty, or is refused, the retry round intentionally skipsmemoryChildId/keepSessionand opens a clean fresh session instead of looping inside a broken context. - Client
normalizeRefsUIParity: Aligned withlib/graph.js:normalizeRefsto accept{ path }/{ text }object items consistently.
Agent Skill & Docs Polish
- Sharper
skills/workflow-canvas/SKILL.md&SKILL_DESCRIPTION: Added annotation/comment trigger keywords, trimmed dense pruning specs for cleaner model attention, added a 4-row Recovery cheat sheet (need-lead,retryFailed,fromNodes,reset), and enforced strictSKILL_DESCRIPTIONparity innpm run check(14/14). - Leaner READMEs & Updated Architecture Docs: Moved dense inactive-node / missing-link state-machine specs out of
README.md/README.zh.mdintodocs/MECHANISM*.md, updated tool counts (all 5canvas_*tools), comment sync notes, and always-visible muted Run Summary pill descriptions. - Public Repo Hygiene: Separated local maintainer release rules into gitignored local config while keeping
AGENTS.mdfocused on public contributor invariants.
Testing & Verification
- Modular Test Suites: Split tests into
executor,loops,tools,parity, andclientsuites + sharedhelpers.mjs— 119/119 tests passing, including full client/backend shared-helper & 5-template parity plus 7 interaction/race matrix tests. npm run check: 14/14 passed (200.7 KB packed tarball).
v1.7.1 — Live Loop Round Progress & Muted Run Summary Pill
中文更新说明
感谢 @youli42 提出 #17 的改进建议!本次 v1.7.1 聚焦受控回环实时轮次进度与执行复盘入口常驻体验。
新特性与改进
- 回环实时轮次与四端口径统一(#17)
- 第 1 轮即时可见:运行进入第 1 轮起,回环胶囊即由
↺ ×N切换为↺ 0/N,环内节点角标同步展示紧凑↺ 0/N,悬停双口径提示「当前第 R/T 轮(已重试 k/N 次)」。 - 触达上限熔断高亮:达到最大重试次数时胶囊红底显示
↺ 已用尽 N/N,节点角标红底显示↺ N/N!,触发全局 20 次安全上限时悬停文案同步说明。 - 终态保留与未进入区分:手动
⏹ 停止(/canvas-stop)、完成或熔断后均保留最终轮次与重试次数(不再清零回弹);被上游条件剪枝或提前中止而从未进入的回环明确标记为「未执行」而非误报第 1 轮;终态后若用户手动调整回环上限,胶囊立即切回新的↺ ×N。 - 四端完全一致:回环胶囊、节点角标、执行复盘弹窗 & Markdown 导出,以及
canvas_workflow返回体loops与工具渲染文本保持统一口径,且完全兼容空闲画布与旧版.run.json。
- 第 1 轮即时可见:运行进入第 1 轮起,回环胶囊即由
- 执行复盘胶囊常驻可见:画布左下角
📊 执行复盘胶囊在尚未运行过画布时也保持可见(呈灰色低对比态,点击可查看说明),运行开始后自动亮起并实时计时。 - 文档致谢:在中英文 README 底部新增「致谢 / Acknowledgements」小节。
质量保障
npm run check13/13 全部通过(语法、278 个中英 I18N 键零冗余、121 个样式键零冗余、46 条本地文档链接有效)npm test113/113 全部通过
English Release Notes
Special thanks to @youli42 for proposing #17! v1.7.1 brings live loop round progress across all four surfaces and an always-visible Run Summary pill.
Highlights
- Unified Live Loop Round Progress (#17)
- Visible from Round 1: As soon as a loop enters Round 1 (before any retry fires), the bypass pill switches from
↺ ×Nto↺ 0/Nand member corner badges show compact↺ 0/N, with dual-metric tooltips (Round R/T (k/N retries)). - Explicit Exhaustion Highlight: Circuit-broken loops highlight in red with
↺ Exhausted N/Non the pill and↺ N/N!on member corner badges (noting the global 20-retry cap when applicable). - Terminal Retention & Unentered Semantics: Stopping (
⏹ Stop//canvas-stop), completing, or exhausting a run preserves final loop counts instead of resetting them; pruned/unentered loops honestly reportNot entered(round: 0) rather than claiming Round 1; editingmaxIterationsafter a terminal run immediately updates the pill back to↺ ×N. - 4-Surface Consistency: Loop pills, member corner badges, Run Summary modal & Markdown export, and
canvas_workflowloopspayload & rendered tool output share one unified contract while staying backward-compatible with idle canvases and legacy.run.jsonfiles.
- Visible from Round 1: As soon as a loop enters Round 1 (before any retry fires), the bypass pill switches from
- Always-Visible Run Summary Pill: The bottom-left
📊 Summarypill now stays visible in a muted gray state before the first run (lighting up live once execution starts). - Acknowledgements: Added an Acknowledgements section in both
README.zh.mdandREADME.md.
Verification
npm run check: 13/13 passednpm test: 113/113 passed
v1.7.0
中文更新说明
新增功能
- 画布注释框与独立便签(#15):
- 零工具栏占位入口:框选节点按
C(或右键「💬 用注释框分组」)一键创建分组注释框;空白处按C、右键「💬 添加注释」或Shift+A → 4创建独立便签(快捷键可在⋯ → 快捷键设置自定义)。 - 实时几何成员判定:拖动注释标题栏自动连带框内所有节点同步移动,按住
Alt拖动仅移动注释框;主体区域pointer-events: none不阻挡框选和右键划断连线;删除注释框仅删框、保留节点。 - 窗口式三边 + 四角缩放 & 缩放可读性:支持左/右/底三边及全部四角自由缩放;提供 6 种明暗主题自适应配色、小/中/大 3 档字号、
120 / 4000字数统计,以及画布缩小时标题按内容长度自适应放大(无缝对齐底框且不遮挡框内节点,📝浮层同步反比例放大)。 - 自动排版联动 & 全链路持久化:执行自动排版或切换横/竖排时自动围绕原框内节点重套分组框(独立便签原地不动);完整接入
localStorage、撤销/重做、全览居中(fitView)、自定义预设与 JSON 导入导出。
- 零工具栏占位入口:框选节点按
- AI 感知与语义读写注释:
/canvas-sync与canvas_inspect同步并展示注释列表及其当前包裹的nodeIds;canvas_generate与canvas_patch支持按语义nodeIds新增、原地更新(保留手动框尺寸与位置)和删除注释(removeComments),不污染执行plan且不消耗子代理执行 Token。
体验优化
- 节点标题「轻点改名 + 按住拖动」:非入口节点标题统一采用
4px拖拽阈值——轻点松手进入聚焦改名(带中文输入法防误触),按住拖动可直接移动节点或多选整组,Shift/Ctrl点标题做多选不再误弹输入框。
English Release Notes
New Features
- Comment Frames & Standalone Notes (#15):
- Zero toolbar clutter: Press
Cwith nodes selected (or right-click💬 Group with comment) to wrap them in a real-time geometric comment frame; pressCon blank canvas, right-click💬 Add comment, or useShift+A → 4to create a standalone note (rebindable under⋯ → ⌨ Shortcuts). - Real-time geometric membership: Drag a comment header to move all nodes currently inside together (hold
Altto move only the box); frame body stays click-through (pointer-events: none) so marquee selection and right-drag link cutting work naturally; deleting a comment never deletes nodes inside. - Window-style 3-edge + 4-corner resizing & zoomed-out readability: Resize from left/right/bottom edges or any of the 4 corners; customize 6 theme-safe colors, S / M / L font sizes, live
120 / 4000character counters, and adaptive zoomed-out title scaling (seamlessly aligned to the body frame without overlapping nodes inside; the📝style/note popover scales cleanly too). - Auto-layout refit & full persistence: Group frames automatically refit around their contained nodes on Auto layout and Horiz / Vert flips (standalone notes stay put); fully persisted in
localStorage, Undo/Redo, Fit View, custom presets, and JSON import/export.
- Zero toolbar clutter: Press
- AI-Aware & AI-Editable Comments:
/canvas-syncandcanvas_inspectexpose comments and their wrappednodeIdson demand;canvas_generateandcanvas_patchsupport creating, updating in place (preserving manual geometry), and removing (removeComments) comments semantically vianodeIdswith zero subagent execution tokens.
UX Improvements
- Click-to-rename + drag-to-move on node titles: Non-entry node titles now use a
4pxdrag threshold — click to rename inline (with CJK IME protection), press-and-drag directly on the title to move the node or multi-selection, andShift/Ctrl-click titles cleanly without accidentally focusing an input.
v1.6.3
中文更新说明
新功能(Closes #14)
- 允许 AI 查看、切换流程预设与启停画布(新增
canvas_preset工具)action: "list":返回当前画布状态(启停状态、当前预设名、节点概览、运行/待拍板态)以及全部跨会话用户预设与 5 个内置示例模板(tpl-swe、tpl-prd、tpl-ab、tpl-cond、tpl-loop);画布禁用时同样可调用。action: "apply":支持按用户预设名、模板 ID 或唯一关键词切换画布(用户预设优先,多命中时列出候选项防止误切),支持顺带覆盖入口task与可选enabled,并自动同步到右侧画布;运行中或待拍板时自动拦截保护。action: "toggle":原地启用或禁用当前会话画布,不改动任何节点位置、布局或撤销栈。- 主对话不匹配纠偏:
buildActiveCanvasContext与canvas_inspect展示当前预设名称;若已启用工作流与本轮任务明显不符,提示 AI 先确认后再切换或停用,不再盲目执行错误流程。 - 无感跨会话预设同步:前端
/canvas-sync顺带同步用户自定义预设库与当前预设名并持久化至.workflow-canvas-state.json(不产生额外命令刷屏)。
优化与修复
- 全插件工具 Schema 统一瘦身(新增工具后常驻 Token 反而更低)
- 对
canvas_generate、canvas_patch、canvas_inspect、canvas_preset、canvas_workflow与SKILL_DESCRIPTION全面精简描述(保留所有参数、枚举与核心规则,长篇文档留在按需加载的SKILL.md),5 个工具定义总体积缩减约 35%(每轮对话净省数百 Token);预设超过 20 个时list自动切换紧凑摘要模式。
- 对
- 画布切换排版与状态细节修复
- 修复横排(
lr)模式下通过canvas_preset加载无坐标内置模板时未自动分层排版的问题;内置模板现在尊重用户当前横/竖排方向,自定义预设恢复其保存的方向。 - 修复点击「✕ 清空画布」后未重置当前预设名(
activePresetRef)的问题。
- 修复横排(
验证
npm run check:13/13 全部通过(含新增lib/presets.js)npm test:109/109 全部通过
English Release Notes
New Features (Closes #14)
- AI Workflow Preset Switching & Enable/Disable (
canvas_presettool)action: "list": Returns current canvas status (enabled state, active preset name, node summary, running/paused flags), synced user presets, and all 5 built-in starter templates (tpl-swe,tpl-prd,tpl-ab,tpl-cond,tpl-loop) — usable even when the canvas is disabled.action: "apply": Switches the current session canvas to a user preset or built-in template by exact name, template id, or unique partial match (lists candidates on ambiguity; supports optionaltaskoverride &enabledflag; blocks while a run is active or paused at a Lead gate).action: "toggle": Enables or disables the current session canvas in place without altering node positions, layout, or undo history.- Mismatch Awareness:
buildActiveCanvasContextandcanvas_inspectnow expose the active preset name and remind the agent to check with the user before running a mismatched workflow. - Zero-Noise Preset Sync: User presets and active preset name piggyback on
/canvas-syncand persist globally in.workflow-canvas-state.jsonacross sessions.
Optimizations & Fixes
- Plugin-Wide Tool Schema Diet (Lower Per-Turn Token Cost Than v1.6.2)
- Trimmed verbose descriptions across all 5 tools (
canvas_generate,canvas_patch,canvas_inspect,canvas_preset,canvas_workflow) andSKILL_DESCRIPTIONwhile keeping every parameter, enum, and invariant intact (~35% smaller total tool definitions; compactlistoutput when >20 user presets exist).
- Trimmed verbose descriptions across all 5 tools (
- Layout & State Polish
- Auto-layout now runs in both horizontal (
lr) and vertical (tb) modes whenever an imported or AI-applied canvas lacks node coordinates; built-in templates respect the user's currentlr/tbpreference while saved user presets restore their saved direction. - Clearing the canvas now properly resets the tracked active preset name.
- Auto-layout now runs in both horizontal (
Verification
npm run check: 13/13 passed (including newlib/presets.js)npm test: 109/109 passed
v1.6.2
中文更新说明
核心修复与体验优化
- 输入口磁吸连线(两段式引导线)
- 拖拽输出连线靠近目标输入口时,自动在缩放自适应半径内(100% 缩放
23px~ 缩小上限36px)触发磁吸;横排(lr)与竖排(tb)均生效。 - 预览线保留真实鼠标落点(输出 ┄┄ 鼠标 ── 输入 两段式引导),目标输入口轻柔放大
1.18×并点亮2px同色光晕;松手按实时坐标直接建连,快速甩手不漏连。
- 拖拽输出连线靠近目标输入口时,自动在缩放自适应半径内(100% 缩放
- 节点有效性与「无出边」提示重构
- 将结构警告(
noOutgoing)与执行排除(deadEnds)解耦:合法终端子代理保持正常亮度(opacity: 1)+ 虚线黄框 + 黄色⚠ 无出边徽章并正常参与执行;仅真正被跳过或被条件剪枝的节点变暗(opacity: 0.65)。 - 空分工且无有效子代理直接输入的串联 Lead 成为路径屏障,阻断无效后代并保留独立有效路径;悬空分支与纯回环孤岛剥叶至不动点(
BigInt祖先位集,支持任意数量 Lead)。 - 黄色警告胶囊同步显示运行状态(进行中 / 失败 / 已跳过),有历史子会话时可点击直达(附
↗箭头)。
- 将结构警告(
- 执行前有效图与回环一致性校验
- 前后端均先校验原图前向环,再过滤无效节点;跨越无效节点、起点非条件节点或交叉重叠的受控回环会明确报错,不再静默裁掉。
- 运行期依赖、条件剪枝、回退路径与回环处理统一使用过滤后的有效图,杜绝被条件拒绝的分支借道空 Lead 偷跑。
- DSH 0.2.2 宿主契约对齐与并发安全加固
- 对齐 DSH
0.2.2-rc.5源码契约:remote.workspaceFiles.stat使用不透明version令牌并在异常时安全降级read、[data-dockkit-content]第 0 帧精准可见性、Agent.status === 'running'中止检测、subagentchat合法mode: 'continuable'及 Cordisscope.get()安全取值。 - 强化可写
standard节点防重复执行:structured节点 1-shot JSON 救援、noSchema仅限只读节点且跳过max-tokens/refusal、session-ref冷启动单次降级;修复晚到子代理立即中断、/canvas-sync保留暂停中 Lead、中文二元条件兜底、多{...}文本/剪贴板提取、Windows 保留文件名消毒及 3 处输入框 IME 守卫。
- 对齐 DSH
验证
npm run check:12/12 全部通过npm test:108/108 全部通过- 隔离
npm pack解包 ESM + Client VM 冒烟通过(16 个文件,171.9 KB)
English Release Notes
Highlights & Fixes
- Magnetic Input-Socket Snapping (Two-Segment Tether)
- Dragging an outgoing wire near an input socket now snaps within a zoom-aware radius (
23pxat 100%, up to36pxwhen zoomed out) in both horizontal (lr) and vertical (tb) layouts. - Keeps the main dashed wire anchored to the real cursor and renders a crisp second solid tether to the target input (
output ┄┄ cursor ── input), paired with a subtle1.18×socket scale and2pxring; releasing uses livemouseupcoordinates so fast flicks never miss.
- Dragging an outgoing wire near an input socket now snaps within a zoom-aware radius (
- Node Classification & No-Outgoing-Link Indicators
- Separated structural warnings (
noOutgoing) from execution exclusions (deadEnds): legal terminal agents keep full brightness (opacity: 1) with a dashed warning border and yellow⚠ No out-linkbadge while still executing normally; only truly skipped or pruned nodes dim (opacity: 0.65). - Blank-role solo Leads act as reachability barriers while preserving independent active paths; dangling chains and loop-only dead islands peel to a fixed point using
BigIntLead-ancestry bitsets. - The yellow warning badge surfaces live/pruned runtime states and stays clickable (
↗) when a historical child session exists.
- Separated structural warnings (
- Effective-Graph & Loop Validation Parity
- Both frontend
buildPlanand backendexecutePlanvalidate raw forward cycles before filtering, reject loops crossing inactive nodes / non-condition sources / overlapping bodies instead of silently dropping them, and run condition pruning/fallback strictly on the effective graph.
- Both frontend
- DSH 0.2.2 Host Contract Alignment & Concurrency Hardening
- Aligned with source-verified DSH
0.2.2-rc.5contracts:workspaceFiles.statopaqueversiontoken with gracefulreadfallback, frame-0[data-dockkit-content]visibility pausing,Agent.status === 'running'root cancellation, validsubagentchatmode: 'continuable', and safescope.get()service resolution. - Prevented unintended re-runs on writable
standardnodes (structured1-shot JSON rescue, read-only-onlynoSchemaretry, single-runsession-refcold fallback), fixed late-activation abort cleanup, preserved pausedwaitingLeadon identical/canvas-sync, fixed CJK binary condition fallback, balanced multi-{...}JSON/clipboard extraction, Windows reserved device name sanitization, and CJK IME guards.
- Aligned with source-verified DSH
Verification
npm run check: 12/12 passednpm test: 108/108 passed- Isolated
npm packESM + Client VM smoke test passed (16 files, 171.9 KB packed)
v1.6.1 — Performance, Robustness & DSH 0.2.2 Alignment
中文更新说明
本次 v1.6.1 聚焦于 60fps 交互流畅度、DSH 0.2.2 宿主源码契约对齐、执行稳健性、长期内存/磁盘卫生与后端模块化拆分,零破坏性变更。
性能与渲染优化
- 精确面板可见性检测 & 折叠零轮询:对齐 DSH 0.2.2
keepMounted机制,通过[data-dockkit-content]的aria-hidden/inert+MutationObserver+IntersectionObserver,在折叠右侧边栏、切换 Tab 或切换会话时完全暂停轮询,展开瞬间 0ms 唤醒。 workspaceFiles.stat优先探测:稳态轮询优先调用轻量stat比对元数据指纹,文件未变动或不存在(workspace-file/not-found)时 0 次read传输与 0 次JSON.parse。- 60fps 拖拽合帧与零监听器抖动:拖拽事件收敛为单次
requestAnimationFrame合帧并在松手时按实时坐标重算框选/拖线落点,消除高频指针抖动与快速甩手误差;平移期间开启 GPU 合成层willChange。 - 渲染热点隔离:图拓扑衍生计算通过
useMemo缓存;运行计时拆入独立组件LiveElapsedText;saveDoc250ms 防抖并保护未落盘编辑时间戳与首次挂载不污染localStorage。
DSH 0.2.2 契约对齐与执行稳健性
- 根治条件节点
stopReason: 'error':对齐 DSHSubagentResult.diagnostic真实错误字段;当minimal条件节点直接输出严格合法的 JSON 判决而未调用structured_output工具导致宿主改写completed → error时,第 1 次尝试即直接救援成功,零额外重试耗时。 - 上游超长输出头尾裁剪:
clipUpstreamOutput对超长上游输出保留头部结论与尾部收尾/报错并折叠中间日志,内置 UTF-16 代理对边界保护(不劈断 Emoji/生僻字)。 - 只读节点瞬态错误自动退避重试:仅对
minimal/condition只读节点在429/502/503/504/超时等瞬态错误时执行 1 次可中断退避重试(响应AbortSignal零僵尸),绝不自动重试可写standard节点。 - 原子写入与并发/输入防护:
saveStore、publishCanvas、publishRunState全部升级为唯一临时文件原子写入(writeFileAtomic);新增单会话executePlan重入互斥锁、运行/等待 Lead 拍板期间禁止自动同步冲掉进度、中文 IME 选词Escape防误关弹窗、sessionId文件名安全清洗,以及更清晰的fromNodes/canvas_generate/canvas_patch输入校验与警告。
长期卫生与模块化
- 后端内存映射全部 LRU 封顶(会话 ≤100、运行快照 ≤50、子会话槽 ≤400),自动清理超 14 天孤儿
.dsh/canvas/*.json及超 1 小时遗留*.tmp;前端localStorage持续限额淘汰旧会话草稿并严格保护全局配置键。 - 后端纯图/裁剪/补丁与复盘快照/LRU/原子写逻辑抽离为零构建 ESM 模块
lib/graph.js与lib/telemetry.js,全部历史导出 100% 向后兼容;静态检查 12/12 与单测 84/84 全部通过。
English Release Notes
v1.6.1 focuses on 60fps canvas responsiveness, source-verified DSH 0.2.2 host contract alignment, execution robustness, long-term memory/disk hygiene, and zero-build backend modularization with zero breaking changes.
Performance & Rendering
- Accurate panel visibility detection & zero idle polling while collapsed: Aligned with DSH 0.2.2
keepMountedsemantics via[data-dockkit-content](aria-hidden/inert) +MutationObserver+IntersectionObserver, pausing polling across collapsed sidebar, inactive tabs, and inactive sessions while waking on frame 0 upon expand. workspaceFiles.stat-first polling: Probes file metadata before reading bytes, eliminating redundantreadIPCs andJSON.parsework when files are unchanged or absent (workspace-file/not-found).- 60fps rAF drag coalescing & zero listener churn: Coalesces pointer moves to
requestAnimationFramewith exact mouseup coordinate resolution for fast marquee/wire flicks and GPUwillChangeduring panning. - Render isolation & debounced persistence: Memoizes graph topology derivations via
useMemo, isolates the 1s live elapsed ticker intoLiveElapsedText, and debounceslocalStoragewrites (250ms) with unflushed-edit timestamp protection.
DSH 0.2.2 Alignment & Execution Robustness
- 1-shot condition JSON rescue &
diagnosticextraction: Aligned withSubagentResult.diagnosticand DSHactivation.ts(completed → errorwhen aminimalcondition judge answers with direct JSON text instead of callingstructured_output), rescuing strict JSON verdicts on attempt #1 without a wasted retry. - Surrogate-safe head+tail upstream clipping:
clipUpstreamOutputfolds oversized upstream outputs while preserving head conclusions and tail errors without ever splitting UTF-16 surrogate pairs. - Safe read-only transient retry: Single abort-aware backoff retry strictly for read-only (
minimal/condition) nodes on transient 429/502/503/504/timeout errors; writablestandardnodes never auto-retry. - Atomic writes & concurrency/input guards: Unified
writeFileAtomicacrosssaveStore,publishCanvas, andpublishRunState; added single-sessionexecutePlanre-entrancy lock, auto-sync suppression while running/paused at Lead, CJK IMEEscapeguard,safeSessionFileBasefilename sanitization, and actionable validation errors/warnings forfromNodes,canvas_generate,canvas_patch, and/canvas-sync.
Long-Term Hygiene & Modularization
- LRU-bounded backend maps, throttled cleanup of >14-day orphaned
.dsh/canvas/*.jsonand >1-hour*.tmpfiles, and ongoinglocalStoragesession pruning preserving all global settings keys. - Extracted pure graph/prompt/patch helpers into
lib/graph.jsand telemetry/LRU/atomic-write helpers intolib/telemetry.js(100% backward-compatibleindex.jsexports;npm run check12/12 &npm test84/84 passing).
v1.6.0
中文更新说明
新增功能
- 零额外 Token 执行复盘摘要(Run Summary):
- 后端执行器在调度节点时纯本地记录每个节点的起止时间与累计耗时、执行轮次、实际运行模型、备用模型回退(
Fallback)、热会话/紫线续接(Continued)、缓存复用(Cached)、条件判决理由与回环逐轮反馈,写入.run.json(不调任何模型、不注入systemPrompt.context,严格 0 额外 Token)。 - 画布左下角在运行产生遥测后自动显示对称的紧凑复盘胶囊(运行中每秒实时跳表),也可随时通过
⋯ → 📊 执行复盘打开。 - 弹窗内置 4 格 KPI(窄侧栏自适应 2×2)、按最慢节点比例绘制的耗时条、点击节点名居中定位、点击
↗直达子代理会话(含.run.jsonchildId兜底)以及 一键复制 Markdown 复盘报告,并向后兼容旧版.run.json。
- 后端执行器在调度节点时纯本地记录每个节点的起止时间与累计耗时、执行轮次、实际运行模型、备用模型回退(
- 内置示例模板升级(全功能门面回环):第 5 个内置模板升级为「全功能回环:并行摸底 → 拍板 → 实现 ↺ 门禁 → 终审」,一图涵盖 4 种节点卡片、3 种语义连线、全局与节点
+ 参考、受控回环↺ ×3及回环外并行旁路节点(横竖版均自动避让零重叠)。 - 常态可见
⏹ 终止按钮:画布左上角● 已启用旁常驻⏹ 终止按钮(空闲时灰标禁用、运行或待拍板时亮红激活,避免布局跳动)。
工程与体验优化
- 条件/结构化节点
outputSchema自动降级重试 & 精准报错:当所选模型或接口不兼容严格outputSchema返回error时,自动去掉outputSchema在同模型以纯 JSON 重试一次并由parseConditionDecision兜底解析;同时提取宿主真实报错明细与模型名,消除旧版「未配置备用模型」造成的误诊。 - npm 安装包体积瘦身 98.9%:
package.json"files"收窄为docs/*.md(排除 12 MB 演示图片),压缩包体积从 12.05 MB → 150 KB,安装速度大幅提升。 - CI 静态防回归门禁(
npm run check):新增零依赖健康检查脚本,在 CI 中自动校验语法、JSON/Locale 键对等、247 项I18N键对等与零死键、109 项样式零死键、本地文档链接、宿主inject向后兼容及 npm 打包体积红线。 - 门面主图全面焕新:更新中英双语主图,完整展示多模型混搭、参考徽标、五色语义连线、受控回环及新工具栏。
English Release Notes
New Features
- Zero-Token Run Summary (
📊 Run summary):- The host executor records per-node timings, cumulative durations across retries, run counts, effective model, fallback rescue (
Fallback), warm/purple session continuation (Continued), cached reuse (Cached), condition verdicts, and round-by-round loop feedback directly into local.run.jsontelemetry (zero extra LLM calls, never injected into prompts). - A compact bottom-left summary pill appears symmetrically opposite the zoom bar once a run begins (live-ticking while active), and is also available anytime via
⋯ → 📊 Run summary. - Includes a responsive KPI bar (4 columns on wide panes, 2×2 on narrow sidebars), proportional duration bars, click-to-focus node centering, direct child-chat jump (
↗with.run.jsonchildIdfallback), one-click Copy Markdown export, and graceful fallback for older.run.jsonfiles.
- The host executor records per-node timings, cumulative durations across retries, run counts, effective model, fallback rescue (
- Upgraded Full-Showcase Loop Starter Template: The 5th starter template now demonstrates all 4 node kinds, all 3 link types (
prompt/structured/session-ref), global & per-node+ Refs, a controlled↺ ×3retry loop, and a parallel bypass node outside the loop (cleanly aligned in bothlrandtb). - Always-Visible
⏹ StopPill: The top-left⏹ Stoppill beside● ONstays visible in idle state (muted/disabled) and lights up red when running or paused at a Lead gate, eliminating layout jumps.
Engineering & Packaging Improvements
- Automatic
outputSchemaPlain-JSON Fallback & Clear Failure Diagnostics: When a condition or structured node receives a providererrorunder strictoutputSchema, the executor automatically retries once on the same model withoutoutputSchema(parsed viaparseConditionDecision), extracts real host error details into results and Run Summary, and removes the misleading "no fallback model configured" wording. - 98.9% Smaller npm Tarball: Narrowed
package.json"files"todocs/*.md, shrinking the packed tarball from 12.05 MB to 150 KB. - Zero-Dependency CI Health Gate (
npm run check): Enforces syntax, JSON & locale parity, 247-keyI18Nparity with zero dead keys, zero unusedS.*styles, valid local doc links, backward-compatibledsh.client.inject, and npm tarball hygiene & size budget. - Refreshed Hero Screenshots: Updated both English and Chinese README hero banners to showcase the v1.6 canvas.
v1.5.5
中文更新说明
新增功能
- 统一终止任务按钮 & 全链路即时中止(#11、#13):
- 工作流运行中或处于
⏸ 待拍板(waitingLead)状态时,画布左上角● ON旁与入口 Lead 卡片上显示红色⏹ 终止/⏹按钮,一键结束执行或解除等待拍板状态。 - 对齐 DSH 0.2.2 原生中止 API:通过并发执行的
/canvas-stop命令 +subagents.interrupt/subagents.drainDescendants/agent.cancel,配合前端remote.subagents.interruptByUser与根会话cancel(),即时中止所有运行中子代理并防止重启/回退产生僵尸子代理;同时支持canvas_workflow({ cancel: true })。 - 保留已完成节点进度,将权威
halted/idle状态写入.run.json,彻底修复历史状态误触发⏸ 待拍板的问题。
- 工作流运行中或处于
- 记住横版 / 竖版布局偏好(#9):
- 切换横版(
lr)/ 竖版(tb)自动持久化为全局默认方向,新建会话按偏好初始化;撤销/重做同步还原方向。 - 保存预设与导出 JSON 同步记录方向(预设列表带
竖/横徽标),加载预设自动还原方向,内置模板自动适配当前方向。
- 切换横版(
- 工具栏撤销 / 重做按钮:在工具栏新增紧凑的
↶/↷按钮(与Ctrl+Z/Ctrl+Y同步)。
问题修复与优化
- 修复同时平移 + 滚轮缩放导致的视口漂移/回弹(#10):改为基于实时视口的增量平移步进(
applyPanStep),并与缩放擦洗及窗口失焦清理联动。 - 修复预设加载不及时(#12):通过同窗口自定义事件 +
storage/focus/visibilitychange实现多会话即时同步,保存/删除前先合并最新预设,并在预设面板增加手动↻刷新按钮。 - 核心算法与 UI 细节加固:
- 修复受控循环打回时环外条件剪枝分支未解封的问题,修复建环跨图重叠校验,修复横版高条件节点布局重叠;
- 拓扑排序与环检测队列优化为
O(V + E)游标实现; - 修复卡片浮层/下拉在竖版布局下的
z-index遮挡、WorkflowCanvas跨会话key隔离、节点拖拽防误写撤销栈、远端canvas_patch字段删除同步等细节。
English Release Notes
New Features
- Unified Stop Button & End-to-End Instant Cancellation (#11, #13):
- Displays a red
⏹ Stoppill beside● ONand a compact⏹button on the Entry Lead card whenever a workflow is running or paused atAwaiting Lead(waitingLead). - Aligned with DSH 0.2.2 native cancellation APIs: concurrent
/canvas-stopcommand +subagents.interrupt/subagents.drainDescendants/agent.cancel, paired with clientremote.subagents.interruptByUserand rootcancel(), pluscanvas_workflow({ cancel: true }). - Preserves partial completed progress and writes authoritative
halted/idlestate to.run.jsonso stopped workflows never falsely re-lock intoAwaiting Lead.
- Displays a red
- Persist Horizontal / Vertical Layout Preference (#9):
- Remembers the user's chosen
lr/tbdirection globally for new sessions and restores direction on Undo/Redo. - Presets and exported JSON now record direction (
V/Hbadges in the preset menu) and restore it on load; built-in templates adapt to the active direction.
- Remembers the user's chosen
- Toolbar Undo / Redo Buttons: Added compact
↶/↷buttons directly in the canvas toolbar.
Fixes & Improvements
- Fixed viewport drift/snap-back during simultaneous pan + wheel zoom (#10) via incremental pan steps (
applyPanStep) and blur/zoom-scrub guards. - Fixed delayed preset sync across sessions (#12) with same-window custom event broadcasting,
storage/focus/visibilitychangelisteners, merge-before-write protection, and a manual↻refresh button. - Core & UI hardening:
- Un-prune downstream nodes reachable from loop members on retry rounds so inner condition branch switches execute cleanly; full-graph loop overlap validation; dynamic vertical spacing in
lrlayout for tall condition cards;O(V + E)queue cursors in topological sort & cycle checks. - Fixed popover
z-indexstacking in vertical layout,WorkflowCanvasper-session keying, drag undo snapshot threshold, and remotecanvas_patchfield deletion sync.
- Un-prune downstream nodes reachable from loop members on retry rounds so inner condition branch switches execute cleanly; full-graph loop overlap validation; dynamic vertical spacing in