dsh-workflow-canvas 1.0.2 → 1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-workflow-canvas",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "A visual subagent-workflow canvas for DeepSeek Harness, docked in the sidebar.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -12,6 +12,7 @@ A canvas is a DAG of agents the user can see and edit.
12
12
  - **Entry Lead** (`id: "lead"`, blue top bar) — created automatically by `canvas_generate` to hold the overall `task`. **Do not author a separate entry Lead node** — wire first-wave nodes directly from `from: "lead"`. The entry Lead **never** triggers `need-lead` (it does not pause before Wave 1).
13
13
  - **Downstream Lead** (`kind: "lead"`, blue top bar) — performed by the conversation itself, never spawned. Any added non-entry Lead node holds a `role` and pauses the run (`status: "need-lead"`) so you can decide, review, or integrate before continuing.
14
14
  - **Subagent** (`kind: "agent"`, green top bar) — spawned as a child agent with its own model, reasoning effort, capability scope, fallback model and memory switch. Wire every subagent's output into a downstream node or final Lead so nothing becomes a dead end.
15
+ - **Condition** (`kind: "condition"`, amber top bar) — lightweight read-only (`minimal`) branch judge that evaluates upstream outputs (including failure/incomplete flags) against `role`. Defaults to binary `if/else` (`branch: "true"` / `"false"`, returning `{ pass, reason }`); set `branches: ["通过", "小修", "重做"]` (2+ entries) for multi-way `switch/case` routing (`{ branches: [...], reason }`), with optional `multiMatch: true` to run all matching branches in parallel (and returning `[]` skips all downstream branches when none match). Unchosen branches are pruned automatically without spawning (even when a side `session-ref` wire connects an upstream ancestor into a pruned branch), and branches can converge back into a shared downstream node or terminal Lead.
15
16
 
16
17
  ## Which tool to call
17
18
 
@@ -26,7 +27,7 @@ Prefer `canvas_patch` for edits: it merges by node id, so renamed, re-roled or r
26
27
 
27
28
  ## Node fields
28
29
 
29
- `id` (stable handle, never reuse it for a different node), `kind` (`lead` or `agent`), `label` (display name), `role` (what this step must do — this is the instruction the node actually follows), `provider` / `model`, `reasoning` (an effort id declared by that model), `preset` (`standard` or `minimal`), `keepSession`, `fallbackModel` / `fallbackProvider`.
30
+ `id` (stable handle, never reuse it for a different node), `kind` (`lead`, `agent`, or `condition`), `label` (display name), `role` (what this step must do, or for `condition` nodes the routing rule), `branches` (optional for `condition` nodes: 2–5 branch names for `switch/case`), `provider` / `model`, `reasoning` (an effort id declared by that model), `preset` (`standard` or `minimal`), `keepSession`, `fallbackModel` / `fallbackProvider`.
30
31
 
31
32
  Fill `role` for every node. A node with an empty role still runs, but it invents its own task and may wander.
32
33
 
@@ -45,7 +46,7 @@ Capability (`preset`) is a two-state switch:
45
46
  | `structured` | blue | a JSON object; the upstream node is asked for structured output automatically, so do not set that by hand |
46
47
  | `session-ref` | purple | the upstream child session; the downstream step runs inside it |
47
48
 
48
- Links only join matching types. Nodes the entry Lead cannot reach are skipped at run time and drawn dashed.
49
+ Output sockets determine link type; every non-entry node has a single universal left input that accepts any incoming channel (`prompt`, `structured`, `session-ref`, or condition branches). Nodes the entry Lead cannot reach are skipped at run time and drawn dashed.
49
50
 
50
51
  ## Running
51
52