dsh-qrules
其他 活跃维护

dsh-qrules

2128627267/dsh-qrules

提供全局、工作区两级规则体系,规则自动注入系统提示词,模型可随时调用规则读取工具获取内容,存储路径支持自定义配置,不同范围规则优先级自动适配。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
JavaScript
主要语言
None
开源协议
28 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:2128627267/dsh-qrules
git clone https://github.com/2128627267/dsh-qrules.git
git clone git@github.com:2128627267/dsh-qrules.git
README.md main

dsh-qrules 规则(全局 + 工作区)

为 DeepSeek Harness 增加两级规则系统:

  • 全局规则:对所有会话生效
  • 工作区规则:仅对当前工作区生效
  • 规则自动注入 system prompt(模型每次读取并遵守);模型也可随时调用 rules_read 工具读取
  • 存放位置可配置:可指定统一目录(任意绝对/相对路径),或放到各工作区文件夹内的指定位置(默认 .dsh-features/global-rules.json 与 .dsh-features/rules.json)

Host RPC(HTTP JSON)

方法 入参 说明
GET /dsh-qrules/list — 返回 { global, workspace, config }
POST /dsh-qrules/save { scope, rule } 新增/更新规则
POST /dsh-qrules/delete { scope, id } 删除规则
POST /dsh-qrules/import { scope, items } 导入规则数组
POST /dsh-qrules/config { globalRulesPath, workspaceRulesPath } 修改存放路径(保存后从新路径重载)

模型工具

  • rules_read:读取当前生效的全部规则

安装(原生 bundle,与 dshmarket 同类)

本插件是标准 DSH bundle:安装后作为普通插件加载,不产生 Cordis 动态插件、无需批准、无需任何手动激活。

dsh plugin --profile web add dsh-qrules

然后重启 dsh web:

  • host 直接作为普通 Cordis 插件运行;
  • 设置页“规则”由标准 client bundle 直接挂载;
  • 不出现 qrule-*,也没有 run-* 消息。

仓库