Preface¶
When running agents in DSH (DeepSeek Harness), the default sandbox restricts write operations to the current session’s workspace. Note directories, sibling repositories, git worktrees, etc., often fall outside the workspace; requiring manual approval for every write/edit or bash redirection interrupts the task flow. The community plugin dsh-extra-paths (maintained by 0x7a76) wraps existing services (without modifying the DSH core) to declare a set of “extra writable roots” for the fs tool and restricted shell, allowing the first write attempt to succeed without approval within the configured scope. The following sections cover its positioning, configuration methods, and usage notes.
What is this?¶
dsh-extra-paths is an admin-security class plugin in the DSH ecosystem: it allows you to configure a set of external paths (or patterns matching directory structures) in the settings, enabling write/edit/str-replace and bash subprocesses to write on the first attempt when rules permit, without requiring per-request approval. The plugin provides a Web settings page with a real-time preview of the resolved absolute paths and pattern matching results for each rule under the current workspace. Directory page: skillhub.cn/plugins/0x7a76/dsh-extra-paths; Source code: github.com/0x7a76/dsh-extra-paths (MIT, package version 0.1.1).
Core Features¶
Writable Scope and Scope¶
Each path can carry scope and surfaces:
| scope | session read-only |
session workspace-write |
|---|---|---|
write (default) |
Write rejected | Writable |
always-write |
Writable | Writable |
surfaces: fs refers to write/edit/str-replace; shell refers to bash subprocesses. Reading and execution are not further restricted by this plugin.
Relative Paths and Wildcard Patterns¶
Relative paths are resolved based on each session’s own workspace; the settings page allows previewing using a “base workspace”. For example, ../some-repo points to a single sibling repository under the parent directory of the workspace; ~/notes/home is relative to the user’s home directory and is independent of the current workspace.
path supports wildcards, turning “the existence of a certain directory structure” into an authorization condition. For instance, <work root>/**/.worktrees/* matches worktrees under various repositories, or <work root>/<some-repo>/.worktrees/* covers only a specific repository (the documentation recommends the latter as traversal costs are lower). The plugin imposes hard boundaries on wildcards: the pattern must have at least two literal anchor segments at the beginning; it will not enter node_modules/.git, and ** will not enter hidden directories; ** is limited to a maximum of 3 levels. If the number of matched directories or hits exceeds the limit, the entire pattern becomes invalid (fail closed); expansion results are cached for approximately 30 seconds.
Settings Page¶
Changes take effect immediately upon saving, without needing to restart DSH. The page displays the resolved absolute path for each line; pattern lines show [active ×N] along with specific root directories. Patterns with zero matches or those rejected are clearly marked.
Installation and Activation¶
Requires DSH 0.1.5, 0.2.0, or 0.2.1; the installation gate will reject the package if the version is outside this range.
Install from the registry (replace <name> with your profile name):
dsh plugin --profile <name> add dsh-extra-paths
When installing from a local build directory, first run pnpm install && pnpm build within the repository, then:
dsh plugin --profile <name> add /path/to/dsh-extra-paths
After installation, you can edit via the Extra paths card in Settings → Plugins or in the Extra writable paths section of the settings sidebar.
Typical Configuration¶
Write to the extra-paths section of ~/.dsh/settings.yaml, or save directly on the Web settings page. Below, <work root> represents the directory where you store your projects (absolute path or starting with ~/), and should be replaced with your actual path:
extra-paths:
paths:
- <work root>/notes/home
- path: ../../notes/home
scope: always-write
- path: <work root>/some-repo
scope: write
surfaces: [fs]
The second example: resolved relative to the current session’s workspace and set to always-write, allowing writes even in read-only sessions. The third example only opens up the fs tool and does not write to the shell surface.
For worktree scenarios, structural anchoring can be used (replace <work root> and the repository name with actual values):
extra-paths:
paths:
- path: <work root>/<some-repo>/.worktrees/*
Use Cases and Notes¶
Suitable for developers who need stable disk writes outside the workspace without clicking approval every time: cross-repository notes, parallel code modification across multiple worktrees, build artifacts in fixed directories, etc. The plugin runs with the permissions of the system user of the current dsh process; the configured root directories represent the actual writable scope. Please review the GitHub repository source code and MIT license before installation.
Known limitations listed in the documentation include: the bash sandbox operates on the granularity of the entire call, so it cannot achieve “complete lack of constraint for a single path”; the same relative path resolves to different directories in different workspaces; the shell side is not relaxed on Windows; files written outside the workspace will not appear in the workspace-changes card of deliverables. always-write weakens the protection provided by Stop for that path in read-only sessions, so be conscious when tightening paths and surfaces during configuration.
The community directory skillhub.cn has no official affiliation with DeepSeek / High-Flyer. The plugin is published by community maintainers and is not an official app store entry.
Conclusion¶
dsh-extra-paths uses declarative extra writable roots to extend the DSH sandbox from “current workspace only” to external directories and worktree patterns under your control, reducing configuration errors through instant previews on the settings page. For further details, see the plugin directory page and the GitHub README (including the Chinese README).