dsh-telegram-channel: Telegram Smartphone Remote Control

Preface

The DeepSeek Harness (DSH) plugin ecosystem is designed to extend host capabilities. For developers running DeepSeek Harness on a computer, inputting commands directly on a mobile phone is often inconvenient. The dsh-telegram-channel plugin provides a solution: by attaching to a local active session via a Telegram Bot, it enables synchronised interaction between the mobile phone and the computer.

Environment Requirements

  • DeepSeek Harness (DSH): Version 0.2.x (declared as ^0.2.0-rc.2 in peerDependencies; the plugin remains compatible until version 0.3.x is released).
  • Node.js: >= 22.

Installation

Installation commands vary depending on the host Profile. This plugin is forked from hi-wenw/dsh-telegram-channel to ensure compatibility with the Martty Host (dsh --profile martty).

# web profile
dsh plugin --profile web add github:zhang0098/dsh-telegram-channel

# martty profile
dsh plugin --profile martty add github:zhang0098/dsh-telegram-channel

Configuration

Set the following items in your environment variables or configuration:

Key / Env Var Description
token / DSH_TELEGRAM_TOKEN Bot token
allowedUserIds / DSH_TELEGRAM_ALLOWED_USER_IDS Whitelist (numbers, comma-separated). If left empty, usage is forbidden
allowAllUsers For debugging; set to true to allow all users
maxMessageLength Maximum message length, default 4096
pollingTimeoutSec Polling timeout in seconds, default 30
rendering Rendering mode, rich or html

Core Features

  • Session Binding: Use the /sessions command to select a workspace and session to bind. Once bound, text sent from the mobile phone will be treated directly as subsequent operations in that session.
  • Cold Session Support: The session list includes cold sessions (sessions not currently running). Upon selecting a cold session, the plugin automatically resumes it without closing the session window on the computer.
  • Dual-Channel Mirroring: After binding, prompts appear simultaneously in both Telegram and the computer’s TUI/Web interface. Whichever channel answers first renders the other channel’s input invalid.
  • Model Switching: When binding to a cold session, the last used model is retained. Subsequently, you can switch the model for the next turn using the /model command.

Commands

  • /sessions: List workspaces and sessions for binding purposes.
  • /last: View the last Q&A history.
  • /model: Switch the model to be used in the next turn.
  • /status: View the status of the currently bound session.
  • /unbind: Disconnect the current binding (does not close the computer session).
  • /help: Display help information.

Technical Details

  • Version Compatibility: DSH 0.2.x uses peerDependencies for version gating. If the host version does not match ^0.2.0-rc.2, the plugin bundle is skipped with the prompt skipping profile bundle.
  • Architectural Adjustments: The original version failed to start on Martty due to a hard declaration of inject: ['agents', 'apiProxy'] (as apiProxy is only provided in the web profile). This fork removes the hard dependency, switching to runtime detection. If the host lacks apiProxy, the /model command falls back to the ctx.llm + installModelSelection local path.
  • Session Query: Relies on the host’s ctx.sessionQuery.listSessions() (including cold sessions) and ctx.workspaceRegistry (for titles and sorting).

Conclusion

This plugin enables remote control of DSH sessions via Telegram, suitable for developers requiring access to DeepSeek Harness interaction on mobile or heterogeneous devices. The project is released under the MIT License.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye