feat(dev-tools): document dsh install and zero-LLM local checks
Memind CI / Test, build, and release guards (push) Failing after 3m44s

Pin @deepseek-ai/dsh@0.1.1-rc.2 probing in check-dsh-executor-local.mjs,
keep live headless smoke opt-in only, and record the 10k-token approval gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-09-10 08:50:20 +08:00
parent 938f6d6d37
commit c0d43379b8
3 changed files with 170 additions and 5 deletions
+4
View File
@@ -59,6 +59,9 @@ node scripts/check-mcp-compactor-local.mjs
# codebase-memory-mcp CLI + Memind 索引(见 docs/codebase-memory-mcp-local.md
node scripts/check-codebase-memory-mcp-local.mjs
# dsh CLI + dry-run launch plan(见 docs/dsh-executor-local.md,默认零 LLM
node scripts/check-dsh-executor-local.mjs
```
## 用户自测清单(有 LLM 配额时)
@@ -86,6 +89,7 @@ ORDER BY created_at;
## 禁止项
- Agent **不得**自动设置 `GOOSE_V149_ALLOW_REAL_LLM=1` 或循环跑 phase2/phase3
- **预计超过 10k token 的 LLM 调用须用户明确同意**(含 dsh headless / Goose smoke
- **禁止** `headroom wrap` / `headroom learn` / `HEADROOM_OUTPUT_SHAPER=1`
- 页面生成 / Page Data 轮次首期 **排除** headroom active
+83
View File
@@ -0,0 +1,83 @@
# DeepSeek Harness (dsh) 本地开发
> MIT · developer preview · **并列 code executor,不替换 goosed**
> 关联:[context-runtime-harness-fusion-plan.md](./context-runtime-harness-fusion-plan.md) §6.3
## 用途边界
| 允许 | 禁止 |
|------|------|
| `tool-gateway` 白名单 task type 的 headless 代码任务 | 替换 Goose + `tkmind-proxy` 主路径 |
| 与 aider / openhands / cursor 并列 executor | 103 默认开启 |
| 小范围验证 Cordis / plugin 模型 | 未批准的大流量 smoke |
## 安装(本机一次)
Memind launch plan 与 smoke 脚本固定 pin
```bash
npm install -g @deepseek-ai/dsh@0.1.1-rc.2
dsh --version # → 0.1.1-rc.2
which dsh # Homebrew 全局 npm 通常在 /opt/homebrew/bin/dsh
```
未装本地二进制时,代码会回退 `npx -y @deepseek-ai/dsh`(首次也会下载包)。
## 开关(默认全关)
```bash
MEMIND_TOOL_GATEWAY_DSH_ENABLED=0
MEMIND_TOOL_GATEWAY_DSH_TASK_TYPES=repo_refactor,multi_file
MEMIND_DSH_BIN=dsh
# MEMIND_DSH_FORCE_NPX=1 # 强制 npx 路径
```
`docs/goose-v149-canary.env.example`
## 离线验证(零 LLM
```bash
node scripts/check-dsh-executor-local.mjs
# → DSH_EXECUTOR_CLI_OK
MEMIND_TOOL_GATEWAY_DSH_ENABLED=1 node scripts/check-dsh-executor-local.mjs
# → DSH_EXECUTOR_OK(仅 dry-run launch plan,不 spawn
```
## Live smoke(耗 token,须批准)
**默认禁止** Agent 自动跑 live。人工一次性:
```bash
export DEEPSEEK_API_KEY=...
MEMIND_TOOL_GATEWAY_DSH_ENABLED=1 \
MEMIND_DSH_SMOKE_TASK='List three files in the workspace root and stop.' \
MEMIND_DSH_RUN_LIVE_SMOKE=1 \
node scripts/check-dsh-executor-local.mjs
```
### Token 成本闸门(2026-09-10
- 优先 **dry-run / 单条最小 headless**
- **预计超过 10k token 必须先经用户同意**
- 禁止循环重跑、禁止 unattended `check-goosed-v149-all` / phase3 聚合
## headless 手动探针
```bash
dsh --profile headless "List three files in this directory and stop."
```
## 接入节奏(fusion-plan
| 阶段 | 内容 |
|------|------|
| **现在** | CLI + dry-run + 文档(本页) |
| **下一步** | Context Runtime shadow 自测后,**1 次**批准 live smoke |
| **之后** | task type 白名单扩展、fallback、memind_adm 开关;103 单独决策 |
## 相关模块
- `dsh-agent-launch.mjs` — launch plan
- `tool-gateway.mjs` — executor 路由
- `llm-providers.mjs` — provider 侧 plan