dsh-web-search-ddg
aooyoo
Zero-token DuckDuckGo search provider for the DeepSeek Harness (DSH) web seam — local headless browser, no API key, no m…
PROJECT TOPICS
PROJECT README
两阶段 DeepSeek Harness Agent 预设:首轮完全等价官方极简模式(锚定 V4 Pro 的 We 思维链),首个工具调用/回复后自动切换完整标准工具目录,Windows 原生可用(Git Bash / WSL 执行,绕开官方 bash 工具在 win32 的缺失)。
社区项目,非 DeepSeek 官方预设,与 DeepSeek 无隶属关系。
DeepSeek V4 Pro 对首次请求的 API 可见工具目录强条件化(消融实验):
| 首轮工具组合(minimal persona 下) | 轨迹 |
|---|---|
bash + str_replace_editor(官方极简) |
✅ We need / minimal-like |
bash + read |
✅ minimal-like |
bash + glob |
❌ 变 Let me(glob 是已观测分界之一) |
| 完整 25 工具 | ❌ 压不住,高频 Let me |
官方 minimal 模式(99/96 分)很强但只有两个工具;标准模式(91/92 分)工具全但轨迹差。本预设把两者解耦:先以极简工具面锚定推理轨迹,第一次工具调用后立即恢复完整能力(anchored-standard 思路,完整 Project2 实测 98/99、均值 98.5、355 个推理块仅 1 个 let me)。
bash(官方持久 bash 工具,PTY 指向 Git for Windows 的 bash.exe)+ str_replace_editor,不是 bash + read 变体dsh-agent-instructions 被禁用(它的注入发生在 pre-step 过滤器之后、无法拦截),改为自研 instruction-late 插件——CLAUDE.md / AGENTS.md 等 workspace instructions 在首个工具调用/回复(promote)后才注入,预热回合完全纯净gitbash(Git for Windows,bootstrap 默认)与 wsl(WSL bash)两个 shell 工具;不需要 Linux / WSL 也能跑| 阶段 | 系统提示 | 工具目录 | 工作区指令 (CLAUDE.md) |
|---|---|---|---|
| 第 1 轮(预热) | 仅 You are a helpful software engineer assistant. |
bash + str_replace_editor |
❌ 不注入(延迟到 promote 后) |
| 第 2 轮起 | 同上(全程保持) | 完整标准目录 + wsl + gitbash + pwsh |
✅ 注入(instruction-late) |
触发条件(promoteOn: either):第一个 tool/call 或第一条 assistant/message,先到先得——第一轮纯文本回复也会晋升,不会卡在极简。
前置:已装好 DSH(dsh web 可运行),Windows 上建议装有 Git for Windows(bash.exe)。
方式一:插件安装(推荐,一步到位)
本仓库同时是 DSH 插件:安装插件时自动把预设复制到 ~/.dsh/.agent-presets/anchored-wsl。
dsh plugin --profile web add "github:dHR-P/dsh-anchored-wsl"
完全重启 DeepSeek Harness 后,新开会话即可选择本预设。
方式二:手动复制
PowerShell:
$target = Join-Path $env:USERPROFILE '.dsh\.agent-presets\anchored-wsl'
if (Test-Path -LiteralPath $target) { throw "Preset already exists: $target" }
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $target) | Out-Null
Copy-Item -Recurse -LiteralPath '.\preset' -Destination $target
Linux/macOS:
dsh_home="${DSH_HOME:-$HOME/.dsh}"
mkdir -p "$dsh_home/.agent-presets"
test ! -e "$dsh_home/.agent-presets/anchored-wsl"
cp -R preset "$dsh_home/.agent-presets/anchored-wsl"
完全重启 DeepSeek Harness,新开一个空白会话,选择 锚定极简 + 标准工具 (WSL)。不要给已有会话切换预设。
Begin. 预热消息,模型以纯极简状态输出(We 思维链);随后你的真实消息自动进入第二轮,工具与工作区上下文全部恢复Windows 注意:预热回合的官方
bash工具在 win32 可能直接报错(terminal inspection is unsupported on platform win32——官方限制)。这是预期的:模型首次工具调用后立即晋升,第二步起全工具(pwsh/gitbash/wsl)可用,不会卡死。若想预热回合也用可用 shell,可把shellTools: [bash]改为shellTools: [gitbash]。
编辑 ~/.dsh/.agent-presets/anchored-wsl/agent.cordis.yml:
wsl --install -d Ubuntu 并重启):把 tool-bootstrap 行的 shellTools: [gitbash] 改为 shellTools: [wsl]promoteOn: either(默认)| tool-call | assistant-message@deepseek-ai/dsh 0.1.0-rc.6 / Windows / Node.js 24standard 预设快照;system-prompt/assemble 与 agent/pre-step 事件名若在后续版本变化,bootstrap 过滤器会降级为全量目录(fail-safe,不阻塞会话)本预设的实现参考了以下项目与讨论,致谢:
tool-bootstrap 过滤器原版)、预设分发结构gitbash 工具实现minimal / standard 预设(config/agent-presets/)— persona 与组合基线MIT。preset/agent.cordis.yml 衍生自 DeepSeek Harness 官方 Standard 预设,原始版权与 MIT 声明保留于 NOTICE(见下方)。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。