dsh-workflow-canvas 0.1.0 → 0.1.2
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 +130 -113
- package/README.zh.md +101 -86
- package/client.js +2192 -2192
- package/cordis.patch.yml +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -1,113 +1,130 @@
|
|
|
1
|
-
# DSH Workflow Canvas
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
##
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
1
|
+
# DSH Workflow Canvas
|
|
2
|
+
English | [中文](README.zh.md)
|
|
3
|
+
|
|
4
|
+
Orchestrate subagent workflows from the DSH sidebar. Draw each step as a node, wire
|
|
5
|
+
the data flow with three link types, enable it, and run it from chat — subagent nodes
|
|
6
|
+
are spawned for real, Lead nodes pause the run and are performed by the conversation
|
|
7
|
+
itself.
|
|
8
|
+
|
|
9
|
+
Describe a workflow in one sentence and the agent sketches the whole canvas for you;
|
|
10
|
+
tweak it in place afterwards with `canvas_patch`. Links make the flow obvious at a
|
|
11
|
+
glance — grey carries text, blue carries JSON, purple continues the upstream session.
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
Requires DeepSeek Harness **0.2.2** or newer (the package declares
|
|
18
|
+
`engines.dsh: ">=0.2.2-rc.1 <0.3.0-0"`).
|
|
19
|
+
|
|
20
|
+
- **From the plugin market** — open **Plugins → Discover**, search
|
|
21
|
+
*"workflow canvas"*, and install. The dshmarket entry is still awaiting
|
|
22
|
+
review; see the
|
|
23
|
+
[catalog PR](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/17180).
|
|
24
|
+
- **From npm** — install the published package `dsh-workflow-canvas`
|
|
25
|
+
(latest `0.1.0`) from the **Plugins** panel, or via the `plugin_manager` tool /
|
|
26
|
+
`dsh` CLI with `install_bundle` and `target: dsh-workflow-canvas`.
|
|
27
|
+
- **From source** — clone the repository and install it as a local directory
|
|
28
|
+
with **Plugins → Add plugin**, pointing at the checkout.
|
|
29
|
+
|
|
30
|
+
After installing, enable the plugin and the `workflow` tab appears in the right
|
|
31
|
+
sidebar.
|
|
32
|
+
|
|
33
|
+
## How this differs from other canvas plugins
|
|
34
|
+
|
|
35
|
+
DSH has more than one "workflow canvas". This one orchestrates **subagents** from
|
|
36
|
+
the sidebar, performs Lead steps in the conversation itself, and lets the agent
|
|
37
|
+
sketch a whole canvas from one sentence. For tool-call / condition / output
|
|
38
|
+
pipelines compiled to `ctx.workflows`, see
|
|
39
|
+
[`@piedpiper911/dsh-workflow-canvas`](https://github.com/PiedPiper911/dsh-workflow-canvas).
|
|
40
|
+
|
|
41
|
+
## Nodes
|
|
42
|
+
|
|
43
|
+
- **Subagent node** (green top bar) — spawns a child agent. Each node sets its own
|
|
44
|
+
model, reasoning effort, capability scope (`standard` / `minimal`), fallback
|
|
45
|
+
model, memory and role.
|
|
46
|
+
- **Lead node** (blue top bar) — performed by the conversation, never spawned. The
|
|
47
|
+
entry Lead carries the overall task; the run stops at every Lead step and resumes
|
|
48
|
+
with your answer.
|
|
49
|
+
|
|
50
|
+
## Links
|
|
51
|
+
|
|
52
|
+
| Type | Colour | Carries |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| `prompt` | grey | plain text |
|
|
55
|
+
| `structured` | blue | a JSON object; the upstream node is asked for structured output automatically |
|
|
56
|
+
| `session` | purple | the upstream child session, so the downstream runs **inside it** |
|
|
57
|
+
|
|
58
|
+
Drag from a right socket to a left socket, or from a left socket to a right one.
|
|
59
|
+
Drag a connected left socket away to detach. Hold the **right button** and sweep
|
|
60
|
+
across links to cut them (toggle in `⋯`).
|
|
61
|
+
|
|
62
|
+
## Running
|
|
63
|
+
|
|
64
|
+
1. Write the task in the entry Lead, and a role for each node.
|
|
65
|
+
2. Connect the nodes — unlinked nodes are dashed and skipped.
|
|
66
|
+
3. Press the **● ON / ○ OFF** pill at the top-left of the canvas, then ask in chat
|
|
67
|
+
to run it.
|
|
68
|
+
4. The run proceeds in parallel waves (up to 4 at a time) and pauses at each Lead
|
|
69
|
+
node with the results collected so far.
|
|
70
|
+
|
|
71
|
+
## Lead handover
|
|
72
|
+
|
|
73
|
+
When a `session` link points into a Lead node, the run reports that child session
|
|
74
|
+
id at the Lead step, so the conversation can keep talking to that agent instead of
|
|
75
|
+
only receiving its text.
|
|
76
|
+
|
|
77
|
+
## Generating and editing the canvas from chat
|
|
78
|
+
|
|
79
|
+
- `canvas_generate` — build a whole canvas from a node/edge sketch (replaces it).
|
|
80
|
+
- `canvas_patch` — edit it in place: update nodes by id, add or remove nodes and
|
|
81
|
+
links, leaving positions and everything else untouched.
|
|
82
|
+
|
|
83
|
+
Both write the canvas to the workspace, and the panel picks it up within ~1.5s.
|
|
84
|
+
|
|
85
|
+
## Presets
|
|
86
|
+
|
|
87
|
+
Name a canvas and press `☆ Save`; load it in another session from `☰ Presets`.
|
|
88
|
+
Presets live in browser storage, shared across sessions of the same origin, and are
|
|
89
|
+
not synchronised across machines.
|
|
90
|
+
|
|
91
|
+
## Memory
|
|
92
|
+
|
|
93
|
+
A node with memory on reuses its child session: within a run, across runs in the
|
|
94
|
+
same session, and — through the persisted child id — after a restart, where the
|
|
95
|
+
Host cold-resumes it. A resume the Host refuses is forgotten and the node starts
|
|
96
|
+
fresh.
|
|
97
|
+
|
|
98
|
+
## Limits
|
|
99
|
+
|
|
100
|
+
- Presets do not travel between the Desktop app and `dsh web`, nor across machines.
|
|
101
|
+
- Node status is read from the subagent catalog, so Lead steps show **Runs in chat**
|
|
102
|
+
instead of a tracked state.
|
|
103
|
+
- Up to 4 nodes run at a time.
|
|
104
|
+
|
|
105
|
+
## Making the agent use this plugin
|
|
106
|
+
|
|
107
|
+
The bundled guide ships as a skill named `workflow-canvas`. DSH has no "auto-load"
|
|
108
|
+
switch: the model sees each skill's **name and description** in its catalogue and
|
|
109
|
+
loads the body on demand. Three things make it reliable:
|
|
110
|
+
|
|
111
|
+
1. **A description that names the trigger words** — canvas, workflow, pipeline,
|
|
112
|
+
node graph, 画布, 工作流, 编排.
|
|
113
|
+
2. **Pointers from the tools** — every `canvas_*` tool description tells the model
|
|
114
|
+
to load the skill first, and tools are always in context.
|
|
115
|
+
3. **A line in your project's `AGENTS.md`** — the strongest option, because it is
|
|
116
|
+
always loaded:
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
When a task involves the workflow canvas or the canvas_* tools, call the `skill`
|
|
120
|
+
tool with name `workflow-canvas` first.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Development
|
|
124
|
+
|
|
125
|
+
Edit `client.js` / `index.js` and reload the app; client changes hot-reload, Host
|
|
126
|
+
changes need a restart. See [docs/DETAIL.md](docs/DETAIL.md) for the internals.
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
|
|
130
|
+
MIT — see [LICENSE](LICENSE).
|
package/README.zh.md
CHANGED
|
@@ -1,86 +1,101 @@
|
|
|
1
|
-
# DSH Workflow Canvas(可视化工作流画布)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
##
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
1
|
+
# DSH Workflow Canvas(可视化工作流画布)
|
|
2
|
+
中文 | [English](README.md)
|
|
3
|
+
|
|
4
|
+
在 DSH 侧边栏里编排子代理工作流:把每一步画成一个节点、用三种连线标出数据怎么流转,
|
|
5
|
+
启用后直接在对话里运行。子代理节点会被真实启动,Lead 节点会暂停运行、由对话本体执行。
|
|
6
|
+
|
|
7
|
+
不必手动画——用一句话描述流程,agent 会替你搭好整张图,之后再随时就地微调。
|
|
8
|
+
节点间的连线一眼就能看懂数据流向:灰线传文本、蓝线传 JSON、紫线让下游接着上游的会话跑。
|
|
9
|
+
|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
## 安装
|
|
13
|
+
|
|
14
|
+
需要 DeepSeek Harness **0.2.2** 或更新版本(包声明
|
|
15
|
+
`engines.dsh: ">=0.2.2-rc.1 <0.3.0-0"`)。
|
|
16
|
+
|
|
17
|
+
- **从插件市场安装** —— 打开 **插件 → 发现(Discover)**,搜索
|
|
18
|
+
*"workflow canvas"* 并安装。dshmarket 条目尚在审核中,见
|
|
19
|
+
[目录 PR](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/17180)。
|
|
20
|
+
- **从 npm 安装** —— 从 **插件** 面板,或用 `plugin_manager` 工具 / `dsh` CLI
|
|
21
|
+
的 `install_bundle`(`target` 填 `dsh-workflow-canvas`)安装已发布的包
|
|
22
|
+
`dsh-workflow-canvas`(最新 `0.1.0`)。
|
|
23
|
+
- **从源码安装** —— 克隆仓库后,用 **插件 → 添加插件(Add plugin)** 把它作为
|
|
24
|
+
本地目录安装,指向 checkout 目录。
|
|
25
|
+
|
|
26
|
+
装好并启用插件后,右侧边栏会出现 `workflow` 标签页。
|
|
27
|
+
|
|
28
|
+
## 与其它画布插件的区别
|
|
29
|
+
|
|
30
|
+
DSH 生态里不止一个「工作流画布」。本项目在侧边栏里编排**子代理**,Lead 步骤由对话本体执行,
|
|
31
|
+
还支持一句话让 agent 自动搭图。若要的是「工具调用 / 条件分支 / 输出模板」编译成 `ctx.workflows`
|
|
32
|
+
的那类管线,请看 [`@piedpiper911/dsh-workflow-canvas`](https://github.com/PiedPiper911/dsh-workflow-canvas)。
|
|
33
|
+
|
|
34
|
+
## 节点
|
|
35
|
+
|
|
36
|
+
- **子代理节点**(顶部绿条)—— 真正 spawn 一个子代理。每个节点可单独设置模型、推理强度、能力范围(`standard` / `minimal`)、备用模型、记忆和分工。
|
|
37
|
+
- **Lead 节点**(顶部蓝条)—— 由对话本体执行,从不 spawn。入口 Lead 承载总任务;运行每到一步 Lead 就暂停,等你在对话里完成。
|
|
38
|
+
|
|
39
|
+
## 连线
|
|
40
|
+
|
|
41
|
+
| 类型 | 颜色 | 传递内容 |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `prompt` | 灰 | 纯文本 |
|
|
44
|
+
| `structured` | 蓝 | 一个 JSON 对象;上游节点会被自动要求输出结构化结果 |
|
|
45
|
+
| `session` | 紫 | 上游的子会话,下游在**它里面**继续跑 |
|
|
46
|
+
|
|
47
|
+
从右端口拖到左端口、或从左端口拖到右端口都能连线;拖已连接的左端口可断开。
|
|
48
|
+
按住**右键**划过连线可切断(可在 `⋯` 里关掉这个手势)。
|
|
49
|
+
|
|
50
|
+
## 运行
|
|
51
|
+
|
|
52
|
+
1. 在入口 Lead 写总任务,给每个节点写分工。
|
|
53
|
+
2. 连好节点——未连线的节点会显示虚线并被跳过。
|
|
54
|
+
3. 点画布左上角的 **● 已启用 / ○ 已禁用** 浮窗,然后在对话里让它跑。
|
|
55
|
+
4. 运行按波次并行(每次最多 4 个),每到一个 Lead 节点就暂停,并把已收集的结果交回。
|
|
56
|
+
|
|
57
|
+
## Lead 交接
|
|
58
|
+
|
|
59
|
+
当 `session` 线指向 Lead 节点时,运行会在 Lead 步骤上报那个子会话 id,于是对话可以继续追问那个子代理,而不只是拿到它的文本。
|
|
60
|
+
|
|
61
|
+
## 从对话生成 / 修改画布
|
|
62
|
+
|
|
63
|
+
- `canvas_generate` —— 从一个节点/连线草图重建整张画布(替换)。
|
|
64
|
+
- `canvas_patch` —— 就地编辑:按 id 更新节点、增删节点和连线,位置和其余内容保持不变。
|
|
65
|
+
|
|
66
|
+
两者都会把画布写到工作区,面板约 1.5 秒内自动读取。
|
|
67
|
+
|
|
68
|
+
## 预设
|
|
69
|
+
|
|
70
|
+
给画布起名后点 `☆ 保存`;在其它会话里从 `☰ 预设` 载入。预设存在浏览器存储里,同源会话共享,不跨机器同步。
|
|
71
|
+
|
|
72
|
+
## 记忆
|
|
73
|
+
|
|
74
|
+
开启记忆的节点会复用它的子会话:同一轮运行内、同一会话的多次运行之间,以及——通过落盘的子会话 id——重启之后(Host 冷恢复)。若 Host 拒绝恢复,该记录会被丢弃、节点重新开始。
|
|
75
|
+
|
|
76
|
+
## 限制
|
|
77
|
+
|
|
78
|
+
- 预设不在桌面应用和 `dsh web` 之间互通,也不跨机器同步。
|
|
79
|
+
- 节点状态读取自子代理目录,因此 Lead 步骤显示 **由对话执行**,而不是一个可追踪的状态。
|
|
80
|
+
- 同一时间最多并行运行 4 个节点。
|
|
81
|
+
|
|
82
|
+
## 让 agent 使用这个插件
|
|
83
|
+
|
|
84
|
+
内置指南以名为 `workflow-canvas` 的技能发布。DSH 没有「自动加载」开关:模型在技能目录里看到每个技能的**名字和描述**,然后按需加载正文。三件事让它更可靠:
|
|
85
|
+
|
|
86
|
+
1. **描述里写进触发词** —— canvas、workflow、pipeline、node graph、画布、工作流、编排。
|
|
87
|
+
2. **从工具指路** —— 每个 `canvas_*` 工具的说明都提示先加载该技能,而工具永远在上下文里。
|
|
88
|
+
3. **在项目的 `AGENTS.md` 里加一行** —— 最稳的办法,因为它每次都会加载:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
当任务涉及 workflow canvas(画布 / 工作流 / 编排)或 canvas_* 工具时,
|
|
92
|
+
先调用 `skill` 工具加载 `workflow-canvas`。
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 开发
|
|
96
|
+
|
|
97
|
+
编辑 `client.js` / `index.js` 后重载应用;客户端改动热更生效,Host 改动需要重启。内部实现见 [docs/DETAIL.md](docs/DETAIL.md)。
|
|
98
|
+
|
|
99
|
+
## 许可
|
|
100
|
+
|
|
101
|
+
MIT —— 见 [LICENSE](LICENSE)。
|