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 via children.
  • Event Writing: Each call appends a todo/tree event snapshot to the session of the owning agent, replayed as last-write-wins.
  • Projection Read: Publishes a todoTree projection for the UI to read the current entire tree, cleared by the next turn/start.
  • Parallel Control: Supports allowParallelInProgress configuration. true allows multiple nodes to be in_progress simultaneously, while false restricts only one node across the entire tree.
  • State Constraints: A parent node can only be completed when all child nodes are completed.
  • Data Normalization: Deduplicates content among sibling nodes at the same level; empty children are normalized to omit the field.
  • Depth Control: Supports maxDepth configuration, with a default of 3 and an upper limit of the protocol constant SCHEMA_DEPTH.
  • Web Side: Registers a conversation.input.dock plan bar, reads the todoTree projection, and lists nodes with indentation based on depth.
  • Web Side: Registers a tool.call.toolview row, with priority: -1 to 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.

  1. Duplicate an existing agent preset to avoid directly modifying the shared preset.
  2. Remove the - id: tool-todo entry and its config sub-key from the duplicate.
  3. 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 register todo_write, and only one can be mounted in a deployment; the flat tool must be explicitly disabled.
  • allowParallelInProgress is a required configuration with no default value.
  • maxDepth defaults to 3, with an upper limit of SCHEMA_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.0 is ESM and rejected by the shell, so it has been deprecated; use versions from 0.2.1 onward.
  • The peer range of this package is uniformly pinned to ^0.1.0-rc.6.
  • @deepseek-ai/dsh-session declares an unpublished peer @deepseek-ai/dsh-type-meta, so installation will fail if autoInstallPeers is enabled.
  • This package will run within the current dsh process; 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