rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:0x0101010/dsh-feishu
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
中文 | English
A Feishu (Lark) long-connection channel plugin for DeepSeek Harness (dsh): bridges a dsh agent to a Feishu bot, so you can dispatch tasks, receive results, and approve permissions right in chat.
Zero npm dependencies — built on Node >= 22's native WebSocket plus a hand-written protobuf Frame codec (field numbers match the official oapi-sdk-go WS module). The whole plugin is a single index.js.
callback/ws/endpoint) — no public IP, no port forwarding, no callback server neededy/n; the card updates in place once handled/stop is the hard interrupt/mode switches agent presets (minimal / standard / PTC / creative), orthogonal to permission presets/permission /plan /compact /goal /export …) work in chatnpx @deepseek-ai/dsh)im:message (send/receive), etc.npx @deepseek-ai/dsh plugin --profile feishu add /path/to/dsh-feishu
Credentials never go into config files — they come from environment variables (put them in the profile's .env, or global ~/.dsh/.env):
FEISHU_APP_ID=cli_xxxxxxxx
FEISHU_APP_SECRET=xxxxxxxx
# optional: agent working directory
DSH_FEISHU_CWD=/your/workspace
Verify the composed config and start:
npx @deepseek-ai/dsh --profile feishu --dump-config # verify
npx @deepseek-ai/dsh --profile feishu # start
cordis.patch.yml)| Key | Default | Description |
|---|---|---|
appId |
required | Feishu App ID (FEISHU_APP_ID) |
appSecret |
required | Feishu App Secret (FEISHU_APP_SECRET) |
domain |
https://open.feishu.cn |
API domain; use https://open.larksuite.com for the international version |
cwd |
process.cwd() |
Agent working directory |
allowUsers |
[] |
open_id allowlist; empty = no restriction — set this in production |
allowChats |
[] |
chat_id allowlist; empty = no restriction |
sessionTimeoutMs |
1800000 |
Idle session recycle timeout |
defaultMode |
standard |
Default agent preset for new sessions |
modeAliases |
see patch | Mode aliases (defaults include Chinese aliases) |
Security note: when
allowUsers/allowChatsare empty, anyone who can talk to the bot can drive your agent (executing tasks on your machine). Configure them before sharing publicly.
| Command | Args | Behavior |
|---|---|---|
/new |
— | Dispose the current session: context cleared, agent destroyed, next message gets a brand-new agent. Use after /mode on a session with history, or to start a fresh task. |
/mode |
— | List all agent presets with descriptions and mark the current one (✅). Also shows whether any preset is broken (e.g. code needs a host runtime not present in the base bundle). |
/mode <preset> |
id or alias | Switch the chat's agent preset: minimal (极简) / standard (标准) / code (ptc) / cordis (创造). Blank session → takes effect immediately. Session with history → the choice is recorded (📌) and applies after /new (presets lock at agent creation). Unknown names list the valid ids. |
/status |
— | Current model (provider/model), active mode, chat id, agent status (running/idle), minutes since last activity, idle-recycle countdown, pending-approval indicator. |
/stop |
— | Hard-interrupt the running turn: cancels in-flight work and clears any queued inputs. If nothing is running, replies "agent idle". |
/help |
— | Built-in help text. |
When an approval card is pending, a bare y = allow, n = deny (case-insensitive). Clicking the card buttons does the same; the card is updated in place either way.
Everything else starting with / is forwarded to dsh's command service, so all built-in commands work in chat. Common ones:
| Command | Behavior |
|---|---|
/permission |
Show the current permission preset |
/permission <preset> |
Switch: read-only (files read-only, no approval needed) / workspace-write (workspace writable, out-of-bounds needs approval — default) / danger-full-access (full access, no approval) |
/plan |
Toggle plan mode: agent plans first, executes after you approve |
/compact |
Compress session history to reclaim context |
/goal |
Set/view a long-running task goal |
/export |
Export the session log |
/feedback |
Record feedback |
Unknown commands reply with the full list of what's available.
📌, takes effect at the next step boundary, task keeps running. Use /stop to abort instead.In group chats, @mention the bot to trigger any of the above.
node test.mjs # offline unit tests: protobuf codec roundtrip + config validation
node debug.mjs # debug frame encoding bytes
test.mjs extracts the pure-function blocks from index.js and roundtrips them — no dsh startup, no real credentials needed.
Feishu WebSocket long-connection protocol (from larksuite/oapi-sdk-go v3 ws module):
POST /callback/ws/endpoint (body carries AppID/AppSecret) returns a WS URL + PingInterval1=SeqID 2=LogID 3=service 4=method(0 control/1 data) 5=headers 8=payloadmethod=0 + headers[{type:ping}] every PingIntervaltype=event; payload is event JSON (core: im.message.receive_v1)biz_rt + {"code":200}) or Feishu will redeliverThe codec is hand-written at the top of index.js (encodeFrame/decodeFrame) — no protobufjs dependency.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。