Introduction¶
When developing project-level agents in DSH, teams often want “configuration to follow the repository”: whether switching machines or starting a new session, subagent definitions, slash commands, MCP servers, and hooks should load consistently. DSH natively reads AGENTS.md and .dsh/skills/ from the workspace, but subagents, commands, MCP, and hooks were previously maintained only in global configurations, making them impossible to version per project or distribute via git.
The following introduces the community plugin dsh-project-config (Maintainer: RicardoYan, Category: Workflow). It loads the aforementioned capabilities for the current DSH workspace from .dsh/settings.yml (and the optional .dsh/settings.local.yml) at the workspace root, and collaborates with dsh-workspace-trust to execute commands and scripts within the project inside “trusted workspace” boundaries.
What is this¶
dsh-project-config is a Cordis plugin for DeepSeek Harness (npm package name dsh-project-config, version 0.2.1 in current documentation). In one sentence: Per-workspace subagents, commands, MCP servers and hooks for DSH from .dsh/settings.yml.
Workspace root determination (from README): Scan upwards from the session directory; the nearest directory containing .dsh/settings.yml or .git is the workspace root.
Core Features¶
Project-level settings.yml¶
Place .dsh/settings.yml at the workspace root to declare four types of entries (field details, hook I/O, migration from Claude Code, and troubleshooting can be found in the repository’s docs/settings.md):
- subagents: Load persona files based on
personaFileand register them as tools with the same name; usetoolFilterto restrict available tools (MCP tools must be written with full names, e.g.,mcp__github__search_code). - commands: Register slash commands;
handlerFileis a module relative to the workspace root, requiringexport default ({ rawInput, agent, workspaceRoot }) => 'text'. - mcp: Start MCP servers (stdio, etc.) based on entries; tool names follow the format
mcp__<serverName>__<tool>; environment variables can reference DSH process environment variables using${VAR}. - hooks: Attach commands to events like
tools/pre-execute,tools/post-execute,agent/pre-step; executed at the workspace root with JSON via stdin; exit code 2 indicates blocking, with the reason passed via stderr.
Personal Override: settings.local.yml¶
MCP credentials, personal hooks, etc., can be placed in .dsh/settings.local.yml using the same syntax as the main file; entries with the same name completely override those in settings.yml. enabled: false can remove the same-named item from the main file, and hook entries are appended. Must be added to .gitignore. The local file is read only if settings.yml exists (can be an empty file). See documentation §7 for details.
Skills are still placed in .dsh/skills/<name>/SKILL.md, read by DSH directly, and are not declared in this plugin’s settings.
In-session Diagnostics Commands¶
The plugin provides /project-config: to view configurations loaded in the current session, skipped entries with reasons, and the connection status of MCP servers.
/project-config reconnect [name] can reconnect a specified MCP server within the current session.
The above commands and configuration warnings follow DSH language settings, with interfaces in Chinese or English; field names and event names remain in their original form.
Collaboration Rules for Subagents and MCP¶
- Subagents, MCP, and hooks are effective for subagents as well; subagents share the main session’s MCP connections and filter based on their respective
toolFilter. - Subagents dispatching further project subagents: The target tool name must be included in
toolFilter.allow, and the target’smaxDepthmust be sufficient (indicating the maximum layer depth; direct dispatch from the main session is layer 1). - The general
subagenttool provided by DSH is available to every subagent and is not managed bytoolFilter; nesting depth is controlled by DSH’s subagent layer limit.
Security Boundaries and AGENTS.md Isolation¶
- Commands, MCP, and hooks run code from the project and are executed only when the workspace is trusted; trust is recorded by dsh-workspace-trust. If this plugin is not installed, it is treated as untrusted by default, but subagents remain fully functional.
- Paths in the configuration only accept relative paths; paths pointing outside the workspace (including symlinks) require the workspace to be trusted and must not be in the forbidden access list.
- Workspaces containing
settings.ymlonly read their ownAGENTS.mdand project skills; they no longer inheritAGENTS.mdfrom the outer git repository root.
Installation and Activation¶
Official installation steps (Desktop example; replace desktop with your profile name for Web, usually web). The trust plugin and project config plugin must be installed together:
dsh plugin --profile desktop add github:RicardoYan/dsh-workspace-trust#v0.2.1
dsh plugin --profile desktop add github:RicardoYan/dsh-project-config#v0.2.1
Restart DSH after installation.
Uninstallation:
dsh plugin --profile desktop remove dsh-project-config
Version and Runtime: The plugin declares compatibility with @deepseek-ai/dsh >=0.2.1-rc.1 <0.3.0-0 and Node ^22.19.0 || >=24.0.0. It relies on DSH internal interfaces (agent events, dsh-tool-subagent, dsh-mcp-client, dsh-hook-protocol, etc.); it is advisable to check the README and releases before upgrading DSH major versions.
Typical Usage¶
Minimal settings.yml Example¶
Create .dsh/settings.yml at the workspace root and combine the four types of configuration as needed. The snippet below is from the README, demonstrating common field forms:
subagents:
- toolName: code-reviewer
personaFile: agents/code-reviewer.md
toolFilter: { allow: [read, grep, mcp__github__search_code] }
commands:
- name: release-notes
description: Generate release notes
handlerFile: tools/release-notes.mjs
mcp:
- serverName: github
transport: stdio
command: npx
args: ['-y', '@modelcontextprotocol/server-github']
env: { GITHUB_TOKEN: '${GITHUB_TOKEN}' }
hooks:
tools/pre-execute:
- matcher: pwsh|bash
command: node .dsh/hooks/check.mjs
personaFile is relative to the workspace root; description in the frontmatter serves as the subagent’s usage description. Tokens can also be written to settings.local.yml instead of environment variables.
Verifying Load Results¶
After starting a new session, run /project-config to confirm whether subagents, commands, MCP, and hooks are loaded as expected and if MCP is connected. Changes to settings.yml or settings.local.yml are effective only in new sessions.
Notes on hooks on Windows¶
The command for hooks is executed by DSH’s shell: PowerShell on Windows. Program paths with quotes require a preceding &, e.g., & "C:/Program Files/nodejs/node.exe" check.mjs.
Scenarios and Notes¶
Who it is for: Teams working in monorepos or multi-repo collaborations who need to commit DSH subagents, custom slash commands, project MCP, and audit hooks alongside their code, while wanting to keep credentials and personal hooks in local settings.local.yml.
Permissions and Security: The plugin runs commands, MCP, and hooks defined in the configuration with the current DSH process permissions; read the source code and the MIT license before installation, and understand the implications of trusting a workspace. Project-level commands and MCP will not run when untrusted, preventing accidental execution of scripts in untrusted repositories.
Other Behaviors (README “Notes”):
- After installing or uninstalling this plugin, existing sessions may receive one extra full AGENTS.md push.
- Diagnostic logs:
%TEMP%\dsh-project-config.log(rotates after exceeding 1MB); MCPurl,headers, andenvvalues are not written to logs or/project-config.
The community plugin directory site dsh-project-config on SkillHub exists alongside the GitHub repository; the DSH ecosystem emphasizes “everything is a plugin,” and this directory is community-maintained, with no official affiliation to DeepSeek / High-Flyer.
Conclusion¶
dsh-project-config consolidates previously global DSH extension points into .dsh/settings.yml, forming a unified set of “in-project agent configurations” alongside AGENTS.md and .dsh/skills/. Combined with dsh-workspace-trust, it runs project scripts and MCP within auditable trust boundaries. If you are maintaining reproducible DSH workflows, you can refer to the repository README and docs/settings.md for field details, place the configuration file in your target workspace, and self-check using /project-config.
- Directory Page: https://www.skillhub.cn/plugins/RicardoYan/dsh-project-config
- GitHub: https://github.com/RicardoYan/dsh-project-config