deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:FrankZhangIronly/dsh-system-control
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness (DSH) web plugin that adds a System menu to the sidebar footer with Restart and Shutdown controls. Restart cycles the launcher (
dsh webexits with code42and is relaunched); Shutdown exits cleanly (0). Both are routed over a loopback RPC channel so non-local callers are rejected automatically.
The plugin is shipped as a two-sided DSH plugin: a host (Node) half that owns the /system RPC channel and calls the existing appExit exit hook, and a browser half that renders the sidebar button + the centered modal dialog.
🌏 中文版本 / Chinese version is also available.
403 by DSH's existing authority check.appExit() is invoked (80 ms timer), so the browser receives a clean acknowledgement.@deepseek-ai/dsh updates.dsh plugin --profile web add dsh-system-control
Restart dsh web. The new 系统 / System button appears at the bottom of the sidebar.
To install from a local checkout:
dsh plugin --profile web add /path/to/dsh-system-control
| Action | Exit code | Launcher behavior |
|---|---|---|
| Shutdown | 0 |
The launcher loop exits and the window closes. |
| Restart | 42 |
The launcher loop relaunches dsh web. |
| Status | n/a | Probe: returns { exitAvailable, exitType }. |
The companion launcher DSH Web.ps1 already implements this contract:
0 → close window,42 → relaunch,If you launch DSH through a different mechanism (systemd unit, plain dsh web, etc.) make sure it understands these codes. Anything else will be treated as a hard crash.
┌────────────────────┐ connection.rpc.call('/system', 'restart', {}) ┌──────────────────────────┐
│ Sidebar button │ ───────────────────────────────────────────────▶ │ HostConnectionService │
│ + modal (browser) │ │ → loopback authority │
└────────────────────┘ │ → /system handler │
│ → ctx.get('appExit')(42)│
└──────────────────────────┘
system-control that injects connection and (transitively, via connection startup) appExit (which the cmdline launcher registers before any plugin mounts)./system with authority: 'loopback'. Anything not bound to loopback is automatically rejected.sidebar.footer.action with order 20 and renders the trigger + modal component.appExit(code) is invoked through ctx.get('timer').timeout(..., 80) so the 200 OK response can flush first.Channel: /system · authority: loopback (non-local callers get 403).
| Endpoint | Returns |
|---|---|
status |
{ ok: true, value: { exitAvailable: <is function>, exitType: <typeof> } } |
restart |
{ ok: true, value: { accepted: true, code: 42 } } then appExit(42) after ~80 ms. |
shutdown |
{ ok: true, value: { accepted: true, code: 0 } } then appExit(0) after ~80 ms. |
| anything else | { ok: false, error: { code: 'internal', message: 'unknown endpoint …' } } |
The status endpoint is purely a sanity probe used by the modal to display "退出通道:可用 / 不可用" in the dialog header.
system-control/
├── cordis.patch.yml # bundle patch: insert the system-control row
├── lib/
│ ├── index.js # host half (Node): /system RPC + appExit bridge
│ └── client.js # browser half: sidebar trigger + modal
├── package.json
└── README.md
The cordis.patch.yml adds a single row to the host composition tree that injects connection. appExit is provided by the cmdline launcher before the tree mounts, so it is consumed implicitly rather than declared in inject: [...].
@deepseek-ai/dsh ≥ current web profile (consumes connection, slots, timer).KeyboardEvent / document APIs).MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。