luzhengyangtx/dsh-telegram-duty

DeepSeek Harness 的 Telegram 值班网关:短信任务循环、全局审批转发、值班/本地切换、中/英文

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that enables remote task management, approval handling, and agent communication via Telegram. After installation and configuration, users can send tasks to a running DSH instance from their mobile phone via a custom Telegram bot, and receive task results, approval prompts, and agent queries directly on their phone. The plugin uses long-polling to check for new updates, and only wakes a DSH agent when a new message arrives, so it consumes zero tokens when idle. It requires DSH version 0.1.2-rc.1 or newer; users on older DSH versions must install the 0.4.0 version of the plugin to use it.

To get started, you first create a new bot by chatting with @BotFather on Telegram and copy the generated bot token. Next, you get your personal chat ID by messaging @userinfobot, then install the plugin to your DSH profile via the dsh plugin add command. After that, you add the token and chat ID to your DSH profile configuration file, restart DSH, and you can start sending tasks from your phone. It is designed for users who need to handle DSH tasks and approval requests when they are away from their local machine.

The plugin is licensed under MIT, with all core features available for free forever. A future commercial pro edition is planned that will add support for other messaging platforms and multi-user team functionality. It only accepts requests from your whitelisted chat ID, ignoring all other senders for security. It connects to Telegram directly by default, so you only need to configure a proxy if your network blocks Telegram. All configuration and update state is persisted to disk, so no progress is lost after DSH restarts, and it supports both English and Chinese interfaces.

这是一个专为DeepSeek Harness(DSH)开发的原生插件,实现了通过Telegram远程处理任务、接收代理回复和处理审批请求的功能。用户可以在手机上通过自建的Telegram机器人向DSH发送任务,处理完成后结果会返回至手机,插件仅在收到消息时唤醒代理,空闲状态零Token消耗。插件要求DSH版本不低于0.1.2-rc.1,旧版本DSH需安装0.4.0版插件才可正常运行。

典型使用流程为,先通过BotFather创建机器人并获取Token,再通过userinfobot获取个人聊天ID,随后在DSH中安装插件,在配置文件中填入Token和聊天ID,重启DSH即可使用。插件支持默认值班会话、指定现有会话处理任务、切换本地/远程值班模式,还提供了侧边栏快捷按钮和全局横幅提示状态。适合需要随时在外处理DSH任务和审批的用户使用。

插件采用MIT许可证,基础核心功能永久免费,未来计划推出付费专业版,新增多平台支持、团队协作等功能。仅允许白名单内的聊天ID发送请求,保障安全;默认直连Telegram,仅需在网络受限的时候配置代理。配置持久化存储,重启后不会丢失更新进度,支持中英文两种界面语言。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add @luzhengyangtx/dsh-telegram-duty

把 luzhengyangtx/dsh-telegram-duty 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-telegram-duty

Awesome DSH Plugin npm

Turn DeepSeek Harness (DSH) into your always-on pocket duty office: message a Telegram bot from your phone, the duty agent gets to work, and the result comes back to your phone. Idle cost is zero tokens — the plugin long-polls getUpdates and only wakes an agent when a message arrives.

中文说明

Requirements

DeepSeek Harness ≥ 0.1.2-rc.1 is required. Since v0.5.0 the plugin reads session history through the session.snapshotEvents() API, which does not exist in 0.1.1-rc.2 and older (it was introduced in dsh-v0.1.2-rc.1). If you are on 0.1.1-rc.2 or older, stay on npm 0.4.0 — the latest version will fail to load there.

Quick Start (≈10 minutes)

  1. Create a bot — chat with @BotFather, send /newbot, and copy the token (looks like 123456:ABC...).

  2. Find your chat id — send any message to @userinfobot (or to your new bot) and read the numeric id.

  3. Install the plugin — from inside a DeepSeek Harness checkout:

    dsh plugin --profile web add @luzhengyangtx/dsh-telegram-duty
    
  4. Configure — add to C:\Users\<you>\.dsh\profiles\web\cordis.patch.yml:

    - id: telegram-duty
      config:
        token: '123456:YOUR-BOT-TOKEN'   # step 1
        chatId: 123456789                # step 2 (whitelist)
        language: zh                     # or en
    
  5. Restart dsh web and send any message to your bot from the phone. Done — the duty agent answers.

While on duty, the web UI shows a banner telling you approvals are forwarded to your phone, with a one-click switch back.

Features

  • 📱 Task loop — Telegram message → dedicated "duty" DSH session (its agent has the standard tool set) → final reply back to Telegram; long replies are split under Telegram's message limit.
  • ⏳ Instant feedback — every task message is acknowledged immediately ("📨 Received, generating…") and the phone keeps showing the "typing…" animation until the result arrives; errors report a clear "⚠️ Processing error".
  • 🎯 Targeted sessions — /sessions lists your workspace sessions (live and offline, matching the web sidebar; blank drafts are hidden) with numbered buttons: tap one to route following messages there. Prefix one message with #N to send just that one to session N. /duty returns to the default duty route. Offline sessions are woken automatically on the first targeted message.
  • 🔐 Whitelist — only your own chat id is served; other senders are logged and ignored.
  • ✅ Global approval forwarding — in duty mode, approval requests from all sessions go to your phone with [✅ Approve] [⛔ Reject] buttons (tap to answer; typing 3 approve / 3 reject still works). Unanswered approvals time out to rejected (fail-closed, 10 minutes by default). /away warns when the web UI still holds unanswered approvals, and /unblock cancels turns stuck on them.
  • ❓ telegram_ask tool — when an agent needs you to choose between options, confirm something, or supply missing information, it pushes the question to your phone with one button per option; the duty agent is prompted to prefer it.
  • 📣 telegram_notify tool — any session's agent can proactively push a message to your phone (reports, reminders, notifications), no waiting required.
  • 🔀 Duty / local toggle
    • Enter duty: send any phone message, send /away, or flip watchMode in the web settings.
    • Back to local: send any message in the web UI, or send /back.
    • In local mode approvals stay in the web popup; in duty mode the popup is paused.
  • 🚩 Duty banner — while on duty, a frame-wide web banner shows "approvals are on your phone" with a one-click switch back.
  • 📱 Sidebar duty button — a "Duty" action beside Settings opens the duty session in one click (creating/waking it when needed), with a live status dot (amber on duty, gray locally).
  • 🗂 Durable — the getUpdates cursor and the watch mode persist across restarts; backlog is fast-forwarded on the very first run only.
  • 🌐 English & Chinese — every Telegram message respects the language setting (zh | en, default en).
  • 🌍 Direct-connection friendly — connects directly by default; configure proxy only when Telegram is blocked in your network (see the table below).

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-smarthome 下一个 Next dsh-client-ui-brand →