DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Host Compliance Check — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
H

dsh-host-compliance-check

Host Compliance Check

DSH host plugin: imitates Trae stop-hook — at the end of each main session turn, if files were modified during that turn (source: real-time, precise tools/result records covering write/edit and run_code child dispatches), injects a notice-form requirement compliance reminder for the main model to ju

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:liuyun847/dsh-host-compliance-check#9b78a1816d4b81588957ccd3ac549a5b13eac154
READMECompatibilityVersions

Description

DSH host plugin: imitates Trae stop-hook — at the end of each main session turn, if files were modified during that turn (source: real-time, precise tools/result records covering write/edit and run_code child dispatches), injects a notice-form requirement compliance reminder for the main model to judge itself

Compatibility and provenance

Host Compliance Check is published as dsh-host-compliance-check and currently resolves to version 0.4.2. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
9/26/2026

Versions

0.4.2stable
9/26/2026

Related plugins

Loading related plugins…

Latest
0.4.2
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
10/5/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in developer-tools.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Sdk Minimal@deepseek-ai/dsh-sdk-minimalThe standalone minimal SDK profile bundle: JSON-RPC, one DeepSeek adapter, persistent shell, and JSONL sessionsSdk App@deepseek-ai/dsh-sdk-appThe dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-baseExperimental Inspector@deepseek-ai/dsh-experimental-inspectorExperimental cross-realm CDP hub for Host debugging and Client Runtime inspection

README

dsh-host-compliance-check

DSH(DeepSeek Harness)宿主插件:模仿 Trae 的 stop-hook 配置(hooks.json 的 PostToolUse + Stop → decision 移交),不自动派发检查子智能体;在主会话 轮次正常结束时,若本轮修改过文件,向主会话注入一段 notice 形态的合规提醒 提示词(source.kind='plugin:compliance-check' + source.form='notice' + 一句话 summary,正文带文件清单),由主模型当场自行判断:直接收尾 / 简要自查 / 派 subagent 深入检查(按其结算通知收活)。

(v0.4.0 变更) 与 0.3.x 的差异:

  • 收集信源从"会话事件日志 + run_code 源码启发式解析"改为 tools/result 实时精确记录 —— 顶层 write/edit 与 run_code 内 tools.write/edit 子派发都经工具管道 emit tools/result(exec.name/exec.arguments 为真实 调用,exec.agent 携带会话),file_path 精确,删除正则猜源码的脆弱逻辑;
  • 注入消息由裸 plugin 文本改为 notice 形态(form:'notice' + summary ≤120,boundContextSummary 语义),不再以 [AUTO] 文本冒充用户输入;
  • diag 日志路径改为基于 DSH_HOME/用户主目录推导,不再硬编码。

(v0.4.1 变更) 注入正文去掉"阻塞等待"措辞:是否前台等待由会话自身的人格纪律决定, 插件只负责提醒与给出手续 —— 与「永不阻塞」型预设(coordinator)的指令冲突由此消除。

(v0.4.2 起) 会话格式 v4 兼容(DSH 0.1.7-rc.1 起):v4 的准入规则 要求 user/message 的 source.kind 是非空字符串且不得等于 'plugin' (旧版"插件包装"写法已退役),违反时该消息落盘被拒、整轮以 format v4 message requires a producer-owned source kind 失败(错误码 UNKNOWN)。 第三方插件注入消息的正确写法是 kind: 'plugin:<插件名>',且 source 里不再有 plugin 字段 ⇒ 本插件注入消息由 { kind:'plugin', plugin:'compliance-check' } 改为 { kind:'plugin:compliance-check' };form / summary 语义与 UI 折叠展示不变 (UI 按 source.kind !== 'user' 判为注入行、按 source.form 折叠)。

特性

  • 轮末提醒:主会话轮次正常结束时,若本轮修改过文件且本用户输入尚未提醒过, 注入 notice 提醒(进 next-step 队列 → 本 turn 继续,主模型当场看到并响应, 响应完 turn 才真正结束 —— 等价 Trae 的 block)
  • 精确收集 = tools/result 实时记录(对顶层 write/edit 与 run_code 内子派发 均触发;scope-filtered 按 agent 分发):
    • exec.name ∈ {write, edit} 且成功 → 提取真实 file_path;
    • 事件日志仅作兜底(顶层 tool/call 的 write/edit),不再解析 run_code 源码
  • 只支持标准模式写入;PTC 裸写(await import('node:fs') + 直接文件 API, 绕过 tools 绑定)不经过工具管道、不产生 tools/result,本插件检测不到 (已知限制;合规做法是程序内用 tools.write/edit)
  • 每用户输入最多提醒一次(新用户消息经 agent/pre-step 复位记录与标记)
  • 只对主会话触发:GUI 恢复/续写历史会话创建的 fork 会话(带 parentSession、无 origin)视为主会话,照常提醒;仅排除子代理会话(header origin: 'subagent'),避免嵌套提醒
  • 提示词携带全部用户输入历史(按时间顺序拼接、跳过插件注入,超长截断保留最新)供对照, 不只取最近一条;内置自查清单与处理方式引导(可直接结束 / 派 subagent 深查,按其结算通知收活)
  • 提醒以 notice 消息呈现(source.kind='plugin:compliance-check' + source.form='notice',summary 一句话 ≤120),UI 折叠展示、不冒充用户输入

配置(cordis.patch.yml 的 entry config)

字段默认值说明
skipPaths[]跳过匹配的路径(RegExp/字符串数组),命中则不记录
diagfalse写诊断日志到 ~/.dsh/compliance-diag.log(DSH_HOME 优先;排查用)

(0.2.x 的 providerName/promptTemplate/diffMaxChars/diffMaxLinesPerFile/watchTools 与 0.3.x 的源码解析逻辑均已移除。)

安装

在 DSH profile 目录(例如 ~/.dsh/profiles/web/)下:

  1. 添加依赖:

    // package.json
    {
      "dependencies": {
        "dsh-host-compliance-check": "file:./plugins/dsh-host-compliance-check"
      }
    }
    

    然后 pnpm install(或 npm install)。

  2. 在 cordis.patch.yml 中注册插件行:

    - insert:
        - id: compliance-check
          name: 'dsh-host-compliance-check'
    
  3. 重启 dsh web 生效。

注意:本仓库以 plugins/dsh-host-compliance-check/ 为活源,运行时加载 node_modules/ 下的 file: 拷贝(二者独立)。改动活源后需把 lib/index.js、package.json、tests/ 同步复制到 node_modules/dsh-host-compliance-check/,再重启 dsh 才生效。

工作原理

  • 监听 agent/pre-step:检测到用户新消息(source.kind === 'user')时复位 该会话的"已提醒"标记与本轮写入记录;
  • 监听 tools/result:每次工具成功结束(顶层或 run_code 子派发),若是 write/edit 则把精确 file_path 记入该会话本轮表(应用 skipPaths 过滤);
  • 监听 agent/turn-stopping(≈ Trae Stop):仅主会话且未提醒过、本轮表非空时, agent.inject 注入 notice 提醒 —— 注入 next-step 使本 turn 继续,主模型当场响应;
  • 事件日志兜底:仅当实时记录缺失时,从会话事件取顶层 tool/call 的 write/edit;
  • 提示词正文带文件清单、本轮用户输入摘录、自查清单与处理方式引导(可直接结束或 派 subagent/subagent_fork 深查(按其结算通知收活));
  • 已知边界:run_code 程序内 PTC 裸写(await import('node:fs') 等直接文件 API,绕过 tools 绑定)不产生 tools/result,本插件不检测;如需要覆盖请改用 tools.write/edit;
  • 无子代理派发、无 ctx.get('subagents') 依赖。

开发

pnpm install
# 修改活源 plugins/dsh-host-compliance-check/ 后,同步 lib/ 与 package.json 到
# node_modules/dsh-host-compliance-check/(file: 拷贝,不自动同步),再重启 dsh
# 纯函数单测(提取/记录/收集/提示词组装):
node plugins/dsh-host-compliance-check/tests/diff.test.mjs

License

MIT