Introduction¶
The philosophy of DSH is “Everything is a plugin”. dsh-change-center handles the unified processing of file changes generated by agent tools: capturing write, edit, bash results, forming change sessions, and providing entry points for review, rollback, restore, and block-level operations. Below is an introduction to its functions, integration methods, and available commands based on verified documentation.
What is it¶
dsh-change-center is a DeepSeek Harness plugin, maintained by Chance-Wu, licensed under the MIT license.
One-sentence positioning: Capture -> Review -> Rollback / Restore / Block-level Operation Center for file changes.
Documentation indicates that version 5.x has removed Approve and Reject, and removed the Apply/Apply All buttons and endpoints. Its main path is Capture (Register): file changes are directly applied, and a before snapshot is established.
Core Features¶
Capture and Registration¶
The plugin captures write, edit, bash results from tools/result and records them as file changes or command records.
It automatically groups them into change sessions based on agent turns. Multiple writes to the same path within the same session are merged into a single record.
“Capture” means “Register”, which implies that after a file change is captured, it is directly marked as applied, and a before snapshot is created, making rollback capabilities available.
Rollback and Restore¶
Available states in the state machine are as follows:
applied: Can be rolled back.rolled_back: Can be restored.pending/failed: Historical states.
Rollback is used to restore the version before capture; Restore is used to undo the rollback and write back the agent version.
Block-level Operations¶
The plugin supports block-level operations: applying or undoing a single hunk, and editing and saving within a block.
Diff View and Change Tree¶
Diff view supports three modes: Unified, Side-by-side, and Edit; all modes display line numbers.
The change tree supports directory trees or grouping by extension, and supports search, filtering, and windowed rendering in large repository mode.
Review Assistance and Background Tasks¶
The plugin provides auxiliary capabilities such as AI review, risk assessment, validation, Git integration, history, and fixes.
Background tasks can be submitted and waited for or canceled via JobHandle; /events SSE is used to push events.
Installation and Enablement¶
The documentation only provides an integration method: add this package to the dsh.profile.bundles of the profile to access it as a profile bundle.
dsh.profile.bundles
Add dsh-change-center to this configuration item.
Before integration, it is recommended to confirm that dependencies meet peerDependencies:
{
"peerDependencies": {
"@deepseek-ai/cordis": ">=4.0.0",
"@deepseek-ai/dsh-agent": "^0.1.0-rc.5",
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.5",
"@deepseek-ai/dsh-session": "^0.1.0-rc.5",
"@deepseek-ai/dsh-tools": "^0.1.0-rc.5"
}
}
Typical Usage¶
Interface Shortcuts¶
J / K or ↑ / ↓: Switch files
U / Z: Rollback
Esc: Collapse to Focus
HTTP Interfaces¶
Rollback a single change:
POST /api/change-center/changes/:id/rollback
Rollback all changes in a session:
POST /api/change-center/sessions/:id/rollback-all
Get SSE event stream:
GET /api/change-center/events
Local Development¶
Execute in the repository:
pnpm install
pnpm typecheck
pnpm test
pnpm build
The test baseline provided by verified documentation is: 189 cases / 24 files.
Applicable Scenarios and Notes¶
dsh-change-center is suitable for scenarios in DSH where it is necessary to uniformly view agent file changes, review differences, rollback or restore changes, and perform apply, undo, or edit on individual hunks.
Notes before use:
- The plugin runs with the permissions of the current dsh process; source code and license should be checked before installation.
- License is MIT.
- Sandbox policy:
danger-full-accessis used for writing plugin state, andworkspace-writeis used for writing back to the workspace. - The disk write path includes
diskBaselineexternal modification guards; when conflicts occur, users are prompted to view the difference or force write. - Persist changes, sessions, snapshots, policies, and review/risk results to
$DSH_HOME/change-center; the paths listed in the documentation include$DSH_HOME/change-center/store/*.jsonl,history/,policies.json,snapshots/,review/,risk/.
Links¶
- Directory Page: https://www.skillhub.cn/plugins/Chance-Wu/dsh-change-center
- GitHub: https://github.com/Chance-Wu/dsh-change-center