dsh-ob-agent: Unified Gates and Sub-agent Orchestration in DSH

Preface

When building agent workflows in DeepSeek Harness (DSH), the main session often inherits a full suite of Agent-class tools: subagents, workflows, Ralph, etc. With so many tools, the model is prone to making incorrect selections. Furthermore, if you configure separate identities, models, and permissions for different tasks individually, the configuration becomes scattered, making it difficult to converge the capability surface on a per-session basis.

The following introduces the community plugin dsh-ob-agent (maintainer yxsj245, categorized under Workflows on SkillHub). It provides “a master switch + preset role entries + per-session selection” on the DSH side, while guarding against residual tools at the execution layer, allowing the main agent to selectively invoke the appropriate subagents based on settings. The current version is 0.2.0; the README indicates compatibility with DSH 0.2.1-rc.2; the repository uses the MIT license.

What is this

dsh-ob-agent is a unified control plugin for DSH’s Agent capabilities: it uses a chat box master switch to hide or reject inherited Agent tools, uses role entries to describe invocation timing, subagent identity, spawn/fork, model, thinking tier, and read-only/full permissions, and supports writing “when to invoke” into the system prompt after per-session selection. The plugin also provides agent_create, agent_update, and agent_list, allowing the model to self-create reusable roles within the scope allowed by policy (by default, only self-created entries can be modified).

Compared to “fully relying on the host to expose all subagent tools by default,” this plugin converges capabilities to entries selected by the user and enforces execution-layer rejection using whitelists and tools.guard() in read-only mode. Subagents can send messages back to their direct parent agent but cannot delegate further.

SkillHub is a directory of community plugins and has no official affiliation with DeepSeek / High-Flyer. Please read the source code and license yourself before installing. The plugin runs with the current DSH process privileges and does not claim OS-level sandboxing.

Core Features

Chat Box Master Switch and Per-Session Selection

There is a “Subagents” master switch above the input box, saved per session. When off: inherited Agent tools are hidden, and residual tools in the own layer are rejected by guards at the execution layer; the system prompt explicitly forbids the use of historical tool names (related to the “Agent Team Mode” switch starting from 0.2.0, see docs/v0.2.0.md in the repo). When on, only selected entries are allowed, and the system prompt lists only the capabilities actually available.

There are 8 role entries built-in (including code review, general subagent, Agent self-management, and 5 collapsed DSH native tool groups); native groups are collapsed by default and cannot bypass the master switch via collapsing.

Role Entries and Runtime Mode

The settings page allows editing of each role’s name, description, invocation timing, identity prompt, spawn/fork, model/thinking tier, permissions, default selection, and governance status. Newly created subagents are fixed as continuable (conversation can continue): the tool name is unified as subagent_<id>_session, returning a persistent subagent ID immediately after delegation. The host sends a notification upon completion, and you can use send_message to continue the conversation or interrupt_agent to abort. The one-shot mode has been removed as per user request; old one-shot entries are normalized to continuable upon reading, retaining the role ID, identity, model, permissions, and selection status.

Model Self-Service and Team Mode (0.2.0)

agent_create / agent_update / agent_list create or maintain entries under global policy permissions, with writes validated and audit logs retained. Version 0.2.0 introduces “Agent Team Mode”: it first releases this plugin’s role tools, restrictions, and capability prompts, and then the user enables the official Agent Team in the DSH plugin page. If the official team service already exists, it automatically yields; this plugin does not install or implement team tools.

Policy Snapshots and Security Boundaries

Governed subagents use namespace IDs at the startActivation() boundary, save immutable policy snapshots, and assemble identity and tool guards at the host’s agent/created stage. Default directory:

$DSH_HOME/plugins/dsh-ob-agent/child-policies/
# When DSH_HOME is not set: ~/.dsh/plugins/dsh-ob-agent/child-policies/

Can be overridden using the environment variable DSH_OB_AGENT_POLICY_DIR. When backing up or migrating sessions, this directory should be backed up as well. Cold restore will be rejected if the policy is missing, corrupted, or if parent-child identities do not match; it will not default to full permissions. The snapshot is a plugin tool policy, not an OS sandbox; under full permissions, local processes can still modify files.

The gates are divided into three layers: tools.restrict hides inherited tools, tools.guard() monotonically rejects (including the own layer), and native implementations are re-mounted according to selected tools. Read-only permissions intersect with tools visible to the parent session; if the intersection is empty, the entry is unavailable. The default file-class whitelist is read / read_image / glob / grep, with optional retention of send_message to the direct parent agent.

Installation and Activation

This plugin does not have an npm release package yet. It needs to be built locally in the source directory and then installed to an existing web profile using a file: path. The example commands in the documentation are as follows (adjust paths according to your actual checkout):

# In the plugin source directory
npm install --legacy-peer-deps
npm run check

# Install to an existing web profile (will not start a replacement server)
dsh plugin --profile web add file:C:/Users/17737/Code/other/DSH/plugins/dsh-OB-agent

After installing or updating the source code, you must restart the original DSH process and refresh the page in the existing GUI. The npm run build output is in the lib/ directory of the source code; it is recommended to back up the profile’s configuration, dependency list, and lock files before updating. Do not use a separate Web service to replace the updated original GUI.

Typical Usage

  1. Complete installation and restart DSH; confirm the appearance of the “Subagents” bar and the settings page entry in the chat box.
  2. Adjust entries (model, permissions, invocation timing, identity prompt) in the settings page according to the task. Prompt variables must be written in registered forms, such as {{cwd}} or {{model}}. Spaces or unknown variables will be rejected during validation.
  3. Turn on the master switch in a new session and select the roles to be used in this session. The system prompt will reflect the current selection and invocation timing.
  4. The main agent calls the corresponding subagent_<id>_session to delegate. When the subagent completes, you can continue the conversation or send a message back to the parent agent (if allowed globally).
  5. If you need to let the model create roles itself, unlock the self-management scope in the settings page and use agent_create / agent_update / agent_list (complying with default restrictions such as “only modify self-created ones”).

For acceptance, refer to docs/USAGE.md: verify that the master switch works, _session tools appear after selection, the returned ID and completion notifications are normal; read-only subagents should not write files or execute commands. For the model-side tool contract, see docs/model-guide.md in the repository.

Applicable Scenarios and Notes

Suitable for: Users who want to tighten the Agent tool surface on a per-session basis within the same DSH configuration; need to preset multiple roles (review, general subagent, native workflow, etc.) and unify permissions and model routing; need to maintain entry identity and guard consistency on the DSH 0.2.1-rc.2 async apply() and new subagent activation paths.

Notes:

  • Peer dependencies include @deepseek-ai/dsh-tool-subagent (>=0.2.1-rc.2 <0.3.0) and other host components. If the host version does not match, persona is no longer supported or panel anomalies may occur. Check the installed copy version and lib/ build hash before restarting.
  • The policy directory may contain role prompts; do not publish them or write secrets into them. run_code cannot be added to the read-only whitelist.
  • Native subagent IDs outside this plugin’s namespace are not subject to snapshot cold restore validation but are still managed by gate configuration.
  • This plugin is not responsible for fixing runtime errors of other plugins; the scope here is limited to dsh-ob-agent.

Conclusion

dsh-ob-agent consolidates the scattered Agent capabilities in DSH into configurable gates and role entries, working in tandem with policy snapshots and execution-layer guards to allow the main agent to invoke appropriate subagents per session. For installation steps, permission semantics, and 0.2.1 migration details, refer to the repository README and docs/USAGE.md.

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

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

Xiaoye