Starfie1d1272/dsh-v4-anchor

Plugin插件 Native原生 ⭐ 2 MIT Sessions & Context会话与上下文

DeepSeek Harness Standard 上用于 DeepSeek V4 的最小首轮 RL 锚点。

Project Overview项目介绍

dsh-v4-anchor is a purposefully minimal native plugin built exclusively for the DeepSeek Harness (DSH) agent framework. It specifically targets DSH version 0.1.0-rc.7, the official standard preset, and top-level sessions using DeepSeek V4 family models, including both deepseek-v4-flash and deepseek-v4-pro variants. You can install it directly from the npm registry with the DSH CLI command dsh plugin --profile web add dsh-v4-anchor, or install a specific pinned GitHub release by running dsh plugin --profile web add github:Starfie1d1272/dsh-v4-anchor#v0.1.0, then restart your DSH web instance with dsh web to apply the configuration change.

The core function of this plugin is to replicate the RL-shaped bootstrap process that published upstream experimental evidence supports for DeepSeek V4 Standard sessions. Before the first persistent tool call is made in a session, it strips away unnecessary runtime contexts, hides the automatically injected AGENTS.md file and Skill Catalog, and leaves only a minimal base system prompt and two core tools: bash or pwsh, and str_replace_editor. After the first tool call completes successfully, the plugin restores all original DSH Standard configuration and adds a one-time reminder to prompt the model to recheck the newly available skills and tools. This plugin is specifically intended for DSH users who want to replicate the documented upstream RL bootstrap experiment results.

This plugin is released under the open-source MIT license and is not an official DeepSeek-affiliated project. It does not add any extra third-party dependencies to your DSH installation, instead it reuses the existing @deepseek-ai/dsh-tool-str-replace-editor package that is already bundled with DSH. It operates as a no-op with no effect on sessions that do not match its target criteria, including non-DeepSeek V4 models, non-standard presets, and nested subagent sessions. It is explicitly positioned as a time-bound behavioral patch, and may be archived or end maintenance if DeepSeek or DSH officially resolve the related behavior in a future update.

这是一个专为 DeepSeek Harness (DSH) 开发的原生极简插件,仅针对 DSH 0.1.0-rc.7 版本的官方 standard preset 和 DeepSeek V4 系列模型生效。它的核心功能是在符合条件的顶层会话首次请求中,复现有实验证据支持的 RL-shaped 引导配置,缩小初始提示范围,促进模型尽早发起工具调用,避免无行动的长推理。

本插件遵循极简设计定位,仅保留已有实验证据支持的窄范围机制,不做任何额外功能扩展。它会在首次工具调用前,暂时移除运行时上下文、隐藏自动注入的 AGENTS.md 和技能目录,仅保留基础系统提示和 bash、str_replace_editor 两个工具。适合想要复现上游 RL 引导实验结果的 DSH 开发者和用户使用。

本插件使用 MIT 许可证开源,不属于 DeepSeek 官方项目,安装后仅对符合条件的会话生效,对不匹配的场景不做任何操作。它复用 DSH 自带的 dsh-tool-str-replace-editor 依赖,不需要额外安装运行时包。作为时效性补丁,若后续官方修复相关问题,本插件可能会停止维护。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-v4-anchor

把 Starfie1d1272/dsh-v4-anchor 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-v4-anchor

English

一个刻意保持极简的 DeepSeek Harness 插件,只做一件事:

在 DeepSeek V4 的 Standard 会话首请求中复现已有实验证据支持的 RL-shaped bootstrap;首次真实工具调用后,恢复完整 Standard 能力,并重新暴露 Skill。

它不是新的 Router,也不是 dsh-router-standard 的替代品,更不会追踪上游不断变化的 routing 实验。

它做什么

仅对以下会话生效:

  • DeepSeek Harness 0.1.0-rc.7
  • 官方 standard preset
  • 顶层会话
  • 模型 ID 匹配 DeepSeek V4,例如:
    • deepseek-v4-flash
    • deepseek-v4-pro

首请求:RL-shaped bootstrap

在首次持久化 tool/call 之前:

system:
You are a helpful software engineer assistant.

tools:
bash / pwsh
str_replace_editor

同时:

  • 暂时移除 runtime contexts;
  • 暂时隐藏自动注入的 AGENTS.md;
  • 暂时隐藏自动注入的 Skill Catalog。

这样首请求尽量保持接近已有实验中使用的最小 RL-shaped surface。

首次工具调用后:恢复完整 Standard

一旦会话出现第一次持久化 tool/call:

  • 恢复原始 Standard system prompt;
  • 恢复 runtime contexts;
  • 恢复完整工具目录;
  • 恢复 Skill Catalog;
  • 恢复 skill loader;
  • 不再隐藏 AGENTS.md。

随后仅额外注入一次 promotion transition reminder,提醒模型重新检查刚刚恢复的 Skill / 工具能力,避免继续沿用 bootstrap 阶段形成的能力假设。

为什么做这个插件

这个项目只保留目前证据链中最窄、最容易解释的一层机制,而不继续维护完整 routing 实验。

已有实验证据支持的部分

上游实验中,RL-shaped bootstrap 使用:

You are a helpful software engineer assistant.

配合:

bash + str_replace_editor

曾记录到真实会话:

  • 25 steps
  • 24 次 tool call
  • 生成约 19 KB artifact

而完整、污染更重的 system surface 曾出现:

  • 约 101K reasoning chars
  • 0 次实际行动

上游小样本 API probes 还报告过:

  • RL-shaped surface:100% 出现 tool call;
  • reasoning 约 18–29K chars;
  • 普通 read/write/edit surface:约 25% action;
  • reasoning 约 73–101K chars。

这些结果支持的是:

首请求 surface 可以显著改变 DeepSeek V4 的思考 / 行动轨迹。

它们不能证明这种轨迹一定提高最终工程质量。

Skill Catalog 隐藏 / 恢复

dsh-router-standard PR #29 进一步发现:

  • dsh-agent-instructions
  • dsh-tool-skill

会在首请求前通过 user message 注入 AGENTS.md 与 Skill Catalog。

因此,仅清空 contexts 并不能得到真正干净的 bootstrap 请求。

PR #29 使用 agent/pre-step 暂时过滤:

agent-instructions
skill-catalog

并在第一次持久化 tool/call 后让它们自然恢复。

真实 session 中已经观察到:

  • request #1 保持 bash + str_replace_editor;
  • promotion 后 request #2 恢复完整目录;
  • skill loader 与 Skill Catalog 同时回来[
  • 模型实际加载了 gh-address-comments、gh-publish、github 等 Skill。

promotion reminder:实验性

后续真实 session 又发现:

“Skill Catalog 已恢复”并不保证模型一定会重新做 Skill matching。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-custom-subagents 下一个 Next dsh-typesafe →