Foreword¶
DeepSeek Harness (DSH) provides a complete set of tools, file operations, and sub-agents when running Agents locally or via a web GUI. However, the dialogue entry point is typically confined to the terminal or browser. For teams that communicate daily on Feishu (Lark), the desire to dispatch tasks to an Agent and view results from a mobile device often leads to building a custom Feishu Open Platform application: applying for the app, configuring event callbacks, finding a public network address to receive webhooks, and then manually integrating the messages into DSH. This process is lengthy, operationally costly, and prone to message loss upon process restarts.
dsh-lark-link is a community-maintained DSH client plugin that establishes a bidirectional bridge between DSH Agents and Feishu/Lark. It allows for application creation and authentication via QR code scanning. The dual persistence of an Outbox for egress messages and a Write-Ahead Log (WAL) for ingress messages minimizes the risk of message loss. Switching modes, permissions, and models is done through Feishu single-selection cards, eliminating the need to remember long command strings.
What is This¶
dsh-lark-link (npm package name dsh-lark-link, current version 0.5.2) is published by maintainer amlyczz. It is categorized as a client plugin, has 26 stars and 5 forks on GitHub, and is licensed under MIT. The plugin integrates into the DSH profile as a Cordis bundle. The bridging layer handles Feishu SDK adaptation, message ingress and egress, session management, and card interactions; the underlying layer remains the native DSH session, which can share the same chat interface, streaming output, and tool panel with the DSH Web GUI.
This is a community plugin and has no affiliation with DeepSeek, Feishu, or Lark.
SkillHub Directory Page: https://www.skillhub.cn/plugins/amlyczz/dsh-lark-link
Core Features¶
The following capabilities are grouped as documented.
Authentication and Connection¶
The /lark setup command scans a QR code to create a Feishu application, automatically subscribing to message events and requesting permissions for group chats and reactions. The README states that setup can be completed in approximately 30 seconds. Alternatively, credentials can be provided manually via environment variables DSH_LARK_APP_ID and DSH_LARK_SECRET. Credentials are stored in the DSH credentials service and not in plain configuration files.
The connection side features probe-driven controlled reconnection, a QuotaGovernor circuit breaker (which automatically disables and reconnects after the quota window expires), compensation for disconnections, and automatic avoidance of environment proxies.
Egress Zero-Loss (Outbox)¶
Egress messages are routed through a persistent Outbox: using JSONL storage, at-least-once delivery, idempotent keys, parallel lanes, and non-blocking dequeueing of failed entries (which do not block the entire queue), with periodic cleanup. Unsent replies are automatically redelivered after the process is killed, the plugin is hot-reloaded, or dsh is restarted. Replies to bridge commands also go through the Outbox.
Inbound Request Redelivery (Inbound WAL)¶
If the plugin or DSH crashes while the Agent is processing a user message, the restarted instance will reconcile via the WAL and re-trigger that user message instead of silently discarding it. There is a count limit and time window to prevent infinite loops; /status shows the number of pending redeliveries.
Multi-Mode Agent and Permissions¶
Supports presets like standard, code, minimal, cordis, as well as GUI-created presets. Sending /mode in Feishu brings up a single-selection card for switching, with code (multi-step tool call in one execution) as the default. The /permission card switches between Read-only, Workspace Write, and Full Access, with danger-full-access as the default.
Card-Based Commands and Native DSH Commands¶
/model, /mode, and /permission are all single-button cards, with model lists grouped by provider. /goal can initiate a long-task loop in Feishu, supporting pause, resume, and clear. /new, /resume, and /workspace manage sessions and workspaces. /doctor generates a ZIP diagnostic package (session log, redacted config, ISSUE.md template). /lark-config key=value hot-modifies and persists configuration.
Command routing rules: Bridge-specific commands are handled by the bridge; DSH-registered commands (e.g., /compact) are executed natively; /goal, unknown /xxx, and plain text are injected directly into the Agent. Skills require no prefix; simply describe the task. When a model asks a question via ask_user_question, it is converted into a Feishu intent confirmation card (options, multiple selections, custom input).
Multimedia Ingress and Egress¶
Ingress: Feishu images are stored as attachments for vision models to read; files undergo bounded text extraction and are written into the prompt. Egress: The model can send back local images or files via lark_send_local_file (subject to workspace whitelist, size validation, and automatic format downgrade).
Display and Interaction¶
Replies automatically detect and use CardKit card rendering (titles, lists, code blocks, tables) for complex Markdown content, while plain text is sent as text messages. /lark-config streaming.enabled=true can hot-enable CardKit schema 2.0 streaming card character-by-character output, which is disabled by default. Upon receiving a message, a random reaction is sent, and a DONE-type emoji is added upon completion (only using emojis verified to work on Feishu).
Web GUI Reuse and Session Isolation¶
Each Feishu session corresponds to an independent Agent instance, with workspace, model, and mode persisted per session. /resume uses a minimalist card to restore historical sessions, supporting selection by click, number, or ID prefix, and extracts the session’s true title to mitigate live session conflicts across restarts. Bridged sessions are automatically assigned to the appropriate workspace, and the web panel can view the Outbox and redelivery counts.
Access Control¶
allowlist restricts the open_ids that can initiate conversations; groupPolicy controls group chat triggering strategy (open - no @ required, mention, keywords, reply); denyList can reject by command prefix. The default is groupPolicy=open, allowing direct speech in group chats to trigger the Agent.
Installation and Enablement¶
Prerequisites: Node.js ≥ 24, and DeepSeek Harness installed globally (npm i -g @deepseek-ai/dsh).
Install via the official DSH dsh plugin mechanism. The package is distributed as a bundle and merges into the profile’s dsh.profile.bundles layer upon installation:
dsh plugin --profile web add dsh-lark-link@latest --ignore-scripts
The --ignore-scripts flag is used to skip the postinstall script of the Feishu SDK’s transitive dependency protobufjs, avoiding a non-zero exit code under pnpm 11’s security policy; it can be omitted if the environment has globally allowed such scripts. --profile web specifies installation to the web profile; when sharing the same profile with the GUI, use web.
Upgrade example:
dsh plugin --profile web update dsh-lark-link --latest --ignore-scripts
If the dist-tags.latest in the registry is not refreshed, causing an “Already up to date” error, you can first check the official source version and then install explicitly:
npm view dsh-lark-link versions --registry https://registry.npmjs.org
dsh plugin --profile web add dsh-lark-link@<new-version> --ignore-scripts
Restart dsh web after installation for changes to take effect. Start the bridge:
dsh web
In the GUI input box or terminal, execute:
/lark setup # Scan QR to create Feishu app, panel displays QR code
/lark start # Start the bridge
Search for the bot in Feishu and send any message. Receiving a reaction and a full reply indicates end-to-end connectivity.
DSH-side lifecycle commands:
/lark setup
/lark start|stop|restart|status
/lark uninstall-clean # Clears credentials and state directory
Typical Usage¶
Switching Mode and Model: Send /mode or /model in Feishu and click the card option; no need to manually type the preset or model ID.
Long Task: /goal Summarize this week's meeting minutes and save to workspace starts autonomous execution. Pause or resume with /goal pause or /goal resume. End or abandon with /goal clear.
Session and Workspace: /new creates a new session in the current workspace. /resume selects a historical session from a card. /workspace /path/to/project changes the workspace root directory.
Hot-Modify Group Chat Strategy:
/lark-config groupPolicy=mention
/lark-config streaming.enabled=true
/lark-config agentPreset=standard
Troubleshooting: Send /doctor in Feishu to get a ZIP diagnostic package, or /status to view connection, Outbox, redelivery, and session health.
Sending Images or Files: Send directly in Feishu. Images go to the vision model; files are text-extracted and fed into the Agent context.
Common Configuration Items¶
All of the following can be hot-modified via /lark-config, taking effect immediately and persisting:
| Config Key | Default | Description |
|---|---|---|
groupPolicy |
open |
Group chat trigger: open / mention / keywords / reply |
groupKeywords |
["lark","bot"] |
Trigger words for keywords mode |
agentPreset |
code |
Agent preset |
permissionMode |
danger-full-access |
Permission mode |
streaming.enabled |
false |
CardKit streaming cards |
reactions.enabled |
true |
Reaction acknowledgements |
allowlist |
[] |
Allowlist of open_ids; empty means no restriction |
denyList |
[] |
Denylist of command prefixes |
workspaceRoot |
empty | Workspace root for bridged sessions; empty defaults to process.cwd() |
attachments.retentionHours |
168 |
Retention hours for inbound media; 0 for permanent |
attachments.dir |
empty | Override directory for inbound media; empty defaults to system tmpdir |
Use Cases and Considerations¶
This plugin is suitable for teams or individuals already using DSH who wish to move the Agent entry point to Feishu (especially mobile). Developers can ask code questions in a group chat, operations staff can receive /status health information, and managers can drive long tasks with /goal, all without being tied to a terminal.
Before installation, it is recommended to read the source code on GitHub and the MIT license. The plugin runs with the current dsh process permissions, defaulting to Full Access (sandbox full access, approval: never). In production environments, the scope should be tightened using allowlist, groupPolicy, and permissionMode. The plugin status is beta; CI runs type checking, 264 tests, and builds on push/PR.
Links¶
- SkillHub Directory: https://www.skillhub.cn/plugins/amlyczz/dsh-lark-link
- GitHub: https://github.com/amlyczz/dsh-lark-link
- npm: https://www.npmjs.com/package/dsh-lark-link