deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:rand0wn/dsh-minimal-anchor
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness (dsh) plugin that shields turn 1 from tool-schema overload.
A fresh dsh session hands the model the entire configured toolset — file
edits, bash, subagents, jobs — on message one, even when the first message is
just "look at this repo and tell me what's going on." A smaller, focused
schema on that first turn keeps the model's early reasoning on exploration
instead of premature action, without touching how any later turn behaves.
dsh-minimal-anchor hooks the harness's own prompt-assembly pipeline to:
read, glob, grep).dsh plugin --profile <name> add dsh-minimal-anchor
or from a local checkout:
dsh plugin --profile <name> add /path/to/dsh-minimal-anchor
This adds the package as a dependency of the profile, but does not by
itself activate it — dsh only applies a package's dsh.bundle patch for
packages listed in that profile's dsh.profile.bundles. Add the package
name to that list in profiles/<name>/package.json:
{
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-headless",
"dsh-minimal-anchor"
]
}
}
}
Confirm it composed with dsh --profile <name> --dump-config — you should
see a minimal-anchor entry. (An equivalent alternative that skips the
bundles list entirely: insert it directly in your own
profiles/<name>/cordis.patch.yml — see Configuration.)
Nothing to invoke — it's a passive plugin. Boot your profile as usual
(dsh web, dsh --profile headless "...", etc.) and the first turn of every
new session goes out with the pruned tool list and preamble automatically.
# profiles/<name>/cordis.patch.yml
- insert:
- id: minimal-anchor
name: 'dsh-minimal-anchor'
config:
whitelistedTools: [read, glob, grep]
enforcePreamble: true
customPreamble: 'Your own turn-1 framing text.'
| Field | Default | Description |
|---|---|---|
whitelistedTools |
[read, glob, grep] |
Tool names kept on turn 1. Must match the exact registered tool names in your profile — check dsh --profile <name> --dump-config if unsure, names differ from plugin to plugin. |
enforcePreamble |
true |
Whether to prepend the structural preamble section on turn 1. |
customPreamble |
(built-in exploration-framing text) | Preamble text, used only when enforcePreamble is true. |
Hooks the system-prompt/assemble waterfall from
@deepseek-ai/dsh-system-prompt,
which runs once per turn and produces the PromptAssembly (sections, tools,
contexts) actually sent to the model. A WeakSet keyed on the assembly's
scope tracks whether that scope has assembled before; the first time, it
filters assembly.tools to the whitelist and unshifts the preamble section,
then calls next() so every other listener in the waterfall still runs
normally. Every later assembly for that scope short-circuits straight to
next() — no mutation, no persisted per-session state beyond the WeakSet
entry, which needs no explicit teardown since it dies with the scope object.
There is no agent/request or per-message hook in the real harness — this
plugin does not use one, unlike an earlier draft of this same idea that
assumed events that don't exist in dsh.
pnpm install
pnpm run build # emit lib/ from src/
pnpm run typecheck # type-check only
Verified against a real local dsh boot (not just types): installed into a
scratch profile, patched in, and run against a live model — the outbound
request on turn 1 carried exactly the whitelisted tools and the preamble
text, and turn 2 carried the full toolset with no preamble.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。