@slhssb/dsh-advisor
Independent-model advisory review for DeepSeek Harness: after each tool step, a reviewer model audits the agent's operations and injects concerns/guidance into the next step.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:slhssb/dsh-advisor说明文档
阅读完整 README ↗dsh-advisor
English | 中文
为 DeepSeek Harness 提供独立模型 advisory 审查。
每个工具执行步之后,由独立的审查模型审计 agent 最近的操作。发现真实问题时(破坏性/不可逆操作、契约/模式违规、偏离用户明确要求、正确性 bug),向下一轮模型调用注入一条简短的 [advisor] 指导消息,让 agent 自我纠正。操作健全时什么都不注入,审查只消耗一次(廉价的)审查调用。
dsh 本身没有内置 advisor;本插件基于标准的 agent/pre-step waterfall 实现(与 dsh-agent-instructions、dsh-compaction-basic 相同的注入通道)。
安装
dsh plugin add @slhssb/dsh-advisor
或加入 profile 的 package.json:
"dependencies": { "@slhssb/dsh-advisor": "^0.1.0" },
"dsh": { "profile": { "bundles": ["@slhssb/dsh-advisor"] } }
然后在 profile 目录执行 npm install(或 pnpm install)并重启 dsh。
配置
默认目标为 DeepSeek 官方 API(deepseek-official provider)与廉价的 deepseek-v4-flash 模型。API key 不由本插件管理:deepseek-official adapter 按请求从 DEEPSEEK_API_KEY 环境变量或凭据存储解析。
默认值无需覆盖——即 DeepSeek 官方 API(deepseek-official/deepseek-v4-flash)。要换审查 provider,在 profile 的 cordis.patch.yml 中覆盖(后写覆盖先写)。以下示例把审查路由到第三方中转:API key 由该 provider 的 adapter 解析(此处按 settings.yaml 的 apiKeyEnv 取 TOKENRHYTHM_API_KEY 环境变量)——本文件从不存放 key:
- id: advisor
config:
provider: tokenrhythm
model: deepseek-v4-pro
maxTokens: 512
maxHistoryMessages: 40
interval: 1
timeoutMs: 30000
| 键 | 默认 | 含义 |
|---|---|---|
provider | deepseek-official | 审查 provider 路由(任意 OpenAI 兼容 adapter 可用)。 |
model | deepseek-v4-flash | 审查模型。 |
maxTokens | 512 |