DeepSeek Harness plugin

DSh-feishu-bot-wangsan7

Feishu/Lark AI bot for DSH: long-connection (WebSocket) event receiving, per-chat DSH agent binding and auto-reply, workspace/session menu commands (NEW_WORKSPACE / NEW_SESSION / WORKSPACE_CHANGE /

Jump to install

Source facts

Repository
wangsan71/DSh-feishu-bot
Latest update
Aug 18, 2026
Category
Remote & Mobile
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/wangsan71/DSh-feishu-bot
Plugin: DSh-feishu-bot-wangsan7
Author: wangsan71

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer2 files
README.mdSource · read only

dsh-feishu-bot — Feishu/Lark bot plugin for DSH

Let DSH talk to you through Feishu (China) or Lark (international): the bot receives messages in a chat, hands each one to a dedicated DSH agent, and replies back in the same chat. Everything runs over the long connection (WebSocket) — no public URL, no tunnel required.

Features

  • Long-connection events: official SDK WebSocket long connection; no public

URL / frp / ngrok.

  • China and international: domain auto-detection (probes

open.feishu.cn then open.larksuite.com), or set feishu / lark manually.

  • One DSH agent per chat: each Lark chat_id gets its own agent session; the

agent has the full DSH toolset (files, shell, search, ...). Replies are capped at max_reply_chars.

  • Bot menu commands: switch/create sessions and workspaces right from the

chat (see below).

  • Beginner-friendly: a web setup page (Settings → Plugins → Feishu/Lark Bot)

with status, a developer-console QR code (scan with your phone to create the app), an AppID/Secret form, and save/refresh actions.

  • Agent tools: lark_status, lark_configure, lark_test — give this repo

URL to any DSH agent and it can configure the bot by itself.

  • Interactive card selection: the "switch session / workspace" menu items pop

a card with buttons; tap a button to switch.

  • Agent questions relayed to you: when the agent asks you something, the

question (with numbered options) is forwarded to Feishu; your reply is the answer.

  • Cross-chat notifications: any DSH conversation can call lark_notify to

push a notification to Feishu ([workspace]-[session]: [content]; target defaults to notify_chat_id, see the init doc). For shell use node scripts/send-notify.cjs --text "hi" (UTF-8 safe).

  • Send files: agents can call lark_send_file to push a local file

(≤30 MB) straight into the Feishu chat.

> 📖 Docs: [初始化文档.md](初始化文档.md) (setup from scratch) · > [交接文档.md](交接文档.md) (maintainers: architecture, official dev format, > release flow, changelog).

Install

Give this repo URL to a DSH agent, or run:

# local path (development)
dsh plugin --profile web add link:<this repo>

# GitHub URL
dsh plugin --profile web add git+https://github.com/wangsan71/DSh-feishu-bot.git

# npm (after a release — pushing a vX.Y.Z tag auto-publishes)
dsh plugin --profile web add @areoneplayer/dsh-feishu-bot

Restart dsh web after install (or follow the dsh plugin hot-mount hint). A 「Feishu/Lark Bot」page appears under Settings → Plugins.

Quick setup (three steps)

1. Create the app: scan the QR on the setup page to open the developer console (China https://open.feishu.cn / international https://open.larksuite.com), log in, create a self-built app, enable the bot capability, add scopes im:message and im:message:send_as_bot (plus im:message.group_msg for groups), and subscribe events via use long connection to receive events with 接收消息 im.message.receive_v1 (no URL needed). Copy App ID and App Secret. 2. Fill credentials: paste App ID / App Secret on the setup page (platform: auto-detect), click save and restart the bridge — or have an agent run lark_configure. 3. Verify: send a text message to the bot; you should get a reply from the DSH agent. Use lark_test to check credentials first.

Config is stored at ~/.dsh/dsh-feishu-bot.json (app_id / app_secret / domain).

Chat commands

Send these in the bot's chat (Chinese or English, optional / prefix):

CommandActionNotes
新建工作区 <path> [title] / NEW_WORKSPACEcreate and switch to a new workspacethe path must be an existing directory
新建会话 / NEW_SESSIONcreate a new session in the current workspacethe new session binds an independent agent
切换工作区 [index/path] / WORKSPACE_CHANGEswitch among already-created workspacesno arg pops a card and lists all workspaces
切换会话 [index] / CHANGE_SESSIONswitch among sessions within the current workspaceno arg pops a card and lists the current workspace's sessions
帮助 / HELPshow the command list

Each chat's current workspace/session is persisted in ~/.dsh/dsh-feishu-bot-state.json; switching to an existing session restores its conversation history.

> Switching commands with no argument send an interactive card (one button > per option); tap a button to switch, or reply with the number in the DM.

Agent questions relayed to you

When the DSH agent needs to ask you something (e.g. the ask_user_question tool), the bot forwards the question to Feishu (with numbered options). Reply in the chat and the agent continues.

Agent-driven configuration

Copy this repo URL to any DSH agent: it reads this README and runs clone/install → lark_configure (AppID/Secret) → lark_test (verify) → asks you to send a test message. Only the app-creation step stays manual in the developer console (scan-login, about two minutes).

Manual config (config file)

{
  "app_id": "cli_xxxxxxxxxxxxxxxx",
  "app_secret": "xxxxxxxx",
  "domain": "auto",
  "websocket": true,
  "cwd": "",
  "agent_preset": "",
  "max_reply_chars": 8000
}

domain: auto (default, probes both) / feishu / lark. After editing, run lark_configure or reload the plugin so the bridge reconnects with new config.

Limitations and security model

  • app_secret is stored in plaintext at ~/.dsh/dsh-feishu-bot.json (private

file in the user home, mode 0600); never expose this path to the model or logs.

  • Each chat conversation consumes API quota; the agent can run file/shell

operations as normal DSH capabilities.

  • Text messages only for inbound handling (message_type: text); the bot can

send text, interactive cards, and files (lark_send_file).

  • Mounted via cordis.patch.yml; the plugin row auto-restores after a DSH

process restart.

Development

npm run build        # tsc + tsdown → lib/
npx tsc --noEmit     # typecheck
npx vitest run       # tests

Host half lives in src/index.ts (engine/routes/tools/bridge manager), the bridge subprocess in bridge/ws-bridge.cjs, the browser setup page in src/client/index.ts.