Vai al contenuto principale
L

dsh-task-dag

leemancheung/dsh-task-dag

Visualizza i subagent di una sessione e le esecuzioni di workflow durevoli come un DAG live con stato, navigazione e cronologia resistente ai riavvii

Installazione

dsh plugin --profile web add github:leemancheung/dsh-task-dag

README

dsh-task-dag

A live task topology for DeepSeek Harness Web.
See Sessions, delegated subagents, and durable workflows as one navigable DAG.

Awesome Awesome DSH Plugin CI Release License

English · 中文

dsh-task-dag visual overview

At a glance

dsh-task-dag turns DSH's existing Client projections into a top-to-bottom dependency graph. It keeps no parallel workflow database and sends no polling requests: when Session state changes, the graph changes with it.

CapabilityBehavior
Live topologyReacts to Session and subagent catalog snapshots without Host polling.
Durable workflowsReconstructs workflow phases and members from workflow-run Conversation Nodes after restart.
Clear ownershipGroups workflow members under workflow nodes instead of drawing duplicate root-to-child edges.
Direct navigationOpens healthy, list-visible subagent Sessions from their graph nodes.
Canvas controlFits the whole graph or pans the original-size canvas; nodes can be dragged and keep their rearranged positions while the current Session panel is reopened.
Bounded layout persistenceManual node positions live only in the current page's current-Session React state; switching Sessions, refreshing the page, or restarting DSH restores deterministic automatic layout. Workflow topology itself is rebuilt from durable Conversation Nodes.
Robust projectionRejects broken or cyclic lineage while retaining deterministic layers for valid deep dependency chains.
Native presentationUses DSH theme semantics, restrained status colors, and custom SVG icons in light and dark modes.
Lifecycle safeRegisters UI and styles through Cordis lifecycle ownership and removes them on unload.

Live screenshot

Captured from a running DSH Web Session with task labels anonymized. The panel, layout, edges, controls, and status presentation are the actual plugin UI.

dsh-task-dag running in DSH Web

Install

dsh plugin --profile web add github:LeemanCheung/dsh-task-dag

Restart the current DSH Web process once after the first installation, then refresh the page. The Task DAG action appears in the Session header.

For a version-pinned installation:

dsh plugin --profile web add github:LeemanCheung/dsh-task-dag#v1.2.0

Using the graph

ActionResult
Select Task DAGOpens the Session-scoped graph panel, enables the related parent catalogs, and refreshes them.
Drag empty canvasPans the scrollable original-size canvas.
Drag a nodeRearranges it while its edges stay in sync; the layout survives close and reopen for the current Session.
Select a subagent node, or press Enter / Space on itOpens that Session when it is available in the Session list.
Toggle fit modeSwitches between a whole-graph overview and the original scrollable canvas.
RefreshRefreshes observed subagent catalogs; workflow nodes remain projection-driven.
Drag the title barRepositions the panel without capturing toolbar controls.
Press Escape or select closeCloses the panel and restores focus to the trigger. The dialog has no focus trap and does not offer keyboard dragging for the panel, canvas, or nodes.

Status colors are deliberately limited to business blue, success green, error red, and warning amber. All other hierarchy is expressed through spacing, typography, borders, and line styles.

Architecture

dsh-task-dag projection architecture

The browser plugin combines three durable Client-facing sources:

  • SessionListState.byId and parentId provide subagent lineage.
  • SessionListState.subagentsByParent provides labels, modes, activity, and catalog health.
  • workflow-run Conversation Nodes provide workflow phases, members, and outcomes.

The package-owned graph-model Module normalizes lineage, inserts workflow grouping nodes, derives navigation capability, and lays out stable vertical layers. The UI Module renders that projection into conversation.session.header.actions.

There is no process-local workflow cache, model prompt contribution, model tool, Host RPC endpoint, or polling loop.

Projection boundaries

Only descendants that can be traced to the current Session through origin: "subagent" lineage are shown. Orphans, missing-parent chains, and cycles are ignored. A catalog's running activity takes precedence over a completed Session summary; workflow members use their workflow-run status; unknown statuses render as historical/idle. If the same member appears in more than one workflow, the last parsed workflow membership owns its displayed grouping and status.

Security and permissions

This is a browser-only, read-only visualization plugin. It does not read workspace files, execute commands, open network connections, register model tools, or persist Session content and credentials.

See SECURITY.md for the reporting policy and complete trust boundaries. Private vulnerability reporting is enabled for the repository.

Development

The runtime package declares Node.js 20+. For development and the pinned jsdom test stack, use Node.js 20.19+, 22.13+, or 24+; CI currently runs Node.js 22.

npm install
npm run check

The check pipeline:

  1. validates source syntax and the pure graph-model Module;
  2. runs graph-model unit tests for lineage, workflow grouping, deterministic layout, and deep chains;
  3. rebuilds and validates the precompiled browser module;
  4. runs jsdom interaction smoke tests for controls, canvas panning, persistent node dragging, and node navigation;
  5. verifies in CI that committed lib/client.js is reproducible from source.

These are pure-model and jsdom smoke checks, not a full DSH Web end-to-end suite. Theme fidelity, responsive layout, complete focus behavior, and unload behavior in a real profile still need manual or browser-E2E verification.

scripts/build.mjs embeds src/graph-model.js, src/client.js, and src/style.css into the committed lib/client.js. Do not edit that generated file directly: change src/, then run npm run build or npm run check before committing.

Troubleshooting

SymptomCheck
Task DAG is missingConfirm this is the Web profile, restart dsh web, and refresh the page.
A node cannot openOnly Sessions that remain visible in DSH's Session list are navigable.
Child status/labels look staleSelect Refresh to refresh observed subagent catalogs.

Remove

dsh plugin --profile web remove dsh-task-dag

License

MIT © LeemanCheung

Plugin correlati