DeepSeek Harness 插件

dsh-advisor-haoliang

DSH advisor plugin: evaluates turn/error via LLM and renders a compact inset advisor card per turn(英文原文)

跳到安装方式

来源信息

GitHub 仓库
haoliangwu/dsh-advisor
最近更新
2026年8月20日
分类
记忆
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/haoliangwu/dsh-advisor
插件名:dsh-advisor-haoliang
作者:haoliangwu

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器2 个文件
README.md来源说明 · 只读预览

<h1 align="center">dsh-advisor</h1>

<p align="center">Turn advisor for DSH — evaluates each turn (default: on error) via LLM and renders a full-width淡蓝 advice card in the chat.</p>

<p align="center"><img src="docs/advisor-card.png" alt="Advisor card — full-width light-blue card with verdict OK and advice" width="640"></p>

A host+client bundle plugin for DeepSeek Harness. The host half listens to session/event for turn/end, calls ctx.llm.stream() with a configurable prompt, and appends advisor/eval (log-only). The browser half registers a ConversationNodeDefinition for advisor/eval and a keyed conversation.chat.node renderer (advisor) — a full-width card in harmonious blue (#e3eefc/#3b6ea5, no traffic-light colors) with verdict icon differentiation.

Install

dsh plugin --profile web add github:haoliangwu/dsh-advisor

Built lib/ is committed, so the git install is one line — no prepare script, no allowBuilds permission. Restart dsh --profile web after install (bundle layer stacks compose at boot).

Configure

In your profile's cordis.patch.yml (~/.dsh/profiles/web/cordis.patch.yml):

- id: dsh-advisor
  config:
    # When to evaluate: ['error'] (default) or ['all']
    evaluateOn: ['error']
    # Optional explicit route; fallback is session's current model (request/header)
    provider: deepseek-official
    model: deepseek-chat
    # Optional prompt template with {turn} and {transcript} placeholders
    promptTemplate: |
      Evaluate turn {turn}...
      Transcript:
      {transcript}

evaluateOn accepts any turn/end reason kind (completed, error, aborted, blocked, max-tokens, interrupted) or all. An empty list disables evaluation.

promptTemplate defaults to a hard-coded JSON template that requests {"verdict":"ok"|"needs-attention"|"off-track","issues":[],"advice":"..."}. JSON parse failures degrade to needs-attention with advice set to raw output.

Disable entirely:

- id: dsh-advisor
  disabled: true

How it works

  • Host: ctx.on('session/event') filters turn/end by evaluateOn; builds a short transcript from session.deriveMessages() (last 10) and the requestHeader/requestContext route (or explicit provider/model); calls ctx.llm.stream() and parses verdict/issues/advice; appends advisor/eval log-only (no surfaceOp, ignorable).
  • Client: ConversationNodeDefinition (kind: advisor, target: chat) matches advisor/eval per turn and builds a chatNode('advisor', …); AdvisorCard renders a full-width淡蓝 card with blue-family icons (○ / ◐ / ◉) and locale-aware verdict labels (advisor namespace, zh/en).
  • Card styling: background #e3eefc, border #c3dbf5, text #3b6ea5 family; icon variants differentiate verdicts within the same hue (light fill → solid fill), never red/yellow/green.

Build from source

pnpm install
pnpm build         # emits lib/index.js, lib/invariant.js, lib/client.js + sourcemaps
pnpm typecheck     # tsc --noEmit

lib/ is committed so git installs work without a build step. After changing source, run pnpm build and commit the updated lib/.

License

MIT