返回目录
消息通讯 插件

dsh-feishu

WilShi/dsh-feishu

Feishu/Lark chat surface for DeepSeek Harness: streaming cards, in-card questions and approvals, guided setup

Stars
0
Forks
0
Issues
0
更新
19 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:WilShi/dsh-feishu

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

The Feishu UI for DeepSeek Harness (dsh)

English | 中文

License: MIT Node npm DSH

The Feishu UI for DeepSeek Harness (dsh) — a dsh-native plugin with a panel-driven control console: every slash command is a button on the ⚙️ control-panel card, approvals and questions resolve inside the chat, and one QR scan sets the whole app up.

Note: DeepSeek Harness is still pre-release and may break between releases. This package is the DSH 0.2.1-rc.5 port of PGZXB/dsh-feishu (MIT): the upstream implementation is kept as-is in lib/ and patched where the 0.2.1 host API changed. Host packages (@deepseek-ai/*, cordis) are peerDependencies — the DSH runtime supplies them.

Host services and bundle scope

The bundle patch inserts only the feishu row. It deliberately does not re-insert schedule or tool-ask-user: DSH 0.2.1 already mounts them (dsh-web-app and the agent presets), and dsh-app-boot appends insert entries without dedupe — a duplicate service provider or tool name would fail the boot. To customize schedule config, use an id-targeted override (see the comments in cordis.patch.yml).

The plugin declares a minimal inject list — agents, sessionQuery, commands, tools — so cordis waits for the services the chat surface cannot work without. Everything else is an optional capability read through ctx.get(...) and degraded with a warning: approval, userQuestions, attachments, workspaceRegistry, sessionTitle, permissionPresets, planMode, agentDefaultModel, agentPresets, llm, schedule, credentials.

https://github.com/user-attachments/assets/e9163793-52f2-4e2c-a08a-22b27372be61

2.5-min demo: control panel, streaming card, approval and question.

Quickstart

Install from npm

# 1. install Node.js ≥ 22.13
#    macOS / Linux: nvm (https://github.com/nvm-sh/nvm) → nvm install 22
#    Windows: https://nodejs.org  (or: winget install OpenJS.NodeJS.LTS)
node --version

# 2. install pnpm
npm install -g pnpm

# 3. install the plugin
#    (pnpm ≥ 11 blocks the protobufjs build script by default, so
#     --allow-build=protobufjs lets pnpm run it)
npx @deepseek-ai/dsh plugin --profile feishu add @wilshi/dsh-feishu@latest

# 4. one QR scan — create + configure the Feishu app
npx --yes --package @wilshi/dsh-feishu dsh-feishu-setup --new --profile feishu

# 5. run
npx @deepseek-ai/dsh --profile feishu

Install from source

# 1. install Node.js ≥ 22.13
#    macOS / Linux: nvm (https://github.com/nvm-sh/nvm) → nvm install 22
#    Windows: https://nodejs.org  (or: winget install OpenJS.NodeJS.LTS)
node --version

# 2. install pnpm
npm install -g pnpm

# 3. clone and build
git clone https://github.com/WilShi/dsh-feishu.git
cd dsh-feishu
pnpm install
pnpm run build

# 4. install into a profile
npx @deepseek-ai/dsh plugin --profile feishu add link:.

# 5. one QR scan — create + configure the Feishu app
pnpm run setup:feishu -- --new --profile feishu

# 6. run
npx @deepseek-ai/dsh --profile feishu

Then message the bot in Feishu. The setup wizard handles the Feishu app end to end — no web-console work and no manual credentials. Already have an app? Set FEISHU_APP_ID / FEISHU_APP_SECRET (environment or profile config) instead — see docs/feishu-setup.md.

Uninstall

# remove the plugin from the profile
npx @deepseek-ai/dsh plugin --profile feishu remove @wilshi/dsh-feishu

# optional — full clean slate: delete the profile and its surface data
# (paths shown for the default dsh home, ~/.dsh)
rm -rf ~/.dsh/profiles/feishu ~/.dsh/feishu

Usage

A Feishu chat is a dsh session — the bot is the agent's avatar. A typical session goes like this:

  1. Start a chat. Direct-message the bot, or run /group <name> to create a group the bot joins. In a group, @-mention the bot (the default policy; a group with just you and the bot also answers plain messages, and the policy is configurable).

Chat with the bot

  1. Open the control panel. Send panel or /panel to open the card-based console.

Control panel

  1. Pick a working directory. Before the first turn, the bot opens the workspace picker automatically. The panel also offers 🗂️ Workspaces with recent, favorite, searchable, and custom-path choices.

Project picker

  1. Ask. Send a message — the agent runs and its output streams into a live card (tool calls, reasoning, markdown, tables). The card ends green with the full answer inside; Stop, copy, retry, and the ⚙️ panel button sit on it.

    Mid-stream Finalized
    Card mid-stream Card finalized
  2. Approve or answer when asked. A permission escalation posts an approval card — tap Allow once (or Reject). A question posts a card you answer with a tap (or a reply).

    Approval Question
    Approval card Question card
  3. Manage workspaces, sessions, and Agent modes. 🗂️ Workspaces lists the same registered names as DSH Desktop and can switch, add, search, favorite, rename, or safely remove a registration without deleting files or history. 🗂️ Sessions filters by all sessions, current workspace, or this Feishu chat, then lets you inspect, resume, rename, fork, archive, or export. 🧠 Agent mode switches between standard, Codex, Claude Code, and custom presets by preserving the current session and opening a safe new one. ➕ New chat starts fresh without deleting the old session.

Sessions picker

Every button on the panel card maps to a slash command — pick whichever feels faster; /help lists them all.

Commands

Command What it does
/help list all commands
/panel open the control-panel card (all commands as buttons)
/group <name> create a group with the bot (bare opens a name-input card)
/cancel stop the running turn
/cd <path> set this chat's working directory (bare opens a path-input card)
/repo [path] pick a project directory (bare scans the default roots; /repo <path> scans that path)
/workspaces [path] list and manage registered DSH workspaces; a path adds and switches directly
/status show this chat's workspace, session, model, Agent mode, and run status
/feishu-status show the surface diagnostic card
/schedule list active reminders
/model <provider/model> switch this session's model (bare opens the picker)
/mode [preset] choose an Agent mode (standard, Codex, Claude Code, or a custom preset)
/export send this chat's session log as a file
/log send the Feishu-only diagnostic log to this chat; disabled unless an allowlist is configured or allowLogExport: true is explicitly set
/sessions list saved sessions (resume, rename, fork, archive, or export from the card)
/resume <id> resume a saved session (bare opens the session list)
/clear /new start a fresh conversation (the old session stays saved)
/goal <text> set the task goal (bare opens a text-input card)
/compact compact older conversation history
/feedback <text> send feedback (bare opens a text-input card)
/permission <preset> switch the permission preset (bare opens the picker)
/plan [on\|off] enter or leave plan mode (bare toggles)

Features

  • Live streaming cards — tool calls, reasoning, markdown, and tables stream in as the agent works.
  • One-tap control panel — /panel renders the full command palette as buttons; no command syntax to remember, and each button is the exact equivalent of typing the command.
  • Card-based workspaces and sessions — add, switch, search, favorite, rename, and safely remove registered workspaces; filter, resume, rename, fork, archive, and export sessions by all/workspace/chat scope.
  • Agent mode management — choose standard, Codex, Claude Code, or a custom preset without mixing incompatible tool histories into the old session.
  • Native image and file input — images enter DSH's native vision attachment path; files retain both a durable DSH reference and a workspace-readable path, with safe fallback when attachment storage is unavailable.
  • In-card approvals & questions — approve a permission escalation or answer the agent's questions in the chat.
  • Sessions survive restarts — a chat's session (and its working directory) is persisted across daemon restarts.
  • Groups & mentions — @-mention the bot; error notices, approvals, and questions @ the requester.
  • Reactions, allowlists, reminders, export, diagnostics — reaction ack, allowedChats / allowedUsers, scheduled reminders, session-log files, and a status card.

Interaction and log safety

  • interactionTimeoutMs controls how long approval and question cards wait for a reply (default: 5 minutes; minimum: 1000 ms).
  • locale defaults to zh-CN and may be set to en-US; sessionVisibility defaults to chat. Administrators may explicitly widen it to workspace or all on a trusted private bot.
  • Session visibility applies to lists, direct /resume <id>, and every session card action. An active session cannot be silently moved from one Feishu chat to another.
  • maxQueuedTurns limits messages waiting behind a running turn (default: 50); maxPendingAttachments limits files waiting for the next instruction (default: 20). Excess work is refused with a visible notice instead of growing durable state without bounds.
  • The session map automatically reads legacy v1/v2 data and upgrades it to v3 without replacing credentials, chat bindings, or working directories.
  • Persistent logs contain only records from the feishu logger, rotate at 5 MiB, and retain 3 archives by default. Override these limits with logMaxBytes and logMaxFiles.
  • /log is enabled automatically when allowedChats or allowedUsers is non-empty. On an unrestricted bot it stays disabled unless allowLogExport: true is set explicitly.
  • proxyUrl (or the FEISHU_PROXY_URL environment variable) routes Feishu REST and WebSocket traffic through an HTTP(S) proxy. Public builds ship no default proxy: unset means a direct connection. A configured but invalid URL fails closed instead of silently connecting directly.

Contributing

See CONTRIBUTING.md and SECURITY.md. Development, tests, and release: docs/development.md.

Community

Join the dsh-feishu community group on Feishu:

dsh-feishu community group QR code

Credits

  • PGZXB/dsh-feishu — the original dsh-feishu implementation this package ports to DSH 0.2.1-rc.5 (MIT). All Host/Client logic and the setup wizard come from upstream; this repository keeps the compiled lib/ and patches only the host API seams.
  • botmux — the reference for the group-chat interaction patterns: streaming cards, approvals, and the QR-driven Open Platform quick-setup flow. dsh-feishu borrows botmux's interaction and onboarding patterns, not its architecture — botmux bridges external CLIs, while this surface is dsh-native and in-process.
  • DeepSeek Harness — the platform this surface is built for.
  • Lark Open Platform SDK — the WebSocket long connection and card APIs the transport builds on.

License

MIT — see LICENSE.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类消息通讯
规则置信度高

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: im。