Minimal-compatible first turn for Web root sessions: starts with persistent bash and str_replace_editor, removes automatic workspace and skill context, then restores the selected preset after the first tool call or reply; includes a persistent composer toggle.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-minimal-first-turn
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:ZRui-C/dsh-minimal-first-turn
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
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
For compatible presets, while First-turn minimal is enabled:
- A new root session's first request uses the Minimal system prompt.
- The model sees only the current official Minimal tool: persistent
bash. DSH removedstr_replace_editorfrom that preset in September 2026. - Automatic workspace-instruction and skill-catalog messages are removed from that request. Instruction messages are carried to the next pre-step so one-shot nested-directory updates are not lost. Deferred instructions are recorded in the session log and survive restart until committed to history.
- 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 before the next model request and stops filtering for that request. An already assembled request and its tool batch finish with the same provider, so toggling cannot unload a tool before it executes.
Installation
This working version is validated with DSH Web 0.2.0-rc.2 and
0.2.1-alpha.1. Peer requirements explicitly allow these two versions, not
an untested continuous version range. The former 0.1.0-rc.6 is unsupported.
The repairs are available from GitHub; merging them does not publish a new npm release. To install the GitHub version and keep the dependency registry separate: 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 "github:ZRui-C/dsh-minimal-first-turn#main" --registry=https://registry.npmjs.org/
The GitHub address is the package spec; --registry is an npm registry, never
a GitHub repository URL. This flag applies only to this installation. Do not use
allow-version to bypass a version mismatch.
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 phase uses the current session-projection registry. Resume, compaction, and events recorded while the switch is off preserve it correctly.
- Custom complete system prompts are protected by current DSH. If their text differs from Minimal, the plugin leaves the entire request unchanged and logs a warning. It does not override that protection. The official Minimal complete prompt remains supported.
- PTC-only tool presentation and same-agent-scope Bash registration conflicts also fall back to the original request. A compatible native Bash catalog is required; no partial prompt/message filtering is applied after a failed mount.
- The temporary Bash provider is retained through its first tool batch, then removed before the next assembled request restores the preset's own Bash. Persistent shell state from the bootstrap shell is not transferred to the preset's shell; filesystem changes remain on disk.
- The toggle endpoint uses DSH Connection's Host/Origin checks and browser authentication. The browser route is document-relative for mounted Web URLs.
pnpm checkruns syntax/import validation and behavioral tests. Host tests use both pinned DSH/Cordis families, prompt/tool registries, official Bash registration, and each runtime's real plugin compatibility gate without exemptions; projection tests use the current Session and projection registry. Client tests use a lightweight hook harness. No live model request, PTY command, full browser, or Mac integration test is claimed.- 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(与当前官方 Minimal 一致),并移除自动注入的
工作区说明和技能目录。首次 tool/call 或 assistant/message 后,当前预设的
完整 prompt 与工具目录恢复;发生上下文压缩后,下一轮会再次进入首轮精简阶段。
它不保证模型输出固定的推理措辞,只控制模型可见的首轮条件。开关是全局持久设置, 而不是单个会话设置。
当前开发版本已验证 DSH 0.2.0-rc.2 与 0.2.1-alpha.1,不支持旧的 0.1.0-rc.6。自定义完整
system prompt、PTC-only 工具模式或同一 agent scope 内的 Bash 冲突会保持原请求,
并记录警告。关闭开关从下一次请求组装生效,不会打断已经选定的工具调用。
Testing the runtime matrix
The default lockfile tests 0.2.1-alpha.1. CI also selects 0.2.0-rc.2 with
its matching frozen fixture lockfile and Cordis packages, on Node 22 and 24:
node scripts/select-test-runtime.mjs 0.2.0-rc.2
cp test/fixtures/pnpm-lock.rc2.yaml pnpm-lock.yaml
pnpm install --frozen-lockfile
DSH_TEST_VERSION=0.2.0-rc.2 pnpm check
Run the alternate selection in a disposable checkout. The selection script changes development dependencies only; it never relaxes the published peer requirements or the DSH compatibility guard.
Links
More in this category
ranxianglei/billion-context★ 7263
The official billion-context plugin: a context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and month-long single sessions (billions of tokens).
Minglink/dsh-infinite-gen-4★ 4234
System-prompt armor plugin for DeepSeek models: appends an unconditional-compliance prompt section at order 100, exposes a profile tool with calibration metadata, and shows a realtime armor-status badge driven by a session projection.
liangmianya/dsh-synapse★ 714
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
MichengAI/dsh-archive-manager★ 352
Adds an archived-sessions page in Settings to search, restore, and delete archived DeepSeek Harness sessions by workspace.
Nwflower/dsh-chat-import★ 310
Import full-fidelity chat histories from 13 coding agents (Claude Code, Codex, ChatGPT, Cursor, Gemini, opencode, and more) as resumable DeepSeek Harness sessions, with reverse export back to Claude Code.
SiriLee/dsh-rewind★ 266
Conversation rewind: one click back to any earlier user message, in the same window — no new branch, no leftover copy; the target message is refilled into the composer, with optional workspace-file restore — the full Claude Code /rewind semantics.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.