Community plugin

GooDAnDReaDY / @goodandready/dsh-messenger-gateway

Telegram messenger bridge for DeepSeek Harness: sessions, steer, homes, inline asks, notify bridge, and optional TTS voice notes.

  • JavaScript
  • MIT
  • 6 stars
  • Nov 19, 2026

About this plugin

Written by the registry from verified metadata, not from the README.

@goodandready/dsh-messenger-gateway is a DSH plugin published from the GooDAnDReaDY/dsh-messenger-gateway repository.

  • Listing statusManifest verified
  • Manifest checkedNov 21, 2026
  • Package@goodandready/dsh-messenger-gateway
  • Package version0.4.50
  • DSH engine>=0.2.0
  • Source commit5470b32
  • Repository createdAug 26, 2026

Capabilities and topics

dshdsh-plugintelegrammessenger
From the repository README

README

Everything below this line is the repository's own document, cached here. This site did not write or review it.

📦 @goodandready/dsh-messenger-gateway


⚡ 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 (bidirectional), Discord and Slack (send-only outbound)
  • Allowlist + pairing codes (fail-closed by default: a fresh install admits nobody until paired; allowlistMode: open is an explicit opt-in)
  • Conversation switching directly from chat (/sessions and /resume <n|id>)
  • Per-user or per-chat sessions (sessionScope)
  • Forum topics as separate sessions
  • Named sessions from chat metadata (agent.sessionTitleFromChat: TG · @username or TG · Group › topic N)
  • 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, @role tags 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 via ffmpeg for Telegram voice notes

Discord and Slack adapters are available as outbound transports (Webhooks or Bot REST APIs). They are send-only (#236): there is no inbound path, so interactive features (messenger_ask, approval cards) are unavailable there and /status labels these adapters as send-only. Telegram is the only bidirectional transport.

Install

dsh plugin --profile web add @goodandready/dsh-messenger-gateway

Then open Settings → Plugins → Messenger gateway:

  1. Enable Telegram
  2. Paste the BotFather token (write-only; leave blank to keep the current token)
  3. Set allowed Telegram user IDs (or use pairing)

Optional companion plugins (same profile)

PluginRole
@goodandready/dsh-voiceTranscribe inbound voice messages
@goodandready/dsh-ttsSpeak agent replies
@goodandready/dsh-vision-bridgeDescribe 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)

The command surface is driven by a single registry (COMMAND_REGISTRY in lib/commands.js) — /help and the Telegram autocomplete list are derived from it, so the table below is always in sync.

CommandDescription
/helpShow commands help
/newStart a fresh session
/sessionsList recent conversations
/resume <n|id>Switch chat to a previous session
/stopInterrupt the current response
/model [list|<prov> <mod>]Interactive model selector
/role [name]Switch persona or role (/role list)
/bind [role]Bind persona to topic / chat
/preset [name]Bind preset to topic / chat
/lang [en|zh]Switch user language
/rewind [N]Rewind last N turns
/forkFork the session into a new branch
/exportExport history to Markdown
/skillsList active tools & skills
/toolsList active tools
/projectTopic workspace binding (/project bind <path>)
/memory [add <fact>]Show / add remembered user facts
/forget <id|all>Delete stored user facts
/outbox [retry|clear]Transactional queue & DLQ
/costSession token usage & estimated cost
/cwdShow the working directory
/files [dir]Workspace file explorer
/get <path>Download a file to the chat
/remind <time> <text>Set a reminder (e.g. /remind 15m Call client)
/cronManage recurring autonomous tasks
/topic <name>Create a forum topic with an isolated session
/statusGateway and active model status
/topLive server resources: RAM, uptime, chats
/app, /dashboardOpen the Mini App dashboard
/keyboard on|offToggle the quick-actions keyboard
/voice on|offPer-user spoken replies
/tts on|off|statusPer-chat speech synthesis
/mute / /unmuteMute / unmute notifications in this chat
/update [now]Check or install a plugin update
/startConnect and show greeting
/whoamiYour messenger user id
/pair CODEApprove a pairing code
/sethome [name]Bind the current chat/topic as a named home
/homeList homes
/setalertConfigure the admin alert channel
/alert [test]Alert channel status / test alert

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 either webhookUrl or botToken. Target channels via chatId: "<channel_id>".
  • Slack: set slack.enabled: true, provide either webhookUrl or botToken. Target channels via chatId: "<channel_id>" or threads via threadId: "<thread_ts>".

Send-only transports (#236): Discord and Slack have no inbound path (no interactions endpoint / events API), so they deliver notifications and replies but cannot receive button clicks. messenger_ask and approval cards are not offered on these transports (requests fail fast), and /status + the web dashboard label them as send-only.

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.messenger for other plugins

Configuration notes

  • sessionScope: user (default) or chat — how group chats isolate sessions
  • allowlistMode: closed (default) or open — closed refuses every unknown user (fail-closed): a fresh install admits nobody until the admin approves a pairing code (/start → approve in the settings card); open admits all users when the allowlist is empty — enable it explicitly only for public assistant bots, the settings card and /status surface the exposure
  • security.trustProxy: false (default) — loopback-trusted requests must carry a pinned localhost / 127.0.0.1 / [::1] Host (DNS rebinding defense). Enable only behind a trusted local reverse proxy that rewrites the Host header
  • /get and /files require allowlisted users and never serve hidden (dot) files
  • telegram.proxyUrl is a secret: the settings API returns only a masked value and an empty field keeps the configured proxy
  • Inbound archives are extraction-capped (per-entry and per-archive budget verified against actual bytes — a lying ZIP header cannot balloon the heap)
  • Mini App artifacts are chat-scoped: a Telegram user sees only artifacts produced in their own chat; allowlisted admins see all
  • Mini App sign-in is hardened: auth_date required, 1h acceptance window, one-time query_id (replays rejected); initData in URL query is not accepted — the Mini App must send it via the Authorization: tma header
  • HITL approvals are fail-closed by default: in mutations sensitivity every tool that is not recognizably read-only (including network, send and MCP tools) asks for confirmation; a chat without a target refuses unconfirmed actions
  • Delivered updates are deduplicated across polling and webhook transports and the poll offset survives restarts — commands never execute twice
  • Artifact SVG entering the dashboard store is sanitized (script blocks, event handlers and javascript: URLs stripped)
  • Pending interactive asks are bounded (200 concurrent) and the ask timeout is clamped to 10 minutes
  • Long replies are chunked by raw markdown (fence-aware) so no HTML tag is ever cut at a message boundary; /voice summary and /keyboard persist through the settings writer
  • telegram.apiRoot with plain http is only accepted for loopback hosts (a local Bot API server); the webhook URL is logged without its secret path
  • webhooks.enabled: false removes the messenger write routes entirely; GET /update and /messenger require trusted callers
  • webAppEnabled: false takes the whole Mini App surface down (dashboard and every /api/* answer 404) and clears the menu button
  • The outbox queue (alerts, cron, autonomous messages) is multi-writer safe: all mutations take an exclusive lock and reload on-disk state, so two gateway processes sharing a home neither lose nor duplicate jobs; DLQ alerts bypass the queue and are rate-limited per chat
  • Note: turn replies to the user are streamed directly and are not covered by the outbox retry guarantee (by design — streaming edits cannot be replayed)
  • Inline keyboard replyMarkup sent via /messenger/send is schema-validated (button text/actions, sizes) before delivery
  • All state files (pairing, outbox, voice prefs) are written with 0600 permissions inside 0700 directories
  • State persistence is durable and versioned: every write is fsynced before the rename (directory fsynced after), each save keeps a .bak of the previous good version, files carry a schemaVersion with migrations from legacy formats, and a corrupted file is preserved as .corrupt-<ts> and recovered from .bak — pairing never silently wipes access (fail-closed with an explicit error)
  • Config sync is granular: changes that do not touch the transport slice (tokens, proxy, Bot API root, poll/webhook mode, adapter enablement, session scope) are applied live on the running gateway — active dialogs, streaming replies, pending asks and the Telegram polling offset survive a settings save; only transport changes recreate the gateway, and recreation is serialized (single-flight)
  • Hot path stays async: cwd resolution is cached (10 s TTL) so inbound messages never run synchronous stat/realpath (matters on network filesystems), outbox persistence batches enqueue bursts into one debounced write and is forced out on stop(); the plugin also loads cleanly into profiles without a webServer service (routes are skipped with a warning), and a reload/dispose never leaves a stopped gateway reachable
  • /mute (per chat) stops ALL outbound delivery to that chat — notify bridge, messenger.send, HTTP sends, cron prompts and forum mirroring report {ok, muted} and skip delivery; the interactive turn conversation is unaffected, and the dashboard shows real outbox/DLQ counters
  • The settings card is generated from the config schema: every setting is visible and editable (the advanced section covers allowlist mode, bot language, approval sensitivity, streaming, Mini App, cost footer, budget alerts, forum mirror and memory injection), secrets are only reported as configured-flags and never returned to the browser
  • sessionList: true (default) — enables /sessions and /resume commands in chat
  • sessionTitleFromChat: false (default) — name each new session after its originating chat (TG · @user, TG · Group › topic N) instead of generic generated titles
  • voiceMode: mirror / always / off — when to speak replies (also /voice)
  • tts.enabled / tts.maxChars — TTS gate and length cap
  • notifyBridge — forward non-messenger web session events to a home
  • telegram.proxyUrl: optional HTTP, HTTPS or SOCKS5 proxy URL (socks5://user:pass@127.0.0.1:1080, http://127.0.0.1:8080); socks:// and socks5h:// are aliases. Leave it empty to use TELEGRAM_PROXY / DSH_MESSENGER_TELEGRAM_PROXY / HTTPS_PROXY / ALL_PROXY from the environment, use off/none/direct to disable proxying entirely, and NO_PROXY/no_proxy rules are honoured. The tunnel is implemented with node:net/node:tls (no extra dependencies) and keeps normal TLS certificate verification for api.telegram.org
  • telegram.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 on the Plugins tab: a summary row (plugins.row.config) and the full settings page (plugins.item), with the legacy settings.plugin.item slot kept as a fallback for older DSH builds.
  • 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: ffmpeg on the host PATH

License

MIT

Badge

Listed here? Link back with this badge — paste the snippet into your repository README.

Listed on DSH Plugin badge
[![Listed on DSH Plugin](https://dsh-plugin.com/badges/listed.svg)](https://dsh-plugin.com/plugins/GooDAnDReaDY/dsh-messenger-gateway)