Skip to content

Releases: cershuang/dsh-fschannel

dsh-fschannel v0.2.2

Choose a tag to compare

@cershuang cershuang released this 15 Aug 19:13

dsh-fschannel v0.2.2

Feishu/Lark bot bridge for DeepSeek Harness. Bind a web-created session to a Feishu chat; messages flow both ways over the official @larksuite/channel SDK (WebSocket long connection, no public callback URL).

What's new since v0.2.1

Embedded card images (this release)

  • Local images are embedded into final cards — no remote links: when the assistant's reply contains a markdown image reference (![alt](path)) pointing to a real image file inside the session workspace, the plugin uploads the bytes (im.v1.image.create, image_type: message) and renders a card v2 img element with the alt text; the markdown syntax is removed from the prose
  • Remote URLs and unreadable paths are never embedded: the reference is stripped from the card and the alt text is kept as plain prose — no dead/broken images, no leaked links
  • Images are appended after the text elements; a reply that is only images produces a bare image card
  • Path resolution is confined to the session workspace (same relative() rule incl. Windows cross-drive as the image route and the send tools)

Settings page

  • Plugin version shown in the status card/feishu/status now returns version (read once from the package manifest), displayed monospace in the settings status card (zh/en)

中文要点

  • 卡片图片内嵌(本次核心):agent 回复中的 markdown 图片引用(![说明](路径))若指向会话工作区内的本地图片文件,会自动上传并以内嵌 img 元素显示在最终卡片里——不显示远程链接/死链;远程 URL 或无法读取的路径不会出现在卡片中(保留说明文字)
  • 设置页显示插件版本号:状态卡片新增「插件版本」,/feishu/status 返回 version

Full feature set (v0.2.x line)

  • i18n: Feishu-facing copy follows the host locale (client reports locale; zh/en dictionaries for all messages, commands, toasts, error codes)
  • Image gallery: session-header "Feishu images" button (API-driven grid; images no longer written into the session log)
  • Session-log repair: boot-time auto-repair (ignorable markers + seq-conflict closer removal, incremental fingerprints); POST /feishu/repair-logs forces a pass
  • Settings page: bindings table (chat ocID / session / DSH title / action), unified card layout
  • Send tools: send_feishu_image and send_feishu_file — the agent can deliver generated images/files to the bound chat (workspace-confined paths, Buffer upload, optional caption/file name)
  • Reliability: CSRF closure, credential masking, concurrency fixes, stream leaks, oversized-card degradation, TTL de-index, etc.

Installation

cp example.env .env      # path config only; credentials go to the settings page
npm install && npm run build
dsh plugin --profile web add file:<repo-path>
dsh web

See README (中文) / README.en.md (English) for the full setup guide.

Notes

  • Requires Node 22+; @anionex/dsh-vision-toolkit needed for image recognition
  • Version line: 0.2.0 (i18n + hardening) → 0.2.1 (send tools) → 0.2.2 (embedded card images + version display)

dsh-fschannel v0.2.0

Choose a tag to compare

@cershuang cershuang released this 15 Aug 15:30

dsh-fschannel v0.2.0

Feishu/Lark bot bridge for DeepSeek Harness. Bind a web-created session to a Feishu chat; messages flow both ways over the official @larksuite/channel SDK (WebSocket long connection, no public callback URL).

What's new since v0.1.5.4

Internationalization (i18n)

  • Server-side copy follows the host language: all Feishu-facing messages (guidance hints, /model command replies, queue acknowledgements, image hints, streaming-card placeholders, card-action toasts, error codes) now come from lib/locales.js zh/en dictionaries — the client reports the host's active locale (POST /feishu/config { locale }) and re-reports on locale/change, so Feishu replies switch language together with the Web UI
  • English README: new README.en.md with a language switcher on both files; README.md stays Chinese (default) and GitHub serves the English version to English visitors automatically
  • 49 keys, zh/en parity enforced by scripts/smoke-locales.mjs (key set + {placeholder} parity + fallback semantics)

Image gallery & repair (from v0.1.5.x line)

  • API-driven session image gallery: session-header "Feishu images" button opens a grid of staged images (click to view original); images are indexed in the plugin's own store and no longer written into the session log — the old feishu/image event type made the harness refuse the whole log
  • Session-log repair at boot: marks historical feishu/image events as harness-accepted ignorable, and drops harness-synthesized interrupted-tool-result closer blocks whose seq range conflicts with real continuation events (duplicate-seq logs the harness refuses); incremental per-log fingerprints skip unchanged logs on later boots; manual re-run via POST /feishu/repair-logs

Settings page

  • Bindings management as a table: chat ocID (short, full-id tooltip) | session (short) | DSH session title (the workspace list name, e.g. "继续开发插件") | action; pending sessions share the table with a badge + created time
  • Unified card layout, status dot, aligned inputs/buttons, zh/en headers

Reliability fixes (highlights)

  • Security: two CSRF bypasses closed on the loopback API; credential masking fixed (short secrets were echoed verbatim); loopback API hardened
  • Concurrency: two processes can no longer clobber each other's bindings; the connect guard can actually fail and reconnect; a superseded session's response can no longer overwrite the current one
  • Correctness: resolveCredentials tier-atomic (mixed sources no longer lose the secret); bind() no longer drops the session's model route; TTL de-index now matches; reaction misattribution fixed; gallery button stayed hidden after broadcasts — now re-reads
  • Cards: table size capped (138 KB card degradation to markdown), fenced-code closing rules fixed
  • Streaming: stream leak on teardown fixed; plugin teardown hardened

Engineering

  • npm test — offline gate: eslint no-undef + tsc --noEmit (strictNullChecks) + build + 14 smoke suites (incl. client-behavior, images-lifecycle, settings-render, locales)
  • .gitattributes pinning line endings; restart-dsh.ps1 reinstalls the plugin and verifies what actually runs
  • Dead code removed (unused imports/methods), media-type tables collapsed to one source, boot-repair timer cleared on teardown, TTL-expired held images no longer leave orphan files

中文要点

  • 国际化:飞书侧所有文案(引导提示、/model 命令回复、排队提示、图片提示、流式卡片占位、卡片 toast、错误码)跟随宿主语言 —— 客户端上报宿主当前语言(POST /feishu/config { locale }),宿主切换语言时飞书回复同步切换;新增英文 README(README.en.md),中文 README 保持默认,GitHub 自动按访客语言重定向
  • 图片画廊:会话头「飞书图片」按钮打开图片网格;图片索引由插件自管,不再写入会话日志(旧事件类型会导致会话无法加载);启动时自动修复历史日志(ignorable 标记 + seq 冲突清理,增量跳过),POST /feishu/repair-logs 可手动全量重跑
  • 设置页:绑定管理表格化(聊天 ocID / 会话 / DSH 会话标题 / 操作),统一卡片排版
  • 可靠性:关闭两个 CSRF 绕过、修复凭据掩码泄露、双进程绑定互踩、连接守卫失效、TTL 索引不匹配、表情误标、画廊按钮不刷新、超大卡片降级、流式泄漏等 20+ 项
  • 工程npm test 离线门禁(eslint + tsc strictNullChecks + 构建 + 14 个冒烟套件);移除死代码、合并重复表

Installation

cp example.env .env      # path config only; credentials go to the settings page
npm install && npm run build
dsh plugin --profile web add file:<repo-path>
dsh web

See README (中文) / README.en.md (English) for the full setup guide (Feishu app creation, permissions, long-connection config, release scope).

Notes

  • Requires Node 22+; @anionex/dsh-vision-toolkit needed for image recognition
  • Version line: 0.1.x (credential store, gallery, repair) → 0.2.0 (i18n + hardening)

dsh-fschannel v0.1.5.4

Choose a tag to compare

@cershuang cershuang released this 15 Aug 02:39

dsh-fschannel v0.1.5.4

Feishu/Lark bot bridge for DeepSeek Harness. Bind a web-created session to a Feishu chat; messages flow both ways over the official @larksuite/channel SDK (WebSocket long connection, no public callback URL).

Highlights

  • Credential store integration — app credentials are saved via the settings page into the DSH credential store ($DSH_HOME/.credentials.yaml, masked appId, secret never echoed); layered resolution: entry config > credential service (env > store > project/user .env) > env file
  • Runtime-adjustable settings — output mode (streaming cards / plain), in-session image display, image staging expiry and caps; all editable in the settings page and persisted per machine
  • Image gallery — session-header "Feishu images" button opens an API-driven grid of every staged image (click to view original); images are indexed in the plugin's own store and no longer written into the session log
  • Session-log repair — auto-repairs historical logs at boot: marks old feishu/image events as harness-accepted ignorable, and drops harness-synthesized interrupted-tool-result closer blocks whose seq range conflicts with real continuation events (a duplicate-seq log the harness refuses to load); manual re-run via POST /feishu/repair-logs
  • Settings page polish — bindings management rendered as a table (chat ocID / session / DSH session title / action), unified card layout, zh/en headers
  • Single-member group exemption — groups with one user + the bot answer without @-mention; @all never triggers the bot
  • Model controls from Feishu — button card + /model family, /status, /stop, /help; per-session model route persisted and replayed
  • Reactions & queueing — 👍 on receipt, ✅/☹️ on completion/failure; SDK-level dedup + per-chat serialization with queue position ack

中文要点

  • 凭据改走 DSH 凭据库(设置页填写,appId 掩码显示,secret 永不回显)
  • 图片以会话内画廊呈现(会话头「飞书图片」按钮),不再写入会话日志——旧日志由启动时自动修复(ignorable 标记 + seq 冲突段清理),POST /feishu/repair-logs 可手动重跑
  • 设置页绑定管理改为表格:聊天 ocID / 会话 / DSH 会话名称 / 操作
  • 单成员群免 @ 响应;@all 不响应

Installation

cp example.env .env      # path config only; credentials go to the settings page
npm install && npm run build
dsh plugin --profile web add file:<repo-path>
dsh web

See the README for the full setup guide (Feishu app creation, permissions, long-connection config, release scope).

Notes

  • Requires Node 22+ and @anionex/dsh-vision-toolkit for image recognition
  • Version line: 0.1.5.1 (credential store) → 0.1.5.3 (gallery + repair) → 0.1.5.4 (seq-conflict repair + full-session audit)

v0.1 - initial release

Choose a tag to compare

@cershuang cershuang released this 14 Aug 23:08

dsh-fschannel v0.1 — 初始可用版本

DeepSeek Harness 飞书机器人渠道插件:把 Web 会话连接到飞书,消息双向流转。

功能

  • 会话 ↔ 飞书聊天桥接:一对一绑定 + 待绑定机制(在飞书发一条消息即完成绑定),绑定持久化,重启保留
  • 流式卡片:回合开始即开卡(「正在处理…」→ 逐字输出),结束时保留最终结果并自动排版为结构化卡片(段落 / 表格 / 代码块)
  • 表情反馈:收到消息 👍,回合完成变 ✅,失败变 ☹️(可配置 emoji)
  • 队列处理:SDK 级去重 + 按聊天串行投递,忙碌时提示排队位置
  • 飞书侧模型控制:按钮卡片 + /model、/model list、/model use、/model effort、/status、/stop、/help;切换走宿主 apiProxy(与 Web UI 同通道),会话级持久
  • 创建会话时连接:会话头 chip + 设置页「新会话默认连接飞书」开关 + 「新建会话并连接飞书」一键按钮
  • Web 与飞书可同时驱动同一个会话

传输

  • 飞书官方 @larksuite/channel SDK,WebSocket 长连接,无需公网回调地址

文档

  • README 含完整安装 / 配置 / 使用说明,附录为飞书应用申请与配置全流程(权限、事件订阅、长连接、发布)
  • 凭据与路径全部参数化(.env + example.env),无机器路径与敏感信息入库

许可

  • MIT License(Copyright (c) 2026 CersHuang)

Full Changelog: https://github.com/cershuang/dsh-fschannel/commits/v0.1