Skip to main content

dsh-trace-compare

41Stars2Forks2Issues0Watchers

Timeline maze visualization for DSH agent execution traces: main paths, failed explorations, and blind retries are clearly displayed. Supports log upload for single/double session comparison and real-time session tracking. No configuration required.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
HTML
License
MIT
Branch
main
agent-observabilityagent-trajectoryai-agentsdeepseek-harnessdshdsh-pluginllm-agentsobservability

Install

cmdweb profile
$ dsh plugin --profile web add dsh-maze

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 lamost423/dsh-trace-compare for me: review the repository at https://github.com/lamost423/dsh-maze 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.

One-Line Description

Visualize DSH agent's real execution traces as a timeline maze: the main path it pushes forward, failed or missed branches, and rollback points all fall on the same timeline, making it visually clear "why it ended up with this result."

Core Features

  • Upload 1 session log to draw a single run's maze timeline (supports .jsonl and .jsonl.zstd, browser-side decompression)
  • Upload 2 session logs for same-axis comparison: auto-align response nodes by round, manual anchoring available, branch differences counted by round
  • Real-time maze tab grows with current session execution; once tool results are finalized, branches immediately appear
  • Every step has failure/miss/blind retry judgment basis (error flags → strong failure features → weak failure features → four-layer rules by tool category + behavioral retry clusters)
  • Node length = actual step time consumption (parallel tool calls displayed as waterfall rows), hover preview, click to open detail panel, scroll to zoom, drag to pan
  • One-click export current view as SVG or 2x PNG (light background), input box supports "show only failures/retry" + filter by tool + full-text search

Technical Implementation

  • Language: TypeScript + embedded JS (maze page runs in self-contained HTML)
  • Key Dependencies: @deepseek-ai/cordis, @deepseek-ai/dsh-client-runtime, @deepseek-ai/dsh-client-ui-slots, fzstd
  • Architecture: Cordis client plugin, injects via slots: sidebar.footer.action (entry button) + shell.overlay (upload comparison overlay) + conversation.view (real-time maze tab); visualization page renders in sandbox iframe (srcDoc), host only syncs theme and language via postMessage
  • Entry Files: src/client/index.ts (plugin assembly), src/client/maze-upload.html (self-contained visualization page, built with tsdown injecting fzstd UMD)

Use Cases

Debugging why a DSH agent produces a certain result—reviewing the main path and branches of an entire run; when the same task runs with different models/parameters, overlay two logs to compare which step diverged; monitoring the real-time tab while running, seeing which step the current model hesitates at, which step fails, and whether it's repeating the same thing.

Prerequisites and Compatibility

DependencyMinimum VersionNotes
DSH0.1.0-rc.6+Fully validated on rc.6, acceptance tested on rc.8, peer range covers rc.6 to current rc line
Node^22.19.0 or >=24.0.0engines declaration
PlatformCross-platformPure frontend plugin, no native module dependencies
Native ModulesNonezstd uses JS soft decompression in browser (fzstd) or native DecompressionStream

Installation

dsh plugin --profile web add github:lamost423/dsh-trace-compare

Configuration

This plugin requires no additional configuration.

FAQ

Q: Do I need to do any configuration after installation?

A: No. After installing and restarting dsh web, a "Trace Compare" entry automatically appears at the bottom of the sidebar, and each conversation view gains a "Real-time Maze" tab—ready to use immediately.

Q: Will uploaded session log content be sent to the server?

A: No. The entire parsing, judgment, and visualization run in the iframe srcDoc sandbox, completed on the browser side; log content never reaches the host or any external service.

Q: What session log formats are supported?

A: Supports plain text .jsonl, and .jsonl.zstd from the ~/.dsh/sessions/ directory. zstd is decompressed directly in the browser (native DecompressionStream preferred, otherwise uses built-in fzstd soft decompression). Format is identified by content, filename is arbitrary (e.g., macOS copy "session.jsonl 2" can be selected directly).

Q: Can the real-time maze tab view earlier historical steps?

A: No. The real-time tab only draws events currently loaded in the conversation window; steps outside the window are discarded and marked "另有 N 步更早历史未加载" (N more earlier steps not loaded). To view complete history, download the log and use "Trace Compare" to upload.

Q: What theme is the exported image?

A: Fixed light background, regardless of whether the current page is light or dark—specifically designed for sharing scenarios.

Q: Will sub-agent tasks appear in the maze?

A: They will on hosts with the ability to load sub-session history in the background (SessionFace.open). The official 0.1.0-rc.6 to rc.8 lacks this capability; the plugin automatically silently hides them without error, other functions are unaffected.

Q: What method is used to determine if a tool call succeeded or failed?

A: Pure rules, no LLM—four-layer judgment: error flags → strong failure features (beginning and ending windows) → weak failure features (first 300 characters only) → classification by tool. Paired with behavioral blind retry cluster detection (similar parameters + cluster contains failure). Thresholds are all in src/client/verdict.js under VERDICT_RULES.

Q: How to uninstall?

A: Remove via dsh's standard plugin command, then restart dsh web.

Learning Curve

Beginner — install and use immediately, no configuration; upload or switch to the real-time tab to see results immediately.

Known Issues and Limitations

  • Sub-agent branches depend on host's SessionFace.open capability, official rc.6–rc.8 lacks this, plugin automatically silently degrades to not display sub-agents (CHANGELOG.md:5-15 / src/client/subagent-lanes.ts:84-102)
  • Real-time tab only draws events currently loaded in conversation window; steps outside window are discarded and marked "⏮ 另有 N 步更早历史未加载" (README.md:43-46)
  • When uploading 2 session logs, maximum 2 supported; more than 2 are rejected by the page (maze-upload.html:275)
  • Exported SVG/PNG has fixed light background, unrelated to current page theme (README.md:35)
  • "Round alignment line" in dual-session comparison only connects rounds that exist on both sides; rounds unique to one side are displayed as "—" in branch inventory (README.md:32-34)

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/lamost423/dsh-trace-compare)

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