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/docs/DETAIL.md CHANGED
@@ -1,53 +1,67 @@
1
1
  # Workflow canvas
2
2
 
3
- A Blender-style node canvas for orchestrating DSH agents, docked in the right
4
- Sidebar. Draw a DAG, enable it, and ask the agent to run it — subagent nodes are
5
- spawned for real, Lead nodes pause the run and are performed by the conversation
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. Optional **记忆**
12
- reuses the node's session; optional **备用** retries once on a fallback model.
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 can only
16
- join the same type, in either direction. Drag a connected input away to detach.
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; the percentage button resets and recentres on the
19
- Lead; `◎ 定位` recentres without changing zoom.
20
- - Marquee selection: press on empty canvas and drag; dragging any selected node
21
- moves the whole selection.
22
- - Right-drag across links cuts them on release; the swept path and the links about
23
- to be cut are drawn in red. Toggle it under `⋯`.
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
- Both publish `<workspace>/.dsh/canvas/<session>.json`, which the panel polls every
33
- 1.5s. A patch document is applied in merge mode, so node positions survive.
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). The run stops at every Lead node
38
- with `status: "need-lead"` and returns the collected results plus, for `session`
39
- links into that Lead, the upstream child session ids so the conversation can keep
40
- talking to those agents.
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
- `节点 id → child session id` is remembered on disk, keyed per session. A node with
45
- memory on resumes that child (cold resume after a restart); if the Host refuses,
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
- - Presets live in browser storage: not shared between the Desktop app and
51
- `dsh web`, not synchronised across machines.
52
- - Lead steps have no tracked state; they show **由对话执行**.
53
- - Up to 4 nodes run at a time.
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