Telegram bridge for DeepSeek Harness: bidirectional sessions, conversation steering, home-channel routing, and TTS voice notes sent as Telegram audio messages.
Install
# from npm (prebuilt)
dsh plugin --profile web add @goodandready/dsh-messenger-gateway
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:GooDAnDReaDY/dsh-messenger-gateway
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
⚡ Overview
dsh-messenger-gateway provides an enterprise-grade, multi-transport messaging gateway for DeepSeek Harness agents.
Talk to your Harness agent directly from Telegram: interactive keyboard buttons, forum topic sessions, private user workspaces, pairing codes, and optional spoken voice replies.
Talk to your Harness agent from Telegram: text, voice, photos, documents, inline buttons, named homes, and optional spoken replies.
Features
- Long-poll or webhook Telegram bot
- Configurable proxy support: HTTP, HTTPS, SOCKS5, and SOCKS5h (
telegram.proxyUrl) - Custom Bot API root URL (
telegram.apiRoot) for reverse proxies and local Bot API servers - Multi-transport support: Telegram, Discord (Webhooks & Bot API), and Slack (Webhooks & Bot API)
- Allowlist + pairing codes
- Per-user or per-chat sessions (
sessionScope) - Forum topics as separate sessions
- Quick actions reply keyboard (
/keyboard on|off) - Multi-select interactive ask forms with checkboxes and pagination (
messenger_ask) - Artifact & Mermaid diagram rendering (SVG cards) and monospace table formatting
- Agent roles & personas (
/role coder,/role architect,@roletags in group chats) - Agent tools & skills inspection (
/skills,/tools) - Session management: dialogue history export to Markdown (
/export), turn rewind (/rewind), session branching (/fork) - Workspace file manager (
/files [dir]) and file download (/get <path>) with directory traversal protection - Admin alert channel for pairing requests, model errors and monitoring (
/setalert,/alert) - Persistent scheduled reminders (
/remind <time> <text>,/remind list,/remind cancel) - Inbound webhook event dispatcher (
POST /dsh-messenger-gateway/events) for CI/CD and external alerts - Steer: follow-up messages while the agent is busy (instead of aborting)
/stop,/new,/model,/status,/voice,/sethome,/home- Agent tool
messenger_ask(inline keyboard answers return to the agent) - Named homes for outbound notify /
messenger.send - Optional notify bridge: web session events → Telegram home (excludes messenger sessions)
- Inbound voice → STT (
dsh-voice), photos → vision (dsh-vision-bridge) - Optional TTS replies (
dsh-tts); mp3 is converted to OGG/Opus viaffmpegfor Telegram voice notes
Discord and Slack adapters are available as outbound transports (Webhooks or Bot REST APIs).
Install
dsh plugin --profile web add @goodandready/dsh-messenger-gateway
Then open Settings → Plugins → Messenger gateway:
- Enable Telegram
- Paste the BotFather token (write-only; leave blank to keep the current token)
- Set allowed Telegram user IDs (or use pairing)
Optional companion plugins (same profile)
| Plugin | Role |
|---|---|
@goodandready/dsh-voice |
Transcribe inbound voice messages |
@goodandready/dsh-tts |
Speak agent replies |
@goodandready/dsh-vision-bridge |
Describe inbound photos |
They are not npm dependencies of this package — install them separately if you want those features.
Voice notes
Spoken replies use Telegram sendVoice. If TTS returns MP3 (or other non-Opus audio), the gateway runs ffmpeg (libopus) to produce OGG. If ffmpeg is missing or conversion fails, the audio is sent as a regular audio file instead of a voice note.
Commands (Telegram)
| Command | Description |
|---|---|
/start /help |
Help |
/whoami |
Your Telegram user id |
/new |
New agent session |
/stop |
Abort the current turn |
/model |
Interactive 2-step model picker (providers → models) or /model <prov> <mod> |
/status |
Gateway status and session counters |
/top |
Live server resources: RSS/Heap memory, uptime, active chats, reminders |
/topic <name> |
Create a new Telegram forum topic in supergroups and start an isolated session |
/role [name] |
Switch agent persona (coder, architect, reviewer, writer, translator, concise) |
/skills /tools |
List active agent tools and capabilities |
/fork |
Fork current session into a new independent session |
/export |
Export session dialogue history to Markdown |
/rewind [N] |
Rewind last N conversation turns |
/files [dir] |
Workspace file manager |
/get <path> |
Download file from workspace |
/remind <time> <text> |
Set a reminder (e.g. /remind 15m Call client) |
/setalert /alert |
Configure admin alert channel and send test alert |
/keyboard on|off |
Toggle quick actions reply keyboard |
/voice on|off |
Per-user spoken replies |
/tts on|off|status |
Per-chat spoken replies |
/sethome [name] |
Bind current chat/topic as a named home |
/home |
List homes |
Multi-Transport Support (Discord & Slack)
In addition to Telegram, outbound messages can be dispatched to Discord and Slack via Webhooks or Bot APIs:
- Discord: set
discord.enabled: true, provide eitherwebhookUrlorbotToken. Target channels viachatId: "<channel_id>". - Slack: set
slack.enabled: true, provide eitherwebhookUrlorbotToken. Target channels viachatId: "<channel_id>"or threads viathreadId: "<thread_ts>".
Agent tools & HTTP
- Tool:
messenger_ask— ask the user with inline buttons; choice is fed back into the turn - HTTP (when enabled):
/messenger/send,/messenger/ask,/messenger/progress - Cordis service:
ctx.messengerfor other plugins
Configuration notes
sessionScope:user(default) orchat— how group chats isolate sessionsvoiceMode:mirror/always/off— when to speak replies (also/voice)tts.enabled/tts.maxChars— TTS gate and length capnotifyBridge— forward non-messenger web session events to a hometelegram.proxyUrl: optional HTTP, HTTPS or SOCKS5 proxy URL (socks5://user:pass@127.0.0.1:1080,http://127.0.0.1:8080);socks://andsocks5h://are aliases. Leave it empty to useTELEGRAM_PROXY/DSH_MESSENGER_TELEGRAM_PROXY/HTTPS_PROXY/ALL_PROXYfrom the environment, useoff/none/directto disable proxying entirely, andNO_PROXY/no_proxyrules are honoured. The tunnel is implemented withnode:net/node:tls(no extra dependencies) and keeps normal TLS certificate verification forapi.telegram.orgtelegram.apiRoot: optional custom Telegram Bot API base URL (default:https://api.telegram.org), for local Bot API servers or reverse proxies- Bot token is a DSH secret field — never commit it
Client UI & Settings Card
- Mounted into
settings.plugin.itemon the Plugins tab (key: dsh-messenger-gateway). - Configuration is managed reactively via
settingsScope.bind({ namespace: 'dsh-messenger-gateway' })with snapshot status checking (loading,unavailable,ready). - Protected dictionary registration: duplicate registration attempts on page reload are safely caught with non-fatal warnings, ensuring the settings card never fails to mount.
Requirements
- DeepSeek Harness web (or compatible) profile
- Node.js matching your Harness install
- For voice notes from non-Opus TTS:
ffmpegon the hostPATH
License
MIT
Links
More in this category
xmanrui/dsh-im★ 2147
Connect IM bots to DeepSeek Harness via QR codes or bot credentials (9 channels: Feishu, WeChat, DingTalk, WeCom, QQ, Slack, Telegram, Discord, and WhatsApp).
shaobeichen/dsh-pocket★ 1929
Remote phone access to the DSH Web UI: scan a QR code for LAN or public (cloudflared tunnel) access with real-time sync, a mobile-adaptive layout, and a settings tab.
OpenPetsHQ/openpets#dsh★ 1309
Bridges DeepSeek Harness lifecycle status, errors, and approval requests to a locally running OpenPets desktop companion.
inclusionAI/Avernet#deepseek-harness-channel-bcn★ 641
Connects DeepSeek Harness to Avernet's Bot Collaboration Network over WebSocket V2, with automatic onboarding, isolated agent sessions, tool-call events, and multi-bot routing tools.
c1overzz/dsh-bili-scroll★ 203
Let your DSH agent browse Bilibili on its own, read subtitles, write a daily digest, and @ you when it finds something worth your attention.
Oscar-Williams/dsh-deepcanary★ 91
Evidence-first attention supervision for DeepSeek Harness with C0–C3 policy, deduplicated Inbox alerts, quiet hours, and redacted outcome records.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.