imetn/dsh-lark-bridge1

dsh-lark-bridge

Bidirectional Lark/Feishu control bridge for DeepSeek Harness

AI 分析

核心用途是将 DSH 接入飞书/Lark 工作流。适合企业团队在飞书内直接与 AI 交互、处理审批或群聊任务。需要配置飞书应用凭证。

パッケージ
dsh-lark-bridge
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/08/13

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:imetn/dsh-lark-bridge

ドキュメント

README 全文を読む ↗

Credentials and multi-project configuration

Pass app credentials through the process environment. Never commit them:

export DSH_LARK_APP_ID='cli_xxxxxxxxxxxxxxxx'
export DSH_LARK_APP_SECRET='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

Edit ~/.dsh/profiles/lark/cordis.patch.yml. A later profile patch replaces the Bridge's entire config, so keep every non-default value together:

- id: dsh-lark-bridge
  config:
    allowedOpenIds:
      - ou_owner_xxxxxxxxx
    requireMention: true
    groupSessionScope: thread
    defaultProjectId: web
    cardPreset: standard
    nativeImageInput: false
    progressCards: true
    provideUserQuestions: true
    enableApprovals: true
    projects:
      - id: web
        name: Web App
        chatIds:
          - oc_web_topic_group_xxxxxxxxx
        allowedOpenIds:
          - ou_owner_xxxxxxxxx
        cwd: /absolute/path/to/web-app
        workspaceRoot: /absolute/path/to/web-app
        inboundDir: .dsh-lark-bridge/inbox
        cardPreset: developer
      - id: ios
        name: iOS App
        chatIds:
          - oc_ios_topic_group_xxxxxxxxx
        cwd: /absolute/path/to/ios-app
        workspaceRoot: /absolute/path/to/ios-app
        inboundDir: .dsh-lark-bridge/inbox
        cardPreset: compact

The global and Project-specific user allowlists are restrictive intersections: when a Project list is non-empty, an operator must pass both. Project lists do not widen the global policy.

Safe ID bootstrap:

  1. Leave the allowlists empty and start the Bridge.
  2. Have the intended user send a DM or group mention.
  3. Copy the rejected sender and chat IDs from the local log.
  4. Add only those IDs and restart.

Do not enable allowAllUsers or allowAllGroups in production. Comma-separated environment allowlists are also supported:

export DSH_LARK_ALLOWED_OPEN_IDS='ou_xxx,ou_yyy'
export DSH_LARK_ALLOWED_CHAT_IDS='oc_xxx'

Validate the composed profile before starting:

dsh --profile lark --dump-config
dsh --profile lark

Configuration reference

FieldDefaultMeaning
allowedOpenIds[]Bridge-wide user allowlist; all users are denied by default
allowedChatIds[]Legacy/single-Project group allowlist; Project chatIds are preferred
allowAllUsers / allowAllGroupsfalseDevelopment-only open-policy switches
requireMentiontrueRequire a bot mention in groups
groupSessionScopethreadthread recommended; alternatives are sender and chat
defaultProjectIdfirst ProjectProject selected initially in DM
projectsone default ProjectProject bindings for chat, model, cwd, files, access, and card view
provider / modelHarness selectionGlobal model route; each Project may override it
cwdprocess cwdGlobal Agent working directory default
workspaceRootcwdOutermost directory from which lark_deliver may send files
inboundDir.dsh-lark-bridge/inboxPrivate attachment directory inside workspaceRoot
cardPresetstandardGlobal card density; each Project may override it
nativeImageInputfalseAlso inject received images through the Harness attachment service
progressCardstrueUse one mutable live execution card per turn
progressUpdateMs1000Card update throttle, minimum 250 ms
maxInboundFileBytes20 MiBPer-attachment streaming limit
maxOutboundFileBytes30 MiBPer-file limit; long Markdown truncates on a UTF-8 boundary
interactiveTimeoutMs10 minApproval and question timeout
provideUserQuestionstrueRegister the Lark question provider
enableApprovalstrueRoute approvals for Lark-owned Sessions to Lark
cardBodyMaxChars12000Card output preview, from 1000 to 28000 characters

Each Project supports id, name, chatIds, allowedOpenIds, provider, model, cwd, workspaceRoot, inboundDir, and cardPreset.