在 agent 自己的 bash/shell 命令结束后,重新观察该会话此前观察过的文件:自己改文件不再触发 FS_STALE_VERSION,但其他人写入仍会触发。
安装
# npm 包(预构建)
dsh plugin --profile web add @lucagiftzek/dsh-fs-reobserve
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:lucagiftzek/dsh-fs-reobserve
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Ends self-inflicted stale-file errors after an agent's own shell commands.
dsh plugin --profile web add @lucagiftzek/dsh-fs-reobserve
# or from GitHub: dsh plugin --profile web add github:lucagiftzek/dsh-fs-reobserve
# then restart dsh web

A DSH plugin that supplies the missing middle ground for
@deepseek-ai/dsh-fs-observation-policy.
The problem
The observation policy learns a file's version only from instrumented
filesystem operations (read, write and edit), which emit
fs/observed. dsh-tool-bash, dsh-shell and dsh-subprocess-local
contain no reference to that event. DSH's own documentation:
Only instrumented filesystem operations report here; the OS is not watched.
So a session that modifies a file through bash leaves a stale observation,
and its very next edit of that file is refused with FS_STALE_VERSION: an
error caused entirely by the session's own action.
The three options
| Strict | dsh-fs-reobserve | Disabled | |
|---|---|---|---|
| Stale error from your own bash writes | fires | gone | gone |
| Stale error from a third-party writer | fires (correct) | fires (correct) | suppressed (unsafe) |
FS_NOT_OBSERVED (read before edit) |
enforced | enforced | gone |
| Worst-case failure | wasted call | wasted call | silent data loss |
| Discipline required | yes | none | none |
What it does
After one of a session's own bash/shell calls settles, it re-stats the
targets that session had observed and re-emits fs/observed at their
current state. All three transitions are covered:
- present → present (new version): the command rewrote the file
- present → absent: the command deleted the file
- absent → present: the command created a file a read had confirmed missing
A version is never manufactured; it comes from ctx.fs.stat, the only
sanctioned source.
What it deliberately does not do
It never re-observes a change the session did not cause. A file rewritten by
cron, another agent, or a desktop editor keeps its old observation, so the next
edit still fails with FS_STALE_VERSION and the agent is still forced to
re-read. That is the protection worth keeping.
Configuration
Options are read from the plugin's loader entry config (the fs-reobserve row in your
profile's cordis.patch.yml); a settings.yaml section is not read. Example in
docs/TROUBLESHOOTING.md.
| Key | Default | Meaning |
|---|---|---|
tools |
[bash, shell] |
out-of-band tools to react to |
notify |
true |
attach a notice to the tool result so the agent knows |
maxNotifyPaths |
4 |
paths named before eliding |
Install
Install from npm: dsh plugin --profile web add @lucagiftzek/dsh-fs-reobserve, or from GitHub: dsh plugin --profile web add github:lucagiftzek/dsh-fs-reobserve.
dsh plugin --profile web add @lucagiftzek/dsh-fs-reobserve
# or from GitHub: dsh plugin --profile web add github:lucagiftzek/dsh-fs-reobserve
# then restart `dsh web`; the log shows "fs-reobserve: armed ..." once
A local checkout works the same way: dsh plugin --profile web add link:/absolute/path/to/dsh-fs-reobserve.
Requires Node 22.5 or newer and a DSH build that ships @deepseek-ai/dsh-fs-observation-policy
(used on DSH 0.1.5 and 0.2.1). Tests: npm test.
The package declares dsh.bundle, so dsh plugin add puts it in dsh.profile.bundles
and its own patch inserts the fs-reobserve entry. Do not add a second insert row by hand.
Kill switch without uninstalling
Add to ~/.dsh/profiles/web/cordis.patch.yml:
- id: fs-reobserve
disabled: true
When something goes wrong
- Ask your agent to load the
fs-reobserve-doctorskill. This version does not register it automatically: copyskills/fs-reobserve-doctorinto~/.dsh/skills/once (how). - Symptom-first guide: docs/TROUBLESHOOTING.md.
- Codes and log lines: docs/ERRORS.md.
More plugins by the same author
All of them are open source and run on DeepSeek Harness 0.2.x (several on 0.1.5 too).
| Plugin | What it does |
|---|---|
| dsh-artifacts | An Artifacts tab that lists the files an agent produced and previews them in place, plus a template library agents can use and extend |
| dsh-mail | Mail client and agent mail tools: IMAP, POP3, SMTP and OAuth2 accounts, scheduled and bulk sends with unsubscribe handling |
| dsh-note-keeper | Obsidian-compatible Markdown notes in the sidebar with search, graph, audio notes and transcription, OCR and client-side encryption |
| dsh-phone | SMS and calls (Twilio, SIP via Asterisk) with call audio through your own server, live voicemail and Telegram |
| dsh-voice | Read-aloud, dictation and language-aware speech with 23 TTS and STT providers, per-language routing and word highlighting |
| dsh-orchestrator | Agent swarm and task orchestration: an Orchestrate tab, orch_* tools, runners, provider cards and a machine API |
| dsh-workspace-rail | A workspace-first sidebar rail: pinned chats, projects as folders, live Recents, search and unread markers |
| DSH-Idle-Watchdog | Idle-chat nudges and an authenticated HTTP API that posts a prompt into any chat |
| dsh-plugin-updates | Update checker that only offers releases your running DSH core can load |
| dsh-subagent-tiering | Subagents default to a cheaper sibling of the parent model unless the agent names a route |
| dsh-fs-reobserve (this one) | Ends self-inflicted stale-file errors after an agent's own shell commands |
| dsh-request-image-cap | Clamps every image sent to the model to a pixel cap, fixing many-image request errors |
| dsh-seal | An encrypted channel in front of DSH: a Go reverse proxy plus a service worker that seal all DSH browser traffic |
Built by Luca Tzekos, who also makes Job Opportunities API: employer-direct job data with per-field provenance you can verify yourself, free to read and available as an API. If this plugin is useful to you, a star on this repo or a look at jobopportunitiesapi.org is the best thanks.
链接
同类插件
DayuanJiang/next-ai-draw-io#dsh-plugin★ 36548
dsh 的 draw.io 绘图插件:通过 next-ai-drawio MCP 服务器作图,点回复里的链接在右侧栏打开实时预览,可以手动修改图,AI 的每次修改都是可以恢复的版本。需 Node.js 18+,首次使用由 npx 下载 MCP 服务器。
Tencent/WeKnora#dsh-weknora★ 36201
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 6962
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
T-Auto/dsh-ops★ 5011
为 Windows 的 DSH 提供 bash、PowerShell 7 及 Rust 高性能工具,减少 token 消耗。
sixtysevenlf/dsh-blender-plugin★ 1536
让 DSH agent 通过直连 TCP 通道驱动本地 Blender,提供 15 个工具:视口帧、自定义视角渲染、Python 执行、无头与作业卸载、事务回滚,以及 34 个 family / 228 个 op 的规划层。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1153
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。