Skip to main content

ax-feishu-bridge

34Stars18Forks6Issues0Watchers

Chat-driven native DeepSeek Harness for Feishu/Lark: create bots via QR code, private chats/groups/topics maintain separate conversations, streaming card responses support images, text, and group policies.

Evidence4/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
Branch
main
chatbotcordisdshdsh-pluginfeishularkpi-plugin

Install

cmdweb profile
$ dsh plugin --profile web add ax-feishu-bridge

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin AX1202/ax-feishu-bridge for me: review the repository at https://github.com/AX1202/ax-feishu-bridge first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

Chat directly in Feishu/Lark to drive your local DeepSeek Harness: scan to create a bot, private chats/groups/group topics each maintain independent sessions, the bot replies with streaming cards, supporting images, code files, and group policy configuration.

Core Features

  • Create Feishu/Lark self-built bots via terminal QR code scan, no manual App ID/Secret entry needed
  • Private chats, group chats, and group topics each bind to independent DSH sessions without interference
  • Group chats support two trigger strategies: open (replies without @) and mention (triggers only on @ / keywords / replies)
  • Supports image (png/jpg/webp/gif) and common code/text attachment input; recognition capability depends on the selected model
  • Immediately shows "Replying..." card upon receiving messages, with streaming typing in the same card, can be stopped mid-way
  • Switch sessions/models/thinking intensity/workspace via /new /resume /model /thinking /workspace /status /stop /config in Feishu
  • Parse Feishu interactive alert cards, bring the original message to the model when replying/quoting

Technical Implementation

  • Language: TypeScript
  • Key Dependencies: @larksuiteoapi/node-sdk (Feishu official SDK), @deepseek-ai/dsh-attachment-local (local image storage), @deepseek-ai/cordis (DSH host framework)
  • Architecture Pattern: Cordis plugin injection; DSH end registers feishu-harness plugin via cordis.patch.yml, host calls apply(ctx) on startup, uses ctx.effect to start/stop WebSocket transport; injects into Pi end via extension mechanism of @earendil-works/pi-coding-agent (same npm package, two adapters, completely independent configuration)
  • Entry Files: DSH entry src/adapters/harness/index.ts, Pi entry src/adapters/pi/index.ts, public logic in src/feishu/

Use Cases

You frequently use Feishu/Lark for work and want your local DSH to help with code, documents, and debugging tasks anytime. This plugin lets you collaborate with DSH without leaving the chat window: private one-on-one continuous conversations, having the bot take tasks in groups according to strategy, throwing alert cards to the bot in alert groups for model analysis. More natural than opening a separate terminal interaction, and easier to share the same session context with colleagues.

Prerequisites & Compatibility

DependencyMin VersionDescription
DeepSeek Harness0.1.0-rc.6+peerDependencies declares dsh-agent/dsh-agent-presets/dsh-llm/dsh-session/dsh-session-query all as ^0.1.0-rc.6
Cordis^4.0.1peerDependencies declares @deepseek-ai/cordis ^4.0.1
Node^22.19.0 or >=24.0.0engines.node field
PlatformCross-platformNo os/cpu restrictions in source code; only Pi adapter requires separate Git Bash configuration on Windows (DSH adapter unaffected)
Native ModulesNoneAll pure JS/TS dependencies

Installation

dsh plugin --profile web add github:AX1202/ax-feishu-bridge

Configuration Options

DSH default config is stored in ~/.dsh/feishu/config.harness.json. If no config is detected on first startup, it automatically enters terminal config wizard (QR code scan recommended, can also manually fill). All config items can also be set via environment variables with HARNESS_ prefix (environment variable > config.json > default value).

ConfigTypeDescriptionDefault
appId / appSecretstringFeishu/Lark app credentialsGenerated by config wizard
domainfeishu / larkApp region (China Feishu / International Lark)feishu
groupPolicyopen / mentionGroup chat trigger strategyopen
groupKeywordsstring arrayGroup keyword triggers (comma/semicolon separated), no @ needed when matched[]
groupAlsoOnReplybooleanAlso trigger when replying to bot messages, no @ neededfalse
ignoreBotMessagesbooleanWhether to ignore other bot messagestrue
cardActionModewebhook / wsCard button callback channelwebhook
cardActionWebhookHoststringCard callback listening address0.0.0.0
cardActionWebhookPortintegerCard callback port (DSH default 3002)3002
cardActionWebhookPathstringCard callback path/webhook/card
languagezh / enPrompt languagezh
reactEmojistringEmoji response on message receiptGet
autoStartbooleanWhether to automatically connect to Feishu on DSH startuptrue
parseInteractiveCardsbooleanWhether to convert Feishu alert cards to readable text for the modeltrue
includeQuotedMessagebooleanWhether to include original message content when replying/quotingtrue
quotedMessageMaxCharsintegerMax characters to include from quoted message8000
promptNotifySecintegerSend "still processing" reminder in Feishu after this many seconds for long tasks; 0 to disable180
promptTimeoutSecintegerTask hard timeout in seconds; 0 means never timeout0
sendMaxRetriesintegerRetry count when Feishu API has temporary failures2
streamingReplybooleanEnable CardKit single-card streaming replytrue
streamPrintFrequencyMsintegerRefresh interval for streaming character-by-character display (ms)50
streamPrintStepintegerCharacters to display per update1
streamPushIntervalMsintegerInterval to push latest content to Feishu (ms)120

Hot-reload whitelist (takes effect immediately when sending /config in private chat with the bot): groupPolicy / groupKeywords / groupAlsoOnReply / ignoreBotMessages / reactEmoji / language / streamingReply / streamPrintFrequencyMs / streamPrintStep / streamPushIntervalMs.

FAQ

Q: Why isn't the bot replying?

A: Check three things in order: 1) Is the Feishu bot created and configured? (/feishu status shows App ID and connection status); 2) Is the plugin loaded with DSH (default autoStart=true, changes take effect after next startup if disabled); 3) Does the group strategy require @ the bot (with mention strategy, no @ means no reply).

Q: I sent a message in a group but the bot ignored me, how to fix?

A: Check the strategy: mention requires @-ing the bot to reply (can combine with keyword triggers or reply to bot messages for follow-up); with open strategy, direct replies in group/topic work, but ensure "Get all messages in group" or "Get messages from users and bots in group" permission is enabled in Feishu developer后台.

Q: Can I install Feishu plugins for both DSH and Pi together?

A: Yes. Configs are stored separately at ~/.dsh/feishu/config.harness.json and ~/.pi/agent/feishu/config.pi.json, they don't affect each other; connection locks are distinguished by appId, multiple processes with the same appId only have one holder; card callback ports use 3001 for Pi and 3002 for DSH, out-of-the-box separation.

Q: Can the bot recognize images I send?

A: Depends on two things: 1) Whether the model selected in the current session supports image input; 2) Whether the Harness host provides image attachment service. This plugin registers local storage to ~/.dsh/attachments when host doesn't mount (degrades to text-only on mount failure). Only supports png/jpg/webp/gif.

Q: Can /workspace use relative paths?

A: No. Source code explicitly validates: only accepts absolute paths or paths starting with ~/, relative paths directly error out.

Q: Will long-running tests/builds be marked as failed?

A: Not by default. With promptNotifySec=180, after 180 seconds it only sends one "still processing" reminder in Feishu, the reply card stays "replying", and completes with normal result delivery; only when explicitly setting promptTimeoutSec>0 will it hard timeout and report failure.

Q: How to reset config but keep session history?

A: Run /feishu reset confirm in DSH — it deletes config like config.harness.json and session mappings, but does not delete any session history content; next startup will re-enter config wizard.

Ease of Use

Beginner — After installation, first launch enters config wizard, complete via QR code scan; no required parameters or command-line operations needed to start chatting in Feishu.

Known Issues & Limitations

  • DSH platform limitation: In a blank brand new session, commands like /feishu setup don't render command history; need to send a normal message in that session first before executing commands; the setup wizard itself is unaffected (Q&A and QR code still work in terminal).
  • Image input depends on host attachment service: When host doesn't mount, plugin mounts its own local storage (stored in ~/.dsh/attachments), if mount fails image input will be unavailable and prompt for text-only downgrade.
  • Image formats only support png/jpg/webp/gif, other formats are rejected with prompt.
  • /workspace only supports absolute paths or paths starting with ~/, relative paths directly error out.
  • When multiple processes start concurrently with the same appId Feishu bot, only one process can get the connection lock (/feishu status shows owned by another process), other processes don't start connection.

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/AX1202/ax-feishu-bridge)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory