dsh-feishu-assistant: DSH Ops Request Channel in Feishu Direct Messages

Introduction

When running agents in DSH, tools, MCPs, and personas are typically bound to your own web session. When colleagues need to check logs, modify configurations, or ask about release status, they often have to ask you to do it for them in the interface, or each set up their own entry point. If DSH is exposed directly to the public internet, approval and permissions become hard to control.

Below is the community plugin dsh-feishu-assistant (maintainer wanjiaju3108): colleagues submit requests by direct messaging the bot in Feishu, and after you approve on the approval card, the specified DSH session executes with the tools and persona from its profile, and results return to Feishu as cards. Events are received via long-lived connection, no public webhook entry needed.

What Is This

dsh-feishu-assistant is a Web platform plugin for DeepSeek Harness (DSH), categorized as workflow. Current version 0.2.0 (MIT license), requires DSH 0.1.7-rc.1 or above; Node ≥ 22.

In one sentence: an operations request channel for colleagues—you only keep approval rights, execution is handed to the same shared DSH session; consistent messaging, serial queuing, answers displayed as Markdown cards in Feishu.

Not suitable for: scenarios where each colleague wants their own independent session with separate context accumulation (that would be a per-user IM bridge, not this plugin).

Core Features

Routing and Approval

  • Colleagues submit a request via Feishu direct message; non-admin messages first go to an approval card, and only when an admin clicks “Approve” does it enter the request queue; “Reject” returns a receipt. Up to 20 pending approvals; when sending the card, in-app urgent delivery can be enabled, and if not processed within 5 minutes, SMS urgent delivery can be triggered (requires corresponding permissions); requests expire and are voided after 15 minutes with notification.
  • Admins are bound via an 8-digit pairing code (sent as a direct message to the bot, valid for 10 minutes, single-use); the sender’s open_id is stored. Admin messages go directly into the queue.
  • Approval card callbacks verify the clicker’s identity; non-admins cannot click on behalf of others.

Serial Execution and Shared Session

  • Request queue is FIFO: the next request is only injected after the previous complete turn/end.
  • Wait for target session to be idle before injection: avoids interleaving with your turns in the Web UI; during waiting, the requester’s card shows “Processing”.
  • Feishu long-lived connections may deliver duplicates; the plugin deduplicates by message_id (last 200), duplicates are only logged, answered once.

Answers and Writeback

  • Text direct messages do not render Markdown, so answers use cards: first send “Processing”, then consume submitted assistant/message per step, using cardkit to replace the entire card body; auto-paginates when approaching the 24 KB limit. Without cardkit:card:write, falls back to “one regular card per segment”.
  • Admin direct requests first reply with “Processing”; if the entire turn produces no output, the failure reason is explained.
  • If the target session is continued by you in the interface (not initiated by Feishu), the plugin still pushes that turn’s answer via direct message to the admin.
  • After a non-admin’s full turn completes, the original message and answer are merged and forwarded to the admin (requires im:message:send_as_bot and related permissions).

Persona and Permissions

  • Upload local md/txt as persona in the settings page (max 64 KB); if not uploaded, “Feishu AI Assistant Mode” is not enabled, and Feishu messages are not processed (admins receive guidance, others are silent).
  • The persona overrides the target session’s personal settings; modifying the original file requires re-upload.
  • Feishu-side execution is unattended, DSH permission approval is fail-close; the session and general settings must be set to full permissions, and admins must be properly bound (the bot has full permissions equivalent to the local machine).

WeCom Reminders (Optional)

When non-admin requests complete with output, reminders can be sent to WeCom (send-only, no webhook). Requires WeCom CorpID, AgentId, recipient UserId, and Secret; WeCom-side trusted domain / trusted IP prerequisites must be satisfied independently.

Installation and Activation

Install in the web profile (command from official README):

dsh plugin --profile web add dsh-feishu-assistant

After installation, restart dsh web.

If DSH is still 0.1.5, install the last compatible version:

dsh plugin --profile web add dsh-feishu-assistant@0.1.4

If you get ERR_PNPM_IGNORED_BUILDS: protobufjs at the end, the plugin may not have been registered in the profile. Add the build to the profile’s pnpm-workspace.yaml and install again:

# ~/.dsh/profiles/<profile>/pnpm-workspace.yaml
allowBuilds:
  protobufjs: true

Plugin directory page: skillhub.cn/plugins/wanjiaju3108/dsh-feishu-assistant. Source code: github.com/wanjiaju3108/dsh-feishu-assistant.

Typical Usage: From Zero to Chatting

1. Create Application in Feishu Open Platform

  1. Open Feishu Open Platform, create an Enterprise Self-Built App.
  2. Record App ID and App Secret in “Credentials & Basic Info”.
  3. Enable Bot in “Add App Capability”.
  4. In “Permission Management”, add at least the seven permissions listed in the README as needed (receive direct messages, send messages as bot, card writing, contacts/user basic info, in-app and SMS urgent delivery, etc.); to display names on cards, also configure the contacts data permission scope.
  5. In “Events & Callbacks”, select Long-lived Connection as the subscription method, add event im.message.receive_v1 and callback card.action.trigger.
  6. Create a version and publish; after enterprise admin approval, it takes effect for users.

2. Configure in DSH

Open Settings → Feishu AI Assistant:

Item Description
App ID / App Secret Write to $DSH_HOME/.credentials.yaml (reference names FEISHU_ASSISTANT_APP_ID / FEISHU_ASSISTANT_APP_SECRET)
Target Session Recommend creating a dedicated session; select from dropdown after logs exist
Persona File Upload md/txt, otherwise mode is not enabled
Admins Generate pairing code, send via direct message to the bot to complete binding

Permission order: First set Settings → General → Permissions to full permissions, then create the target session; for existing sessions, run /permission within the session to set full permissions.

3. Verification

Send a message via Feishu direct message to the bot. Admin messages go directly to the queue; others first receive the approval flow. The “Status” section in the settings page shows the long-lived connection, target session, and persona status.

The patch layer can also pre-configure (excerpt):

- id: feishu-assistant
  name: dsh-feishu-assistant
  config:
    sessionId: ''
    managerId: ''
    persona: ''
    personaName: ''
    wecomEnabled: false

Settings page changes take effect immediately (applies: 'live'), no restart needed.

Use Cases and Notes

Who It’s For

  • Small teams wanting to hand off “check configs, view logs, ask about releases” from IM to DSH in one sentence, without giving each person a separate session or public entry point.
  • Need unified persona and toolchain, and accept single-session serial execution (to avoid multiple people acting on the same environment simultaneously).

Must Be Aware

  • The plugin runs with the current dsh process permissions locally; with full permissions enabled, operations through the bot are equivalent to DSH on that machine. Before installing, read the source code and MIT license to confirm credentials and admin binding policy are acceptable.
  • Only processes direct text messages; group chats, images, files, rich text, voice, etc. are not processed (see README “Known Boundaries” for details).
  • The DSH ecosystem is “everything is a plugin”; SkillHub and similar are community directories, with no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-feishu-assistant turns Feishu direct messages into a controlled DSH entry point: pairing codes define admins, approval cards define release, serial queue defines pace, results return to colleagues’ Feishu as cards. For installation details and boundary descriptions, refer to the repository README.

  • Directory page: https://www.skillhub.cn/plugins/wanjiaju3108/dsh-feishu-assistant
  • GitHub: https://github.com/wanjiaju3108/dsh-feishu-assistant
羽毛球分组比赛记分
小程序二维码

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

Xiaoye