alchemistwu/dsh-telegram0

dsh-telegram

用于 DeepSeek Harness 的极简、健壮的 Telegram 桥接插件,支持通过手机与智能体对话。

AI 分析

核心用途是实现手机端与 DSH 智能体的双向 Telegram 聊天。适合需要移动端远程交互、接收工具执行进度和进行人工确认(ask_user_question)的用户。

包名
dsh-telegram
版本
0.1.0
最近更新
2026年9月2日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:alchemistwu/dsh-telegram

dsh-telegram

Minimal, robust Telegram bridge for DSH — chat with your agent from your phone.

Zero runtime dependencies: hand-rolled long-polling transport over fetch, plain cordis plugin, strip-only TypeScript. ~800 lines.

Features

  • Inbound → agent turn: messages create/resume sessions and deliver via the agent-loop API (followup), with preset mounting, workspace attachment, and automatic TG MM-DD HH:mm titles
  • Outbound: typing indicator on turn start, 🔧 progress events, final assistant text on turn end
  • ask_user_question answerer: agent questions render as numbered Telegram messages; reply with a number (multi: 1,2) or free text. Without this the agent blocks forever — the only other answerer lives in the web UI
  • Commands: /new [hint], /sessions (numbered menu, newest first), /use (resumes offline sessions), /status, /stop
  • Safety: allowedChatIds allowlist (fail-closed), durable update offset, 429 retry_after backoff

Config

- id: telegram
  config:
    allowedChatIds: [123456789]
    workspacePath: /path/to/workspace   # optional; defaults to first registered workspace
    model:                              # optional
      provider: modal
      model: zai-org/GLM-5.3-Flash

Bot token resolution: config.tokenTELEGRAM_BOT_TOKEN env → .telegram-token file next to the package.

Development

npm test          # 28 tests: unit + e2e (real apply() through a fake network)
probe/            # runtime contract probe — boots in a real profile and
                  # executes every service call the plugin makes, because
                  # mocks encode the author's beliefs; the probe encodes nothing

License

MIT