Foreword¶
When running Claw agents in DeepSeek Harness (DSH), the model continuously calls tools such as Shell, files, skills, and MCP. While official permissions can constrain certain capabilities, Claw sessions often require a combination of Agent and session-level policies. Without unified interception and logging, a single erroneous call could cross expected boundaries. The following introduces the community plugin dsh-agent-gate (directory entry dsh-claw-gate, maintainer xingyingyuzhui, category admin-security): it intercepts tool calls based on layered permissions in Claw sessions, initiates official DSH one-time approvals when necessary, and writes results to a local audit log. The official file sandbox is still recommended to be enforced by the ecosystem peer dsh-session-permissions.
What is this¶
dsh-agent-gate is a permission gate plugin for DSH Web configuration (current version in package.json is 0.1.14, MIT license). It addresses three issues in Claw/session scenarios: Intercepting tool calls that do not conform to policies, Approving high-risk operations requiring human confirmation, and Auditing call records that can be filtered and exported. Policy calculation reuses the layered model from dsh-session-permissions (Official ∩ Agent ∩ Session). The gate itself applies only to Claw sessions; workspace sessions continue to follow official permissions exclusively.
Core Features¶
Layered Interception and Approval¶
The plugin performs validation before tools actually execute via tools/pre-execute and tools.guard. When the policy disallows an action and the rule requires confirmation, it triggers the official DSH one-time approval process. The results (approved or denied) are appended to:
~/.dsh/agent-gate/audit.jsonl
Division of Labor with session-permissions¶
The official sandbox for Claw sessions (e.g., read-only, workspace-write) is pinned by dsh-session-permissions, not implemented solely by this gate. The two can be installed together: the permission plugin manages the sandbox and policy baseline, while agent-gate handles interception, approval, and the audit UI for Claw.
Visibility for Skills and MCP¶
The Agent skill denylist removes corresponding entries from the session’s official skill catalog and the / menu, rather than just intercepting tool calls named skill. Unauthorized MCP services are similarly rejected and removed from the model’s visible tool list at the start of the session, reducing the window where “the model sees it first, but execution is intercepted later.”
Audit Page in Web Settings¶
Once the Web client is installed and enabled, an Audit page is available in settings. It allows filtering records by time, result, tool type, and Claw Agent, and supports exporting the current filtered results for post-incident verification or archiving.
Uninstalling the Gate Independently¶
After uninstalling dsh-agent-gate, new tool calls will no longer be intercepted by this plugin. As long as dsh-session-permissions remains, the official file sandbox will not loosen due to the gate’s removal.
Installation and Activation¶
It is recommended to install this alongside dsh-session-permissions. Execute the following in the Web configuration:
dsh plugin --profile web add github:xingyingyuzhui/dsh-agent-gate
After installation, restart dsh web to activate the plugin and Cordis patches.
For local development, you can link the repository (replace the path with your local absolute path):
dsh plugin --profile web add link:/abs/path/to/dsh-agent-gate
Uninstall command (from original source):
dsh plugin --profile web remove dsh-agent-gate
Typical Usage¶
- Install dsh-session-permissions and this plugin, then restart
dsh web. - Create or open a Claw session in DSH, and configure tool and skill scopes according to Agent and session permissions.
- Trigger a tool call that might cross boundaries: observe whether it is intercepted by the gate or triggers an official one-time approval prompt.
- Open the Audit page in settings, filter by time or Agent, and export the current results if necessary. Simultaneously, check locally if
~/.dsh/agent-gate/audit.jsonlmatches the interface.
Workspace sessions do not go through this gate’s Claw-specific logic. When troubleshooting permission issues, distinguish between session types.
Applicable Scenarios and Notes¶
Target Audience: Teams or individuals running Claw Agents in DSH who require auditable and approvable tool calls. It falls under the admin-security category, focusing on governance and compliance rather than business feature extension.
Notes: The plugin runs with the current dsh process privileges. Please read the GitHub repository source code and the MIT license before installation. The community plugin directory SkillHub entry is an independent site and has no official affiliation with DeepSeek or High-Flyer. “Everything is a plugin” is a common practice in the DSH ecosystem; this gate is a layer of security reinforcement and cannot replace your overall management of Agent prompts, keys, and the host environment.
Conclusion¶
dsh-agent-gate consolidates Claw session tool calls into three lines: layered policy, official approval, and exportable auditing, aligning with the sandbox policies of dsh-session-permissions. For further information, visit the directory page skillhub.cn/plugins/xingyingyuzhui/dsh-claw-gate and the source code github.com/xingyingyuzhui/dsh-claw-gate.