Records the version of the edit target as an observation when the agent inspected the file with bash instead of the read tool, so the filesystem observation policy stops rejecting edits with FS_NOT_OBSERVED. Applies to edits only; blind whole-file overwrites stay guarded.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:ruaibeite/dsh-auto-observe
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Removes the recurring file has not been read — read the file, then retry failure for files the
agent inspected with bash instead of the read tool.
Why it keeps happening
dsh-fs-observation-policy requires a prior read, and only a few channels record an observation:
the read tool (including offset/limit windows), a successful write/edit, and image reads.
A bash call — sed -n, awk 'NR>=…', cat, a python3 - <<PY script — records nothing,
and that is exactly how agents inspect code. In one real session: 1186 bash calls against 114
reads, with four rejected edits, all on files that had only ever been looked at through bash.
What it does
A listener prepended to the fs/edit-intent / fs/write-intent waterfal (prepend is required: the
policy's listener never calls next(), so anything queued after it never runs):
- it mirrors
fs/observedinto a ledger shaped exactly like the policy's. If a record exists it does nothing and hands control back — soFS_STALE_VERSIONprotection is untouched; - with no record it takes the file's real version via
ctx.fs.statand emitsfs/observedthe way thereadtool does ({kind:'present', version}, or{kind:'absent'}when missing); - a non-regular file, a missing session owner, or a failed
statall fall through untouched.
The trade-off, stated plainly
The record it writes is a fact about the file (its current version), not a claim that the model
saw the content. edit is on by default because an anchored replacement still has to match the
current text byte for byte. write — a blind full overwrite — is off by default (writes: true to change that) because it has no such backstop. Every intervention logs one line.
One known bound
The mirror starts recording when this plugin loads. That is harmless on the normal path — the plugin needs a Harness restart, and a restart empties the policy's in-memory ledger too, so both start from zero together. The one exception is hot-enabling this plugin mid-session, after files have already been read: those earlier records are unknown to the mirror, so the plugin records their current version once, which relaxes staleness for that single edit. A restart realigns them.
Install
./install.sh # desktop profile by default; PROFILE_NAME=web ./install.sh for another
Restart Harness afterwards (host plugins do not hot-reload).
Development
node test/contract.mjs # dependency-free contract tests
The tests replicate the real waterfall (queue-shift) and the policy's ledger logic verbatim, and
cover the baseline failure, unblocking, zero-intervention when a record exists, staleness
preservation, missing owners/targets, prepend placement and all three switches.
License
MIT
Links
More in this category
yjh051108/dsh-routing-suite★ 7027
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3950
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
first-fluke/oh-my-agent#dsh★ 1494
Runs project OMA checks before and after tool execution and when a turn tries to finish. Installs its OMA CLI dependency and initializes unconfigured projects on first use. Requires Node.js 22+; initial setup needs network access and project write access.
MichengAI/dsh-skills-manager★ 631
Manages local DeepSeek Harness skills in Settings and shows shared Agent skills as read-only.
hust-open-atom-club/oh-dsh★ 326
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
Fishquito7/dsh-skill-mcp-panel★ 291
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.