aleksvega/dsh-tg-bridge ↗★ 0

dsh-tg-bridge

提供Telegram机器人桥接以远程驱动DSH 适合需要通过Telegram发送文字、语音或图片远程操控DSH会话的用户。

包名
dsh-tg-bridge
兼容性
待验证
版本
1.5.4
许可证
MIT
最近更新
2026年10月25日

安装

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

dsh-tg-bridge

A Telegram bridge for DeepSeek Harness: drive the agent from a bot with text, voice and photos, without opening the desktop app.

Each forum topic is a separate project with its own session and its own working directory. Replies arrive with progress, a "Stop" button and copyable code blocks.

Features

  • Text: a regular task goes to the agent, the answer comes back in the same topic.
  • Voice: local faster-whisper, the transcript is shown before the answer.
  • Photos: sent to a vision-capable model; text and UI are recognized.
  • Project per topic: /cd my-app, and all turns run from that directory.
  • Goal and checklist per topic: /goal, /task; both survive restarts and are prepended to every turn.
  • Live progress: "⏳ Working..." with steps, a timer and the cache hit rate at the end.
  • No lost messages: a journal with acknowledgement and replay.
  • Fail-fast: when the quota runs out it switches to a free model right away.
  • dsh-tg check: diagnostics in one command, no changes to the system.
  • Languages: menus and service messages in en, ru, zh; /lang switches the topic language, a new user gets theirs from the Telegram language_code (anything outside ru/zh → en).
  • "Stop"/"Retry" buttons, tool confirmations: right in the message, no commands to type.

Requirements

  • Node.js ≥ 20
  • DeepSeek Harness 0.2.1-rc.2 or newer in the 0.2.x line (>=0.2.1-rc.2 _.jsonl; the progress message shows the last two as 💭 lines. The command needs no ids: it falls back to the newest turn's thought file, because tool shells do not inherit the bridge environment. --thought never sends a Telegram message on its own.

Goals and tasks

A topic carries its own goal and checklist, so the aim survives /new, a restart and a different session:

/goal ship the release      set or replace the goal
/goal                       show the goal and the checklist
/task write the migration   add a task
/task done 2                tick it off
/task rm 2                  remove it
/goal done                  close the goal (all tasks done)
/goal clear                 delete the goal and its tasks

The bridge prepends the goal and the list to every turn, with the exact command that updates it (goal.mjs). The agent ticks tasks as it finishes them, and the next turn sees the new state. The bridge is the only writer of state.json: the agent drops a job file into goal-jobs/ and the bridge applies it, so there is no lock race and no lost update.

Security

  • config.json, state.json, pending/, logs are in .gitignore and never end up in the repository.
  • The token is stored in the DSH credentials store, not in code or config.
  • The bridge only replies to ids in allowedUserIds.

Documentation

License

MIT, see LICENSE.