Preface

When running agent tasks with DSH, a session often involves multiple rounds of reasoning and dozens of tool calls, making the event log very long when listed line by line. The built-in “Trajectory” view is ledger-style; it’s searchable, but it’s not intuitive to quickly answer questions like “What happened in this round?”, “Which step was slowest?”, or “Where were tokens spent?”. DSH’s philosophy is that everything is a plugin, and the session view itself has seams. The dsh-decision-map introduced below uses these seams to create a layer of visualization.

What is it

dsh-decision-map (Decision Map) is a DeepSeek Harness bundle plugin maintained by Scitiger-AI, version 0.1.0, MIT license. One-sentence positioning: renders the current session’s execution trajectory into a timeline of cards and statistics that can be understood at a glance.

It is a “dual-sided” plugin:

  1. The node half registers a decisionMap session projection, folding event logs into a timeline and stats.
  2. The browser half registers a “Decision Map” tab in the session view, reading the projection and rendering it.

The package structure is also straightforward:

dsh-decision-map/
├── package.json          # Dual package identity declaration (dsh.bundle.patch + dsh.client)
├── cordis.patch.yml      # bundle patch: inserts a line { id: decision-map, name: dsh-decision-map }
├── lib/
   ├── index.js          # node half: registers decisionMap session projection
   └── client.js         # browser half: registers conversation.view tab
└── README.md

Core Features

Card-based Timeline

After installation, the session view (conversation.view slot, order 20) gains a “Decision Map” tab. Each action on the timeline is a card, categorized into three types:

  • 💭 Thinking (Amber): This step produced reasoning
  • 🔧 Tool (Blue): A tool call
  • ✍️ Write File (Green): A call where the tool name is exactly write / edit

Rounds are separated by “Round N · N actions · Span X”. Each card is labeled with the type, tool name, duration, and Round N · Step S, with details indented below—showing reasoning snippets for Thinking and parameters for Tools.

Clicking any card expands a detail panel on the right, displaying the action’s type, duration, time, and full details. Selected cards have a highlighted border. The difference from the built-in “Trajectory” is that Decision Map turns every step into an icon-labeled card laid out chronologically, making it easy to see at a glance what was done and how long it took.

Stat Cards

Next to the timeline is a row of stat cards: Total Tokens (split input/output), number of tool calls, number of rounds, and the most time-consuming step.

Data Source

The node half registers a decisionMap session projection, folding these events: turn/start, step/start, assistant/chunk, assistant/message, tool/call, tool/result, step/end, resulting in a timeline + stats structure. Methodology:

  • Tokens are calculated as inputTokens + cacheReadTokens + cacheWriteTokens + outputTokens from usage. They are only counted for assistant/message where the adapter reported usage; otherwise, they are 0.
  • Tool duration is paired tool/call → tool/result by callId.
  • Thinking duration is a TTFT approximation: the duration from the first reasoning token in this step to the first non-reasoning token. Steps with no output tokens have empty thinking node duration.

The browser half registers a conversation.view tab, reading the projection via useProjection("decisionMap"). The data flow is: Session event logs -> Projection folding -> Delivered to browser via tail page with api-proxy and session/projection push frames -> Tab rendering.

Pure Frontend Implementation, Zero Dependencies

Rendering is done entirely on the frontend: inline styles + div, without referencing any external libraries, CDNs, fonts, or images. Colors use the shell’s built-in --dsw-static-* static colors and --dsw-alias-* theme aliases, adapting automatically to light/dark themes.

The entire package has zero runtime dependencies, no build step, and no TypeScript. It installs and works out of the box. Neither half creates process-level or page-level side effects, allowing for clean cleanup via Cordis’s stop/update/unload methods.

Installation and Activation

First, get the package, then install it into a profile using dsh plugin. Three ways:

# Way A: In the package directory (where package.json is) using `.`:
cd /path/to/dsh-decision-map
dsh plugin --profile web add .

# Way B: In the parent directory of the package, using relative path:
dsh plugin --profile web add ./dsh-decision-map

# Way C: After publishing to npm, install by package name:
dsh plugin --profile web add dsh-decision-map

Two notes:

  1. dsh plugin add anchors relative paths to the directory where the command is executed. Don’t write add ./decision-map inside the package directory—that would point to a non-existent subdirectory.
  2. This package declares dsh.bundle.patch. dsh plugin add automatically merges it into the profile’s dsh.profile.bundles layer stack, then the profile combinator applies the built-in cordis.patch.yml:
- insert:
    - id: decision-map
      name: dsh-decision-map

In other words, you don’t need to manually edit cordis.patch.yml.

After the steps above, restart (or trigger config hot reload), enter any session, and the “Decision Map” will appear in the view tabs of the title bar.

Known Trade-offs

  • Projection values are carried with the tail page: timeline is a complete list of actions. Projection values grow when sessions are long. The detail of each node is truncated to 120 characters, negligible for normal sessions.
  • “Write File” is a heuristic classification: only calls where the tool name is exactly write / edit are marked green; tools like bash (which can read and write) are categorized as “Tool”, not speculated as writing to disk.
  • Thinking duration is a TTFT approximation, not exact wall-clock reasoning time; steps with no output tokens have empty thinking node duration.
  • Tokens are values reported by the provider, consistent with the core token accounting method. If the adapter doesn’t report usage, it is counted as 0.

Applicable Scenarios and Notes

Suitable for developers who need to review agent execution processes: confirming action order in multiple rounds, checking the duration of each step, and examining token consumption distribution. It only does display, it does not modify session data.

One reminder: The plugin runs with the permissions of the current DSH process. Before installing, it is recommended to read the source code and check the license. The core of this package is just the two files lib/index.js and lib/client.js, no build step, zero runtime dependencies, low reading cost, and the license is MIT.

Conclusion

dsh-decision-map is very restrained in what it does: it adds a tab to the session view, folds event logs into a timeline and stat cards, changing the execution trajectory from “queryable” to “visible”. It installs and works out of the box, uninstalls cleanly, fitting DSH’s philosophy of “everything is a plugin”.

  • Plugin Directory Page: https://www.skillhub.cn/plugins/Scitiger-AI/dsh-decision-map (Community-maintained independent directory site, no official affiliation with DeepSeek or Fenxiang)
  • Source Code Repository: https://github.com/Scitiger-AI/dsh-decision-map