Edit the global ~/.dsh/AGENTS.md rules from the web settings panel, live on save.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-global-rules
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:badai147/dsh-global-rules
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
在 DeepSeek Harness Web 的设置面板中编辑用户级全局规则文件 $DSH_HOME/AGENTS.md(默认 ~/.dsh/AGENTS.md)的插件。
Edit your user-global rules file $DSH_HOME/AGENTS.md (default ~/.dsh/AGENTS.md) from the DeepSeek Harness web settings panel.

功能 / Features
- 设置页新增「全局规则」标签:打开即加载全局规则文件的当前内容,并显示它解析到的位置
- 路径解析与 harness 一致:非空
$DSH_HOME优先,否则~/.dsh(与内置dsh-agent-instructions同规则,因此编辑的一定是真正生效的那个文件) - 编辑保存,实时生效:新会话立即生效;当前会话在下次文件操作后感知新规则(由 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):用ctx.connection.fetch.register注册精确 Fetch 路由GET/POST /api/global-rules(读文件 / 写文件,256 KiB 上限)。它挂在 Connection 的/api通道上,因此自动落在 Host/Origin 栅栏与浏览器鉴权之内,无需自建同源校验 - 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:/api 精确 Fetch 路由(Node ESM)
│ └── client.js # Client:设置页 UI(__ModuleLoader__ bundle)
└── package.json
License
Links
More in this category
yjh051108/dsh-routing-suite★ 7003
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3666
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
hust-open-atom-club/oh-dsh★ 325
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
weijiafu14/pi2dsh★ 206
Pi Host ABI compatibility engine: after one install, unmodified Pi extensions from npm mount as native DSH plugins with `dsh plugin add <pi-package>`. Verified end to end on stock DSH with pi-mcp-adapter (full MCP manager: OAuth, resources, prompts, MCP Apps, elicitation, sampling), @tintinweb/pi-subagents, pi-code, pi-hermes-memory and pi-background-tasks; `pi2dsh inspect` reports a package's compatibility before installing.
lire1131/dsh-undo-savepoint★ 166
Undo/redo & rollback system for DSH: every config change is auto-snapshotted; undo/redo/restore to any version from the WebUI or the offline CLI/GUI tools (works even when DSH fails to boot).
Fishquito7/dsh-skill-mcp-panel★ 155
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.