Skip to main content

dsh-lark

39Stars8Forks9Issues1Watchers

Integrate DSH Agent into Feishu/Lark: assign tasks, view progress, and switch workspaces and models directly in chat. Questions, plans, and tool approvals are processed through interactive cards that return to the chat.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
BSD-3-Clause
Branch
main
cordisdeepseek-harnessdshdsh-pluginfeishulark

Install

cmdweb profile
$ dsh plugin --profile web add dsh-lark-channel

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 omdsh-dev/dsh-lark for me: review the repository at https://github.com/omdsh-dev/dsh-lark 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

Connect DeepSeek Harness (DSH) Agent to Feishu/Lark chat—assign tasks in chat, view thinking and tool call processes, switch workspaces and models, and handle questions/planning/approvals all within the current chat; when needed, multiple bots can also collaborate in the same group via @ handoffs.

Core Capabilities

  • Assign tasks to Agent directly in Feishu chat, with thinking process, tool calls, and results written back to chat as native thinking process messages, final answer as a separate message
  • Use /ws to list available workspaces, use /cd to switch to a specified directory—each conversation × current directory corresponds to an independent Agent session
  • Use /model card to switch the model for the current conversation (preserving context), or use one-liner /model use <provider/model> for direct switch
  • Use /new to start a fresh session in place (clearing context, preserving workspace and model), use /sessions to list resumable sessions in the current workspace and resume with one click
  • Use /permission card to select permission presets—question answering, plan confirmation, and tool approval all handled via interactive cards in chat (single select / multi-select / text)
  • File transfer: files sent by users to chat land in .dsh-lark/inbox/<timestamp>-<message-hash>/ in the workspace for Agent to read; files sent by Agent are delivered directly in private chats, but each file in group chat triggers an approval card
  • Multi-bot collaboration: dsh-lark-channel add <name> attaches a second bot instance; they hand off turns in the same group using @, default continuous bot turns limit is 6

Technical Implementation

  • Language: TypeScript (ESM, package.json:5), bundled via tsdown into lib/index.js, also provides dsh-lark-channel CLI
  • Key Dependencies: @deepseek-ai/cordis ^4.0.1 (peer dep, plugin host framework), @larksuite/channel ^0.4.1 (Feishu IM long-lived connection transport), @deepseek-ai/schemastery ^3.18.1 (config schema validation), qrcode-terminal ^0.12.0 (first-time QR scan)
  • Architecture Pattern: Cordis function-plugin form—src/index.ts exports name='lark-channel', inject=['agents'], Config Schema and apply(ctx, config); cordis.patch.yml inserts this line into DSH profile bundles, mounted by host at startup; CLI dsh-lark-channel is a separate process, uses its own provision script to write independent profile + launchd/systemd user service for single-instance bots
  • Entry Files: DSH profile entry src/runtime.ts (apply + startup guidance), CLI entry src/cli.ts (re-exports only provision.ts's main), QR scan + credential persistence see src/onboarding.ts

Use Cases

Suitable for users already running Agent in DSH and wanting to continue tasks via mobile/Feishu client: let DSH Agent advance work in Feishu private chat or group without staying at the terminal; or let multiple Agents share a set of project directories—combine workspace switching with multi-bot collaboration, let one bot make changes while another reviews. People needing instant chat distribution, file transfer, and approval retrieval will use this frequently; if you just want to run local commands or pure web UI, this plugin won't help.

Prerequisites & Compatibility

DependencyMinimum VersionNotes
DeepSeek Harness>=0.1.0-rc.6Explicitly required in README; below this version DSH can't find this plugin's bundle line
Node.js^22.19.0 || >=24.0.0package.json engines field
PlatformmacOS / Linux / WindowsCross-platform; macOS uses launchd, systemd Linux uses systemd --user, Windows / non-systemd Linux CLI degrades to foreground execution (src/provision.ts:11-14,290-296)
Feishu ClientPC 7.70 / Mobile 7.74+ (recommended)Newer client needed for thinking process rendering; older clients can set output: 'stream' to use typewriter card
Native ModulesNonePure JS/TS implementation, no node-gyp compiled modules

Installation

dsh plugin --profile web add github:omdsh-dev/dsh-lark

Alternatively, run npm i -g dsh-lark-channel + dsh-lark-channel start to generate QR code in terminal for standalone mode.

Configuration Options

ConfigTypeDescriptionDefault
appId / appSecret / appSecretRefstringFeishu app credentials; after QR scan plugin saves to host credentials/secrets service; can also provide directly via LARK_APP_ID / LARK_APP_SECRET env varsPrints QR code on first start if not set
domainURLFeishu open platform domain, Feishu default https://open.feishu.cn, Lark international use https://open.larksuite.comFeishu
cwdpathDefault workspace directory for chat AgentHost process cwd
workspaceRootsstring arrayLimits directories /cd can switch to; empty means unlimited[]
provider / modelstringModel routing used by Agent; switch per chat with /modelHost agentDefaultModel
sessionScopechat | chat-thread | chat-senderSession granularity: one per entire chat, by thread, or by senderchat
outputcot | streamThinking process format; cot uses native thinking process message, stream uses typewriter card (older clients)cot
showProcessbooleanWhether to show reasoning and tool call process in Feishutrue
attachImagesbooleanSend chat images as content blocks to model; only enable after confirming model supports visionfalse
receiveFiles / maxReceiveFileBytesboolean / bytesWhether inbound files land in workspace, per-file limittrue / 20 MiB
sendFiles / maxSendFileBytesboolean / bytesWhether Agent-initiated outbound files are allowed, per-file limittrue / 20 MiB
hideProcessWhenDonebooleanLet platform hide thinking process messages after task completion (cot only)false
syncSlashCommandsbooleanSync plugin's slash commands to Feishu / paneltrue
denyToolsstring arrayDisable certain tools on Agent side (use Agent shadow Q&A instead)[]
botPeersopen_id arrayLimit to only respond to messages from which bots[]
botHopsnumberContinuous bot turn limit; human speech resets quota6
requireMentionbooleanIn group chat, must @ to get responsetrue
senderAllowlist / groupAllowlist / approversopen_id arrayFurther restrict who can DM, which groups can be served, who can answer approvals[]
instancestringName for plugin line (multi-bot scenario); first bot must leave empty for compatibility—
chatWorkspaces / chatModels / chatEpochs / chatSessionsobjectPer-conversation state mapping (workspace, model, new session count, bound session), written back by /cd /new /model /session{}

FAQ

Q: After installation, how do I get the bot alive in Feishu?

A: After adding to DSH profile via dsh plugin --profile web add github:omdsh-dev/dsh-lark, start via dsh web; or run npm i -g dsh-lark-channel + dsh-lark-channel start, terminal prints QR code, scan with Feishu App to complete app creation. Credentials go to host secrets service, not plaintext settings.

Q: Bot only responds when @'d in group by default, how to change to passive response in group too?

A: Set requireMention to false in config and restart service. Note this is a session-level switch; who can add the bot is still determined by the Feishu app's visibility scope; changing this won't expand visibility.

Q: I switched workspace mid-way or don't want .dsh-lark in workspace git history, what to do?

A: Plugin reminds to add .dsh-lark/ to .gitignore when first file lands, but plugin itself won't modify this file. Inbound files are grouped by message, add-only no-delete (src/files.ts:42-46), cleanup is your own decision—explicit design, channel won't clean for you.

Q: Agent wants to send file back in group chat, do I have to click approval card every time?

A: Direct send in private chat, approval card pops for every file in group chat, and there's no switch to turn off group chat approval—hardcoded at source level (src/config.ts:177-180, README:159), positioned as "official backdoor for prompt injection exfiltration chain".

Q: Can I configure multiple bots to collaborate with each other?

A: Yes. dsh-lark-channel add reviewer adds a second Feishu app, forming independent profile line; after QR scan bots each have settings, credentials, and sessions. Add them to same group, use @ for turn handoff, default continuous bot turns limit is up to 9 (any human speech resets). dsh-lark-channel remove <name> can remove, name and credentials kept for next add.

Q: I want to clear context to start fresh, but keep workspace and model, how?

A: Use /new. It starts a fresh session in place, clears message history, workspace and current model stay unchanged. To fully switch context (including workspace) use /cd <new-path>.

Q: How long after modifying config options does it take effect?

A: Config is read at startup, modifications require service restart to take effect (README.md:165). On macOS it's launchctl kickstart -k, on systemd Linux systemctl --user restart dsh-lark.

Getting Started Difficulty

Beginner — enable with one DSH plugin command, or after npm i -g one start command to get started; most common "scan QR and use" path doesn't require understanding internal structure. Advanced option tuning requires understanding concepts like allowlists, session granularity, thinking process format.

Known Issues & Limitations

  • Group chat file approval count hardcoded to 3: In group chat, max 3 pending approval files can be attached simultaneously, 4th is directly rejected with prompt to wait for previous results; this limit is not configurable (README.md:161-162 / src/config.ts:179-182)
  • Group chat approval always persists, no switch: Direct send in private, approval card pops for every file in group chat (src/config.ts:177-180), source code explicitly refuses to provide off option to avoid prompt injection exfiltration chain backdoor
  • macOS / Linux behavioral difference: macOS uses launchd, systemd Linux uses systemd-user; Windows and non-systemd Linux CLI entry start degrades to foreground execution (src/provision.ts:11-14,290-296)
  • Image attachments not sent to model by default: Images sent in chat land on disk by default but not passed as visual content to model, need to confirm model supports vision then enable attachImages in config—otherwise one screenshot can drag down entire session (src/config.ts:128-143)
  • Document attachments have no online preview: pdf / xlsx / docx after upload can only be downloaded, not previewed—this is a limitation from upstream @larksuite/channel fixing ordinary files as stream type upload (README.md:163)
  • Voice messages only land on disk, no transcription: Plugin doesn't do speech recognition (README:164)
  • Outbound file paths truncated to within workspace: Any text shown to people or model only says "relative path within workspace", including send_file failure's own filesystem error line; intentional to avoid exfiltrating host page prefix during prompt injection
  • Maintenance commands queued per session: Two users clicking maintenance commands during idle time execute one queue per Agent in sequence, timeout fails (src/maintenance.ts:1-19)
  • Config changes require restart to take effect: Cordis reads config at startup, runtime changes to cordis.patch.yml won't auto-reload, need to restart host service (README.md:165)

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/omdsh-dev/dsh-lark)

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