dsh-tg-bridge
提供Telegram机器人桥接以远程驱动DSH 适合需要通过Telegram发送文字、语音或图片远程操控DSH会话的用户。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:aleksvega/dsh-tg-bridge說明文件
閱讀完整 README ↗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;/langswitches the topic language, a new user gets theirs from the Telegramlanguage_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.2or newer in the0.2.xline (>=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.--thoughtnever 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.gitignoreand 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
- docs/TELEGRAM-SETUP.md: BotFather settings, group and bot permissions
- docs/ROADMAP.md: what comes next
- docs/UX-ANALYSIS.md: interactive UX review
- docs/COST.md: what one turn costs and how to reduce it
- docs/CHANGELOG.md: change history
- docs/RELEASE-CRITERIA.md: release readiness criteria
License
MIT, see LICENSE.