badai147/dsh-global-rules
在DeepSeek Harness Web设置面板中编辑~/.dsh/AGENTS.md全局规则的插件
Project Overview项目介绍
dsh-global-rules is a DSH plugin that lets users edit the ~/.dsh/AGENTS.md global rules file directly from the DeepSeek Harness web settings panel, eliminating manual terminal edits. Core capability: provides a Global Rules tab for reading, editing, and saving Markdown content, auto-creating the file if missing. Use it to centrally manage cross-project AI agent behavior constraints, prompt rules, or team collaboration standards. Caveat: in the current session, rule updates take effect only after the next filesystem tool call, when dsh-agent-instructions detects the change and injects the new content.
dsh-global-rules 是一款 DSH 插件,用于在 DeepSeek Harness Web 设置面板中直接编辑 ~/.dsh/AGENTS.md 全局规则文件,无需手动打开终端。核心能力:提供「全局规则」标签页,支持读取、编辑、保存 Markdown 内容,并在文件不存在时自动创建。适用于需要集中管理跨项目 AI Agent 行为约束、Prompt 规则或团队协作规范的用户。注意:当前会话的规则更新需等待下一次文件操作后由 dsh-agent-instructions 动态检测并注入,不会立即刷新所有上下文。
请帮我了解并安装插件:【dsh-global-rules】【https://github.com/badai147/dsh-global-rules】
Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-global-rules
把 badai147/dsh-global-rules 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-global-rules
在 DeepSeek Harness Web 的设置面板中编辑 ~/.dsh/AGENTS.md(全局规则)的插件。
Edit your ~/.dsh/AGENTS.md (global rules) from the DeepSeek Harness web settings panel.

功能 / Features
- 设置页新增「全局规则」标签:打开即加载
~/.dsh/AGENTS.md当前内容 - 编辑保存,实时生效:新会话立即生效;当前会话在下次文件操作后感知新规则(由 DSH 内置的
dsh-agent-instructions动态检测机制完成) - 文件不存在时保存会自动创建
- 零构建:Client 端为手写
__ModuleLoader__bundle,Host 端为纯 Node ESM
安装 / Install
dsh plugin --profile web add dsh-global-rules
从 GitHub 源安装(备选):
dsh plugin --profile web add github:badai147/dsh-global-rules
重启 dsh web,然后打开 设置 → 全局规则。
使用 / Usage
- 打开设置 → 全局规则
- 编辑规则内容(Markdown 格式,与
AGENTS.md语法一致) - 点击「保存」
保存后:
- 新会话:首次步骤直接读取新内容,立即生效
- 当前会话:下一次文件系统工具调用后,DSH 会检测到文件变化并注入 "Updated instructions from: ~/.dsh/AGENTS.md",模型按新规则执行
工作原理 / How it works
- Host(
lib/index.js):注册GET /global-rules(读文件)与POST /global-rules(写文件,同源校验 + 256 KiB 上限)两个 HTTP 路由 - Client(
lib/client.js):手写window.__ModuleLoader__.loadbundle,注册settings.section的「全局规则」页面 - 生效机制:DSH 内置
dsh-agent-instructions插件覆盖user-globalscope 的动态检测——无需插件做任何热重载
目录结构 / Structure
dsh-global-rules/
├── cordis.patch.yml # bundle patch:插入 global-rules 层
├── lib/
│ ├── index.js # Host:HTTP 路由(Node ESM)
│ └── client.js # Client:设置页 UI(__ModuleLoader__ bundle)
└── package.json
c3ll256/dsh-toy
FeatherHunter/dsh-mattpocock-skills-deck
yoli-mi/dsh-client-ui-custom
omdsh-dev/dsh-toolkit
XieZongChen/dsh-md-notes
Kaiji-Z/dsh-plugin-lookatstudy