dsh-wecom-soul-bot: Integrating WeCom smart bot into DSH with persona and long-term memory

Introduction

Building a bot that operates continuously in Enterprise WeChat typically involves setting up a custom service: handling callbacks, maintaining sessions, integrating with models, and managing memory. This logic is repetitive and error-prone, especially when deploying the bot within DeepSeek Harness (DSH) to leverage the host’s workspace capabilities and approval mechanisms. Re-implementing an access layer is not cost-effective.

dsh-wecom-soul-bot consolidates this into a DSH plugin: it integrates the smart bot into DSH using Enterprise WeChat’s official long connection (Bot ID + Secret, no public callback required), then layers on persona, sender identity, three-tier long-term memory, reminders, and proactive messages. Below is an introduction to the plugin’s positioning, capabilities, installation, and usage.

What is it

dsh-wecom-soul-bot is a DeepSeek Harness plugin maintained by FlashPoint007, categorized as “Workflow” with 0 stars on the community directory page. It solves the problem of allowing a bot within an Enterprise WeChat group to connect to DSH via a long connection and stably remember the content it is supposed to remember.

The plugin description highlights three main threads: direct dialogue in private chats, replying when mentioned in groups, and adding persona, identity tags, and long-term memory on top of this dialogue.

Core Features

Long Connection Access. Uses the official @wecom/aibot-node-sdk WebSocket long connection, eliminating the need for public callbacks. User groups, authorization, session management, and tool approval are all handled within the plugin page.

Persona. The plugin only injects the persona into the session bound to the bot; other sessions in DSH are unaffected. The default persona is “Big Fat Fish” and can be changed in the plugin page.

Sender Identity. The plugin writes a line 【对话环境】 at the beginning of every message to indicate whether it is a private or group chat, the sender’s user ID, and whether the sender is the master. Fake tags with the same name in the message content are replaced to prevent bypassing identity checks via text.

Three-Tier Long-Term Memory.

  • Working memory refers to session context.
  • Core memory does not decay and is injected every round; only the master can write to it.
  • Scenario memory decays according to a forgetting curve, with an adjustable half-life; its lifespan is extended by importance and every recall, and it is selected for injection based on topic and clarity. It can still be retrieved using wecom_memory_recall after fading.
  • Shared memory can only be written when the master chats privately; entries suspected to contain keys are strictly rejected.

Work Mode (Disabled by default). Skills and tools are only allowed when the entire message round comes from the master, intercepted by DSH’s tools.guard at the tool layer. The work rules require loading skills first, planning first, confirming before execution, and verifying after execution.

Reminders. Reminders are set, listed, and cancelled via wecom_reminder_set / wecom_reminder_list / wecom_reminder_cancel. When the time comes, the reminder is sent back to the original session in the persona’s tone. Reminders due during plugin downtime are sent after recovery; reminders older than 12 hours are invalid.

Proactive Messaging (Disabled by default). A local “dice roll” decides whether to initiate a message; it is only sent to the master via private chat and includes quiet periods, daily limits, and cooldowns. Messages are not sent if the model replies with [SKIP].

Auto-Interruption During Execution (Disabled by default). When a task is running, the master’s plain text is merged into the current turn (equivalent to /steer), while other messages continue to queue normally.

Commands. /stop, /steer, /clear, /model, /history, as well as /new, /sessions, /use, /compact, /delete, /approve, etc.

Reliable Delivery. If a send fails clearly, it is retried a maximum of 3 times; if the result is uncertain, it is not retried. In chat mode, replies completed during plugin downtime are resent once after restart.

Image Input. Images and mixed text/image messages are sent to the model, with a maximum of 4 images, each not exceeding 5 MiB.

Host Service. ctx.provide('wecomSoulBot') provides send (restricted to authorized sessions), listTargets, and describeConversation. It emits wecom-soul-bot/session-unbind and wecom-soul-bot/session-bind events when session bindings change.

Installation and Enablement

The official installation command uses the release package address rather than directly concatenating the repository name:

dsh plugin --profile desktop add https://github.com/FlashPoint007/dsh-wecom-soul-bot/releases/latest/download/dsh-wecom-soul-bot.tgz

Fill in --profile according to your actual usage: for the desktop version, it is generally desktop, and for the web version, it is web. Restart DSH after installation.

If you need to install from source, the repository does not commit dist/; you must build it before adding:

git clone https://github.com/FlashPoint007/dsh-wecom-soul-bot.git
cd dsh-wecom-soul-bot
pnpm install
pnpm run build
dsh plugin --profile desktop add <absolute path to repository>

The repository requires Node version >=22, package manager pnpm@11.22.0, and has an MIT license.

Typical Usage

According to the README, enabling the plugin consists of three steps.

1. Connection. In the plugin page “Connect”, fill in the Bot ID and Secret from the Enterprise WeChat Admin Console → Smart Bot → API Mode. The Secret is stored in the DSH credential database (key name WECOM_SOUL_BOT_SECRET) and is not written to a configuration file.

2. Authorization. Send a message to the bot (mention it in a group), and it will appear in “Pending Authorization”; add it to a group.

3. Persona and Memory. In the plugin page “Persona and Memory”, fill in the master’s user ID (leave empty to use the admin list). The README specifically warns that the user ID issued by Enterprise WeChat may be encrypted; rely on the sender ID in the plugin logs. Then, enable Work Mode, Reminders, Proactive Messaging, and Auto-Interruption as needed.

Commands related to development:

pnpm install
pnpm run verify   # build + typecheck + all tests

Applicable Scenarios and Notes

Suitable for developers or teams already using DSH who want to offload the Enterprise WeChat bot to run within DSH and retain the bot’s persona and long-term memory. The plugin runs with the permissions of the current DSH process; it is recommended to check the source code and license before installing.

There are two points to note.

1. Every message in a group chat triggers your local DSH Agent. The README suggests keeping the group chat group permission as “View Only”; tool approvals are only pushed to private chats with administrators.

2. Persona and work rules are prompts, not isolation. The true boundaries that take effect are workspace permissions, DSH approval, and the tool interception in Work Mode. Do not rely on the persona as a security boundary.

For scenarios requiring clear identity, please rely on the 【对话环境】 written by the plugin, and do not trust tags with the same name appearing in the message content.

Conclusion

The value of this plugin lies in packaging the scattered capabilities of Enterprise WeChat long connection, identity labeling, three-tier memory, and reminders into a single DSH plugin, reducing the repetitive work of building an access layer. Its capabilities are concentrated on the session bound to the bot and do not pollute other sessions in DSH. For stronger control, the Work Mode and tool approvals are still determined by the DSH side.

Directory Page: https://www.skillhub.cn/plugins/FlashPoint007/dsh-wecom-soul-bot

GitHub: https://github.com/FlashPoint007/dsh-wecom-soul-bot

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

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

Xiaoye