ZRui-C/dsh-minimal-first-turn
Web 根会话的首轮精简:先使用持久 bash 与 str_replace_editor,移除自动工作区和技能上下文;首次工具调用或回复后恢复所选预设,带持久 composer 开关。
已收录
1
Session
Bundle 已验证
功能介绍
Web 根会话的首轮精简:先使用持久 bash 与 str_replace_editor,移除自动工作区和技能上下文;首次工具调用或回复后恢复所选预设,带持久 composer 开关。
适合
- 希望缩小新根会话首轮请求、同时在之后恢复所选预设的 DSH Web 用户。
- 首个工具交互仅需持久 bash 和 `str_replace_editor` 的工作流。
- 希望通过全局持久 composer 开关控制首轮精简,并在上下文压缩后再次应用的用户。
不适合
- 子代理会话,因为其会明确保留原有 prompt 和工具目录。
- Windows 主机,因为当前持久 Bash PTY 实现仅支持 macOS 和 Linux。
- 首轮请求就必须获得工作区说明、技能上下文或所选预设完整工具目录的工作流。
- 期望保证特定推理措辞或结果的用户;该插件只控制请求条件。
README
DSH Minimal First Turn
| 中文 | Installation |
dsh-minimal-first-turn is a DeepSeek Harness Web plugin that makes an enabled
root session’s first model request smaller and closer to the official Minimal
preset, without permanently giving up the selected agent preset.
It is inspired by the first-request conditioning work in
xiaobright/dsh-anchored-standard.
This project is independent, experimental, and not affiliated with DeepSeek.
What It Does
While First-turn minimal is enabled:
- A new root session’s first request uses the Minimal system prompt.
- The model sees only the official Minimal tool pair: persistent
bashandstr_replace_editor. - Automatic workspace-instruction and skill-catalog messages are removed from that request.
- The first durable
tool/callorassistant/messagerestores the selected preset’s original prompt and complete tool catalog. - After
compaction/end, the next request enters the same controlled phase.
The composer contains a persistent 首轮精简 switch. It is global to the current DSH home, not per-session. Disabling it removes this plugin’s agent-scoped Minimal tools and stops all filtering for future requests.
Installation
This package targets DSH Web with @deepseek-ai/* 0.1.0-rc.6 packages.
A persistent Bash PTY is required, so the current release supports macOS and
Linux hosts; Windows is not supported yet.
dsh plugin --profile web add dsh-minimal-first-turn
Restart the existing dsh web process, then open a conversation. The
首轮精简 switch appears beside the composer controls.
The toggle state is stored at:
$DSH_HOME/plugins/dsh-minimal-first-turn.json
When DSH_HOME is unset, the path is ~/.dsh/plugins/dsh-minimal-first-turn.json.
Development
pnpm install
pnpm check
npm pack --dry-run
For a local Web profile, add the package as a dependency and mount its
cordis.patch.yml, then restart dsh web. Host changes require a restart;
client-only changes require a page reload when the Web HMR watcher is not
running.
Compatibility and Caveats
- The plugin changes model-visible first-request conditions. It does not guarantee a particular reasoning phrase or outcome.
- Its behavior is intentionally limited to root sessions; subagents keep their original catalog.
- The first-turn effect is derived from durable session events, so resume and compaction preserve the phase correctly.
- DeepSeek Harness is a developer preview. Pin the supported DSH package versions when using this in production.
License
MIT. The implementation includes derivative work from the MIT-licensed
dsh-anchored-standard project and DeepSeek Harness packages; the required
attribution is included in LICENSE.
中文说明
这是一个 DSH Web 插件。开启“首轮精简”后,新根会话的第一轮模型请求会使用
Minimal system prompt、持久 bash 与 str_replace_editor,并移除自动注入的
工作区说明和技能目录。首次 tool/call 或 assistant/message 后,当前预设的
完整 prompt 与工具目录恢复;发生上下文压缩后,下一轮会再次进入首轮精简阶段。
它不保证模型输出固定的推理措辞,只控制模型可见的首轮条件。开关是全局持久设置, 而不是单个会话设置。
常见问题常见问题
在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:ZRui-C/dsh-minimal-first-turn。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。
兼容性以页面上展示的 bundle 与 profile 状态为准。如果某个 profile 尚未检测到,请先保持禁用,并在生产启用前阅读仓库文档。
GitHub 链接和 activity 元数据是 release 与维护状态的来源。新版本发布后重新查看本页,确认目录已经观察到最新版本。