dsh-rule-engine
Rules execution engine for dsh: parses AGENTS.md, hard-blocks rule-violating tool calls, text-based B/D rule auditing, /guard command, version-guard for versioned files, and free-zone support (engine skips free-zone sections).
dsh 规则执行引擎:解析 AGENTS.md、硬拦违反规则的工具调用、文本纠察与审计、/guard 命令、版本化文件守卫、自由区域支持(引擎跳过自由区内容)。
How to install
dsh plugin add dsh-rule-engine About
dsh-rule-engine DSH 规则执行引擎 v3 的插件实现。它把 ~/.dsh/AGENTS.md 当作唯一真相源,自动解析规则四要素与执行等级,再通过「工具守卫 + 文本检测 + 时序检查 + 审计台账」执行用户规则,而不是内置一套与用户无关的安全清单。 项目背景 这个项目来自一个非常具体的个人需求: 作者是**零编程基础**用户,但极其重视规则的制定、执行、遵守与复盘。 作者发现:规则如果只写在文本里、靠模型“自觉”执行,会反复失效(例如时间词写错、内联命令违规、交付前漏验证等)。 因此核心思路是:**规则的执行不能只靠自觉,要尽量靠插件在机制层强制**。 本插件所有规则均从 AGENTS.md 动态解析,规则增删改后无需重写插件。 当前实现基于已有的 AGENTS.md 规则体系拓展,社区暂无类似插件供参考(大概率为该等约束可能限制开发自由性,不适用于专业编程人员),**可能存在大量不完备、误判或边界问题**。欢迎任何使用者提出调整建议、提交 issue 或 PR。项目仍处于“可运行但需要持续打磨”的阶段。 功能分层 阶段 1 容器:解析 AGENTS.md 全部规则 → 理解产物(rule-understanding.json 可生成) 阶段 2 匹配机 + 工具守卫 + 文本检测 阶段 3 时序检查 + 授权询问集成 阶段 4 D 级自证调度 + /guard…
Recommendation signals
Meta
- License
- MIT
- Language
- JavaScript
- GitHub stars
- 3
- mo. downloads
- 3.9K
- Last push
- 2026-09-23
- Created
- 2026-08-15
Links
Basic safety check
- Findings
- None
- Sources
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
- Topics
- dsh-plugin
Related plugins
dsh-auto-mode
NanmiCoder/dsh-auto-mode
Adds an Auto permission preset between Workspace Write and Full access: routine work stays in the official workspace-write sandbox while the current session model reviews escalation and destructive calls, granting one exact wider access once, asking when the intent is ambiguous, and denying critical paths.
dsh-passwords
slywalker2006/dsh-passwords
Turns DeepSeek Harness into a server-grade multi-tenant platform: remote access + auto HTTPS, subuser permissions & token/daily quotas, sandbox enforcement, encrypted auth & audit log.
sofagent
KongFangXun/sofagent/tree/main/engine/dsh-plugins/cordis-plugin-sofagent-audit
Commit-time audit harness for AI coding agents: 24 git-diff rules (secrets, out-of-scope edits, prompt injection), HMAC-signed audit trail, snapshot rollback, and an MCP server with 84 tools. Installable via dsh plugin add.
dsh-vault
Ox0400/dsh-vault
Encrypted local credentials vault for the Harness: a web settings page and vault_* tools to store, search and copy passwords, API keys, TOTP secrets and card data, with health audits, expiry rotation, imports/exports and read-only/ask access modes.