DeepSeek Harness事件驱动任务守护者 - 断言规则、纠正检测、审核队列
Event-driven mission guardian for the DeepSeek Harness - assertion rules, correction detection, review queue
安装
dsh plugin --profile web add github:Max-Null/dsh-guardianGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
Guardian state engine for the DeepSeek Harness — three trigger-line monitors over session events, with live reminder injection and a UI snapshot service.
M2 of SSiD (思灵), ported from fractal's guardian: assertion counting, the edit review queue, and no-feedback-loop monitoring.
What it monitors
| Trigger line | Rule |
|---|---|
| Assertion count | Scans assistant messages for unverified claims (不支持/做不到/只有 N 种/不存在/无法 X/远低于/过于 X). Counts per session, decays by 1 every 3 clean turns, segments into levels [1,3]+. |
| Edit review queue | Successful write/edit tool calls enqueue {filePath, sessionId, turn}. FIFO cap 20, dedup per file+session. Reminder lists them at turn end. |
| No-feedback loop | Per turn: edits without bash/pwsh increment the counter; any exec resets it. 3 consecutive edit-only turns inject a "build a feedback loop first" warning. |
Compose
# cordis.yml (or via the bundle patch):
- id: guardian
name: '@max-null/dsh-guardian'
Requires storage, system-prompt in the host composition (dsh-base ships
both). Installs as a bundle: dsh plugin --profile <name> add @max-null/dsh-guardian.
Services
ctx.guardian— the engine:snapshot()→{ session, reviewQueue }for UI panelssessionState(sessionId)→ per-session state
- Three dynamic
systemPrompt.contextreminders (guardian:assertion,guardian:no-feedback,guardian:review), evaluated per assembly from the most recently active session.
Config
| Field | Default | Meaning |
|---|---|---|
decayTurns |
3 |
Clean turns before one assertion point decays |
assertionThresholds |
[1, 3] |
Ascending thresholds segmenting levels 1-3 |
noFeedbackThreshold |
3 |
Consecutive edit-only turns before the warning |
reviewQueueMax |
20 |
Review queue FIFO cap |
globalRoot |
$DSH_HOME/storages/guardian |
JSON storage root |
Storage
One JSON unit (guardian, version 1) under $DSH_HOME/storages/guardian:
sessions table (per-session state) + the global slot (review queue).
In-memory is authoritative during a run; state flushes at turn end.
Develop
npm install --legacy-peer-deps # DSH peer types resolve via tsconfig paths
npm test # vitest: 27 pure-function tests
npm run typecheck # tsc against adjacent deepseek-harness lib/types
npm run build # emit dist/
The npm registry carries unsynchronized DSH rc versions, so dev tooling resolves
@deepseek-ai/*types throughtsconfig.jsonpaths pointing at an adjacentdeepseek-harnesscheckout (../deepseek-harness). Runtime peer resolution is unaffected — the host composition supplies the real packages.
原始 README: https://github.com/Max-Null/dsh-guardian/blob/main/README.md ↗
同类插件
查看全部 →
deepseek-harness
从仓库或系统描述生成经过校验的自包含交互式架构图、流程图、时序图、数据流图和生命周期图。

dsh-plugin
通过 DSH MCP 客户端挂载 Ouroboros 的纯配置包,在 DSH 中提供 36 个涵盖需求访谈、Seed、执行、评估与演化流程的工具。

dsh-tongflow
基于 TongFlow 的“片场”插件,用于图片、配音、音乐与视频制作:agent 为每个资产生成 TongFlow 工作流文件(.tongflow.json)并通过 TongFlow 插件执行,内嵌工作流画布,按镜头/角色/take 组织项目,附漫剧模板;以 @tongflow 开头的会话进入 Studio 界面。

helloagents
AI 编码 CLI 的工作流层:技能、项目知识、交付检查、更安全的配置写入与可恢复执行

dsh-ai-novel-writer
安装专用 AI 小说创作预设与工作台:提供带修订号的本地项目资产、紧凑侧边工作台,以及需要原生审批的逐文件变更。

rea
用 agent 逆向任何东西:从应用行为到原生二进制