dsh-claw-policy: DSH Shared Claw / Session Policy Contract

Preface

When implementing permission and MCP governance for Claw Agents in DeepSeek Harness (DSH), a common practice is for each plugin to define its own set of policy fields and default values. When field names or enum values are inconsistent, subsequent components such as the registry, session-permissions, and gate must repeatedly parse or maintain their own “dialects.” This results in high integration costs and can easily lead to misunderstandings that permissions have been relaxed when a plugin is uninstalled.

The following introduces the community plugin dsh-claw-policy (Repository: xingyingyuzhui/dsh-claw-policy, Package Name: dsh-agent-policy). It provides the shared contract for the governance suite’s Phase 1–2: policy schema, preset base classes, MCP initialization defaults, and policy versions. It does not intercept tools; actual rejection and hiding occur on the side of gate plugins such as dsh-agent-gate.

What is this

Maintainer: xingyingyuzhui. Directory Category: admin-security.

In one sentence: It provides DSH with a reusable Claw / session policy schema and default configuration persistence conventions, allowing other plugins to consume the same structure rather than copying policy definitions individually. Uninstalling this plugin will not automatically relax permissions; by default, it falls back to DSH’s original permission-presets, and the gate remains at dsh-agent-gate.

Core Functions

Policy Contract, No Interception Execution

The README explicitly states: This plugin is responsible for the schema / preset base classes / MCP initialization defaults and does not deny tools. The naming convention for MCP tools in DSH is mcp__<service>__<tool>; there are three default modes for the MCP surface related to this plugin (specific allowance logic is completed in the gate):

  • none: All off
  • explicit: Only allows services listed in servers.allow
  • init-defaults: Allows when the allowlist is empty (initialization scenario)

Unified Reference for Ecosystem Plugins

package.json exports ./schema (policy-schema.mjs) and ./store (policy-store.mjs). Other plugins should reference these entry points to avoid maintaining duplicate schemas. Current version: 0.1.8, Runtime requirement: Node.js >= 20, License: MIT.

Default Configuration and Claw Templates

The persistent template for new Claw Agents and MCP initialization default values are written to ~/.dsh/agent-policy/defaults.json in the user’s home directory (this file remains on disk after the plugin is uninstalled).

Installation and Enablement

The official installation command is as follows (Original source material, do not modify the repository slug):

dsh plugin --profile web add github:xingyingyuzhui/dsh-agent-policy

Recommended installation order: Install before dsh-agent-registry, dsh-session-permissions, and dsh-agent-gate. Restart dsh web after installation is complete.

For local development, you can use the link method to mount the source directory:

dsh plugin --profile web add link:/abs/path/to/dsh-agent-policy

Uninstallation:

dsh plugin --profile web remove dsh-agent-policy

Typical Usage: Editing defaults.json

After following the installation steps above, edit ~/.dsh/agent-policy/defaults.json as needed. The fields listed in the README are as follows.

Field Meaning
preset Persistent template for new Claw Agents, values such as research, developer, etc.; corresponds to Claw Agent Template in the settings interface
mcp Default MCP surface value for new Agents: none | explicit | init-defaults
servers.allow / servers.deny List of MCP service names visible during initialization

Example structure (Field names and enums are subject to the README; please fill in values according to your environment):

{
  "preset": "developer",
  "mcp": "explicit",
  "servers": {
    "allow": ["example-mcp-server"],
    "deny": []
  }
}

Note: When BOOTSTRAP.md still exists in the workspace, the gate will additionally allow bootstrap-related capabilities such as asking for names and writing to the workspace persona file; these relaxations are not configured in the aforementioned defaults.json, nor are terminal-type permissions opened by default through this contract.

Applicable Scenarios and Notes

Who it is for: Developers building or maintaining DSH agent governance chains—especially those who are using or planning to use components like dsh-agent-registry, dsh-session-permissions, dsh-agent-gate, and need unified policy schemas and MCP initialization conventions.

Notes:

  1. This plugin is a contract layer; do not expect it to intercept tools just by being installed alone. Please ensure the gate plugin is in place during integration.
  2. DSH plugins run with the permissions of the current dsh process; before installation, please review the GitHub Source Code and MIT License yourself to ensure compliance with your security policies.
  3. The community plugin directory SkillHub Entry is an independent site and has no official affiliation with DeepSeek / High-Flyer; installation and configuration are subject to the repository README.

Conclusion

dsh-claw-policy (Package Name: dsh-agent-policy) consolidates Claw / session policies into a shared schema and default configuration convention, allowing other plugins in the governance suite to consume rather than copy; interception remains the responsibility of the gate. For directory information and documentation, please visit the SkillHub Plugin Page and the GitHub Repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye