Skip to main content

dsh-task-dag

6Stars0Forks0Issues0Watchers

Added a "Task DAG" entry to the DSH Web session title bar, rendering the current session, delegated sub-agents, and persistent workflows as a real-time navigable dependency graph.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
dagdeepseek-harnessdsh-pluginsubagentsvisualizationworkflow

Install

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

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin LeemanCheung/dsh-task-dag for me: review the repository at https://github.com/LeemanCheung/dsh-task-dag first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

At a Glance

Add a "Task DAG" entry to the DSH Web session title bar that renders the current session, its delegated sub-agents, and persistent workflow nodes into a top-down dependency graph. Nodes are draggable and clickable for navigation—a visualization tool for troubleshooting "what sub-tasks were derived from this task and which step are they at."

Core Capabilities

  • Real-time Topology: Converts DSH's existing client projection into a top-down DAG; the graph refreshes when session state changes without Host-side polling
  • Persistent Workflow Recovery: After DSH restarts, reconstructs workflow stages and members from workflow-run session nodes, preserving context without loss
  • Workflow Grouping: Collapses workflow members under workflow nodes to avoid drawing duplicate direct edges from the root session to members
  • Direct Navigation: Click (or press Enter/Space) on healthy sub-agent nodes still in the Session list to jump directly to the corresponding session
  • Canvas Controls: Switch between "Fit All" and "Original Size Scrollable" views; drag empty areas to pan the canvas
  • Node Drag Repositioning: Drag nodes to re-layout; edges follow in real-time; adjusted positions persist when the current Session is closed and reopened
  • State Visualization: Colors are restrained to business blue/success green/error red/warning amber四种; other levels are expressed through spacing, fonts, borders, and line styles
  • Safe Uninstallation: UI and styles are registered through Cordis lifecycle; completely removed when the plugin is uninstalled with no DOM residue

Technical Implementation

  • Language: JavaScript (src/client.js uses CommonJS, src/graph-model.js uses ESM, scripts/build.mjs uses ESM)
  • Key Dependencies: @deepseek-ai/dsh-client-runtime / @deepseek-ai/dsh-client-locale / @deepseek-ai/dsh-client-ui-conversation / @deepseek-ai/dsh-client-ui-primitives / @deepseek-ai/dsh-client-ui-workflow-run / react ^18.2.0
  • Architecture Pattern: Pure Cordis client plugin; cordis.patch.yml registers a plugin named task-dag in the host; apply(ctx) injects TaskDagAction into the session title bar via ctx.slots.inject('conversation.session.header.actions'), uses ctx.effect to register stylesheets and Chinese/English dictionaries, and collapses the catalog via ctx.sessions.setSubagentCatalogOpen when closing the panel; the DAG is computed by pure functions buildGraph + graphLayout, with UI rendered via React + ReactDOM Portal to document.body
  • Entry Files: src/client.js (UI components) + src/graph-model.js (bloodline normalization, workflow grouping, deterministic vertical layout), bundled by scripts/build.mjs into browser-loadable lib/client.js

Use Cases

For users responsible for managing multi-Agent collaboration sessions: when a Session spawns many one-off sub-agents or persistent sub-agents, and you want to instantly see "which step is still running, who spawned whom, and which workflow stage they belong to." Suitable for demo scenarios and on-site troubleshooting of complex multi-step tasks, avoiding the need to scroll back and forth in the sub-session list.

Prerequisites & Compatibility

DependencyMinimum VersionDescription
DSHNot declaredpackage.json does not declare dsh version dependency; dsh.client.platform explicitly set to web, only Web profile available
Node.js>= 20package.json engines.node declares >=20; development recommends 20.19+ / 22.13+ / 24+, CI currently uses Node 22
PlatformWebpackage.json dsh.client.platform is web; browser-based read-only visualization, CLI / Desktop profile not supported
Native ModulesNoneOnly uses DSH client runtime + React 18, no native dependencies introduced

Installation

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

Configuration

No additional configuration required. After installation, restart dsh web once, and the "Task DAG" entry will appear in the session title bar—no files or environment variables need to be edited.

FAQ

Q: I don't see the "Task DAG" entry in the session after installation. What should I do?

A: Confirm the profile is web (add --profile web to the command). First-time installation requires restarting the dsh web process and refreshing the browser page; subsequent enablements or upgrades typically don't require a restart.

Q: Clicking a node doesn't open the corresponding session. What should I do?

A: Only sub-agent nodes that still appear in the DSH Session list are navigable; if a session is archived, deleted, or not currently visible, its node won't respond to clicks. Use the "Refresh" button in the panel to re-fetch the sub-agent catalog.

Q: I dragged nodes to adjust their positions. Will they persist for the next session?

A: Positions are only preserved in the current page's React state for the current Session. After switching to another Session, refreshing the page, or restarting DSH, it will return to the plugin's deterministic auto-layout; the workflow topology itself is still rebuilt from persistent workflow-run data.

Q: Does this plugin read my files, make network requests, or inject prompts?

A: No. This is a read-only visualization plugin that runs entirely in the browser; it doesn't read workspace files, send network requests, register model tools, or persist session content or credentials. See SECURITY.md for details.

Q: Is CLI or Desktop profile supported?

A: No. package.json dsh.client.platform explicitly declares "web", and cordis.patch.yml only registers a client-side plugin with no node-side implementation.

Q: The status or labels in the graph look outdated. What should I do?

A: The panel automatically fetches the observed sub-agent catalog upon opening; if there's a discrepancy, click the "Refresh" button in the toolbar to fetch again. Workflow nodes are always driven by persistent data projection; the refresh button won't rearrange workflow ownership.

Q: How do I uninstall?

A: Run dsh plugin --profile web remove dsh-task-dag, then restart dsh web once.

Ease of Use

Beginner — Plug and play with no config files or environment variables; click the entry to open the graph, drag nodes, click to navigate, and other interactions are all GUI-based—no code or command-line operations required.

Known Issues & Limitations

  • Layout preservation is bounded: manually dragged node positions are only stored in the current page's React state for the current Session; switching Sessions, refreshing the page, or restarting DSH returns to deterministic auto-layout, see source code at src/client.js:549 useEffect(() => { setNodePositions({}); }, [sessionId])
  • Workflow member attribution uses "last resolved workflow" to overwrite previous attribution and status, so if the same sub-agent is referenced by multiple workflows simultaneously, it will be grouped under the last resolved workflow, see source code at src/graph-model.js:170-175
  • Projection discards orphans that cannot be traced to the current Session, missing parent node chains, and circular bloodlines, while still generating deterministic vertical levels for legitimate deep dependency chains, see source code at src/graph-model.js:72-91
  • Status colors are intentionally limited to business blue, success green, error red, and warning amber四种; other levels (workflow vs sub-agent vs root session) are distinguished only by icons, spacing, borders, and line styles, see source code at src/client.js:69 (zh dictionary status.*) and README.md:71
  • No focus trap: when the panel is open, only Escape to close and return focus to the entry button; keyboard dragging of panel, canvas, or nodes is not supported, see source code at src/client.js:558-568 and README.md:69
  • Current check pipeline (npm run check) only covers syntax, pure model unit tests, and jsdom smoke testing; theme visuals, responsive layout, focus, and uninstallation behavior in real profiles still require manual or browser E2E verification, see source code at README.md:114-115

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/LeemanCheung/dsh-task-dag)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory