DeepSeek Harness 插件

zhengqiuyang/dsh-prompt-drift

Star 数 ★ 0 下载量(近 30 天) 864 分类 安全与权限 收录于 2026-10-17 npm dsh-prompt-drift

系统提示词面漂移门:任何插件或预设注入组装提示词的段落均哈希基线化,对模型被告知内容的静默改写将响亮报错。

安装

# npm 包(预构建)

dsh plugin --profile web add dsh-prompt-drift

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:zhengqiuyang/dsh-prompt-drift

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。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 只有英文版本。

dsh-prompt-drift

System-prompt surface drift gate — sections any plugin contributes are hashed and baselined

CI

dsh plugin --profile default add github:zhengqiuyang/dsh-prompt-drift

If this helps you, please give it a star — it helps others find it.

Part of the DSH trust layer — ten deterministic checks, no LLM in the trust path.

System-prompt surface drift gate for DeepSeek Harness (dsh).

Any plugin or preset can contribute sections to the assembled system prompt. Upgrading one can silently rewrite what the model is told; a malicious one can inject "ignore all safety rules" straight into the prompt. This plugin hooks the system-prompt/assemble waterfall, hashes every section (name → sha256(text)), baselines the surface, and diffs every later assembly against it. dsh-mcp-test guards what the model can call; this guards what the model is told. Zero LLM calls in the trust path.

Why now (checked 2026-10-12)

Empty lane. The nearest neighbour (dsh-modelprint, 0★) fingerprints model config, not the prompt surface. Prompt-injection plugins scan content flowing in; nobody watches the assembled prompt itself — the one channel every plugin can write to without anyone reviewing a diff.

How it works

system-prompt/assemble ──> sections [{name, sha256(text)}] name-sorted
                     ──> baseline absent? freeze it (commit the file)
                     ──> diff: added / removed / changed sections
                     ──> warn once per distinct drift (signature dedup)

Dynamic sections (cwd, timestamps) can be excluded via ignoreSections. Baseline file is stable, name-sorted JSON — commit it; it is the contract.

Install

dsh plugin --profile default add github:zhengqiuyang/dsh-prompt-drift

Prebuilt lib/ ships in the repo — git installs need no build step and no allowBuilds authorization.

Configure

- id: dsh-prompt-drift
  name: dsh-prompt-drift
  config:
    baselinePath: .dsh-prompt-drift/baseline.json
    rebaselineOnDrift: false
    ignoreSections: []

Compatibility

  • DSH: verified against the 0.2.x line (source snapshot 0.2.1-alpha.2); installs on any profile via dsh plugin add (prebuilt lib/, no build approval).
  • Node: >= 20 (CI matrix: Node 20/22/24 on Ubuntu and Windows).
  • Disposable-profile evidence (2026-10-19): dsh plugin --profile <fresh> add github:zhengqiuyang/dsh-prompt-drift → installed in 30s; boot shows [dsh-prompt-drift] active: …; dsh plugin --profile <fresh> remove dsh-prompt-drift → dependencies cleared, bundles restored.

Develop

npm install && npm test

Kill criteria

If dsh ships first-party prompt-surface pinning, this freezes at its last working version with a postmortem here.

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。