Skip to content

Releases

v1.7.4

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 01 Dec 10:02

中文更新说明

本次 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 边框内弧)。

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 hard dsh.client.inject requirement, with <html lang> and navigator.language fallbacks). The ⋯ menu cycles through Follow DSH (ZH/EN) → 中文 → EN and 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 272px menu 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.
  • Toolbar & Floating Pill Refinement:
    • Aligned the canvas toolbar's bottom divider with DSH's Chat | Trace header divider;
    • Locked ⋯ menu dimensions and toggle pill minWidth (58px) for zero width/height jitter when switching languages or toggling ON/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.

v1.7.3 — Paused-Lead Hot-Edit Preservation

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 30 Nov 06:10

中文更新说明

✨ 核心新特性

  • 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 via canvas_patch. Completed upstream outputs and waitingLead stay preserved via reconcilePausedLeadState, 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 global refs, switching presets, deleting the waiting Lead, wiring a new unexecuted dependency into the waiting Lead, or lowering a loop's maxIterations below its used count cleanly resets to idle and rejects stale leadResult calls instead of silently bypassing review. canvas_patch explicitly reports preservedPausedLead / resetPausedLead.
  • Smoother Client Sync While Paused: Turn-start auto-sync now runs safely for dirty edits during need-lead, preserves completed upstream Done badges across canvas_patch merges, and immediately wakes .run.json polling to reflect authoritative host state.

🛠 Reliability & Audit Fixes

  • Fixed authoritative .run.json status: "idle" being erased to null on the client, which could previously re-lock the UI into ⏸ Awaiting Lead from 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 shared computePrunedIds helper.
  • Fixed parallel Lead insertion stealing leadResult from the active waitingLead, unblocked new outgoing edges off failed condition judges, stale loopFeedback / nodeAttempts after deleting a loop edge, and remote presetName sync drift.
  • Hardened Cordis resolveService to rely strictly on .get(name) on Cordis contexts, added active-run guards to canvas_generate / canvas_patch, and made .run.json timestamps monotonic.

v1.7.2 — Stabilization, Template Parity & Sharper Agent Skill

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 26 Nov 10:33

中文更新说明

本次 v1.7.2 为稳定期加固与一致性维护版(零新功能膨胀),聚焦修复前后端隐性漂移、明确回环×记忆边界语义,以及提纯 AI 技能提示与文档体验。

修复与加固

  • 修复前后端内置模板漂移(lib/presets.js ↔ client.js):将 canvas_preset 后端 5 套内置模板(tpl-swe、tpl-prd、tpl-ab、tpl-cond、tpl-loop)与侧边栏 UI 逐节点、逐连线完全对齐(补齐 tpl-prd 10 节点/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 / client 5 个并行测试文件 + 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 so canvas_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 skips memoryChildId/keepSession and opens a clean fresh session instead of looping inside a broken context.
  • Client normalizeRefsUI Parity: Aligned with lib/graph.js:normalizeRefs to 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 strict SKILL_DESCRIPTION parity in npm run check (14/14).
  • Leaner READMEs & Updated Architecture Docs: Moved dense inactive-node / missing-link state-machine specs out of README.md / README.zh.md into docs/MECHANISM*.md, updated tool counts (all 5 canvas_* 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.md focused on public contributor invariants.

Testing & Verification

  • Modular Test Suites: Split tests into executor, loops, tools, parity, and client suites + shared helpers.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

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 25 Nov 21:15

中文更新说明

感谢 @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。
  • 执行复盘胶囊常驻可见:画布左下角 📊 执行复盘 胶囊在尚未运行过画布时也保持可见(呈灰色低对比态,点击可查看说明),运行开始后自动亮起并实时计时。
  • 文档致谢:在中英文 README 底部新增「致谢 / Acknowledgements」小节。

质量保障

  • npm run check 13/13 全部通过(语法、278 个中英 I18N 键零冗余、121 个样式键零冗余、46 条本地文档链接有效)
  • npm test 113/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 ↺ ×N to ↺ 0/N and 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/N on 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 report Not entered (round: 0) rather than claiming Round 1; editing maxIterations after 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_workflow loops payload & rendered tool output share one unified contract while staying backward-compatible with idle canvases and legacy .run.json files.
  • Always-Visible Run Summary Pill: The bottom-left 📊 Summary pill 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.md and README.md.

Verification

  • npm run check: 13/13 passed
  • npm test: 113/113 passed

v1.7.0

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 25 Nov 08:44

中文更新说明

新增功能

  • 画布注释框与独立便签(#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 C with nodes selected (or right-click 💬 Group with comment) to wrap them in a real-time geometric comment frame; press C on blank canvas, right-click 💬 Add comment, or use Shift+A → 4 to create a standalone note (rebindable under ⋯ → ⌨ Shortcuts).
    • Real-time geometric membership: Drag a comment header to move all nodes currently inside together (hold Alt to 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 / 4000 character 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.
  • AI-Aware & AI-Editable Comments:
    • /canvas-sync and canvas_inspect expose comments and their wrapped nodeIds on demand;
    • canvas_generate and canvas_patch support creating, updating in place (preserving manual geometry), and removing (removeComments) comments semantically via nodeIds with zero subagent execution tokens.

UX Improvements

  • Click-to-rename + drag-to-move on node titles: Non-entry node titles now use a 4px drag threshold — click to rename inline (with CJK IME protection), press-and-drag directly on the title to move the node or multi-selection, and Shift/Ctrl-click titles cleanly without accidentally focusing an input.

v1.6.3

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 25 Nov 07:29

中文更新说明

新功能(Closes #14)

  1. 允许 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(不产生额外命令刷屏)。

优化与修复

  1. 全插件工具 Schema 统一瘦身(新增工具后常驻 Token 反而更低)
    • 对 canvas_generate、canvas_patch、canvas_inspect、canvas_preset、canvas_workflow 与 SKILL_DESCRIPTION 全面精简描述(保留所有参数、枚举与核心规则,长篇文档留在按需加载的 SKILL.md),5 个工具定义总体积缩减约 35%(每轮对话净省数百 Token);预设超过 20 个时 list 自动切换紧凑摘要模式。
  2. 画布切换排版与状态细节修复
    • 修复横排(lr)模式下通过 canvas_preset 加载无坐标内置模板时未自动分层排版的问题;内置模板现在尊重用户当前横/竖排方向,自定义预设恢复其保存的方向。
    • 修复点击「✕ 清空画布」后未重置当前预设名(activePresetRef)的问题。

验证

  • npm run check:13/13 全部通过(含新增 lib/presets.js)
  • npm test:109/109 全部通过

English Release Notes

New Features (Closes #14)

  1. AI Workflow Preset Switching & Enable/Disable (canvas_preset tool)
    • 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 optional task override & enabled flag; 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: buildActiveCanvasContext and canvas_inspect now 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-sync and persist globally in .workflow-canvas-state.json across sessions.

Optimizations & Fixes

  1. 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) and SKILL_DESCRIPTION while keeping every parameter, enum, and invariant intact (~35% smaller total tool definitions; compact list output when >20 user presets exist).
  2. 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 current lr/tb preference while saved user presets restore their saved direction.
    • Clearing the canvas now properly resets the tracked active preset name.

Verification

  • npm run check: 13/13 passed (including new lib/presets.js)
  • npm test: 109/109 passed

v1.6.2

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 25 Nov 07:05

中文更新说明

核心修复与体验优化

  1. 输入口磁吸连线(两段式引导线)
    • 拖拽输出连线靠近目标输入口时,自动在缩放自适应半径内(100% 缩放 23px ~ 缩小上限 36px)触发磁吸;横排(lr)与竖排(tb)均生效。
    • 预览线保留真实鼠标落点(输出 ┄┄ 鼠标 ── 输入 两段式引导),目标输入口轻柔放大 1.18× 并点亮 2px 同色光晕;松手按实时坐标直接建连,快速甩手不漏连。
  2. 节点有效性与「无出边」提示重构
    • 将结构警告(noOutgoing)与执行排除(deadEnds)解耦:合法终端子代理保持正常亮度(opacity: 1)+ 虚线黄框 + 黄色 ⚠ 无出边 徽章并正常参与执行;仅真正被跳过或被条件剪枝的节点变暗(opacity: 0.65)。
    • 空分工且无有效子代理直接输入的串联 Lead 成为路径屏障,阻断无效后代并保留独立有效路径;悬空分支与纯回环孤岛剥叶至不动点(BigInt 祖先位集,支持任意数量 Lead)。
    • 黄色警告胶囊同步显示运行状态(进行中 / 失败 / 已跳过),有历史子会话时可点击直达(附 ↗ 箭头)。
  3. 执行前有效图与回环一致性校验
    • 前后端均先校验原图前向环,再过滤无效节点;跨越无效节点、起点非条件节点或交叉重叠的受控回环会明确报错,不再静默裁掉。
    • 运行期依赖、条件剪枝、回退路径与回环处理统一使用过滤后的有效图,杜绝被条件拒绝的分支借道空 Lead 偷跑。
  4. 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' 及 Cordis scope.get() 安全取值。
    • 强化可写 standard 节点防重复执行:structured 节点 1-shot JSON 救援、noSchema 仅限只读节点且跳过 max-tokens / refusal、session-ref 冷启动单次降级;修复晚到子代理立即中断、/canvas-sync 保留暂停中 Lead、中文二元条件兜底、多 {...} 文本/剪贴板提取、Windows 保留文件名消毒及 3 处输入框 IME 守卫。

验证

  • npm run check:12/12 全部通过
  • npm test:108/108 全部通过
  • 隔离 npm pack 解包 ESM + Client VM 冒烟通过(16 个文件,171.9 KB)

English Release Notes

Highlights & Fixes

  1. Magnetic Input-Socket Snapping (Two-Segment Tether)
    • Dragging an outgoing wire near an input socket now snaps within a zoom-aware radius (23px at 100%, up to 36px when 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 subtle 1.18× socket scale and 2px ring; releasing uses live mouseup coordinates so fast flicks never miss.
  2. 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-link badge 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 BigInt Lead-ancestry bitsets.
    • The yellow warning badge surfaces live/pruned runtime states and stays clickable (↗) when a historical child session exists.
  3. Effective-Graph & Loop Validation Parity
    • Both frontend buildPlan and backend executePlan validate 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.
  4. DSH 0.2.2 Host Contract Alignment & Concurrency Hardening
    • Aligned with source-verified DSH 0.2.2-rc.5 contracts: workspaceFiles.stat opaque version token with graceful read fallback, frame-0 [data-dockkit-content] visibility pausing, Agent.status === 'running' root cancellation, valid subagentchat mode: 'continuable', and safe scope.get() service resolution.
    • Prevented unintended re-runs on writable standard nodes (structured 1-shot JSON rescue, read-only-only noSchema retry, single-run session-ref cold fallback), fixed late-activation abort cleanup, preserved paused waitingLead on identical /canvas-sync, fixed CJK binary condition fallback, balanced multi-{...} JSON/clipboard extraction, Windows reserved device name sanitization, and CJK IME guards.

Verification

  • npm run check: 12/12 passed
  • npm test: 108/108 passed
  • Isolated npm pack ESM + Client VM smoke test passed (16 files, 171.9 KB packed)

v1.6.1 — Performance, Robustness & DSH 0.2.2 Alignment

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 25 Nov 02:43

中文更新说明

本次 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;saveDoc 250ms 防抖并保护未落盘编辑时间戳与首次挂载不污染 localStorage。

DSH 0.2.2 契约对齐与执行稳健性

  • 根治条件节点 stopReason: 'error':对齐 DSH SubagentResult.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 keepMounted semantics 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 redundant read IPCs and JSON.parse work when files are unchanged or absent (workspace-file/not-found).
  • 60fps rAF drag coalescing & zero listener churn: Coalesces pointer moves to requestAnimationFrame with exact mouseup coordinate resolution for fast marquee/wire flicks and GPU willChange during panning.
  • Render isolation & debounced persistence: Memoizes graph topology derivations via useMemo, isolates the 1s live elapsed ticker into LiveElapsedText, and debounces localStorage writes (250ms) with unflushed-edit timestamp protection.

DSH 0.2.2 Alignment & Execution Robustness

  • 1-shot condition JSON rescue & diagnostic extraction: Aligned with SubagentResult.diagnostic and DSH activation.ts (completed → error when a minimal condition judge answers with direct JSON text instead of calling structured_output), rescuing strict JSON verdicts on attempt #1 without a wasted retry.
  • Surrogate-safe head+tail upstream clipping: clipUpstreamOutput folds 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; writable standard nodes never auto-retry.
  • Atomic writes & concurrency/input guards: Unified writeFileAtomic across saveStore, publishCanvas, and publishRunState; added single-session executePlan re-entrancy lock, auto-sync suppression while running/paused at Lead, CJK IME Escape guard, safeSessionFileBase filename sanitization, and actionable validation errors/warnings for fromNodes, canvas_generate, canvas_patch, and /canvas-sync.

Long-Term Hygiene & Modularization

  • LRU-bounded backend maps, throttled cleanup of >14-day orphaned .dsh/canvas/*.json and >1-hour *.tmp files, and ongoing localStorage session pruning preserving all global settings keys.
  • Extracted pure graph/prompt/patch helpers into lib/graph.js and telemetry/LRU/atomic-write helpers into lib/telemetry.js (100% backward-compatible index.js exports; npm run check 12/12 & npm test 84/84 passing).

v1.6.0

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 24 Nov 18:52

中文更新说明

新增功能

  • 零额外 Token 执行复盘摘要(Run Summary):
    • 后端执行器在调度节点时纯本地记录每个节点的起止时间与累计耗时、执行轮次、实际运行模型、备用模型回退(Fallback)、热会话/紫线续接(Continued)、缓存复用(Cached)、条件判决理由与回环逐轮反馈,写入 .run.json(不调任何模型、不注入 systemPrompt.context,严格 0 额外 Token)。
    • 画布左下角在运行产生遥测后自动显示对称的紧凑复盘胶囊(运行中每秒实时跳表),也可随时通过 ⋯ → 📊 执行复盘 打开。
    • 弹窗内置 4 格 KPI(窄侧栏自适应 2×2)、按最慢节点比例绘制的耗时条、点击节点名居中定位、点击 ↗ 直达子代理会话(含 .run.json childId 兜底)以及 一键复制 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.json telemetry (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.json childId fallback), one-click Copy Markdown export, and graceful fallback for older .run.json files.
  • 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 ↺ ×3 retry loop, and a parallel bypass node outside the loop (cleanly aligned in both lr and tb).
  • Always-Visible ⏹ Stop Pill: The top-left ⏹ Stop pill beside ● ON stays 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 outputSchema Plain-JSON Fallback & Clear Failure Diagnostics: When a condition or structured node receives a provider error under strict outputSchema, the executor automatically retries once on the same model without outputSchema (parsed via parseConditionDecision), 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" to docs/*.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-key I18N parity with zero dead keys, zero unused S.* styles, valid local doc links, backward-compatible dsh.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

Choose a tag to compare

@Wasabi2575 Wasabi2575 released this 24 Nov 17:07

中文更新说明

新增功能

  • 统一终止任务按钮 & 全链路即时中止(#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 ⏹ Stop pill beside ● ON and a compact ⏹ button on the Entry Lead card whenever a workflow is running or paused at Awaiting Lead (waitingLead).
    • Aligned with DSH 0.2.2 native cancellation APIs: concurrent /canvas-stop command + subagents.interrupt / subagents.drainDescendants / agent.cancel, paired with client remote.subagents.interruptByUser and root cancel(), plus canvas_workflow({ cancel: true }).
    • Preserves partial completed progress and writes authoritative halted / idle state to .run.json so stopped workflows never falsely re-lock into Awaiting Lead.
  • Persist Horizontal / Vertical Layout Preference (#9):
    • Remembers the user's chosen lr / tb direction globally for new sessions and restores direction on Undo/Redo.
    • Presets and exported JSON now record direction (V/H badges in the preset menu) and restore it on load; built-in templates adapt to the active direction.
  • 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/visibilitychange listeners, 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 lr layout for tall condition cards; O(V + E) queue cursors in topological sort & cycle checks.
    • Fixed popover z-index stacking in vertical layout, WorkflowCanvas per-session keying, drag undo snapshot threshold, and remote canvas_patch field deletion sync.