dshbase

插件目录 / Automation / dsh-review-loop

dsh-review-loop

已验证 · 实测可装 wuxiangru915

✓ 持续维护 基于 11 个官方 DSH 包 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

2Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-15最近推送
跨平台平台

功能简介

dsh-review-loop — DSH 插件(编排)

✅
我们的评价
可用 — 实测通过,早期项目

dsh-review-loop — DSH 插件(编排) 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-review-loop

Incremental diff reviewer for DeepSeek Harness.

中文说明 · MIT License

dsh-review-loop turns code review of agent work into an incremental, closed-loop process: after you approve a batch of changes, a checkpoint is recorded and the next review shows only the changes made afterward — never a re-review of what you already saw. Review feedback is injected back to the agent through the harness's normal message channel, without interrupting its work.

What it solves

An agent task commonly touches a dozen or more files. Reviewing the full diff every time is slow, and re-reviewing unchanged work wastes attention. This plugin makes review follow the agent's progress:

agent works (modifies files)
  -> open the review panel: only changes since the last review checkpoint
  -> inspect each file's diff, add feedback
  -> approve: a new checkpoint is recorded, feedback is injected to the agent
  -> the agent responds and keeps working; new changes become the next batch

Features

  • Incremental review (since-review): approving snapshots the working tree into a checkpoint; the next review diffs checkpoint -> current, so reviewed files disappear from the queue unless they change again.
  • Two entry points: a Web UI review panel docked above the conversation composer (2s polling), and a /review command for keyboard-first use. The same core logic backs both.
  • Feedback closed loop: approvals may carry a comment, delivered to the agent as a user message via agent.inject().
  • No tool-call parsing: any on-disk change — by the agent, by you, or by another process — is reflected; the plugin reads git, not the agent loop.
  • Checkpoint persistence: $DSH_HOME/review-loop/<workspace-hash>.json, written atomically, never polluting the workspace's own git status.
  • Zero core modifications: a pure bundle plugin (dsh.bundle patch layer); the agent-loop skeleton is untouched.

Installation

# one line, from a git source
dsh plugin --profile web add github:wuxiangru915/dsh-review-loop

# restart the web server, then hard-refresh the page

Local development:

# Development requires a sibling checkout of the DeepSeek Harness source
# repository at ../deepseek-harness: the @deepseek-ai/dsh-* packages are not
# fully published to npm (dsh-type-meta is missing), so devDependencies link
# to the workspace instead. Adjust the link paths in package.json if your
# checkout lives elsewhere.
pnpm install && pnpm build
dsh plugin --profile web add /path/to/dsh-review-loop

The repository ships prebuilt lib/ artifacts, so git-source installs work without a build step on the user's machine.

Usage

Web UI

Review panel (English)

In any session whose workspace is a git repository, a review panel appears above the composer:

  • A status line — N file(s) to review — with an Open review button.
  • The expanded panel lists the pending files with toggleable, colorized diffs (added lines use the success token, removed lines the error token; the sign is always visible).
  • An optional feedback input and an Approve & checkpoint button.
  • After approval the panel shows the reviewed state; later edits re-surface the file.

Command line

Command Behavior
/review Incremental: changes since the last checkpoint (or the full change set vs HEAD when none exists)
/review all The complete working-tree change set vs HEAD, ignoring the checkpoint
/review approve Record a checkpoint
/review approve <comment> Record a checkpoint and inject the comment into the agent

Architecture

src/
├── review.ts      Pure core (collectState / approve / renderState) — shared by command and HTTP paths
├── git.ts         git helpers (status / diff / hash-object; zero-dependency spawnSync)
├── checkpoint.ts  checkpoint persistence ($DSH_HOME/review-loop/<ws-hash>.json, atomic write)
├── http.ts        Web routes: GET /plugins/dsh-review-loop/state · POST /plugins/dsh-review-loop/approve
└── client/
    └── review-panel.tsx  Browser panel (conversation.input.dock slot, polling refresh)
command: /review ------> renderState() ----+
                                           +--> src/review.ts (pure, shared)
web UI:  GET /state ----> collectState() --+
         POST /approve --> approve() + agent.inject()

The client bundle is a CJS __ModuleLoader__ artifact served at /plugins/@dsh-plugin/dsh-review-loop/client.js; routes and command share one checkpoint store, so approving from the UI advances the same queue the /review command reads.

Incremental algorithm

for each working-tree change vs HEAD:
  compare its content hash with the checkpoint's recorded hash
    same  -> reviewed (hidden)
    changed / new / HEAD moved -> pending (the incremental queue)
approve re-snapshots the tree -> the checkpoint advances

Testing

pnpm test       # 7 integration tests: real cordis + real git repositories
pnpm typecheck
pnpm build      # dual-half build: host ESM + client bundle

Roadmap

  • /review command (incremental diff / approve / feedback injection)
  • Web UI review panel (file list + diff + approve)
  • Checkpoint persistence (incremental queue)
  • Line-level comments (diff parser)
  • Session-branch coupling (checkpoint follows session branches)
  • npm publish (@dsh-plugin/dsh-review-loop)

Requirements

  • DeepSeek Harness >= 0.1.0-rc.5 (Cordis 4.x)
  • A git repository (hard prerequisite)
  • Node.js >= 22

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-review-loop」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:wuxiangru915/dsh-review-loop

Headless(CLI)profile:

dsh plugin --profile headless add github:wuxiangru915/dsh-review-loop

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

自动化一项重复工作——调度、串联任务或响应事件——不用你亲手启动。

适合谁

有周期性工作、想 cron 式无人值守而非手动触发的人。

二次开发建议

触发器和任务模板是缝——加事件驱动或文件监听触发,以及更丰富的流程编排。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Automation 里更多

浏览全部 7797 个插件 →