dsh-advisor
dsh plugin bundle porting the omp advisor subsystem: a per-session reviewer model that observes the primary transcript and injects severity-ranked advice (nit/concern/blocker).
AI 分析
核心用途是引入“双模型”机制对主 Agent 的输出进行实时质量把关。适合对大模型生成代码或方案的准确性有极高要求的任务。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:omdsh-dev/dsh-advisorドキュメント
README 全文を読む ↗Configuration
Add an advisor: section to the global dsh settings document (default $DSH_HOME/settings.yaml — shared across profiles; the web Settings card writes to this same file):
advisor:
enabled: true # master switch (default false) — set explicitly to enable
provider: deepseek-official # REQUIRED when enabled
model: deepseek-v4-flash # REQUIRED when enabled
systemPrompt: "" # optional; "" = built-in reviewer prompt
immuneTurns: 3 # int ≥ 0, default 3 — cooldown after a delivered steer
maxDeltaMessages: 60 # int ≥ 0, default 60 — delta window; 0 = unbounded
The advisor is off by default. When enabled, provider and model are mandatory: enabled: true without both is a hard gate — the advisor never starts a model call and reports a disabled-with-reason status; unknown config keys are rejected.
The same keys compose across three surfaces (later layers override earlier ones; every surface shares the same key set and the same hard gate, with the host-side gate as the final line of defense on every path):
- Plugin-row config — the profile patch layer (
$DSH_HOME/profiles/ /cordis.patch.yml). This is the composition base. - dsh web Settings page — the "插件配置" (Plugin Configuration) page — the Advisor card (id
advisor) with the enabled toggle, provider / model selects restricted to system-configured providers and their models, and the optional fields. Saving writes into theadvisorsettings namespace and applies to new sessions immediately — no restart. The card requires a current dsh web build whose shell declares thesettings.plugin.itemcard slot and loads packages that declaredsh.client; it reads and writes the namespace through the officialGatewayServiceRPC channel (/api/advisor/get+/api/advisor/set), which is not gated by the settings exposure allowlist. It additionally blocks saving while enabled with a required field empty. /advisorcommand — per-session and ephemeral: it flips a session override, never the persisted config (see Verify).
In a dsh-tui profile there is no settings page: the same two persisted surfaces (profile patch layer + global $DSH_HOME/settings.yaml) compose the config, and /advisor config prints the composed config as a read-only readback with edit hints. Full reference → docs/configuration.md.
