dsh-agent-log: Offline Review of an Agent Work Report

Introduction

When developing agents with DeepSeek Harness (DSH), reviewing task execution is a key part of debugging. dsh-agent-log is a DSH plugin that read-only reconstructs what a task did from local DSH session logs and outputs a Work Report for the current agent session. The report includes tool calls, command executions, file reads/writes, test results, failure reasons, and token consumption. The plugin is fully offline, does not require an API key, and does not modify session data.

Core Features

The plugin provides the following capabilities:
* Read-only reconstruction of tasks from DSH session logs
* Generation of detailed reports including tool calls, command executions, file reads/writes, test results, failure reasons, and token consumption
* Fully offline, no API key required, and does not modify session data
* Provides a CLI tool for batch generation of daily/weekly reports
* Provides an HTTP route interface
* Provides a right sidebar panel to view reports

Installation and Enablement

Command Line (dsh web)

dsh plugin --profile web add github:Neo65536-engineer/dsh-agent-log

--profile must be set to the profile actually in use (e.g., web). It takes effect within seconds after installation.

Desktop (DSH Desktop)

  1. Open “Plugins” in the sidebar and click “Add Plugin”
  2. Enter github:Neo65536-engineer/dsh-agent-log
  3. Click “Install”
  4. After installation, click “Enable Now”
  5. Wait a few seconds, then refresh the page (F5)

Verify Installation

Start a new conversation and ask the model to run:

work_report({})

If a report is generated, the installation is successful.

Typical Usage

1. Agent Tool Call

work_report({})                                    // 复盘当前会话
work_report({ turns: 3 })                          // 只看最近 3 轮
work_report({ format: "json" })                    // 返回结构化数据
work_report({ out: "reports/task.md" })            // 同时写入文件

2. Right Sidebar Panel

Right sidebar “+” -> “Agent Work Report”. It provides 7 tabs (Overview, Tools, Commands, Files, Tests, Failures, Turns). Supports refresh and downloading HTML/Markdown.

3. Offline CLI (usable without installing the plugin)

Run in the repository directory:

node bin/worklog.mjs --list                   # 列出所有会话
node bin/worklog.mjs --latest                 # 最近一个会话的报告
node bin/worklog.mjs --period --since today  # 生成今日日报
node bin/worklog.mjs <sessionId> --out r.md   # 写入文件

4. HTTP Routes

GET /plugins/dsh-agent-log/report?format=json
GET /plugins/dsh-agent-log/report?format=markdown

Permissions and Limitations

Permissions

  • Read: $DSH_HOME/sessions, $DSH_HOME/storages/session_projcache
  • Write: only writes to a specified file when out is explicitly provided
  • Network/credentials: not used and not required

Dependencies and Compatibility

  • Node version: >= 20
  • Runtime dependencies: none. No npm install required and no build required
  • DSH version: 0.1.5-rc.3, 0.1.7-rc.1, 0.1.7-rc.2

Display Limitations

  • Detail tables show at most 80 rows; JSON mode can retrieve the full data
  • On Windows, some pipeline commands may be counted as suspected failures due to broken pipe

Notes

  • Desktop enablement: After installing the plugin on Desktop, you must click “Enable Now”; otherwise the plugin will not be loaded.
  • Data completeness: Detail tables are truncated by default. For complete data, use format: "json" or view the sidebar panel.
  • Permission check: The plugin runs with the current dsh process permissions. Before installation, review the source code and license.
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye