DeepSeek Harness (DSH) uses a pluggable architecture. When running multi-turn agent sessions, tasks may stop in the background (completion, errors, pending approval, etc.), and manual monitoring is time-consuming and prone to oversights. dsh-message-push is a Cordis plugin that pushes messages to platforms such as QQ, Telegram, Feishu, or WeChat when a session stops.

This plugin is maintained by DNAlec and is released under the MIT License. It is a pure “push layer” that is only responsible for notifications and does not participate in approval decisions or inject inbound messages. It also provides a ctx.messagePush API for other plugins, allowing them to reuse the same channel and deduplication logic.

Installation and Enabling

Installing this plugin requires a pnpm environment. After installation, dsh web must be restarted for the “Message Push” entry to appear on the settings page.

dsh plugin --profile web add github:DNAlec/dsh-message-push

Core Features

The plugin supports triggering pushes in the following scenarios:

  • Task completed
  • Task interrupted
  • Task blocked
  • Task errored (with error details)
  • Length limit reached
  • Approval required
  • Response required

Each push includes the session name, a preview of the last reply, and a link to open the web interface to handle it. The plugin has a built-in deduplication mechanism; events of the same type for the same session within the same time window are merged into a single notification.

Configuration and Usage

  1. Open settings: Go to Settings → Message Push.
  2. Connect a channel: At least one channel must be enabled + target bound + connected.
    • QQ: Supports creating a bot via QR code, or manually entering AppID / AppSecret.
    • Telegram: Enter the bot token.
    • Feishu: Enter the Open Platform App ID / Secret.
    • WeChat: Supports QR code login (official iLink, private chat only; a dedicated secondary account is recommended).
  3. Bind a target: This plugin is designed as a private bot. If no target is bound, privately message the bot from your phone and reply yes or confirm; that chat will be set as the push target.
  4. Send a test: Click “Send test push” to confirm the channel is working.

Other plugins can directly call the ctx.messagePush API:

const push = ctx.get('messagePush');
push.notify({
    kind: 'needs-approval',
    sessionId: '...',
    title: '修复推送插件',
    body: '需要批准:删除 3 个文件'
});

Architecture and Dependencies

  • Configuration files: Located in ~/.dsh/message-push/ (permissions 0600).
  • Dependencies:
    • Required: pnpm.
    • Optional:
      • @tencent-connect/qqbot-connector: Dependency for the QQ channel.
      • @larksuiteoapi/node-sdk: Dependency for the Feishu channel.
      • qrcode: Dependency for QR code features.

The plugin is implemented in pure JavaScript, with zero @deepseek-ai/* dependencies. It only uses Cordis-injected names (such as timer) and the runtime’s built-in fetch / WebSocket.

Notes

  • Push-layer scope: The plugin is only responsible for notifications. It does not make approval decisions, reply in chat, or inject inbound messages into agent sessions.
  • Private bot design: A push target must be bound by replying yes. Do not expose the bot to an environment where strangers can send private messages. For QQ group chats, @ the bot and enter the speaker’s userId in settings.