dsh-workflow-canvas 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.js +489 -112
- package/docs/MECHANISM.md +2 -2
- package/docs/MECHANISM.zh.md +2 -2
- package/index.js +238 -1098
- package/lib/graph.js +1068 -0
- package/lib/telemetry.js +250 -0
- package/package.json +2 -1
package/docs/MECHANISM.md
CHANGED
|
@@ -12,8 +12,8 @@ at run time, and how memory cold-resume, fallbacks, and live status tracking wor
|
|
|
12
12
|
## 1. Architecture: Bidirectional Client ↔ Host Bridge
|
|
13
13
|
|
|
14
14
|
The plugin splits cleanly into two halves:
|
|
15
|
-
- **Client (`client.js`)**: Mounted as a right-sidebar `Workflow` tab (`keepMounted: true`, keyed by `sessionId` for isolation, preserving state while collapsed). Owns visual editing, live cross-tab preset sync, global layout preferences, shortcuts, visual effects, and live status rendering.
|
|
16
|
-
- **Host (`index.js`)**: Registers the bundled `workflow-canvas` skill, per-session `systemPrompt.context`, two commands (`/canvas-sync` and `/canvas-stop`), and four tools (`canvas_inspect`, `canvas_generate`, `canvas_patch`, `canvas_workflow`). Owns real subagent execution, unified cancellation, and
|
|
15
|
+
- **Client (`client.js`)**: Mounted as a right-sidebar `Workflow` tab (`keepMounted: true`, keyed by `sessionId` for isolation, preserving state while collapsed). Owns visual editing, live cross-tab preset sync, global layout preferences, `rAF`-coalesced rendering, visibility-aware adaptive polling, shortcuts, visual effects, and live status rendering.
|
|
16
|
+
- **Host (`index.js` + `lib/graph.js` + `lib/telemetry.js`)**: Registers the bundled `workflow-canvas` skill, compact per-session `systemPrompt.context`, two commands (`/canvas-sync` and `/canvas-stop`), and four tools (`canvas_inspect`, `canvas_generate`, `canvas_patch`, `canvas_workflow`). Owns real subagent execution, head+tail upstream output clipping, safe read-only transient backoff retry, unified cancellation, LRU memory/disk hygiene, and atomic state persistence.
|
|
17
17
|
|
|
18
18
|
```mermaid
|
|
19
19
|
flowchart LR
|
package/docs/MECHANISM.zh.md
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
## 1. 整体架构:Client 与 Host 的双向通道
|
|
10
10
|
|
|
11
11
|
插件由两部分组成:
|
|
12
|
-
- **客户端(`client.js`)**:挂载在 DSH 右侧边栏的 `Workflow` 标签页(`keepMounted: true` 且按 `sessionId` 设 `key`
|
|
13
|
-
- **Host 侧(`index.js`)**:注册技能 `workflow-canvas
|
|
12
|
+
- **客户端(`client.js`)**:挂载在 DSH 右侧边栏的 `Workflow` 标签页(`keepMounted: true` 且按 `sessionId` 设 `key` 隔离,收起侧边栏时保留画布状态),负责图形编辑、跨会话实时预设同步、全局布局偏好、`rAF` 流畅渲染、可见性自适应轮询与实时状态渲染。
|
|
13
|
+
- **Host 侧(`index.js` + `lib/graph.js` + `lib/telemetry.js`)**:注册技能 `workflow-canvas`、精简会话级强上下文注入 `systemPrompt.context`、两条命令(`/canvas-sync` 与 `/canvas-stop`),以及 4 个工具(`canvas_inspect`、`canvas_generate`、`canvas_patch`、`canvas_workflow`),负责真实调度子代理、上游超长输出头尾智能裁剪、只读节点瞬态错误自动退避重试、统一中止、LRU 内存/磁盘清理与原子持久化。
|
|
14
14
|
|
|
15
15
|
```mermaid
|
|
16
16
|
flowchart LR
|