顾问引导。守卫保护。模型执行。
32.2/100
综合分
3
GitHub 星标
—
npm 周下载
—/5
用户评分
数据截至 2026/10/1 · 周下载取自 npm 全网(含 CI / 镜像),非本站安装数;综合分由星标、活跃度与兼容性检查合成。
自动兼容检查有告警:未发布到 npm registry,仅可从源码安装。
安装命令 · 需先装 dsh CLI 引擎
dsh plugin --profile web add AndrasSama/dsh-omp-advisor该包不可直接 npm 安装,改从 GitHub 源安装(明细见下方安装检查)
状态速览
判定依据:实装验证 · 静态安装检查 · 自动扫描 · 仓库维护状态信任档位:需留意
是什么
dsh 原生插件 · browser
安全吗
本站尚未对该插件做风险分级
暂未覆盖,不等同于无风险
还在维护吗
更新放缓:最近一次提交在 34 天前
档位由哪些信号合成
本站实装验证(真实安装 L4 覆盖全站;L5 为运行时冒烟或实机截图,覆盖范围小于 L4) · 验证所用 dsh 版本 · 静态安装检查 · 风险分级 · 仓库维护状态。 下方各区块是它的证据明细。
⚠︎ 实装验证未通过(unknown · 2026/10/30) ——可能是验证环境差异,装前建议到 GitHub 仓库确认最近更新与 issue。
社区实装还没有人打卡 · 装过的第一个就是你
安装兼容性检查⚠ 装前注意未发布到 npm registry,仅可从源码安装
展开查看检查明细 ↓
以下结论由程序自动检查 npm 包、engines 声明与入口文件得出,未做人工实机验证——能装不等于用着没问题。
✗npm 包dsh-omp-advisor(未发布到 npm,仅可源码安装)
✓Node 引擎未声明 engines.node
✓dsh CLI 依赖未声明 dsh 版本约束
✓入口文件main/exports/bin 已声明
验证方式:npm registry 存在性 + package.json 静态校验 · 最后检查 2026/10/21 20:38:40
安全扫描自动 · 静态分析源码v2.7.0🔵 扫描:含敏感能力尚无人工评估展开查看扫描说明与证据 ↓
安全扫描自动 · 静态分析源码
v2.7.0静态扫描发现插件具备触达本地系统的能力:执行外部命令、读写/删除本地文件、读取剪贴板或密钥类环境变量(至少其一)。这是能力清单,不是危险判定——具体能力项与证据见下方,安装前请自行判断是否需要。
可执行外部命令读写/删除本地文件发起外部网络请求
查看扫描证据(共 25 处,展示前 16 条)
- 读取本地文件lib/index.js:230
if (existsSync(candidate)) roots.push(candidate); - 读取本地文件lib/index.js:240
if (existsSync(profilesDir)) { - 读取本地文件lib/index.js:242
for (const entry of readdirSync(profilesDir)) { - 读取本地文件lib/index.js:255
if (existsSync(candidate)) return candidate; - 读取本地文件lib/index.js:313
existing = await readFile(path, "utf8"); - 写入本地文件lib/index.js:322
await mkdir(join2(cwd, MEMORY_DIR_NAME), { recursive: true }); - 写入本地文件lib/index.js:323
await writeFile(path, existing + (existing && !existing.endsWith("\n") ? "\n" : "") + renderLessonEntry(lesson) + "\n", "utf8"); - 读取本地文件lib/index.js:362
const content = await readFile(lessonsPath(cwd), "utf8"); - 执行外部命令来自配置/变量lib/index.js:420
child = spawn(command, args, { - 发起网络请求lib/index.js:558
const response = await fetch(url, { - 写入本地文件lib/index.js:933
await mkdir2(join3(cwd, MEMORY_DIR_NAME), { recursive: true }); - 写入本地文件lib/index.js:934
await writeFile2(this.pendingPath(cwd), JSON.stringify(forCwd, null, 2), "utf8"); - 执行外部命令固定命令lib/index.js:1204
const child = spawn2("git", args, { - 删除本地文件lib/index.js:1271
unlinkSync(candidate); - 执行外部命令固定命令lib/index.js:1307
const child = spawn2("git", args, { cwd, env: envIdx, stdio: ["ignore", "pipe", "pipe"] }); - 删除本地文件lib/index.js:1371
if (existsSync3(indexPath)) unlinkSync(indexPath);
扫描于 2026/11/4(0 天前) · 范围 入口闭包 + 发布文件清单 · 来源 GitHub 仓库
静态扫描只反映源码中出现的调用,不构成安全背书;人工评估与自动扫描相互独立、互不覆盖。
依赖的 DSH / Cordis 模块
@deepseek-ai/cordis@deepseek-ai/dsh-llm@deepseek-ai/schemastery给这个插件打分还没有人投票↓
用户评分
还没有人投票,来当第一个
功能亮点
- 独立审查模型监督智能体
- 注入建议与分级引导
- 自动恢复与git检查点
Ward council 是移植到 DeepSeek Harness 的 oh-my-pi 顾问子系统——独立的审查模型盯着你的智能体并给出建议(nit 注入,concern/blocker 引导),还带自动恢复和 git 检查点
README
由 DeepSeek 最新模型翻译生成Ward Council
顾问引导。守卫保护。模型执行。
包名:dsh-omp-advisor —— 即其安装并存储设置时所用的名称。
这是什么?
你的编码代理很出色,但在长时间会话中可能会陷入隧道视野:漏掉安全漏洞、在测试真正通过之前就宣称“完成”,或者在走错路后仍一意孤行。Ward Council 为它提供了第二双眼睛 —— 一个或多个独立的顾问模型,实时观察会话,并在关键时刻发声。
每个顾问都会随着对话记录的不断增长而阅读它,可以用只读工具(read / grep / glob)调查你的工作区,并通过专用的 advise 工具提交具体建议。建议以清晰标注的备注形式送达,由主代理权衡 —— 而非必须服从的命令:
The SQL in search.py interpolates the user query directly — parameterize it before this ships.
你可以从 DSH 的模型列表中为每个顾问挑选模型,将其限定到特定的工作区,并赋予它一个人设(内置 25 个预设)以及精选的领域技能(打包 250 个)。这是源自 can1357/oh-my-pi 的顾问看门狗设计,在 DeepSeek Harness(DSH)插件接缝上原生重建。
展开完整文档(README 剩余 1 节)
Ward Council
顾问引导。守卫保护。模型执行。
包名:dsh-omp-advisor —— 即其安装并存储设置时所用的名称。
这是什么?
你的编码代理很出色,但在长时间会话中可能会陷入隧道视野:漏掉安全漏洞、在测试真正通过之前就宣称“完成”,或者在走错路后仍一意孤行。Ward Council 为它提供了第二双眼睛 —— 一个或多个独立的顾问模型,实时观察会话,并在关键时刻发声。
每个顾问都会随着对话记录的不断增长而阅读它,可以用只读工具(read / grep / glob)调查你的工作区,并通过专用的 advise 工具提交具体建议。建议以清晰标注的备注形式送达,由主代理权衡 —— 而非必须服从的命令:
The SQL in search.py interpolates the user query directly — parameterize it before this ships.
你可以从 DSH 的模型列表中为每个顾问挑选模型,将其限定到特定的工作区,并赋予它一个人设(内置 25 个预设)以及精选的领域技能(打包 250 个)。这是源自 can1357/oh-my-pi 的顾问看门狗设计,在 DeepSeek Harness(DSH)插件接缝上原生重建。
primary agent ──► session log ──► delta renderer ──► advisor model (your pick from the DSH model list)
▲ │ read/grep/glob (read-only)
│ ▼
└──── agent.inject / agent.steer ◄── advise tool ── dedupe + quarantine
概览
- 实时审查 —— 顾问审查对话记录的每个新片段(每轮或每步),绝不重复读取历史。
- 建议,而非命令 —— 备注带有严重程度(nit / concern / blocker)以及指引“权衡,不要盲目服从”;由主代理决定如何行动。
- 工具调用闸门 —— 可选地将发现转化为真正的决策:宿主的 tools/pre-execute 瀑布流在其主体运行前拒绝该调用(deny),或将其挂起等待你的批准(ask)。有界设计,因此顾问永远不会使代理死锁。
- 持久记忆 —— 顾问在每次审查中召回相关经验教训,并将持久的经验教训写回,通过可插拔引擎(纯文本 MD、OpenViking、Hindsight、MisakaNet、mem0 或任何 MCP 服务器)。
- Git 还原点 —— 在轮次边界进行无副作用的工作区快照,让顾问可以推荐精确的、仅限工作树的回退。
- 完成闸门 —— 在代理宣称“完成”之前,顾问会核实原始请求是否确实已实现,否则要求如实报告。
- 韧性 — 对失败的评审和轮次自动重试、配额冷却、输出隔离;顾问永远不会阻塞你的智能体。
- 25 个角色,250 项技能 — 从安全审计员到网络小说架构师的一键预设,每个都配有精选的领域技能。
- 可搜索的模型选择器 — 编写器的模型席位变为可按名称 / id / 提供商 / 描述进行输入过滤的搜索框,推理强度芯片保留在面板页脚中。吸收自独立的 dsh-model-search 插件。
- 多标签页设置 + 实时监控 — 常规 / 顾问 / 工作区 / 记忆 / 监控,外加一个可选的工作区范围侧边栏标签页。
目录
- 工作原理 — 评审循环 · 建议与投递 · 工具调用门 · 韧性 · 干预 · 还原点 · 完成门 · 记忆 · 编写器模型选择器 · UI
- 安装 · 配置 · 预设 · 技能
- 安全模型 · 开发 · 署名与许可 · 已知限制
工作原理
评审循环
- 增量评审。 顾问永远不会两次看到完整历史:持久会话日志上的游标会将每个新切片(user/message、assistant/message、tool/call、tool/result)渲染为顾问模型所评审的紧凑 markdown 更新。
- 微小增量跳过(可选)。 设置 Skip tiny deltas 后,小于阈值的转录更新会被跳过,而不会调用顾问模型——这是在话多的会话中削减顾问流量的一种低成本方式(被跳过的增量之后不会重放)。
建议与投递
- 是建议,不是命令。 备注以…
消息的形式到达。主智能体决定如何处理它们。
- 严重级别。 nit(默认)· concern · blocker。升级等级去重:同一条备注只有在严格更高的严重级别下才会重新投递。
- 投递渠道(DSH 原生)。
| 严重级别 | 主智能体运行中 | 主智能体空闲 |
| 非中断(默认:nit) | agent.inject — 搭乘下一个步骤边界,绝不唤醒 | agent.inject |
| 中断(默认:concern、blocker) | agent.steer — 最近的步骤边界 | concern 降级为 inject;blocker 仍然 steer(可能唤醒一个轮次) |
- 轮次中途延迟。 当 reviewTrigger: step 时,在轮次仍在运行时提出的非阻塞备注会被暂扣,并在轮次完成时确定性地冲刷,因此部分工作不会被打断,也不会有建议丢失。
- 合并(可选)。 当附加了多个顾问时,备注可能会接踵而至。将 Coalesce advice 设置为一个以毫秒为单位的窗口(例如 1500),运行时就会在该窗口内缓冲来自所有顾问的备注,然后按每个投递渠道一条包含多个 的消息发出,而不是每条备注一条消息。语义:
- 0(默认)——每条通知都单独投递,与上述完全一致。
- 窗口激活——计时器从第一条缓冲通知开始计时;当计时器触发时,该批次在发送时按通道分组(steer 与 inject 会根据主会话的当前状态重新解析),并按每个非空通道作为一条消息发送。
- 中断性严重级别——一个 concern/blocker(根据你的中断集合)会立即冲刷整个批次,因此紧急建议永远不会等到窗口结束。
- 会话销毁会取消计时器并丢弃缓冲的通知:已销毁的会话永远不会收到建议。
韧性
- 自动重试(可选,默认开启)。 失败会自动恢复,而不是静默消亡:
- 一次失败的顾问审查(速率限制、临时提供商错误)会在配置的延迟后重新运行同一个增量,最多重试到配置的尝试上限。
- 一次失败的主模型回合(turn/end 且 reason.kind: "error")会在同样的延迟后收到一条自动的“从你中断的地方继续”后续消息,按每次失败事件计数,并在任何完成的回合后重置。
- 尝试上限:1–999,或 0 = 无限制(消息中会将上限标记为 ∞)。用户中止和永久性错误(未知模型/提供商)永远不会重试——即使上限为无限制。可通过 Auto-retry failures 关闭整个功能。
- 遏制(已移植)。 输出隔离(不可用工具的请求、仅输出的破坏性指令)、连续 3 次失败后的积压丢弃、永久性错误暂停直到设置更改、配额/速率限制冷却暂停。顾问永远不会阻塞主代理——这是对 oh-my-pi 追赶等待的有意且更安全的偏离。
- 上下文溢出恢复(v0.7.3)。 如果顾问累积的历史记录超出了模型的上下文窗口,运行时会重置该顾问的对话(将其缩减回系统提示词 + 当前增量)并重试一次——而不是在无限制重试循环中重新发送同样臃肿的上下文。第二次溢出(单个增量本身就过大)会暂停该顾问,而不是永远空转。随后 Monitor 会显示暂停原因以及一个 Resume 按钮(v0.7.4):在 Advisors 标签页中将顾问切换为上下文更大的模型,然后点击 Resume 即可直接将其恢复——无需重启。
工具调用门控
- 直接使用宿主的否决权(v0.9.0,需选择启用)。 DSH 会评估一个 tools/pre-execute 瀑布流,其监听器在工具主体运行之前返回一个 PreToolDecision——allow、deny 或 ask。调用 next() 会让调用继续;而返回一个决策则会结束链条,因此 deny 意味着该工具确实永远不会执行。Ward Council 的门控会将顾问的发现转化为正是这样的决策:
- 顾问以门控严重级别(默认:blocker)报告一项发现。运行时会将其记录为会话的已武装发现。
- 对受门控工具(默认:变更集 bash、write、edit)的下一次调用会被拦截。在 deny 模式下,该调用会被拒绝,模型会收到顾问的理由以及你可选的额外指导;在 ask 模式下,该调用会被暂留以待你决定,并显示本地化提示。
- 设计上有限度。 一条发现最多可拒绝 maxDenials 次调用(默认 2);此后,针对该发现,门控会退让,调用继续执行,因此持不同意见的顾问永远不会使代理陷入死锁。一条新发现会重新武装门控并重置上限。设为 0 表示永不退让。
- 可见性与清除。 每次拒绝、暂留和退让都会出现在 Monitor 标签页的活动流中(gate-denied、gate-ask、gate-stood-down),已武装的发现会作为标签出现在侧边栏中(tool gate: (n/max)),并带有一个 Clear gate 按钮——clearToolGate RPC 会立即释放受门控的调用。同样的数据会作为 toolGate 字段随会话快照传递。
- 可移植性。 决策契约在两条线上都存在——PreToolDecision 在 alpha 线中已经带有 allow / deny / ask(已在 dsh-tools@0.1.0-rc.6 中验证),而 0.2 中也有相同的联合类型。Ward Council 发送的 info 错误标识和本地化 displayReason 是附加字段,旧版宿主会直接忽略。
- 默认关闭,关闭时无作用。 当 Tool gate 被禁用时,监听器是纯直通(next()),与早期版本完全一致——启用门控是唯一会改变工具调用行为的事情。
干预
- 阻断器干预(可选,默认关闭)。 这以时间为基础的中断而非权限中断来补充门控:当顾问在主代理运行时提出 blocker,插件会对正在运行的步骤调用 agent.cancel——尚未派发的工具调用会中止,已在运行的调用会提交——然后以跟进消息的形式用该建议唤醒代理,使其看到原因并作出反应。当你希望放弃正在运行的步骤时,使用 Blocker intervention;当你希望在特定调用运行前将其拒绝时,使用 Tool gate。已在执行中的调用永远不会被终止。若两者都未启用,建议仍只是建议。
Git 还原点
- Git 还原点(可选,默认关闭)。 该插件将工作区快照保存为无副作用的 git 对象——一个一次性索引会捕获已跟踪的更改以及未跟踪的文件(遵循 .gitignore),并以提交对象的形式存储在隐藏命名空间 refs/dsh-omp-advisor/ 下。你的索引、HEAD、分支和工作树永远不会被触碰,也绝不会运行任何 reset/clean/stash 命令。快照在轮次边界发生,并且(可选地)在变更工具之前通过直通的 fs/write-intent / fs/edit-intent / tools/pre-execute 监听器发生,带有有界等待,绝不会阻塞你的工具。顾问获得只读的 list_restore_points / diff_restore_points 工具;在破坏性或错误的步骤之后,顾问可以调用 advise 并带上 rewindTo —— 该建议随后会携带精确的仅工作树还原配方(git restore --source= --worktree --staged .),以及顾问对哪些步骤绝不能再次发生、哪些是进展的分类。主模型自行执行还原;该插件从不回退任何内容。在某个还原点之后创建的文件会被保留,绝不会被删除。非 git 工作区会被跳过。
完成门禁
- 完成门禁(默认开启,仅提示)。 当被监视的 agent 准备收尾(“完成”、“所有测试通过”、目标达成)时,顾问会验证原始请求是否确实已实现——对照工作区,以及当存在还原点时,对照会话的基线→当前差异。如果没有实现,它会指示 agent 如实报告已完成和未完成的内容,并询问你部分完成的状态是否可以接受。一旦工作被验证为完成——或者你明确接受这一妥协——顾问的 acceptance 建议会提醒 agent 将已接受的状态提交到它正在处理的分支(该插件将最新的还原点标记为已接受;agent 执行提交)。
顾问记忆
- 顾问记忆(v0.7.0)。 顾问在每次审查中回忆相关的长期经验,并将持久的经验写回,通过可插拔的引擎名册:内置的按工作区纯文本存储(默认)、OpenViking、Hindsight、MisakaNet、mem0,以及任何自定义 MCP 记忆服务器。多个引擎可同时运行,每个顾问选择自己的引擎,不可用的引擎会变灰,绝不会阻塞审查,写入门禁(批准 / 自动 / 只读)控制哪些内容会被存储。完整控制项位于记忆选项卡。
Composer 模型选择器
- 输入以筛选,而非逐项扫描。 Composer 的模型席位是一个单一获胜者槽位(conversation.input.model)。该插件为它注册了一个可搜索的变体,因此该席位变成了一个搜索框,覆盖与原生选择器和 /model 弹窗读取的相同的按会话模型目录——在任一位置做出的选择都会保持同步,模型选择的其他方面没有任何改变。
- 搜索与按键。 对名称、id、提供方或描述,并在结果中保留提供商标头。↑/↓ 移动,Enter 选择,Esc 关闭,活动行会保持滚动到可见范围内。
- 保留 effort 芯片。 打开面板的页脚带有当前模型的推理 effort 芯片(包括 Provider default),因此遮蔽原装席位不会让你失去 effort 控制。
- 失败保持可见。 目录加载失败时会显示该目录自身的错误文本并提供重试;部分失败时会报告提供商数量。
- 子代理会话保持惰性。 在会话可能无法使用 Agent 绑定的模型 RPC 的地方,该席位会渲染为禁用状态,与原生席位完全一致。
- 按构造即为可选。 这是客户端入口内一个由 try/catch 保护的贡献,它只需要宿主页面的 react/react-dom,并且不声明任何额外的 dsh.client.inject 包——因此,如果其中任何内容不可用,设置部分仍会加载,原生席位会直接渲染。它位于 src/client/model-select.ts,从 dsh-model-search v0.1.0 引入。
设置 UI 与监控
- 多标签设置 UI。 设置部分像插件市场的内部标签栏一样组织:General(策略开关——包括 v0.9.0 中添加的 Tool gate 控件)、Advisors(名册——卡片默认折叠,点击标题展开)、Workspaces(一个工作区 × 顾问激活矩阵,基于同一个 workspaces 字段)、Memory(持久化顾问记忆——可插拔引擎、写入门控、按顾问的引擎开关)以及 Monitor(实时状态 + 活动流)。
- 可选的侧边栏监视器 + 工作区管理器标签页。 当安装了 dsh-better-sidebar 时,该插件会在侧边栏工作台中注册一个 Advisors 标签页。该标签页遵循侧边栏的会话作用域,因此它会显示此会话的名称和工作区、其附加的顾问(状态点、审查/建议计数器、最后错误)及其活动流——其他会话则折叠在“其他会话”下,而标签条徽章仅统计此会话的顾问(当某个顾问已停止/出错时显示 !,当此处未附加任何顾问时隐藏)。自 v0.7.5 起,它还是一个工作区顾问管理器:它列出所有已配置的顾问,分为在此工作区中活跃和在此处不活跃(原因:off、disabled here 或 not in this workspace),并带有内联的 Enable here / Disable here 按钮,以及一个与主题自适应的 Add advisor ▾ 下拉菜单,其中列出内置预设(一个自行渲染的菜单,而非原生 ,因此会跟随浅色/深色方案;新顾问的作用域限定为此工作区,并使用第一个可用的模型)。自 v0.7.6 起,该开关是真正工作区作用域的:“Disable here”会向一个新的正交 disabledWorkspaces 排除列表追加一个精确的 = 条目——它绝不会翻转顾问的全局 enabled 开关,也绝不会删除已编写的 workspaces 包含模式,因此一个始终开启的顾问可以仅在此工作区中被关闭,并在其他所有地方继续运行;“Enable here”会清除该排除项(并在需要时开启该顾问/添加包含模式)。写入操作通过窄范围的主机端 RPC(setAdvisorWorkspace、addWorkspaceAdvisor)进行,这些 RPC 会以原子方式加载-修改-保存当前设置——侧边栏绝不会对其(最多 2 秒过期的)缓存进行读取-修改-写入,因此在设置对话框中的并发编辑不会被覆盖。主机的工作区匹配器会遵循 disabledWorkspaces,因此一个在此处被禁用的顾问实际上会在该工作区中停止附加/审查(而不仅仅是在标签页的渲染中)。自 v0.9.0 起,一个工具门已武装的会话会显示一个 tool gate: (n/max) 芯片,悬停时显示该发现的备注,并带有一个 Clear gate 按钮,该按钮通过 clearToolGate RPC 释放被门控的调用。检测是一个有界的运行时探测——绝不是硬依赖:没有侧边栏时,插件会完全像以前一样加载和运行。
安装
先决条件
- 带有 web profile(dsh web)的 DeepSeek Harness——已在 0.2.0-rc.2 以及 0.1.2-alpha.4 系列上验证。v0.9.0 增加了对 0.2 的支持,这改变了插件必须遵循的两件事:
- 设置已移入 Loader 条目。 0.2 移除了面向插件的 settings.register / settingsScope API;插件的设置就是其 Loader 条目 Config,通过宿主的设置服务(update/replace)进行编辑,并由该条目的 schema 描述。Ward Council 自适应地绑定设置:当宿主提供 settings.register 时(alpha 线)使用它,当不提供时(0.2)使用 config + 设置服务路径。无论哪种方式,设置文档和 UI 都是相同的。
- 设置写入会重启插件。 在 0.2 上,更改 config 会触发 cordis 的 internal/update,从而销毁并重新应用插件。Ward Council 将其视为正常情况:会话运行时在写入路径上就地重建,任何会话都会在其下一个事件上被惰性重新附加,因此顾问无需重启即可恢复。
其余被消费的接口保持不变,并已在 0.2.0-rc.2 上重新验证:Service(ctx, name)、createUserMessage + plugin 源类型、llm.stream、agents.get、session/turn/fs 事件名称、双参数 connection.rpc.handle、tools/pre-execute / fs/write-intent / fs/edit-intent 瀑布流、settings.section 插槽、__ModuleLoader__ 客户端包装器,以及 dsh.bundle.patch / dsh.client 的 package.json manifest 结构。
- 在 DSH 的模型列表中至少配置一个模型——每个顾问都需要一个 provider 路由 + 从该列表中选择的模型。
- 插件在启用前处于惰性状态:主开关(Attach advisors to sessions)默认关闭。
- 可选:对于侧边栏 Advisors 标签页,需要 dsh-better-sidebar 0.18.0-alpha.0(alpha 线版本;0.17.x 面向旧的 rc 线)。
安装
from GitHub
dsh plugin --profile web add github:AndrasSama/dsh-omp-advisor
or from a local checkout
dsh plugin --profile web add "file:/path/to/dsh-omp-advisor"
然后重启 DSH Web并强制刷新浏览器(Ctrl+Shift+R)。重启是强制性的:运行中的服务器在启动时计算插件 bundle 修订版本,因此新安装或更新的插件在服务器进程重启之前永远不会出现。
验证
1. 在 DSH Web GUI 中打开 Settings——必须存在一个 Ward Council 部分。
2. 一旦主开关打开,其 Live status 面板会列出已附加顾问的会话。
3. 首次运行:启用主开关,点击 Add advisor ▾ 并选择一个预设,从下拉菜单中选择一个模型,然后启动任意会话——顾问 chip 会在一个回合内出现在 Live status 中。
升级 / 卸载
upgrade: re-run add with the same spec, then restart DSH Web
dsh plugin --profile web add github:AndrasSama/dsh-omp-advisor
uninstall (settings in the dsh-omp-advisor namespace stay on disk)
dsh plugin --profile web remove dsh-omp-advisor
速率限制指南。 每个顾问在每次被审查的转录更新时发起一次模型调用。在严格的免费额度下(例如 5 次请求/分钟),将 Review trigger 保持为 turn,保持顾问名单精简,并让 Auto-retry 保持开启,其延迟至少与提供商的速率窗口一样长。
代理安装提示
将以下内容交给具有 DSH 主机 shell 访问权限的 AI 代理——它是自包含的:
Install the dsh-omp-advisor plugin into the DSH web profile.
Context:
- DSH CLI: dsh (must be on PATH; often ~/.npm-global/bin/dsh). Version must be
0.1.2-alpha.4+ (the alpha line). The web profile directory is ~/.dsh/profiles/web (pnpm-managed).
- dsh plugin --profile web delegates to pnpm inside that profile dir.
- A dsh web server may currently be RUNNING and hosting live user sessions.
NEVER kill it yourself unless the user explicitly says they will restart it;
the plugin only activates after a server restart, so finish the install and
then ask the user to restart dsh web and hard-refresh the browser.
Steps:
1. Install from GitHub:
dsh plugin --profile web add github:AndrasSama/dsh-omp-advisor
(or from a local checkout: dsh plugin --profile web add "file:/abs/path/to/dsh-omp-advisor")
2. Verify it registered:
dsh plugin --profile web list | grep dsh-omp-advisor
Expect one line showing dsh-omp-advisor.
3. Sanity-check the installed copy at ~/.dsh/profiles/web/node_modules/dsh-omp-advisor:
package.json version matches the release, and lib/index.js + lib/client.js +
skills/ exist. KNOWN PITFALL with file: installs: pnpm hardlinks files at
first install, so later edits to the source checkout can leave the installed
copy partially stale. If anything looks stale, mirror the checkout over it:
rsync -a --delete --exclude node_modules --exclude .git \
/abs/path/to/dsh-omp-advisor/ ~/.dsh/profiles/web/node_modules/dsh-omp-advisor/
4. Ask the user to restart dsh web and hard-refresh the browser (Ctrl+Shift+R).
5. Post-restart verification in the GUI: Settings shows a "Ward Council"
section. The plugin is INERT until the user enables "Attach advisors to
sessions" (off by default) and adds at least one advisor with a model picked
from the DSH model list — tell them this.
6. If the section is missing after restart: check the server log for plugin
load errors, confirm step 2/3, and confirm the browser was hard-refreshed.
Do not edit ~/.dsh/settings.yaml by hand for this plugin; configuration lives
in the dsh-omp-advisor settings namespace and is edited through the GUI section.
配置打开 Settings → Ward Council。该部分有五个内部标签页——General、Advisors、Workspaces、Memory、Monitor——仿照 Plugin Market 的子标签栏设计。设置位于 dsh-omp-advisor 命名空间中,并且实时生效——编辑名单时无需重启。Advisor 模型调用通过 ctx.llm.stream 使用你选择的提供商路由 + 模型 id,因此计费、路由和故障转移的行为与你的其他 DSH 模型流量完全一致。
General 标签页
- Attach advisors to sessions——主开关(默认关闭)。
- Review trigger——turn(审查已完成的轮次)或 step(在轮次运行期间审查)。Step 模式会在每个工具步骤触发——UI 警告称,这对有速率限制或按量计费的提供商来说负担很重。
- Interrupting severities——哪些严重级别会进行引导;其余级别作为非中断上下文随行。
- Coalesce advice (ms)——0 = 立即发送每条备注;>0 = 将窗口内所有 advisor 的备注按通道批量合并为一条消息(参见 How it works)。限制在 0–10000 范围内。
- Auto-retry failures——开关 + 延迟(ms,1000–300000,默认 5000)+ 尝试次数上限(0–999,默认 3,0 = 无限制)。重试失败的 advisor 审查,并向失败的主轮次自动发送“continue”(参见 How it works)。
- Blocker intervention——默认关闭。开启后,当主流程运行期间出现 blocker 时,会取消正在运行的步骤,并用该建议唤醒 agent(参见 How it works)。
- Tool gate——默认关闭。将发现结果转化为真正的调用前决策(参见 How it works):enabled、mode(deny 拒绝调用并告知模型原因 / ask 暂缓调用以等待你的决定)、触发该机制的 severities(默认 blocker)、在 gate 停止前针对每个发现结果允许的 max denials(默认 2,0 = 永不停止)、gated tools(逗号分隔;留空 = bash、write、edit),以及附加到模型看到的拒绝消息中的可选 note。
- Restore points——默认关闭。开启后,会在轮次边界将工作区快照到隐藏的 git refs 中;keep 设置每个会话保留多少个(1–100,默认 20),并且 also snapshot before mutating tools(默认开启)会在写入/编辑/bash 之前进行捕获。随后,Advisors 可以建议回退,并对照会话基线验证完成情况(参见 How it works)。
- Completion gate——默认开启(仅提示词,零额外调用)。Advisor 会在 agent 声称完成之前验证工作是否确实完成,否则要求提供诚实的已完成/未完成报告,并提醒 agent 提交已接受的状态(参见 How it works)。
- Skip tiny deltas (chars)——0 = 审查所有内容;>0 = 跳过小于此值的转录更新。
Advisors 标签页
- Add from preset——一键从 25 个内置角色之一创建现成的 advisor(参见 Presets)。
- 顾问 — 顾问名册,以可折叠卡片形式呈现(默认折叠 — 点击卡片标题展开;新添加的顾问会自动展开)。每个顾问包含:
- 名称,
- 从 DSH 模型列表中选择的模型(提供商路由 → 模型 → 可选推理强度),
- 最大轮数 — 顾问每次审查的工具循环预算(1–10,默认 4),
- 可选的专长指令(例如 “专注于安全:注入、密钥、不安全反序列化。”),
- 工作区 — 以逗号分隔的模式,与会话的工作区路径进行匹配;顾问仅在匹配的会话中运行(留空 = 所有会话)。普通模式为子字符串匹配 — /home/sama 也会匹配 /home/sama/anything — 因此对于宽泛路径,请以 = 为前缀进行精确 cwd 匹配(=/home/sama)。这就是你如何将写作工作台分配给小说工作区、将工程工作台分配给代码工作区的方式。
- 技能 — 顾问精选的技能标签:移除一个(×),从目录下拉菜单中添加任何打包技能,或者如果顾问是从预设创建的,则重置为预设默认值(参见 技能),
- 技能交付 — inject(默认:在系统提示中注入完整技能正文)或 lazy(id+描述索引加上一个 load_skill 工具 — 节省 token,每个加载的技能多一次调用开销),
- 记忆引擎 — 该顾问从哪些长期记忆引擎中回忆并写入(参见 记忆 标签页)。未勾选任何项 = 仅使用内置纯文本存储;不可用的引擎在此处也会置灰,
- 每个顾问的启用开关。
工作区标签页
- 一个工作区 × 顾问矩阵:行是已知工作区(会话中打开的每个工作区加上已配置的每个模式),列是顾问。勾选的单元格表示该工作区模式在顾问的列表中;切换会重写卡片编辑器使用的同一个 workspaces 字段。没有模式的顾问会在所有地方运行 — 其单元格呈现为不确定状态,勾选其中一个会将其范围限定到该单个工作区。一个自由文本行让你添加一个尚无会话打开过的工作区模式。
记忆标签页
顾问获得持久的、工作区范围的记忆:每次审查前,它们会回忆相关经验教训到上下文中,审查后,它们可能会写回一条持久经验教训。多个引擎可以同时运行,每个顾问在其卡片上选择自己的引擎。
- 启用顾问记忆 — 总开关(默认开启)。关闭时,不会运行回忆,也不会存储任何内容。
- 写入门控 — 谁可以存储经验教训:
- 审批(默认)— 顾问提议的经验教训会排队为待处理,只有你在待处理经验教训列表(或监控标签页)中批准后才会存储。
- 自动 — 经验教训立即存储。
- 只读 — 仅回忆,从不写入。
- 召回预算 — 每个引擎的最大条目数(1–10,默认 3)以及每次审查的总字符数(500–40000,默认 6000)。召回的条目通过单一打包层进行合并:按引擎上限、跨引擎去重、按分数排序、按预算截断——并作为最后一个提示块注入,以保持提示前缀缓存稳定。
- Memory engines — the engine roster with live probe status (green = available, yellow = needs setup, gray = unavailable). Unavailable engines are grayed out and skipped at runtime; they never block a review. Rescan re-probes on demand. Engines:
- Plaintext MD (built-in) — the default. One append-only markdown lesson file per workspace at /.dsh-omp-advisor/lessons.md, recalled with a deterministic BM25-lite keyword search. Zero LLM calls, zero dependencies, human-editable.
- OpenViking — drives the same stdio MCP proxy the OpenViking memory plugin starts (servers/mcp-proxy.mjs, auto-resolved from the profile's node_modules). Recall via find, store via remember — so OpenViking lessons can be written too. (The plugin's openvikingMemory host service is isolate-scoped and not reachable across plugins, hence the proxy.)
- Hindsight — spawns Hindsight's bundled stdio MCP server (dist/mcp-server.js, auto-resolved) with HINDSIGHT_MCP_HARNESS=dsh; recall/search knowledge pages and ingest lessons.
- MisakaNet — read-only failure-lesson network (verified debugging lessons), probed via its local MCP adapter when present. Its raw MCP tools use dotted names (deepseek.recovery.search); DSH only rewrites dots→underscores when surfacing tools to agents, so the preset matches the dots.
- mem0 — self-hosted mem0 MCP server (ships disabled; fill the endpoint and enable).
- Add custom MCP engine — point the advisor at any MCP memory server (mem0, Graphiti, Cognee, a private store…). Provide an id, transport (stdio command/args/cwd or HTTP url), the recall/store tool names, and a read-only flag. This is the catch-all for frameworks without a dedicated preset.
- Engine script auto-resolution — builtin stdio presets that live in another package (OpenViking, Hindsight) use a resolveScript specifier resolved across the enclosing and profile node_modules at spawn time, so no profile-specific absolute path is hardcoded. If the package isn't installed the engine shows "not installed" and stays gray.
- Preset migration — builtin engine definitions are versioned. When a release changes a preset (tool names, transport, spawn command), your persisted copy of the old preset is re-derived from the new one automatically (your enable/disable toggles carry over; custom engines are never touched).
- Pending lessons — when the write gate is Approval, advisor-proposed lessons wait here with their tags and target engines; Approve stores them, Discard drops them. Pending writes persist per workspace and survive restarts.
Monitor tab
- Live status — per-session advisor status dots, backlog, review/advice counters, last errors, restore-point counts, and an armed tool gate finding (advisor, severity, refusals used). A halted / errored / quota-exhausted advisor gets a Resume button that resets its conversation and re-arms it; a context-overflow halt also shows a hint to assign that advisor a larger-context model in the Advisors tab first.
- Activity feed — the service-wide event ring (≤100, newest first): reviews with duration, advice deliveries with severity+channel, retries, quota cooldowns, halts, blocker interventions, tool-gate refusals / holds / stand-downs (gate-denied, gate-ask, gate-stood-down), restore-point snapshots, session attach/detach. The same feed powers the optional sidebar tab.
Presets
The Add from preset dropdown ships 25 ready-made advisor personas. Applying a preset creates a new advisor (name collisions get a numeric suffix) whose specialization instructions are the persona's expanded soul description and whose skill list is the persona's 10 curated skills. You can then edit everything — model, instructions, skills — like any advisor.
| # | Role | Preset |
| 1 | High-Concurrency Backend | The Rustacean Weaver |
| 2 | AI Inference Integrator | The Weights Whisperer |
| 3 | Appchain Developer | The Genesis Architect |
| 4 | Infrastructure Admin | The Edge Guardian |
| 5 | Python Service Architect | The Django Synthesizer |
| 6 | Node.js Systems Dev | The Event Loop Maestro |
| 7 | Harness Plugin Creator | The Meta Coder |
| 8 | Code Review Gatekeeper | The Linting Oracle |
| 9 | Technical Writer | The Clarifier |
| 10 | Security Auditor | The Red Teamer |
| 11 | Digital Marketing Strategist | The Conversion Alchemist |
| 12 | Direct Response Copywriter | The Hook Master |
| 13 | Web Novel Architect | The Worldbuilder |
| 14 | Author Community Manager | The Patron Whisperer |
| 15 | Investigative Journalist | The Fact Finder |
| 16 | Editorial Desk Editor | The Style Enforcer |
| 17 | Financial Analyst | The Ledger Reader |
| 18 | Legal Contract Reviewer | The Clause Hunter |
| 19 | GDPR & Privacy Officer | The Data Steward |
| 20 | EU AI Act & Governance | The Model Auditor |
| 21 | IP & Copyright Sentinel | The License Guardian |
| 22 | Cybersecurity & NIS2 Readiness | The Resiliency Engineer |
| 23 | E-Commerce & Consumer Protection | The Consumer Shield |
| 24 | Privacy-by-Design Engineer | The Minimizer |
| 25 | Agent Tool-Safety Guardian | The Tool Warden |
Domain presets (finance, legal, privacy, marketing…) frame their advice as review flags and analysis, not professional counsel — the soul descriptions tell them to surface risks and defer final judgment to qualified humans.
Skills
The plugin packages 250 advisor skills under skills//SKILL.md — 10 curated per preset. Each skill is a compact briefing (what to watch for, best practices, a quick checklist) that sharpens the advisor in a specific domain, e.g. n-plus-one-query-audit, prompt-injection-via-tool-results, gdpr-data-mapping, cliffhanger-mechanics.
- Injection (default). An advisor's configured skill bodies are embedded into its system prompt as … on every review call. Unknown ids are skipped, never fatal. One model call covers everything — best on rate-limited providers.
- Lazy loading (opt-in per advisor). With skill delivery set to lazy, the system prompt carries only an id+description index and the advisor gets a load_skill tool to fetch a body on demand. Saves ~15KB of prompt per advisor; each loaded skill costs one extra tool-loop call, so prefer it on token-metered providers with headroom.
- Per-advisor editor. Every advisor card lists its skills as chips: × removes one, the + add packaged skill… dropdown adds any of the 250 (with its description as tooltip), and advisors created from a preset get a reset to preset defaults button restoring the curated list.
- Build-time embedding. scripts/gen-skills.mjs scans skills/ and generates the host embed (full bodies) and the client catalog (ids + descriptions) before every build and test run; the skills/ tree is the source of truth and ships in the package.
Safety model
- Advisors get read-only tools confined to the watched session's workspace (read, grep, glob, plus load_skill in lazy mode). No mutating tools yet — oh-my-pi's WATCHDOG.yml grant system is planned for a later release behind DSH's approval flow (see Blocker intervention for what exists today).
- Advisor output passes a quarantine before it can become context: requests for unavailable tools and output-only destructive directives (ported hazard patterns) are replaced with a sanitized error.
- Advisories injected into the session are excluded from future advisor deltas (no feedback loops).
- The plugin never blocks or gates the primary agent on its own initiative. Auto-retry only ever adds a followup message after a failed turn, and stops after the configured attempt cap (permanent errors never retry). There are exactly two opt-in exceptions, both off by default: Blocker intervention, which cancels the running step when a blocker fires (already-running tool calls are never killed), and the Tool gate, which refuses a specific tool call before it runs — bounded to maxDenials refusals per finding precisely so an advisor cannot hold your agent hostage.
- Restore points are additive only. Snapshots write commit objects under refs/dsh-omp-advisor/* via a throwaway index — the user's index, HEAD, branch, and worktree are never touched; only an allowlist of git verbs runs, object ids spliced into arguments are SHA-format validated, prompts are disabled, and every spawn has a hard timeout. Restores and commits are always executed by the primary model (under your normal tool authority/approvals), never by the plugin; a restore keeps files created after the point instead of deleting anything. Pre-mutation snapshot waits are bounded so a tool call is never blocked on git.
- The /dsh-omp-advisor RPC channel is reached through the same Host/Origin trust fence as /api (loopback, or a deployment's --trusted-host authorities), so the settings section and live status panel also work from remote GUIs. On the alpha line and 0.2 alike, rpc.handle(channel, handler) takes two arguments — trust and authentication are applied by the physical carrier before* dispatch, so the channel needs no authority option of its own. Handlers return RpcResult values and never throw.
- Settings reads and writes ride that same channel (snapshot / update endpoints) instead of ctx.settingsScope: DSH keeps settingsScope persistence loopback-only, so a scope-bound section would render "unavailable" in every remote browser. Host-side, update still goes through the settings domain's schema + validation + live watch.
Development
npm install # dev deps only; DSH packages are runtime-provided
npm run build # gen-skills + host ESM (lib/index.js) + client CJS ModuleLoader bundle (lib/client.js)
npm test # 180 unit tests over the ported semantics + memory
npm run typecheck # tsc --noEmit (DSH packages shimmed)
Syncing a local install (read this before testing your change). Installing this plugin from a checkout with a file: spec makes the profile materialise it as a hard-link farm — every installed file shares an inode with the file in your checkout. That looks like it stays in sync, and for most files it genuinely does: lib/index.js, package.json and cordis.patch.yml come out with nlink 2 and a write to either side is visible from the other immediately.
lib/client.js is the exception, and it is the one that matters. Check the link state and you will see it sitting at nlink 1 with a different inode from your checkout — the build does not edit it in place, it renames a new file over the old one, which allocates a new inode and breaks the link permanently. From that moment the installed copy keeps serving the previous client bundle, with no error and no version mismatch; the only symptom is that your change is simply not there — a merged feature that never renders, while the tests that inspect the checkout pass. (This is not hypothetical: it is how the searchable composer seat shipped, passed every test, and was absent from the running profile.)
node -e "const f=require('fs');for(const p of ['lib/client.js','lib/index.js'])console.log(f.statSync(p).ino, p)" # local vs installed: same inode = still linked
So after every build, before restarting DSH:
node scripts/sync-installed.mjs # defaults to $DSH_HOME/profiles/web/node_modules/dsh-omp-advisor
It only rewrites files that are already installed, refuses a target that is not this plugin, and is a no-op when already in sync. Then restart DSH Web for the host half and reload the page for the client half.
Layout: src/ host plugin (settings, service, runtime, advisor loop, tools, delivery, quarantine, delta, restore-points, memory), src/client/ settings section (multi-tab) + presets + optional better-sidebar tab (sidebar.tsx), src/prompts/ ported advisor prompts (incl. the completion-gate protocol and the memory-recall protocol), skills/ the 250 packaged advisor skills (source of truth for the build-time embeds), scripts/gen-skills.mjs the skill embed generator, test/ node:test suite (git-backed tests run against real temporary repositories and skip cleanly when git is absent; client modules are tested through a minimal React stub).
Attribution & license
Advisor semantics and prompt texts ported from can1357/oh-my-pi (packages/coding-agent/src/advisor/), © Mario Zechner / Can Bölük / Stencil Labs, under the MIT license reproduced in NOTICE-oh-my-pi-LICENSE. This plugin is an independent port for DeepSeek Harness and is not affiliated with the oh-my-pi project.
The restore-point design borrows patterns (no code) from two community plugins: PerryLink/dsh-checkpoint-rewind (Apache-2.0) — side-effect-free git-object snapshots, pre-mutation capture listeners, worktree-only restore that keeps post-snapshot files — and Anionex/dsh-turn-rewind (BSD-3-Clause) — the explicit-only / no-Git-control-plane-mutation safety contract. Thanks to both projects for publishing their designs.
The optional sidebar monitor tab integrates with omdsh-dev/DSH-better-sidebar (MIT) through its public ctx.betterSidebar.registerTab service API, following its external-plugin guide (optional peer dependency, effect-wrapped registration, runtime probe instead of a hard inject).
License. Ward Council is distributed under the SamaCorp Inc. Personal Use License — see LICENSE: full license for personal use and modification; no sale of the software or modified derivatives; unauthorized sales trigger full buyer refunds plus legal fees and $50 per copy sold owed to SamaCorp Inc. One carve-out: the advisor semantics and prompts ported from oh-my-pi remain under MIT (see NOTICE-oh-my-pi-LICENSE), as MIT requires — those portions keep their MIT terms in every copy. Versions up to and including v0.6.0 were released under MIT; copies already distributed under MIT keep those terms (the relicense is forward-only, from v0.6.1).
Known limitations
- Advisories render as ordinary plugin messages in the conversation (a dedicated advisory card is future work).
- Restore points need a git worktree: non-git (and unborn-HEAD) workspaces are skipped, and sparse checkouts/submodules are out of scope for snapshots. A restore keeps files created after the point — deleting them is the model's deliberate judgment call, guided by the advisory.
- Consuming ctx.changeLedger when dsh-turn-rewind is installed and session-state (seed-replay) rewind are future work. The gate's ask mode covers human-approval routing for finding-armed calls; general pattern-based risk approval (e.g. "ask before any rm -rf") is still future work.
- No mutating-tool grants for advisors yet (oh-my-pi's WATCHDOG.yml roster). The two intervention layers — the pre-call Tool gate (refuse/hold a call) and opt-in Blocker intervention (cancel the running step) — are what exists today; full WATCHDOG grants remain targeted for a later release behind the DSH approval flow.
- The gate is a policy gate, not a sandbox: it stops a call an advisor objected to, but an advisor is a model and can be wrong in both directions — it may fail to object, and enabling nit or concern as a gating severity will hold up ordinary work. maxDenials bounds the cost of a disagreement, not the quality of the judgment.
- No in-session "advisors watching" badge yet; health is visible in the settings Monitor tab and — with dsh-better-sidebar installed — in the sidebar Advisors tab (status badge included).
- Status panel polls every 5 s while the settings section is open (sidebar tab: 2 s while registered); no push yet. The activity ring is in-memory only (≤100 events, lost on restart) — monitoring, not audit.
- Advisor memory (v0.7.0) still ahead: composing memory with restore points (rewind lessons) and the completion gate (compromise records), MCP connection pooling, a dedicated memory browser, and per-engine write confirmations.
- Web profile UI; other profiles can still configure the namespace by hand.预览分享卡片长什么样 ↓
分享 · DeepSeek Harness Hub
AndrasSama/dsh-omp-advisor
顾问引导。守卫保护。模型执行。
相关插件 · 浏览器
智能体插件框架deepseek-ai/deepseek-harness
DeepSeek Harnessdsh是由 DeepSeek AI 开发的开源 agent harness智能体框架。
★ 270,422已汉化DSH
71.9
多设备 Agent 看板YaoApp/yao
✨ 所有 Agent 和工作区集中管理,覆盖你的每一台设备。任务看板追踪进度,桌面端、移动端、浏览器、API…
★ 8,147已汉化DSH
71.2
可扩展侧边栏工作台omdsh-dev/DSH-better-sidebar
DSH 的双工作台:原生右侧栏 + 自绘底部面板,并把 ctx.betterSidebar 服务开放给所有插件
★ 4,761已汉化DSH
71.1
浏览器自动化桥Tencent/BrowserSkill
你的 Agent。你的浏览器。连接,就能协作。
★ 9,967已汉化DSH
71
AI 小说创作工作台EthanYoQ/AI-Novel-Writer
AI 小说作家 / AI Novel Writer
★ 1,591已汉化DSH
70.7
智能体浏览器引擎platonai/Browser4
DeepSeek Harness 集成
★ 1,175已汉化DSH
70.4
这是你的仓库?认领条目