Preface

DeepSeek Harness (DSH) places many capabilities into plugins, but a common bottleneck remains in the session channel: while the Agent works in the Web interface, how text, images, and files received by a WeCom AI Bot can enter the same Harness session, and how approvals, files, and access policies continue to be handled, still require a separate integration layer.

sliverp/DeepSeek-harness-wecom serves this channel bridge: it uses the official @wecom/aibot-node-sdk long connection to bring WeCom AI Bot text, image, and file messages into DeepSeek Harness, while preserving persistent sessions, approvals, file path restrictions, and access control. Below we cover installation, configuration, usage, and important considerations.

What This Is

This is a standalone DSH channel plugin used to enable WeCom AI Bot as a text, image, and file channel for DeepSeek Harness. The repository path is sliverp/DeepSeek-harness-wecom, the license is MIT, and the version reported in package.json is 0.1.5.

It primarily addresses three types of issues:

  • Allow text messages from WeCom one-on-one chats and group chats to enter the Harness session.
  • Allow images and files to be used by the Harness Agent’s tool system, rather than remaining only as chat messages.
  • Maintain tool, prompt, and skills combinations similar to the Web session, with support for approvals, session rotation, and access policies.

It is not an official app store application for DeepSeek Harness but a standalone plugin in the community directory. The directory page and repository address are provided at the end.

Core Features

Sessions and Messages

  • Uses the official @wecom/aibot-node-sdk long connection.
  • Supports Bot ID + Secret authentication, heartbeat, and reconnection handling.
  • Supports text messages in WeCom one-on-one chats and group chats.
  • Each one-on-one chat or group chat corresponds to a persistent Harness session.
  • Supports Harness agent-preset combinations, keeping tools and skills aligned with the Web session.
  • If the same active session is already open on the Web, the WeCom side can reuse that session without opening a second session writer.

Images and Files

  • Supports mixed text and image input.
  • Supports official encrypted image, file, and video downloads with AES decryption.
  • Supports Durable Harness image attachments.
  • Decrypted inbound files are stored outside the workspace and exposed to Agent tools via absolute paths.
  • Automatically degrades to text-only processing when the selected model cannot accept images.
  • Supports text and inline image replies, as well as proactive sending after uploading other image formats.
  • Provides the wecom_send_file tool available within the current WeCom turn, with workspace boundary and file size checks.

Commands and Approvals

  • Supports WeCom Markdown replies via official stream response fields.
  • Supports one-time tool approvals within the same session using /approve <code> and /reject <code>.
  • Supports /new and /reset to switch to a new persistent session while preserving old history.
  • Supports forwarding Harness commands registered by the current agent preset; /compact, /goal, and /plan are enabled by default.
  • Provides channel commands such as /bot-ping, /bot-image-test, /bot-file-test, /bot-help, /bot-status, and /bot-cancel.
  • Supports an optional welcome message under the WeCom enter_chat event.

Access and Stability

  • Provides open, allowlist, or disabled access policies for one-on-one chat and group chat traffic.
  • Supports sequential session processing, deduplication, retries, and bounded timeouts.
  • Secrets are resolved through the Harness credential service rather than being placed only in plugin configuration.
  • If the Bot ID or Secret is not configured, the channel remains dormant, and DSH itself can still complete startup.

Installation and Enabling

Prerequisites

The plugin requires:

  • Node.js 22.19 or higher.
  • pnpm 10.33.4.
  • DeepSeek Harness 0.1.0-rc.7 or higher.
  • A WeCom AI Bot with long connections enabled, along with a Bot ID and Secret.

Installing the Plugin

Install from GitHub:

pnpm dsh plugin --profile web add github:sliverp/DeepSeek-harness-wecom

If using a local checkout:

pnpm dsh plugin --profile web add /absolute/path/to/DeepSeek-harness-wecom

Installation does not require immediate credential configuration. If the Bot ID is empty, or the referenced Secret does not exist or is empty, the channel remains inactive and DSH will still complete startup. Afterwards, configure the credentials and reload or restart DSH before connecting to WeCom.

Configuring Credentials

For the development environment, you can start with environment variables:

export WECOM_BOT_ID='your-bot-id'
export WECOM_BOT_SECRET='your-bot-secret'
pnpm dsh --profile web

For persistent configuration, place WECOM_BOT_ID in ~/.dsh/.env and save WECOM_BOT_SECRET via the Harness credential settings surface. Do not commit WECOM_BOT_ID or WECOM_BOT_SECRET to the repository.

If the credentials are non-empty but invalid, the channel typically just goes offline without causing the entire DSH startup to fail.

Typical Usage

Handling Tool Approvals in a WeCom Session

When Harness requires tool approval, the plugin sends the approval request back to the originating session. You can reply within the same WeCom session:

/approve <code>

Or reject it:

/reject <code>

Such codes are for one-time tool approvals and are bound to the originating session.

Switching Persistent Sessions

To change context, use:

/new

Or:

/reset

These two commands cause the plugin to request cancellation of the current generation and switch to a new persistent session. The old session history is preserved.

Controlling Image Input

The plugin supports controlling image processing via imageInputMode, with the following options:

  • auto
  • always
  • never

auto is suitable for most cases: models with image capabilities receive image attachments, while models without such capabilities degrade to text-only information. always is only suitable for scenarios where the routing is confirmed to accept images, while never forces the text fallback.

Viewing Channel Commands

In WeCom, send:

/help

Or:

/bot-help

This lists the currently available channel commands.

Adjusting Policies and Connection Behavior

Plugin behavior can be overridden in:

~/.dsh/profiles/web/cordis.patch.yml

to adjust policies or connection behavior. The following configuration items are commonly involved:

singleAllowFrom
groupAllowFrom
imageInputMode
inboundFileDirectory
maxInboundFileBytes
maxOutboundFileBytes
approvalTimeoutMs
responseTimeoutMs
maxReplyBytes

A few constraints that require special attention:

  • If the workspace contains non-public data, the allowlist policy should be used.
  • /permission is only enabled under strict singleAllowFrom and groupAllowFrom policies.
  • /export depends on Web download-side capabilities and is unavailable in the WeCom channel.
  • approvalTimeoutMs must be less than responseTimeoutMs.
  • maxInboundFileBytes and maxOutboundFileBytes both default to 20971520 bytes, i.e., 20 MiB.
  • maxReplyBytes defaults to 20000 bytes.

Inbound files are stored under inboundFileDirectory with owner-only permissions. The default directory may be located under the operating system’s temporary directory; if files need to be retained, do not rely on the default temporary directory location.

Applicable Scenarios and Considerations

This plugin is suitable for the following scenarios:

  • You already have DeepSeek Harness sessions and want to continue using them in the WeCom AI Bot.
  • You need to process text, images, and files in one-on-one chats or group chats.
  • You need to integrate Harness tool approvals into chat sessions.
  • You need access control, session rotation, and file size limits for WeCom traffic.

Before use, note:

  • The plugin runs with the privileges of the current dsh process; review the source code and license before installation.
  • wecom_send_file is activated only within the current WeCom turn, and paths must reside within cwd.
  • After WeCom messages enter, the model, tools, and file access remain constrained by the current Harness configuration.
  • The community directory page is not the official app store for DeepSeek Harness; treat installation as a regular third-party plugin.

References

  • Directory page: https://www.skillhub.cn/plugins/sliverp/DeepSeek-harness-wecom
  • GitHub repository: https://github.com/sliverp/DeepSeek-harness-wecom