dsh-workflow-canvas 0.1.2 → 0.2.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 +163 -130
- package/README.zh.md +125 -101
- package/client.js +1326 -252
- package/docs/DETAIL.md +42 -28
- package/docs/images/canvas-demo-zh.png +0 -0
- package/docs/images/canvas-demo.png +0 -0
- package/index.js +273 -84
- package/package.json +1 -1
- package/skills/workflow-canvas/SKILL.md +9 -7
- package/docs/images/node-types.svg +0 -86
package/docs/DETAIL.md
CHANGED
|
@@ -1,53 +1,67 @@
|
|
|
1
1
|
# Workflow canvas
|
|
2
2
|
|
|
3
|
-
A
|
|
4
|
-
|
|
5
|
-
spawned for real, Lead nodes pause the run and
|
|
6
|
-
itself.
|
|
3
|
+
A node-graph canvas for orchestrating DSH subagents, docked in the right
|
|
4
|
+
sidebar. Draw a DAG (or load a starter template), enable it, and ask the agent
|
|
5
|
+
to run it — subagent nodes are spawned for real, Lead nodes pause the run and
|
|
6
|
+
are performed by the conversation itself.
|
|
7
7
|
|
|
8
8
|
## Canvas
|
|
9
9
|
|
|
10
10
|
- **Subagent node** (green top bar): spawns a child agent with its own
|
|
11
|
-
`provider` / `model` / `reasoning effort` / capability scope
|
|
12
|
-
reuses the node's session; optional
|
|
11
|
+
`provider` / `model` / `reasoning effort` / capability scope (`standard` or
|
|
12
|
+
`minimal`). Optional **Memory** reuses the node's child session; optional
|
|
13
|
+
**Fallback** retries once on another model.
|
|
13
14
|
- **Lead node** (blue top bar): performed by the conversation, never spawned. The
|
|
14
|
-
entry node carries the task; added Lead nodes carry a role.
|
|
15
|
-
- **Sockets are typed** (`prompt` / `structured` / `session`); a link
|
|
16
|
-
|
|
15
|
+
entry node carries the overall task; added Lead nodes carry a role.
|
|
16
|
+
- **Sockets are typed** (`prompt` / `structured` / `session`); a link only joins
|
|
17
|
+
the same type (either direction), and cycles are blocked immediately. Drag a
|
|
18
|
+
connected input away to detach.
|
|
17
19
|
- Nodes the entry cannot reach are drawn dashed and skipped at run time.
|
|
18
|
-
- Wheel zooms around the cursor;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
- Wheel zooms around the cursor; middle-drag (or `Space` + drag) pans; `⊡ Fit`
|
|
21
|
+
fits all nodes into the visible viewport; the percentage button resets to 100%
|
|
22
|
+
on the Lead.
|
|
23
|
+
- Marquee selection: drag on empty canvas to select multiple nodes; dragging any
|
|
24
|
+
selected node moves the whole selection.
|
|
25
|
+
- Right-drag across links cuts them on release; the swept path and links about to
|
|
26
|
+
be cut highlight in red (toggle under `⋯`).
|
|
27
|
+
- Shortcuts: `Shift+A` opens the Add Node menu at the cursor,
|
|
28
|
+
`Ctrl+D` duplicates selected nodes, `Delete` removes selected nodes, `Ctrl+Z`
|
|
29
|
+
undoes, and `Esc` closes popups. `⋯` also provides `⊞ Auto layout`,
|
|
30
|
+
`⇧ Copy JSON`, and `Visual effects` (`Minimal` / `Standard` / `Vivid`).
|
|
31
|
+
- Click any subagent node's status pill (e.g. `Done ↗`) to jump straight to its
|
|
32
|
+
live subagent chat pane.
|
|
24
33
|
|
|
25
34
|
## Editing from chat
|
|
26
35
|
|
|
27
36
|
| Tool | Effect |
|
|
28
37
|
|---|---|
|
|
38
|
+
| `canvas_inspect` | reads the current session canvas (enabled state, task, nodes, links) |
|
|
29
39
|
| `canvas_generate` | replaces the canvas with a node/edge sketch |
|
|
30
40
|
| `canvas_patch` | edits in place: update nodes by id, add/remove nodes and links |
|
|
31
41
|
|
|
32
|
-
|
|
33
|
-
1.5s. A patch document is applied in merge mode
|
|
42
|
+
`canvas_generate` and `canvas_patch` publish `<workspace>/.dsh/canvas/<session>.json`,
|
|
43
|
+
which the panel polls every 1.5s. A patch document is applied in merge mode so
|
|
44
|
+
node positions survive.
|
|
34
45
|
|
|
35
46
|
## Running
|
|
36
47
|
|
|
37
|
-
Subagent nodes run in parallel waves (up to 4)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
48
|
+
Subagent nodes run in parallel waves (up to 4) via `canvas_workflow`, which also
|
|
49
|
+
supports `task` (override the entry task for template reuse) and `reset: true`
|
|
50
|
+
(discard a paused run). The run stops at every Lead node with
|
|
51
|
+
`status: "need-lead"` and returns the collected results, any unrecovered
|
|
52
|
+
`failed` nodes, plus — for `session` links into that Lead — the upstream child
|
|
53
|
+
session ids so the conversation can keep talking to those agents.
|
|
41
54
|
|
|
42
55
|
## Memory
|
|
43
56
|
|
|
44
|
-
|
|
45
|
-
memory on resumes that child (cold resume after a restart);
|
|
46
|
-
the record is dropped and the node starts fresh.
|
|
57
|
+
`node id → child session id` is persisted on disk, keyed per session. A node
|
|
58
|
+
with memory on resumes that child (including cold resume after a Host restart);
|
|
59
|
+
if the Host refuses, the record is dropped and the node starts fresh.
|
|
47
60
|
|
|
48
61
|
## Limits
|
|
49
62
|
|
|
50
|
-
-
|
|
51
|
-
`dsh web`,
|
|
52
|
-
|
|
53
|
-
-
|
|
63
|
+
- Saved presets live in browser storage and do not auto-sync between the Desktop
|
|
64
|
+
app and `dsh web`, nor across machines (use `⋯ → ⇧ Copy JSON` and `⇩ Import`
|
|
65
|
+
to share or migrate them; starter templates are built in under `☰ Presets`).
|
|
66
|
+
- Lead steps have no tracked state; they show **Runs in chat**.
|
|
67
|
+
- Up to 4 nodes run at a time.
|
|
Binary file
|
|
Binary file
|