DSH HUB
首页插件商店插件包社区排行榜资源发布指南
插件源码
返回插件目录

Blue-2571 /

Blue-2571/dsh-telegram-bot

已验证

这个插件还没有填写简介。

★ 0 Stars0 Forks0 IssuesN/A 社区评分0 已确认安装
查看 GitHub
README来源: main@67f0cf1e

@blue/dsh-telegram-bot

English · 简体中文

A minimal single-purpose DeepSeek Harness (dsh) plugin: connect a Telegram bot to your dsh agent via long polling — no public endpoint needed.

Inspired by dsh-im-hub, but reduced to Telegram only: one adapter, no web settings card, no HTTP webhook surface.

  • One agent per chat (telegram:<chatId>), multi-turn context retained.
  • Agent-preset mounting: set agent.preset and the bot's sessions mount that preset, getting the same tools (bash, fs, ssh, ...) as a Web GUI session.
  • Whitelist access control (allowedUserIds).
  • Slack-style commands: /help /reset /status /model.
  • Long replies split at Telegram's 4096-char limit.
  • Idle chats disposed after agent.idleTimeoutMs.

Install

dsh plugin --profile web add @blue/dsh-telegram-bot

The row is disabled by default. Enable it from the profile's cordis.patch.yml:

- id: dsh-telegram-bot
  disabled: false
  config:
    telegram:
      token: '123456:ABC-DEF...'   # from @BotFather
      allowedUserIds: [6354114195] # your numeric Telegram user id
    agent:
      preset: standard             # mount the standard preset for full tools

Then restart the profile (dsh web).

Configuration

Key Default Description
enabled true Master switch.
telegram.token '' Bot token from @BotFather.
telegram.allowedUserIds [] Numeric user ids allowed to talk to the bot; empty = everyone. Set it in production.
telegram.timeoutSeconds 50 getUpdates long-poll timeout.
telegram.pollIntervalMs 500 Gap after a poll timeout/error.
agent.cwd '' Working directory for agent sessions (defaults to dsh's cwd).
agent.provider / agent.model '' Override model; empty = deployment default.
agent.preset '' Agent preset id to mount for bot sessions ('' = deployment default).
agent.maxMessageLength 4000 Max chars per outbound message.
agent.idleTimeoutMs 1800000 Idle time before a chat's agent is disposed (0 = never).
agent.instructionPrefix '' Prefix prepended to every user message.

Commands

Command Effect
/help Show command help.
/reset Clear this chat's context (fresh agent).
/status Show active chats / agents.
/model Show the current model selection.

Security

  • Force a whitelist. An empty allowedUserIds means anyone with the token can drive your agent — which can execute tools on the host.
  • The token lives in the profile's cordis.patch.yml; keep that file private (or reference an environment variable via !!js process.env.TG_BOT_TOKEN).

License

MIT

—/ 5

暂无评分

已验证 DSH bundle

Commit 67f0cf1e397a

社区评论

还没有评论,来写第一条。

DSH HUB

社区维护的 DSH 插件索引。不是 GitHub 或 DeepSeek AI 的官方产品。

社区资源API关于