badai147/dsh-global-rules 预览 preview

badai147/dsh-global-rules

在DeepSeek Harness Web设置面板中编辑~/.dsh/AGENTS.md全局规则的插件

Project Overview项目介绍

This is a native plugin built exclusively for the DeepSeek Harness (DSH) web profile. It adds a dedicated “Global Rules” section to DSH’s web settings panel, letting users edit the ~/.dsh/AGENTS.md global rule file directly within the DSH interface without switching to a separate terminal or text editor. To install the plugin, you can run the dsh plugin --profile web add dsh-global-rules command in your terminal, or install it directly from the GitHub repository with the command dsh plugin --profile web add github:badai147/dsh-global-rules. After installation completes, you will need to restart the dsh web process for the plugin to load.

The workflow for using the plugin is straightforward once it is installed and loaded into your DSH web instance. First, open the settings panel in the DSH web interface, then navigate to the new Global Rules tab that the plugin adds. Next, edit your global rules in standard Markdown format, matching the AGENTS.md syntax that DSH expects, then click the save button to apply your changes. New DSH sessions will pick up the updated rules immediately, and existing active sessions will automatically detect the change the next time a file system tool is called.

This plugin requires no extra build steps, as the host side is pure Node ESM and the client side is a manually written __ModuleLoader__ bundle. The plugin enforces a 256 KiB size limit on the global rules file to prevent unnecessary performance issues for your DSH instance. It is released under the permissive open source MIT license, so there is no cost to use, modify, or redistribute the code. It has no external dependencies beyond a fully working DSH web installation, so no additional packages need to be installed manually after adding the plugin.

dsh-global-rules 是专为 DeepSeek Harness (DSH) Web 开发的原生插件,用于在 DSH 的网页端设置面板中直接编辑全局规则文件 ~/.dsh/AGENTS.md。安装完成后,它会在设置页新增一个「全局规则」标签页,打开后自动加载 AGENTS.md 的当前内容,支持直接编辑保存,文件不存在时会自动创建。用户可通过 DSH 官方插件命令安装,也可选择直接从 GitHub 源码安装。

它的典型使用流程很简单,用户打开设置页的「全局规则」标签,编辑符合 Markdown 格式的规则内容后点击保存即可。新规则对新建会话立即生效,对于当前已有会话,DSH 内置的动态检测机制会在下一次文件操作后感知到规则变更,让模型按照新规则执行。这个插件面向所有需要自定义 DSH 全局行为的 DSH 用户,不管是调整开发流程还是统一写作规范都可以使用。

这个插件是零构建的,主机端是纯 Node ESM,客户端是手写的 __ModuleLoader__ 包,不需要额外构建步骤。它对写入的规则文件设置了 256 KiB 大小上限,使用 MIT 许可开源,没有任何使用成本。安装完成后只需要重启 dsh web 即可使用,没有额外的依赖需要用户手动安装。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 11 stars - an early-stage project星标 11,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

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

Awesome DSH Plugin

English | 中文

Edit your user-global rules file $DSH_HOME/AGENTS.md (default ~/.dsh/AGENTS.md) from the DeepSeek Harness web settings panel.

Global rules settings page

Features

  • A new Global rules settings tab (labelled 「全局规则」): opening it loads the current content of the global rules file and shows the path it resolved to
  • Path resolution matches the harness: a non-blank $DSH_HOME wins, otherwise ~/.dsh (the same rule the built-in dsh-agent-instructions follows, so you always edit the file that is actually in effect)
  • Edit and save with immediate effect: new sessions use the new rules on their first step; the current session picks them up after its next file operation (handled by DSH's built-in dsh-agent-instructions change detection)
  • Saving creates the file when it does not exist yet
  • Zero build: the client half is a hand-written __ModuleLoader__ bundle, the host half is plain Node ESM

Requirements

  • DeepSeek Harness (dsh) with the web profile
  • No extra runtime dependency: the plugin ships only lib/ and cordis.patch.yml

Install

dsh plugin --profile web add dsh-global-rules

Installing from the GitHub source (alternative):

dsh plugin --profile web add github:badai147/dsh-global-rules

Restart dsh web, then open Settings → Global rules.

Usage

  1. Open Settings → Global rules
  2. Edit the rules (Markdown, the same syntax as AGENTS.md)
  3. Click Save

After saving:

  • New sessions read the new content on their first step, so it applies immediately
  • The current session: after the next filesystem tool call, DSH detects the change and injects "Updated instructions from: ~/.dsh/AGENTS.md", and the model follows the new rules

How it works

  • Host (lib/index.js): registers the exact Fetch route GET/POST /api/global-rules through ctx.connection.fetch.register (read the file / write the file, 256 KiB limit). It rides Connection's /api channel, so it lands inside the Host/Origin fence and browser authentication with no hand-rolled same-origin check
  • Client (lib/client.js): a hand-written window.__ModuleLoader__.load bundle that registers the Global rules page under settings.section
  • Effect mechanism: DSH's built-in dsh-agent-instructions plugin covers dynamic detection for the user-global scope, so this plugin needs no hot-reload of its own

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-piggy 下一个 Next dsh-cline-free-provider →