dsh-session-settings
English | 中文
Session Settings, MCP Server, and Skill Management plugin for DeepSeek Harness (DSH) Web GUI.
Configure per-session or global settings directly from the Web GUI with immediate effect:
- Subagent Model & Reasoning Effort: Independently configure provider, model, and reasoning effort for subagents (
subagent,subagent_fork,workflow). - Centralized MCP Server Management: First-class sidebar navigation item for Model Context Protocol (MCP) servers with 2-stage compatibility probing, automatic protocol downgrade, tool schema inspection, and read-only browsing of resources and prompts.
- Session-Level MCP Tool Control: Granularly enable/disable MCP servers and specific tools per session or follow global defaults.
- Session-Level Skill Management & Control: Independently enable/disable bundled, user, and project skills per session, with automatic dynamic prompt catalog filtering and execution enforcement.
Table of Contents
- Features
- Mainline Compatibility
- Installation
- Plugin Updates & Upgrades
- Uninstallation
- Development & Maintenance Commands
- Frequently Asked Questions (FAQ)
- License
Features
- Settings Sidebar Navigation Entry: Top-level section in Settings navigation sidebar (dedicated icon) for direct MCP server management.
- Session-Specific Tab: Dedicated tab in the conversation view for configuring the active session's subagent models, MCP tools, and skills.
- Switch-Based Subagent Control: Three explicit switches — allow agents to choose a subagent model, replace the model of forked subagents, and specify a subagent model with its reasoning effort.
- Instant Effect: Each agent's scope layers are re-declared on save and on tool-registry changes, so an updated policy applies on the very next request without restarting DSH.
- Three Explicit Scopes: Session, Workspace, and Global are distinct write targets chosen on the page, never inferred from which fields a request happens to carry.
- New-Session Page Targets a Live Session: Choosing a workspace on the New-Session page connects that workspace's blank session, and the modal writes session-scope edits straight to it — effective on the next request. A page with no session has no session scope to write to, so that tab disables itself and explains why.
- Single Interface Contract: Paths, HTTP methods, and request bodies are each declared once in
src/types.ts; the client sends and the server validates against the same definitions, with no server-side compatibility branches. - One Resolution Ladder: The session → workspace → global rules and their defaults live in
src/shared/, shared by the panel that displays them and the server that enforces them, so a panel cannot show one value while enforcement uses another. - Authenticated Routes: All routes are registered on the official connection carrier, so a request passes the Host/Origin fence and browser authentication before any handler runs.
- Interoperable MCP Import & Export: Server configuration is exported as an
.mcp.jsondocument — the same shape Claude Code reads — carryingtype,nameand every connection parameter, so a file round-trips without loss and can be handed to another tool as-is. Import validates each entry and reports every rejection with its reason instead of silently dropping it. - Remount a Broken MCP Connection: Each enabled server card in the session settings has a Remount button beside Server Info. It tears down and rebuilds that server's official client — the only recovery path when tool calls keep failing while the server still reports as connected (a streamable-HTTP session the server has already forgotten), so recovering no longer means restarting
dsh web. - Read-Only Resource & Prompt Browsing: The MCP server modal offers Resources and Prompts tabs. Resources are grouped into resources and templates, and a template's parameters are expanded server-side before reading; prompts are shown per role with copy-full-text and a Raw JSON view. Lists are cache-first and content is never persisted — reads happen only on click, and the read-only views never change what the model can see (that stays a session policy decision).
- Extra Writable Directories: The session sandbox panel grants directories the workspace-write policy does not cover, each with the purpose sentence the model reads beside its path. Built-in presets fill a whole toolchain's usual caches in one click; Manage presets stores your own deployment-wide, and Export to clipboard writes the current draft as
path | descriptionlines so a colleague can import them on their machine. Import never fails silently: every line it could not use is reported with its number.
Sharing sandbox directory lists
Export to clipboard in the sandbox panel writes the current draft as plain text:
# Sandbox extra writable directories
~/Android/Sdk | Android SDK and platform tools
~/.gradle | Gradle dependencies, wrapper and daemon caches
One path | description row per line; the first # line is an optional title; blank lines and further # lines are ignored. Everything after the first | belongs to the description, so a description may contain one. A row without | is a bare path.
Paste that text into Manage presets → Import from clipboard to store it as a preset, or hand it to someone else. Readers accept the format by hand, so the shape above is what any tool producing it must emit.
Mainline Compatibility
| Plugin Branch | Compatible DeepSeek Harness (DSH) Mainline | Architecture & Features |
|---|---|---|
main branch |
>= 0.2.2-rc.1 |
Native support for Session Format V4, Cordis 4.1, @modelcontextprotocol/client 2.2.0, the agent.model.select() routing API, the SandboxPolicy.additionalWritableRoots channel, the settings.section.icon slot, and the ui-primitives icon set. |
⚠️ Note: The
mainbranch targets DSH 0.2.2-rc.1 and above natively. It keeps no backward-compatibility shims and does not support earlier DSH lines. The host does not readengines.dsh; compatibility is enforced through thepeerDependenciesrange on@deepseek-ai/dsh, so an incompatible host refuses the plugin instead of loading it half-broken.
Installation
🚀 One-Line Quick Install (Recommended)
This repository includes a GitHub Actions workflow that automatically builds and deploys a minimal release to the dist branch (containing built artifacts and manifests without raw source bloat).
You can install this plugin with a single command without any local build step:
dsh plugin --profile web add github:u9521/dsh-session-settings#dist
Note: After installation, start or restart the Web service:
dsh web
Installation from Source (For Developers)
Step 1: Obtain the Source Code
Clone the repository to your local machine:
mkdir -p ~/.dsh/plugins
cd ~/.dsh/plugins
git clone https://github.com/u9521/dsh-session-settings.git
cd dsh-session-settings
Step 2: Install Dependencies & Build
pnpm install
pnpm run build
Step 3: Register to DSH Web Profile
dsh plugin --profile web add .
Verify Installation
List the plugins in the web profile to verify that @local/dsh-session-settings is registered:
dsh plugin --profile web list
Step 4: Start and Verify
dsh web
Plugin Updates & Upgrades
Option 1: Online Update (Recommended)
If you installed via the one-line command from the GitHub dist branch, update directly using dsh plugin --profile web update:
dsh plugin --profile web update github:u9521/dsh-session-settings#dist
Note: After updating, start or restart the Web service:
dsh web
Option 2: Local Source Upgrade (For Developers)
If you installed from cloned local source, pull the latest commits from the main branch and rebuild:
# Step 1: Navigate to the plugin source directory
cd ~/.dsh/plugins/dsh-session-settings
# Step 2: Pull latest commits from the main branch
git pull origin main
# Step 3: Update dependencies and rebuild artifacts
pnpm install
pnpm run build
# Step 4: Restart the Web service
dsh web
Uninstallation
To disable and completely remove the plugin, use the DSH CLI to remove it from the web profile:
dsh plugin --profile web remove @local/dsh-session-settings
Note: If installed via the GitHub specifier, you can also run:
dsh plugin --profile web remove github:u9521/dsh-session-settings#distAfter uninstallation, start or restart
dsh webto return to the default DSH interface.
Development & Maintenance Commands
| Command | Description |
|---|---|
pnpm run build |
Full build (runs tsc type check + generates lib/ bundles) |
pnpm run check |
Type check only (tsc --noEmit) without emitting files |
pnpm run lint |
ESLint + type check + Prettier check |
pnpm run lint:fix |
ESLint autofix + Prettier write |
pnpm run fmt |
Format source code and configuration files with Prettier |
pnpm run fmt:check |
Check code formatting compliance |
Frequently Asked Questions (FAQ)
Q1: Do I need to restart dsh web after updating session settings or disabling tools/skills?
A: No. The host plugin declares each agent's policy on that agent's own scope (tool restrictions, execution guards, and scoped prompt sections) and re-declares it when you save. As soon as you save settings in the Web GUI, they take effect on the very next request.
Q2: What happens if I save session settings before the session exists?
A: On the New-Session page a blank session already exists as soon as a workspace is connected, so session-scope edits are written to that session and take effect on the next request. On a page with no session at all there is nothing to write to: the Session tab is disabled and a note beside the tabs says so. Workspace and Global defaults remain editable there. Nothing is ever staged or retargeted — a save lands only on the scope you selected.
Q3: Are the plugin's API routes authenticated?
A: Yes. All routes are registered through the official connection carrier, so an unauthenticated request receives 401 before any handler runs. The plugin holds no credentials of its own.
Q4: How do I uninstall or remove the plugin?
A: See the Uninstallation section above and run dsh plugin --profile web remove from the corresponding profile.
License
This project is licensed under the MIT License.
No comments yet. Be the first to write one.