DSH-Backroom: A Read-Only Host Diagnostic Backend for DSH Plugin Authors

Introduction

When writing plugins on DeepSeek Harness (DSH), two scenarios are notoriously hard to prove on-site: the plugin is mounted but shows “no activity at all”, and the documentation mentions ctx.get('sessionController') — whether it is actually obtainable in the real process. Host-side logs primarily go through ctx.logger, which by default only lands in a cordis in-memory ring buffer; the stdout of the installed backend child process is also captured by the GUI pipe, so a single console often cannot reveal the full trail. Type declarations describe interface shapes, but cannot replace conclusions about runtime reachability.

Below is the community plugin dsh-backroom (maintained by LEEKINBUN-dsh-tools, current version 0.3.0, MIT licensed). It registers six 127.0.0.1 loopback HTTP routes inside the host process: four read-only diagnostic routes and two session-related capabilities protected by a key that is off by default. The plugin itself writes nothing to disk; it is categorized as admin-security. You can view its entry on the SkillHub directory page, and find source code and documentation in the GitHub repository. The DSH ecosystem emphasizes “everything is a plugin”; SkillHub is an independent community directory with no official affiliation with DeepSeek / High-Flyer.

What is this

dsh-backroom is a “back room” for DSH plugin authors: it aggregates the host ctx.logger buffer and plugin console.error/warn output into a readable log tail; reports the real results of ctx.get for each official service surface in the current process via a liveness matrix; and can read desktop crash logs for crash attribution. It also provides key-gated narrow session ports and a session creation route — when no key is configured, they are effectively non-existent.

Compatibility statement (from package.json): dsh >= 0.2.0, labeled compatible on 0.2.0-rc.2 and 0.2.1-rc.2. Profiles requiring Node >= 20 (e.g. desktop / web) load the bundle.

Core Features: Six Loopback Routes

All six routes are mounted under the /dsh-backroom/* prefix via the plugin’s webServer.register(), are accessible without an application session cookie (similar to /dsh-chamber/*), and return the header Cache-Control: no-store.

Route Summary
GET /dsh-backroom/probe ctx.get(name, true/false) matrix for each service surface, method names, dependency property access, hmr.getLinked(), log entry count before apply, Node/argv/DSH_* variable names, ctx.fiber.state
GET /dsh-backroom/logs?limit=&level=&contains= Logger tail from plugin apply onwards + plugin console output; ring cap of 4000 entries with dropped count reported
GET /dsh-backroom/faults?limit=&dir= Reads desktop crash logs, attributes frames to installed bundles vs official frames; includes explicit reasons when attribution fails (e.g. kill-shaped) (no key needed, but dir must be within whitelisted roots, otherwise 403)
GET /dsh-backroom/presets Read-only, key-free: agentPresets.list() and permissionPresets.catalog() plus the state of five permission gates
GET/POST /dsh-backroom/session?session=&key= Narrow port: read turn projections of allowed sessions; POST sends a prompt to a registered session, with optional wait=turn-end
GET/POST /dsh-backroom/sessions?key= Create sessions, archive sessions created by this plugin, query this process’s creation ledger; must pass workspace roots, preset, quota, budget gates

The first four routes are read-only; session and sessions require the environment variable DSH_BACKROOM_SESSION_KEY, and sessions must additionally satisfy the five gates listed in the README (e.g. if DSH_BACKROOM_WORKSPACE_ROOTS is not set, the entire session creation route is disabled).

How to Discover baseUrl and Port

Since 0.2.1-rc.2, the backend port is assigned by the system — do not assume the fixed port from the 0.2.0 era. One reliable approach: among the listening ports of processes related to DeepSeek Harness.exe, request GET /dsh-backroom/probe on candidate ports; whichever returns 200 is the backend. Alternatively, use the launcher provided in the repository, which prints backend port = ….

Inside a DSH session, the model sees the tool backroom_entry (read-only) each turn, which returns baseUrl, call formats for the six routes, the state of each gate, and hard limits. Any local process can also first call the key-free GET /dsh-backroom/presets to confirm the plugin is mounted.

Installation and Enablement

The official README uses profile-local file: dependencies + bundle registration, rather than installing via a single CLI plugin name. Steps:

  1. Place the plugin directory at a stable path, e.g. C:\plugins\dsh-backroom.
  2. Edit ~/.dsh/profiles/<profile>/package.json, adding both a dependency and a bundle:
{
  "dependencies": { "dsh-backroom": "file:C:/plugins/dsh-backroom" },
  "dsh": { "profile": { "bundles": [ /* …existing bundles…, */ "dsh-backroom" ] } }
}
  1. Install using dsh’s bundled pnpm and restart dsh (bundles are resolved only at startup; refreshing the page is not enough):
Remove-Item -Recurse -Force "$env:USERPROFILE\.dsh\profiles\<profile>\node_modules\dsh-backroom"
pnpm install --dir "$env:USERPROFILE\.dsh\profiles\<profile>"

file: installs are copies, not symlinks; after modifying source code you need to reinstall or compare lib/** against the README to verify synchronization. To uninstall, remove the two lines above from the manifest, remove node_modules\dsh-backroom, run pnpm install --dir … again, and restart; if you only want to disable it, you can simply remove "dsh-backroom" from the bundles array.

Review the source code and the MIT license before installing; the plugin runs with the current dsh process’s permissions. Action endpoints are closed when no key is set, but read-only diagnostics and the loopback surface are still exposed.

Typical Usage: Minimal curl Sequence

Let $P be the backend port and $K be the key provided by the launcher or DSH_BACKROOM_SESSION_KEY (the x-backroom-key header is recommended to avoid leaking the key into logs via the query string). The following examples come from the README’s minimal call sequence.

First, view the local current agent preset roster (key-free):

curl -s "http://127.0.0.1:$P/dsh-backroom/presets"

Common read-only troubleshooting via probe and logs:

curl -s "http://127.0.0.1:$P/dsh-backroom/probe"
curl -s "http://127.0.0.1:$P/dsh-backroom/logs?limit=200&level=error"

For action capabilities, the gates must first be opened via environment variables (e.g. the launcher tools/start-desktop-with-mouth.ps1 sets key, DSH_BACKROOM_WORKSPACE_ROOTS, etc.). Session creation example:

curl -s -X POST "http://127.0.0.1:$P/dsh-backroom/sessions?key=$K" -H 'content-type: application/json' \
  -d '{"cwd":"D:/Temp/backroom-ws","agentPreset":"minimal","caller":"some-agent"}'

Send one message to that session and wait for the turn to end:

curl -s -X POST "http://127.0.0.1:$P/dsh-backroom/session?key=$K&session=<sid>&wait=turn-end&timeoutMs=90000" \
  -H 'content-type: application/json' -d '{"text":"Reply with just one character: ok"}'

session / sessions are not tool surfaces for the in-session model to call directly; external agents, scripts, or CI must supply the key themselves when accessing the HTTP interface. When the crash log directory is at a non-default location, the read-only faults route can be pointed at a directory under allowed roots via DSH_BACKROOM_CRASH_LOGS.

Use Cases and Notes

Who it is for: Maintainers who are developing or debugging DSH plugins and need host logs and a ctx.get liveness matrix, or need to distinguish between “plugin logic errors” and “process killed externally” (kill-shaped); integration scenarios that need to limitedly create sessions and send prompts from external automation (must accept the five gates and process-level ledger; owned sessions are cleared after restart).

Daily advice: In normal use, rely only on the four read-only routes; when opening the “session narrow ports”, use the README-recommended -Sid target session and a one-shot launcher, avoiding persisting the key in user environment variables long-term.

Security and boundaries: Action routes return 403 disabled by default; the key file is readable by any local process by default, guarding against accidents rather than malicious local processes. Although faults is key-free, its paths are constrained by a whitelist, preventing it from becoming an arbitrary-file-read entry point. Permission levels cannot be loosened through this plugin; you cannot switch models or delete sessions (only archive/hide them).

Conclusion

dsh-backroom consolidates the three capabilities most lacking for plugin authors into a set of loopback endpoints: readable log tails, live probes of service surfaces, and crash attribution, and only opens session-related narrow ports after explicit configuration. If you are troubleshooting “installed but no evidence” or “the type says it exists, but it’s not in the process” on DSH, you can first install the bundle, check probe and logs, and then consult faults and presets as needed.

  • Directory page: https://www.skillhub.cn/plugins/LEEKINBUN-dsh-tools/dsh-backroom
  • Source code and Chinese README: https://github.com/LEEKINBUN-dsh-tools/dsh-backroom
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye