dsh-guardian
Manifest valid★ 1Event-driven mission guardian for DeepSeek Harness: assertion rules, correction detection, review queue · Event-driven mission guardian: assertion rules, correction detection, review queue
@max-null/dsh-guardian
本插件属于 @max-null/* 插件系列——这一系列共同构成 SSID(思灵 · Seek Soul in Darkness) 桌面体验。SSID 是整合它们的盒:dsh-capture · dsh-chat-rail · dsh-chinese-thinking · dsh-draft-polish · dsh-guardian · dsh-habit · dsh-memory · dsh-node-appearance · dsh-plugin-center · dsh-quick-toolbar · dsh-skill-mcp-center · dsh-ssid-panels · dsh-ssid-zh-ui · dsh-achievements。
This plugin belongs to the @max-null/* family — a set of plugins that together form the SSID (思灵 · Seek Soul in Darkness) desktop experience.
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. |
截图
本插件是会话行为监控类:不新增任何按钮、面板或设置项。它在会话过程中维护断言计数、编辑审查队列与「无反馈环」监测,效果体现在模型行为的约束上。
按《SSiD 开发手册》§9 截图规范:截图须回答「装完会多出/变成什么」的入口与面板。 本插件无界面元素(no UI surface),故不适用该项要求,改以上述行为效果说明代替。
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.
A failed flush is logged to stderr and dropped: the serialized write chain stays usable, and neither the event entry point nor the chain lets a failure escape into the host process. The state is advisory and rebuildable, so losing one update is the intended blast radius — a rejected write must never take the kernel down.
Develop
npm install --legacy-peer-deps # DSH peer types resolve via tsconfig paths
npm test # vitest: 31 tests (incl. write-failure resilience)
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.
SSID 系列
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
| 0.2.0 | — | — |
| 0.2.1 | — | — |
| 0.2.2 | — | — |
Comments
Loading…
From the same category
by awesome-dsh-plugin
A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表
★ 24.1k
CC0-1.0
Python
Nov 10, 2026
by 0xsline
DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.
★ 1.3k
CC0-1.0
Python
Nov 6, 2026
by woniuniuniu
DeepSeek Harness 自媒体工作台插件:一句话记灵感,一键生成脚本、封面、配图和分镜
★ 771
↓ 3.7k/wk
MIT
JavaScript
Nov 8, 2026
dsh plugin --profile web add dsh-media-deskby uumit-ai
Open dsh web from your phone or another computer through a UUMit account, without running your own server or installing another program: a built-in tunnel client connects to UUMit's hosted tunnel, and
★ 521
↓ 268/wk
MIT
JavaScript
Oct 21, 2026
dsh plugin --profile web add @uumit-ai/dsh-uumit-remoteby Yuuyuko-uu
DSH 鱼的记忆:给会话一份会淡忘的长期记忆,每条都带时间
★ 508
MIT
JavaScript
Nov 9, 2026
dsh plugin --profile web add dsh-fish-memoryby SAOS-3624
Scene-aware storyboard for DeepSeek Harness: 9-16 numbered cells with timestamps + transcript + an audio envelope, packed into ONE image (384 tokens). Two tools: video_storyboard and video_zoom.
★ 499
↓ 17k/wk
MIT
JavaScript
Nov 10, 2026
dsh plugin --profile web add dsh-video-storyboard