Preface¶
DSH already has a flat list-style dsh-tool-todo tool plugin for maintaining the todo_write task list. If the deployment side needs to organize tasks by parent-child hierarchy instead of laying out tasks in a flat list, an alternative solution that maintains the DSH tool registration form but changes the data shape to a tree structure is required.
Below is an introduction to dsh-tool-todo-tree. It is a mutually exclusive alternative to the flat dsh-tool-todo: both register under the same tool name todo_write, and only one can be mounted in a deployment.
What Is This¶
The repository is Chinesezjc/dsh-tool-todo-tree, licensed under MIT.
This plugin is for DeepSeek Harness (DSH), positioned as a nested tree-shaped todo_write tool plugin. It replaces the flat list of todo_write with a task tree nested via children, and provides corresponding plan bars and tool row displays on the web side.
The package is a standalone buildable DSH bundle, with all dependencies sourced from published @deepseek-ai/* npm packages, and does not require the DSH source tree.
Core Features¶
todo_write: Full replacement write of the entire task tree, with nodes nested viachildren.- Event Writing: Each call appends a
todo/treeevent snapshot to the session of the owning agent, replayed as last-write-wins. - Projection Read: Publishes a
todoTreeprojection for the UI to read the current entire tree, cleared by the nextturn/start. - Parallel Control: Supports
allowParallelInProgressconfiguration.trueallows multiple nodes to bein_progresssimultaneously, whilefalserestricts only one node across the entire tree. - State Constraints: A parent node can only be
completedwhen all child nodes arecompleted. - Data Normalization: Deduplicates
contentamong sibling nodes at the same level; emptychildrenare normalized to omit the field. - Depth Control: Supports
maxDepthconfiguration, with a default of 3 and an upper limit of the protocol constantSCHEMA_DEPTH. - Web Side: Registers a
conversation.input.dockplan bar, reads thetodoTreeprojection, and lists nodes with indentation based on depth. - Web Side: Registers a
tool.call.toolviewrow, withpriority: -1to override the built-in flat row, and performs layer-by-layer statistics. - Browser-side Artifact: In closure-factory form, with CSS Modules compiled into the bundle and injected into the stylesheet.
Installation and Activation¶
First, install it to a specified profile using the DSH plugin command:
dsh plugin --profile <name> add dsh-tool-todo-tree
This step will add the package to the profile dependencies and register cordis.patch.yml as a layer bundle.
An example bundle configuration is shown below. It mounts the tree tool while disabling the flat tool:
- id: tool-todo
disabled: true
- insert:
- id: tool-todo-tree
name: dsh-tool-todo-tree
config:
maxDepth: 3
allowParallelInProgress: true
If installing from a local tarball, you can use the package produced by pnpm pack.
If installing from a git ref, you can use:
github:Chinesezjc/dsh-tool-todo-tree#<sha>
During git installation, pnpm will run prepare, which needs to be allowed in the profile’s pnpm-workspace.yaml.
Typical Usage¶
Enabling the tree tool requires not only installing this package but also removing the flat tool entry from the agent preset.
- Duplicate an existing agent preset to avoid directly modifying the shared preset.
- Remove the
- id: tool-todoentry and itsconfigsub-key from the duplicate. - Use this modified preset when creating a session.
Do not add tool-todo-tree to the preset. This tool intentionally rejects scoped context; adding it will cause session.create to fail immediately; it only mounts at the host layer and reaches the session through inheritance.
Verified preset impacts include: the shipped standard, code, and cordis presets each have a line - id: tool-todo, while minimal does not. A same-named tool at the preset layer will override a same-named tool at the host layer, so a deployment that only runs dsh plugin add may still exhibit flat behavior.
Applicable Scenarios and Notes¶
Suitable for deployments that need to use a tree-shaped task plan in DSH as a replacement for the flat dsh-tool-todo. Before use, confirm the following limitations:
- Mutually exclusive with the flat
dsh-tool-todo: Both registertodo_write, and only one can be mounted in a deployment; the flat tool must be explicitly disabled. allowParallelInProgressis a required configuration with no default value.maxDepthdefaults to 3, with an upper limit ofSCHEMA_DEPTH.- The plan bar only indents based on depth and does not collapse; wider trees rely on the plan bar’s own scrolling.
- The browser artifact for
0.2.0is ESM and rejected by the shell, so it has been deprecated; use versions from0.2.1onward. - The peer range of this package is uniformly pinned to
^0.1.0-rc.6. @deepseek-ai/dsh-sessiondeclares an unpublished peer@deepseek-ai/dsh-type-meta, so installation will fail ifautoInstallPeersis enabled.- This package will run within the current
dshprocess; before installation, you should check the source code and license; the license is MIT.
Links¶
- Community Directory Page:
https://www.skillhub.cn/plugins/Chinesezjc/dsh-tool-todo-tree - GitHub:
https://github.com/Chinesezjc/dsh-tool-todo-tree