description: "Record each top-level turn's changed files from git working-tree snapshots as a durable workspace/changes Session event; configuration, repository tiers, and coverage rules."
English | 中文
This plugin records which files each top-level turn changed, with per-file added and deleted line counts, as a workspace/changes Session event. It snapshots the working tree with git when a turn starts and when it ends, diffs the two snapshots, and adds the file-tool edits that git does not cover. The Web changed-files card renders the event; the model never sees it.
The shipped Web bundle mounts this plugin. Mount it in any composition with the subprocess capability and a git executable on the Host:
- name: '@deepseek-ai/dsh-workspace-changes'
config:
maxFiles: 500
| Field | Default | Meaning |
|---|---|---|
dshHome |
$DSH_HOME, then ~/.dsh |
Harness home whose workspace-changes/ directory holds shadow repositories |
timeoutMs |
30000 |
Milliseconds one git command may run before the turn's record is abandoned |
outputMaxBytes |
8388608 |
Bytes of git output retained per command; a larger diff listing abandons the record |
maxFiles |
500 |
Maximum files carried by one event; total still reports the complete count |
shadowExcludes |
.git/, .dsh/, node_modules/, build and cache directories |
info/exclude patterns for shadow repositories |
Every Session with a working directory and no subagent origin is recorded; subagent Sessions are not. A working directory inside a git repository snapshots into that repository's object store through a private index, so the repository's own index, work tree, and refs stay untouched and the user's earlier uncommitted changes never enter a summary. A working directory outside any repository snapshots into a shadow repository under the Harness home whose work tree is the working directory itself; the shadowExcludes patterns replace the missing .gitignore, and a Harness home inside the working directory is excluded automatically. Nested repositories and submodules inside the working directory are recorded as gitlinks, so their internal changes do not appear. Without git — or, on macOS, with only the developer-tools stub at /usr/bin/git — the plugin records nothing and logs that once.
Files the file tools changed but the snapshots do not cover are added from the hunks those tools persist with their results: files matching an ignore pattern and files outside the repository or shadow work tree. Files under /tmp or the platform temporary directory are excluded unless they lie inside the working directory. Line counts for these files sum over the recorded hunks, so repeated edits to one file in a turn can count a line more than once. Changes made through shell commands outside the snapshot coverage are not recorded.
Each file carries a durable path — relative to the working directory inside it, absolute elsewhere — and a display path used for ordering and labels: the relative path, a ../ path for repository files above the working directory, a ~ path under the home directory, otherwise the absolute path. Files sort by display in code-unit order, which lists parent and absolute paths before the working directory's own files. The event also carries the two snapshot tree ids.
None, as the recorder appends a log-only workspace/changes event that only clients read and registers nothing model-facing.
Nothing here enters a model request, so provider cache reuse is unaffected.
path; display is always slash-separated.