dsh-qwenpaw-bridge: Upgrading QwenPaw with Standard ACP Capabilities Without Modifying the DSH Core

Introduction

When using DSH to run ACP, the client typically communicates with the Harness via @deepseek-ai/dsh-acp. To see assistant streaming output, switch permission presets during a session, and obtain a complete model catalog during initialization in an ACP client like QwenPaw, one often needs to pile on private protocols in the adaptation layer or client.

dsh-qwenpaw-bridge is a bundle plugin on the DSH side: it replaces the default acp line in the profile, adding the _meta.qwenpaw extension agreed upon by QwenPaw on the standard ACP line, without modifying the DSH core. QwenPaw still connects to @deepseek-ai/dsh-acp, requiring no private wire protocol. The companion plugin on the QwenPaw side is at BillYuan01/qwenpaw-dsh; this bridge package can be installed and verified independently.

The following introduces the plugin’s positioning, capabilities, and installation steps.

What is this

  • Name: dsh-qwenpaw-bridge (npm package name matches the repository name)
  • Maintainer: BillYuan01
  • Category: Client (classified by the community directory SkillHub)
  • Positioning: A DSH bundle plugin that provides live streaming, hot-swappable permission presets, and a model catalog delivered in one go within _meta (protocol version protocol: 1) for QwenPaw on the acp profile.

Repository and Directory Page:

  • GitHub: https://github.com/BillYuan01/dsh-qwenpaw-bridge
  • SkillHub: https://www.skillhub.cn/plugins/BillYuan01/dsh-qwenpaw-bridge

Core Features

The line remains standard ACP; other capabilities (images, tool updates, usage, config updates, MCP, resume, cancel, etc.) are forwarded as-is. The plugin mainly adds the following four types of behavior (the fail-soft column in the documentation describes the degradation methods):

1. Live streaming

Maps text-delta / reasoning-delta of agent/assistant-stream to agent_message_chunk / agent_thought_chunk via standard session/update; committed text and reasoning are deduplicated to avoid duplicate projections.

If events are missing, subscription fails, or the client chooses to disable streaming, it falls back to the stock committed projection, behaving exactly as if the bridge were not installed. Clients can actively disable it by setting initialize._meta.qwenpaw.streaming = false during initialize; "streaming": false in the response indicates the use of committed mode.

2. Permission Presets (Hot-swappable)

Exposes the preset list in _meta['qwenpaw'].permission_presets and adds a permission_mode dropdown in configOptions. Switching methods include standard ACP session/set_config_option or the extension methods qwenpaw/permission/set and qwenpaw/permission/get.

If ctx.permissionPresets is not present in the running context, the option is not exposed, and permission_mode switching is rejected (-32602) rather than silently falling back to another preset.

When creating a new session, the initial preset can be specified via params._meta.qwenpaw.permission_preset in session/new.

3. Model Catalog

Provides a list of models in _meta.qwenpaw.models within the results of initialize and session/new (and session/resume); each model may carry fields like reasoning_efforts. The number of models depends on the current LLM routing; clients should not hardcode the count but should assert that the list is non-empty, each item contains efforts, and exactly one item is default: true.

If the ctx.llm query fails, the relevant fields are omitted, and the process does not crash.

4. Tool kind Mapping (Optional)

Maps tool_call.kind to read / edit / execute / search / fetch based on the tool name; unknown names remain as other.

Environment and Dependencies

Item Requirement
Node >= 22
DSH >= 0.2.0-rc.2 < 0.3.0-0 (upper bound excludes 0.3 prereleases)
@deepseek-ai/dsh-acp Same as above, provided by the dsh-acp-app bundle
@agentclientprotocol/sdk ^1.4.0, provided by @deepseek-ai/dsh-acp
pnpm dsh plugin add calls pnpm; it must be in the PATH
Client Any ACP client; QwenPaw is the reference implementation

DSH validates the peer range before loading the plugin. If there is a version mismatch, you must explicitly exempt it using dsh plugin --profile <name> allow-version ...; bypassing validation is not recommended in production environments.

Installation and Activation

qwenpaw is not a built-in DSH profile name; you must first create it from the built-in acp template and then install the bridge package. If you directly run dsh plugin add on a brand new profile name, it will only initialize dsh-base, without the ACP app and acp-app-startup.

1. Create profile from acp template

The following command initializes the profile and exits immediately to avoid starting ACP at this moment (acp waits for stdin):

# initialize the profile and exit immediately (do not boot ACP here)
dsh --profile qwenpaw --from-default-profile acp --dump-config >/dev/null

2. Install the bridge plugin

# published package
dsh plugin --profile qwenpaw add dsh-qwenpaw-bridge

# local checkout (works before the first npm release)
dsh plugin --profile qwenpaw add /absolute/path/to/dsh-qwenpaw-bridge

dsh plugin add runs pnpm under $DSH_HOME/profiles/qwenpaw, writes package.json dependencies, and appends the bundle to dsh.profile.bundles. If pnpm is missing, the command exits with 127, and the installation is not completed.

After installation, the profile dependencies are roughly: @deepseek-ai/dsh-base, @deepseek-ai/dsh-acp-app, dsh-qwenpaw-bridge. The bundle disables the original acp line and inserts qwenpaw-bridge; acp-app-startup is retained to handle stdin EOF and --help.

3. Configure model routing

By default, ctx.agentDefaultModel is used. To fix the provider and model, merge the repository’s examples/profile/cordis.patch.yml into $DSH_HOME/profiles/qwenpaw/cordis.patch.yml, and edit the provider, models, and API key environment variables. Do not overwrite existing routing patches, and do not add a second qwenpaw-bridge line (the bundle has already inserted one). The example patch contains only llm-pi-ai and agent-default-model.

4. Startup

dsh --profile qwenpaw

Verify bundle composition

dsh --profile qwenpaw --dump-config > /tmp/qwenpaw.dump

grep -A8 -- "- id: qwenpaw-bridge" /tmp/qwenpaw.dump
grep -A12 -- "- id: acp$" /tmp/qwenpaw.dump | grep "disabled: true"
grep -A2 -- "- id: acp-app-startup" /tmp/qwenpaw.dump
grep -c -- "- id: qwenpaw-bridge" /tmp/qwenpaw.dump   # must print 1

Expected: qwenpaw-bridge appears exactly once, with name as dsh-qwenpaw-bridge; the acp line has disabled: true; acp-app-startup exists.

Usage and Protocol Notes

The _meta.qwenpaw returned by initialize contains protocol, bridge, version (matching the version in the package’s package.json), streaming, models, current_model, permission_presets, etc. session/new / session/resume repeat the same structure and resolve current_model and permission_preset per session; meanwhile, permission_mode appears in configOptions.

Hot-switch permissions (Standard ACP, no process restart required):

{"method": "session/set_config_option",
 "params": {"sessionId": "…", "configId": "permission_mode", "value": "read-only"}}

Extension method examples (The SDK automatically adds a leading underscore to the method name, e.g., _qwenpaw/permission/set):

{"method": "qwenpaw/permission/set", "params": {"sessionId": "…", "preset": "read-only"}}
{"method": "qwenpaw/permission/get", "params": {"sessionId": "…"}}
{"method": "qwenpaw/streaming/set", "params": {"enabled": false}}

Scenarios and Caveats

Suitable for scenarios requiring integration with QwenPaw (or clients compatible with _meta.qwenpaw) over Standard ACP, and wishing to have streaming output, permission presets, and model catalog provided uniformly by the DSH side. The plugin runs with the permissions of the current dsh process; please read the repository source code and the MIT license before installation, and ensure that the DSH / dsh-acp versions fall within the peer range.

The community plugin directory SkillHub is an independent site with no official affiliation with DeepSeek / High-Flyer; stars and versions are subject to the repository and npm (the current package version is 0.2.0).

Conclusion

dsh-qwenpaw-bridge consolidates the streaming, permission presets, and model catalog required by QwenPaw into the DSH bundle layer, keeping the standard line of @deepseek-ai/dsh-acp unchanged. After following the steps above to create the qwenpaw profile, install the plugin, and verify with dump-config, you can connect and verify using QwenPaw or other ACP clients.

  • Directory Page: https://www.skillhub.cn/plugins/BillYuan01/dsh-qwenpaw-bridge
  • Source Code and README: https://github.com/BillYuan01/dsh-qwenpaw-bridge
羽毛球分组比赛记分
小程序二维码

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

Xiaoye