dsh-instruction-audit:DeepSeek Harness 指令文件的最小會話留痕

前言

在 DeepSeek Harness(DSH)中,workspace instruction files 會影響會話。當出現 nested-workspace boundary 或 instruction budget incident 時,需要先確認哪些 AGENTS.md / CLAUDE.md 文件實際進入了某次會話,而不是隻靠猜測。

dsh-instruction-audit 面向這個場景,爲 DeepSeek Harness workspace instructions 記錄 privacy-minimal receipts。

這是什麼

dsh-instruction-audit 是一個獨立社區 bundle,不是 DeepSeek AI 官方包。它觀察 Harness 已經發出的 durable agent-instructions message source,並據此記錄 receipts。

倉庫地址是 https://github.com/1052326311/dsh-instruction-audit 。

核心功能

  • 記錄 DeepSeek Harness 實際放入 session 的 workspace instruction files 的 receipts。
  • 觀察 durable agent-instructions message source。
  • 每條 receipt 包含 session id、event sequence/time、baseline flag、logical scope、display path、action 和 producer-owned content digest。
  • 不讀取 instruction files,不保存 instruction text,不修改 workspace,也不改變 prompt assembly。
  • 無 runtime npm dependencies,並使用 active Harness process 提供的 existing Cordis context。
  • 可用於審計哪些 AGENTS.md / CLAUDE.md 文件影響了 session,包括 nested-workspace boundary 或 instruction budget incidents。
  • 提供 CLI,用於讀取一個 session 的 receipts。

安裝與啓用

倉庫給出的安裝示例是先打包,再把 packed tarball 安裝到 web profile:

pnpm install
pnpm pack
dsh plugin --profile web add ./dsh-instruction-audit-0.1.1.tgz

默認情況下,receipts 寫在 $DSH_HOME/instruction-audit/v1/。文件名爲 session id 的 SHA-256 hash;session id 仍保存在每條 JSONL receipt 中。

如果需要把 receipts 寫到別的目錄,可以配置:

- id: instruction-audit
  config:
    receiptRoot: /absolute/path/to/receipts

典型用法

讀取一個 session 的 receipts:

dsh-instruction-audit --session session-123

適用場景與注意

適合在以下情況下使用:

1、需要確認某次 session 中哪些 AGENTS.md / CLAUDE.md 文件實際生效。
2、nested-workspace boundary 或 instruction budget incident 發生後,需要查看結構化來源記錄。
3、希望保留最小隱私證據,而不是留存 instruction text。

需要注意:

  • Receipt 只證明 Harness 記錄了結構化來源,不證明模型遵循了指令。
  • producer-owned content digest 不構成 security boundary。
  • --dump-config 只證明該 layer 可以組合。
  • 它會使用當前 Harness 進程提供的 existing Cordis context,安裝前建議檢查倉庫源碼與 MIT 許可證。
  • 版本 0.1.1 已對照 DeepSeek Harness source revision 47f943859bef60e4160492346772ded9b24f765a 驗證。

結尾

如果你需要的是對 DeepSeek Harness workspace instructions 的最小留痕,dsh-instruction-audit 提供了一個不讀取文件、不保存指令正文、可用 CLI 查詢單 session receipts 的插件入口。

倉庫地址:https://github.com/1052326311/dsh-instruction-audit

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜