DeepSeek Harness plugin for rulemux: asks the local rulemux CLI for the rules rendered for this workspace (rulemux inject --agent dsh) and injects the output into the session at the first user turn, once per session. Nothing is written into the workspace for rules; skills are the only part that lands on disk.
Install
# from npm (prebuilt)
dsh plugin --profile web add rulemux-dsh
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:cq-guojia/rulemux#path:/dsh-plugin
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
DeepSeek Harness (dsh) plugin for rulemux.
rulemux keeps your rule files in one place and delivers them to each agent. dsh is plugin-first and
does not scan a rules directory on its own, so this plugin is the delivery: it asks the rulemux
CLI for the rules rendered for the current workspace (rulemux inject --agent dsh) and injects that
text into the session once, at the first user turn — the same rules, the same token cost as a host
that reads a rules directory natively, because it is the same renderer.
For rules, nothing is written into your workspace — no .dsh/rules, no copies, no residue to
clean up: the rules travel from your source files straight into the session.
Skills are the one exception (since plugin 0.5.0 / CLI 0.5.0). dsh has a native skills
subsystem, and skills load progressively (name+description at session start, full text only when
called by name) — so, unlike rules, they cannot be injected: they must exist as real files. The
plugin therefore runs rulemux sync --hook --agent dsh when a session starts, and copies land as
__rulemux__<skill-name>/ in <git-root>/.dsh/skills (workspace scope) and/or ~/.dsh/skills
(user scope). Your own skills are never touched, and .agents/skills (a cross-framework convention
dir) is never written. A failed sync is logged and the session continues — rules are unaffected.
Install
dsh plugin --profile <name> add rulemux-dsh
That is the whole thing — the plugin is published on npm. Installing straight from git also works (no npm involved), which is handy for testing an unreleased change:
dsh plugin --profile <name> add "github:cq-guojia/rulemux#path:/dsh-plugin"
The host half needs no build: index.mjs is plain ESM. The details-page panel is bundled into
lib/client.js, and that artifact is committed — so a git install still needs no allowBuilds
approval (see “Build” below if you change src/client/).
Restart dsh after installing — the plugin mounts on the next start.
What you see in dsh
- Plugin list: an icon and a title, in the language of your UI (English / Chinese).
- Plugin detail page: an informational panel — the config file path
~/.rulemux/config.toml(with a copy button), what you need to edit by hand, a minimal example, and a button that opens the project on GitHub.
It does not save anything. ~/.rulemux/config.toml is the single source of truth and you edit
it in your own editor. dsh's own settings document is not a second home for it: the official config
form can only store values in dsh's document (the active profile's Cordis patch), and a plugin on
the detail page has no session context — it cannot read a file off your disk. So the panel tells you
where the file is and what it looks like, and the editing stays where it always was.
Build (only for the details-page panel)
npm install
npm run build # -> lib/client.js (re-run and commit the artifact after changing src/client/)
npm run typecheck
The flow you get
dsh plugin --profile <p> add "github:cq-guojia/rulemux#path:/dsh-plugin"
# restart dsh → ~/.rulemux/config.toml now exists (see below)
# edit it → add your [[source]] / [[skill_source]] entries
# open ONE session → the rules are injected, the skills synced
No throwaway "chat once so it can create the config" session: readiness starts at load, before any session exists.
At dsh startup: three steps, all or nothing
This package declares no dependencies on purpose: a hard rulemux dependency would make the
whole dsh plugin add fail whenever the registry mirror lags — an install-time failure you cannot
act on. dsh runs no install scripts either, so instead the plugin makes itself ready when it loads,
i.e. when dsh starts, and it does exactly three things. Every one of them must hold; otherwise the
session fails with an error.
- The CLI is there and can do the job.
rulemuxis resolved (a dependency copy if one exists, elsePATH) and its reported version must satisfy>=0.4.2— the first release whose config parser accepts the line-trailing#comments thatrulemux initwrites and the docs use. An older CLI (e.g. 0.3.1–0.4.1) knowsdshbut then fails to parse such a config, so it must not be trusted. Only when the version is entirely unreadable does the check fall back to whetherrulemux --helplists thedshagent (the guard for a binary whose--versionlies). A CLI that fails is upgraded withpnpm add -g, falling back tonpm install -gand finallynpm install -g --force(which overrides arulemuxbinary that was copied onto PATH by hand, the usual cause of anEEXIST), and re-checked afterwards. If it still fails, that is a failure, not a success. - This plugin is loaded. Nothing to check: the fact that this code runs at all is the proof.
- The config exists.
~/.rulemux/config.toml, created withrulemux init --agent dshwhen it is missing. An existing config counts as success and is never overwritten.
Because steps 1 and 3 need no workspace, they run at load; step 2 is the load itself.
Failures are loud and actionable: the error names the step that failed, carries the raw output, and says where to fix it (then restart the session to retry). There is deliberately no "succeeded halfway" notice — a half-ready plugin is useless, and it must not look healthy.
Asking for the rules is separate, and never fails the session
rulemux inject --agent dsh runs once per session — it needs the session's workspace, which does
not exist at load time. A non-zero exit is logged (console.error, which lands in dsh's log) and
the session carries on without an injected block.
A config with no [[source]] yet — or one whose sources do not cover this workspace — lands here
too: the CLI prints nothing and exits 0, so nothing is injected. That is a normal outcome, not a
readiness failure: it has no bearing on the three steps above.
What it does
- At load (dsh startup) → starts the three-step readiness chain, so
~/.rulemux/config.tomlis there before you need it. Atagent/session-start→ makes sure that chain has run before the first turn, and starts the one-per-session skills sync. agent/pre-step→ on the first turn that carries user input, awaits the skills sync (so the first model step sees the skills on disk), then runsrulemux inject --agent dshand injects its stdout as recalled material. It asks once per session and only re-asks if a later compaction provably dropped the block — never every turn.- Skills → one
rulemux sync --hook --agent dshper session; real copies into<git-root>/.dsh/skills/~/.dsh/skillsas__rulemux__<skill-name>/; a failed sync is logged, never fatal. For rules it still writes nothing anywhere, so there is no per-workspace state to keep in sync — and nothing left behind when you stop using it (skill copies are converged byrulemux uninstall, exactly like every other agent).
Requirements
- Node 18+ (plain ESM) — dsh's own runtime satisfies this.
- Network and permission for a global install, only if
rulemuxis missing or too old. - A rulemux config (
~/.rulemux/config.toml) whose[[source]]entries cover the workspace; it is created for you at dsh startup, then it is yours to fill in.
License
MIT — same as rulemux.
Links
More in this category
yjh051108/dsh-routing-suite★ 7031
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★ 3963
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.
first-fluke/oh-my-agent#dsh★ 1496
Runs project OMA checks before and after tool execution and when a turn tries to finish. Installs its OMA CLI dependency and initializes unconfigured projects on first use. Requires Node.js 22+; initial setup needs network access and project write access.
MichengAI/dsh-skills-manager★ 641
Manages local DeepSeek Harness skills in Settings and shows shared Agent skills as read-only.
hust-open-atom-club/oh-dsh★ 327
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
Fishquito7/dsh-skill-mcp-panel★ 294
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.