dshbase

Plugin directory / Developer / deepseek-harness-hashline

deepseek-harness-hashline

Unverified magian1127

✓ Actively maintained

View on GitHub ↗ ← Back to plugin directory

0Stars
0Forks
0Open issues
Language
2026-08-23Last push
Cross-platformPlatform

What it does

DeepSeek Harness hashline - 哈希锚点编辑

Our take
Unverified — not yet verified

DeepSeek Harness hashline - 哈希锚点编辑 Not yet verified — install and test it yourself.

“Unverified” means our automated CI has not yet installed this plugin. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

Plugin author? Get the “Verified” label — submit your own evidence (screenshots, logs, or a short demo) and we'll review and flip the badge.

Submit verification evidence ↗

README

deepseek-harness-hashline

中文 · English

⚠️ 测试中(experimental)

当前仍处于测试阶段,请勿用于正式项目。 使用本插件所带来的一切风险由使用者自行承担。

接口、配置项和工具行为可能随时变更,恕不另行通知;在真实工作区启用前请先在隔离环境充分验证。

状态 测试中 版本 0.1.0 MIT License

DeepSeek Harness 哈希锚点文件编辑插件:提供 hashline_readhashline_edit,用
LINE:HASH 联合锚点把编辑绑定到模型最近读取过的具体行内容,解决同一文件多轮修改、多处原子修改、
CRLF/LF 或空白漂移时的机械可靠性问题。

显式工具 hashline_edit 同时接受两种输入:简单的唯一文本替换可使用兼容参数
old_string / new_string / replace_all),需要锚定编辑时使用 edits 列表。默认模式补充
内置 read / edit:新文件仍用 write。开启“替换内置读写”后,允许编辑的智能体改用严格锚定的
read / editedit 必须使用最新读取结果中的 LINE:HASH,不再暴露文本替换参数或无锚点 replace

功能

能力 说明
LINE:HASH 读取 LINE|HASH 内容 格式,默认 4 位十六进制 SHA-256 前缀;模型结果同时报告 EOL/BOM
兼容文本替换 显式 hashline_edit 可用 old_string / new_string / replace_all 做简单唯一文本替换,并进入安全写入链路
三种锚定编辑 set_linereplace_linesinsert_afteredits 的每个数组项只能包含一个操作
精确替换逃生舱 显式 hashline_editedits[].replace 执行严格精确匹配(CRLF↔LF 自动归一),默认要求唯一匹配
原子批量编辑 一次调用全部锚点先校验、重叠先拒绝,再原子写入
版本 CAS 保护 使用 DSH 文件版本防止校验后到写入前的并发覆盖
文本保真 保留 UTF-8 BOM、LF/CRLF、mixed EOL 未触及区域和文件末尾换行状态
失效恢复 唯一哈希匹配自动重定位;否则返回附近当前行,坏锚点报错回显真实锚点
原生结果卡片 读取成功复用 DSH 原生 ReadBlock:完整 `LINE
可逆严格替换 开启“替换内置读写”后,Agent scoped edit 只接受最新 LINE:HASH 锚点;覆盖可逆并随 Cordis Fiber 清理
提示词中文化 开启后注入的提示词与工具说明改为中文,工具名保持英文

环境要求

  • DeepSeek Harness 0.1.0-rc.7 或兼容版本,默认 profile 为 web
  • Node.js ^22.19.0 || >=24.0.0
  • 网页配置卡片还要求 DSH 包含 settings.register(..., { exposeToClients: true }) 支持

安装

把下面示例里的 <绝对路径> 换成你本机实际的绝对路径。源码目录的 lib/ 是构建产物;首次开发安装执行 npm install,首次安装或源码更新后执行 npm run build

npm install
npm run build

普通本地安装:

dsh plugin --profile web add "file:<绝对路径>/deepseek-harness-hashline"

持续开发使用 link: 直接安装(新版运行时从 profile 解析 DSH peer,无需本地 junction):

dsh plugin --profile web add "link:<绝对路径>/deepseek-harness-hashline"

安装后检查组合:

dsh --profile web --dump-config

更新

重新执行安装命令即可更新依赖和持久 bundle。浏览器端内容更新后刷新页面;使用本地 link: 开发时,
主机文件在 DSH HMR 服务可用时自动热重载;不可用时检查本插件的精确自监视路径并报告,不能以重启代替。

卸载

dsh plugin --profile web remove deepseek-harness-hashline

卸载会清理持久 bundle 与运行中条目,不会删除 DSH 会话数据。settings 命名空间 hashline 中已有的
用户覆盖值可能保留,重新安装后可继续使用。

设置与数据

数据 存储位置
全局开关、内置读写替换开关、哈希参数 DSH settings 命名空间 hashline(在“设置 → 插件 → 插件配置”中编辑)

插件不注册模型工具以外的额外能力、不上传数据、不维护独立数据文件。客户端只向现有
settings.plugin.item Slot 贡献配置卡片,通过 DSH settingsScope 读写同一 Host 命名空间。

常见问题

它和内置 read / edit 有什么区别? 内置工具按文本操作;Hashline 把锚定编辑绑定到
“最近读取过的具体行内容”的哈希锚点,能检测过期读取,并把多处修改作为一次原子请求处理。
显式 hashline_edit 为兼容简单场景仍接受 old_string / new_string,并走稳定读取和版本 CAS;替换内置工具后的
edit 则是严格锚定入口,不接受这些无哈希参数。此外,Hashline 读取接入 DSH 原生读取卡,编辑结果使用原生风格 diff 卡。

哈希会碰撞吗? 短哈希有理论碰撞概率:默认 4 hex 相当于 16 位校验,与行号和文件级版本 CAS 联合使用;
高风险部署可在配置中提高 hashLength

“替换内置读写”怎么用? 开启后,允许编辑的智能体看到的是严格锚定的 read / edit
hashline_read / hashline_edit 被隐藏。每次修改先用 read 获取最新锚点;edit.edits 的每个数组项只能包含
一个 set_linereplace_linesinsert_after,不接受 old_string / new_stringreplace。关闭开关恢复原工具。
替换只在智能体原本能看到四个相关工具时安装,避免绕过配置限制;系统提示也在该智能体作用域内同步替换,关闭后恢复。

开发文档

  • 使用指南:工具参数、锚点格式、编辑变体与安全模型
  • 设计说明:工具边界、锚点、文本模型、DSH 集成、包形态
  • 开发指南:本地开发安装、HMR、测试与验证

License

MIT

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install deepseek-harness-hashline for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:magian1127/deepseek-harness-hashline

Headless (CLI) profile:

dsh plugin --profile headless add github:magian1127/deepseek-harness-hashline

Test report

Not yet L3-verified — see failure note below if we already ran it.

Status: pending · last test 2026-08-27
Note: 验证: runtime-fail Browse all pending failures →
Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7795 plugins →