dsh-workflow-canvas 1.5.0 → 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/README.md +7 -5
- package/README.zh.md +7 -5
- package/client.js +1371 -288
- package/docs/DETAIL.md +24 -12
- package/docs/MECHANISM.md +15 -14
- package/docs/MECHANISM.zh.md +15 -14
- package/index.js +795 -81
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +4 -3
- package/skills/workflow-canvas/SKILL.md +8 -7
- package/docs/images/add-node-shift-a.gif +0 -0
- package/docs/images/canvas-demo-zh.png +0 -0
- package/docs/images/canvas-demo.png +0 -0
- package/docs/images/chat-patch-canvas.gif +0 -0
- package/docs/images/condition-switch-run.gif +0 -0
- package/docs/images/connect-and-cut.gif +0 -0
- package/docs/images/lead-pause-resume.gif +0 -0
- package/docs/images/node-condition-en.png +0 -0
- package/docs/images/node-condition-zh.png +0 -0
- package/docs/images/node-config.gif +0 -0
- package/docs/images/node-entry-en.png +0 -0
- package/docs/images/node-entry-zh.png +0 -0
- package/docs/images/node-lead-en.png +0 -0
- package/docs/images/node-lead-zh.png +0 -0
- package/docs/images/node-subagent-en.png +0 -0
- package/docs/images/node-subagent-zh.png +0 -0
- package/docs/images/parallel-and-inspect.gif +0 -0
- package/docs/images/retry-loop-en.png +0 -0
- package/docs/images/retry-loop-zh.png +0 -0
package/locale/en.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Workflow canvas",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Visually orchestrate subagents, conditional branching, Lead gates, controlled retry loops & zero-token run summaries.",
|
|
5
5
|
"detail": "docs/DETAIL.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/locale/zh.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-workflow-canvas",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "A visual multi-agent workflow canvas for DeepSeek Harness — parallel subagents, conditional branching
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"description": "A visual multi-agent workflow canvas for DeepSeek Harness — parallel subagents, conditional branching, controlled retry loops, Lead gates & zero-token run summaries in the sidebar.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"exports": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"client.js",
|
|
17
17
|
"cordis.patch.yml",
|
|
18
18
|
"locale/*.json",
|
|
19
|
-
"docs",
|
|
19
|
+
"docs/*.md",
|
|
20
20
|
"skills",
|
|
21
21
|
"icon.svg",
|
|
22
22
|
"LICENSE",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"dsh": ">=0.2.2-rc.1 <0.3.0-0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
|
+
"check": "node scripts/check.mjs",
|
|
53
54
|
"test": "node --test"
|
|
54
55
|
},
|
|
55
56
|
"dsh": {
|
|
@@ -23,7 +23,7 @@ A canvas is a DAG of agents the user can see and edit.
|
|
|
23
23
|
| inspecting or editing a manually drawn / preset canvas | `canvas_inspect` first to read node ids, models and links |
|
|
24
24
|
| a visual workflow, pipeline, or graph of agents | `canvas_generate` (replaces the canvas) |
|
|
25
25
|
| a change to the existing canvas | `canvas_patch` (edits in place, keeps the layout) |
|
|
26
|
-
| running the canvas | `canvas_workflow` (supports `leadResult`, `task` override, `reset: true`) |
|
|
26
|
+
| running the canvas | `canvas_workflow` (supports `leadResult`, `task` override, `reset: true`, `cancel: true`) |
|
|
27
27
|
|
|
28
28
|
Prefer `canvas_patch` for edits: it merges by node id, so renamed, re-roled or re-modelled nodes keep their position and untouched nodes stay as they are. Call `canvas_inspect` first if you do not already know the current node ids. Regenerating throws the layout away.
|
|
29
29
|
|
|
@@ -53,14 +53,15 @@ Output sockets determine link type; every non-entry node has a single universal
|
|
|
53
53
|
## Running
|
|
54
54
|
|
|
55
55
|
1. The canvas must be enabled (the pill over the canvas); `canvas_workflow` refuses while it is disabled. While enabled, the host automatically injects a per-session runtime context reminder on each turn.
|
|
56
|
-
2. You may pass `task` to override the entry Lead's task (handy when reusing a preset), `reset: true` to discard a paused run and start from scratch, `retryFailed: true` to reuse succeeded nodes and re-run only failed/empty/unfinished nodes plus their downstream, `fromNodes: [...]` to re-run from specific node ids/labels, `clearMemory: true` to forget saved `keepSession` child sessions, and `maxParallel` (1–8) to adjust concurrency.
|
|
56
|
+
2. You may pass `task` to override the entry Lead's task (handy when reusing a preset), `reset: true` to discard a paused run and start from scratch, `cancel: true` to cleanly terminate an active or paused (`need-lead`) run, `retryFailed: true` to reuse succeeded nodes and re-run only failed/empty/unfinished nodes plus their downstream, `fromNodes: [...]` to re-run from specific node ids/labels, `clearMemory: true` to forget saved `keepSession` child sessions, and `maxParallel` (1–8) to adjust concurrency.
|
|
57
57
|
3. Chained Lead nodes with **both** zero subagent upstream **and** an empty `role` — as well as dangling dead-end subagents (zero outgoing edges while an active downstream Lead exists) — are rendered dashed on the canvas and skipped at run time. Chained `Lead → Lead` stages with a non-empty `role` (or Lead + Subagent → Lead) are valid and active.
|
|
58
58
|
4. Subagent capability (`preset: standard | minimal`) narrows the toolset within the main chat's permission ceiling; it cannot elevate past the parent session's sandbox/approval mode.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
5. Subagent nodes run in a dynamic concurrency pool of up to four: as soon as any node finishes, newly unblocked downstream subagents start immediately without waiting for slower siblings.
|
|
60
|
+
6. Intermediate downstream Lead nodes pause the run (`status: "need-lead"`). Complete that Lead step yourself, then call `canvas_workflow` again with `leadResult` to resume downstream nodes — do not spawn an agent for it. If the user asks to cancel/abort instead, call `canvas_workflow({ cancel: true })`.
|
|
61
|
+
7. A **terminal** Lead node (zero remaining downstream nodes) finishes directly with `status: "done"` and `finalLead`: complete the review/summary and reply directly to the user — no extra `canvas_workflow` callback is needed.
|
|
62
|
+
8. When a `session-ref` link points into that Lead node the result lists `sessions: [{ label, childId }]`; you may message those agents directly to follow up.
|
|
63
|
+
9. Only assign image/visual inspection roles to models that declare image input support.
|
|
64
|
+
10. Live timing, fallback/session badges, and loop retry breakdowns are written purely to local `.run.json` telemetry for the sidebar's zero-token **Run Summary** (`📊 Run summary`) and are never injected into model prompts.
|
|
64
65
|
|
|
65
66
|
## Failures & verification iron rule
|
|
66
67
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|