Files
memind/docs/dsh-executor-local.md
T
john f3348f45c0 feat(dev-tools): add shadow portal and dsh gateway local E2E scripts
Add events-only Context Runtime shadow portal verification to save LLM
tokens, wire Tool Gateway → dsh headless smoke, and document both flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 09:25:13 +08:00

2.6 KiB
Raw Blame History

DeepSeek Harness (dsh) 本地开发

MIT · developer preview · 并列 code executor,不替换 goosed 关联: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

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(首次也会下载包)。

开关(默认全关)

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

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。人工一次性:

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 聚合

Tool Gateway E2E(一次 headless

MEMIND_TOOL_GATEWAY_DSH_ENABLED=1 node scripts/test-dsh-executor-gateway-e2e.mjs
# → DSH_GATEWAY_E2E_OK

路由 repo_refactordsh;会消耗 LLM token,须人工批准。

headless 手动探针

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