dsh-permission-guard
A Permission Settings page for DeepSeek Harness (DSH).
One page under Settings that does two things:
- New-session default — one button makes every session created from then on start in Full access; a second button restores the safe Workspace write default.
- Existing-session allowlist — sessions that already exist keep their own permission. You can raise one of them to Full access, one session at a time.
The page asks for confirmation before enabling Full access, and names the risk in plain words.
Install
Plugin market — once listed, install it from Settings → Plugins in the app.
Today, from this repository (the CLI adds the package to your profile and registers its bundle in one step):
dsh plugin --profile desktop add github:frostnova04/dsh-permission-guard
Swap desktop for your own profile name if it differs. A pinned tarball works the same way:
dsh plugin --profile desktop add https://github.com/frostnova04/dsh-permission-guard/releases/download/v0.1.0/dsh-permission-guard-0.1.0.tgz
Reload the window afterwards. The page appears under Settings → Permissions (权限设置).
What it actually does
This plugin does not invent a permission system. It writes the permission presets DSH already has:
- the new-session default is the
defaultPresetvalue of thepermissionsettings namespace, which DSH reads when it creates a session. Changing it never touches a session that already exists. - an allowlist entry performs the same preset write as the
/permissioncommand, so the change is recorded in that one session's own log and survives a restart.
Full access means sandbox danger-full-access with approval policy never: no confirmation
prompts, and writes to any file the DSH process can reach.
Why a page instead of a dropdown
DSH ships a single "permission" row in Settings → General. This plugin gives the same write a dedicated page with the two operations people actually asked for: one switch for everything new, and a per-session list for everything old.
Requirements
- DSH 0.2.1-rc.5 or newer (desktop app and
dsh webboth work). - The standard
settingsandpermission-presetsplugins, which every standard composition includes.
Development
npm install
npm test
test/host.test.mjsmounts the Host API on a real HTTP server with fake Cordis services and drives every route, including the connection gate.test/client.test.mjsloadsclient.jsthe way the browser module loader does, registers the settings section, renders the page withreact-test-renderer, and clicks through the confirmation flow and one allowlist row.
Layout
| File | Role |
|---|---|
index.js |
Host half: the /permission-guard/api/* routes, catalog and session reads, preset writes |
client.js |
Client half: the settings.section registration and the page |
cordis.patch.yml |
The single Loader row that inserts the plugin |
locale/*.json |
The title and description plugin managers display |
icon.svg, assets/icon-180.png |
The plugin icon (a raster copy for storefronts) |
License
MIT
No comments yet. Be the first to write one.