dsh-tuitui-bot
メンテナンス: 活発eayonlee/dsh-tuitui-bot
A DeepSeek Harness integration for the 360 Tuitui instant-messaging bot; the catalog does not describe its available workflows.
$ dsh plugin add dsh-tuitui-bot5
スター
3
フォーク
TypeScript
言語
MIT
ライセンス
2026-11-03
作成日
2026-11-09
最終プッシュ
README
基于 deepseek-harness (dsh) 的 360 推推机器人插件
在推推(Tuitui)单聊、群聊、团队频道帖子里直接对话 DeepSeek Harness。
简体中文 | English
这是什么
把推推机器人做成 dsh 的一个渠道前端:推推消息 → 归一化 → 中间件链 → dsh Agent; dsh 的文本/工具/审批/问答/交付物 → 推推消息、原生交互卡片、原地编辑流式输出。
传输层用推推官方 SDK(@qihoo/tuitui-bot-sdk),
上层是自带的洋葱中间件链:访问控制 → 历史缓冲 → 触发门控 → 清洗 → 限流 → 命令 →
并发串行 → 打字状态 → 引用解析 → 附件处理 → 上下文组包,顺序即行为契约。
快速开始
1. 准备机器人凭据
在推推机器人后台创建机器人,拿到 AppID 与 AppSecret。
2. 安装插件
只支持两种安装方式:npm 包,或者 GitHub Release 里的正式包(tgz)。两者是同一个版本、 同一份产物,装哪个都一样(从 0.1.33 起两边字节一致,v0.1.32 的 Release 附件已按 npm 产物重传)。
方式一 · npm(推荐)
dsh plugin --profile tuitui add @eayonlee/dsh-tuitui-bot
不带版本号 = registry 上的 latest,永远装到最新版。只有排障、复现旧问题时才固定版本
(把 <版本> 换成你要的那个号,别照抄示例):
dsh plugin --profile tuitui add @eayonlee/dsh-tuitui-bot@<版本>
方式二 · GitHub Release 直链
dsh plugin --profile tuitui add https://github.com/EayonLee/dsh-tuitui-bot/releases/latest/download/dsh-tuitui-bot.tgz
dsh-tuitui-bot.tgz 是每次发版都会覆盖上传的稳定文件名,配合 GitHub 的
releases/latest/download/ 永远解析到最新版——所以这条命令里没有版本号,也不会装成老版本。
要固定版本就用带版本号的那份(.../releases/download/v<版本>/dsh-tuitui-bot-<版本>.tgz)。
内网、断网、或者 npm 抽风的时候用这条——它直接从 GitHub 取包,不经过 npm registry。
除此之外没有别的安装渠道:不支持从源码目录装、不支持
github:EayonLee/dsh-tuitui-bot跟主干。 每个 Release / npm 版本都带完整构建产物lib/,装包本身不需要本地构建。
3. 配置凭据并启动
export TUITUI_BOT_APPID="你的AppID"
export TUITUI_BOT_SECRET="你的AppSecret"
export DEEPSEEK_API_KEY="你的 DeepSeek Key"
dsh --profile tuitui # 启动 agent + 推推长连接
也可以不配环境变量:直接启动后在 设置 → 推推机器人 里填写 appId/appSecret, 插件会调用
property.info()校验并把凭据写进 profile 的cordis.patch.yml。
4. 在推推里聊
- 私聊机器人:直接发消息
- 群聊:把机器人拉进群。默认是智能模式——它按自己的性格和上下文判断要不要说话;三档触发方式(
mentionPolicy):require(默认):只有 @ 才算叫它。smart:模型读最近对话自己判断要不要插嘴——别人互相聊天不接话,轮到自己或被问到才开口;判定提示词可在设置页改写。always:群里每条消息都回(只建议专用小群)。
- 团队频道:在频道里发帖并
@机器人(或回复机器人的帖子)
群聊里谁能批审批:默认只有触发这次审批的人能点「允许 / 拒绝」(审批是授权动作,
不该由别人代点);要退回到「群里谁都能批」,把 interactive.approvalRequesterOnly 设为 false。
提问(ask_user_question)相反,群里任何人都可以作答,先答的那条算数。
升级与卸载
升级就是用上面那两种方式之一装新版本(profile 原地替换),然后重启——部署成服务的用
sudo systemctl restart dsh-web,手动前台起的重跑 dsh --profile <name>:
# 方式一:npm(@latest = 最新;已装过就必须带,否则会留在原版本)
dsh plugin --profile <name> add @eayonlee/dsh-tuitui-bot@latest
# 方式二:Release 直链(稳定文件名 = 最新)
dsh plugin --profile <name> add https://github.com/EayonLee/dsh-tuitui-bot/releases/latest/download/dsh-tuitui-bot.tgz
dsh --profile <name> # 重启让新版本加载
升级要写成
…@eayonlee/dsh-tuitui-bot@latest:profile 里已经钉住具体版本号时, 不带版本号的add等于「装回原来那个号」,不会升级。
启动日志里也会提示:有新版本时打一行「有新版本 vX.Y.Z(当前 vA.B.C)」,只提示、不自动装。
设置页「已绑定」那行右侧也能做这件事:有新版本时点「更新到 vX.Y.Z」就跑完上面两步
(下载、校验、备份、安装)。宿主加载了 @deepseek-ai/dsh-hmr 时不需要重启——插件会就地
热重载,版本号自己变;没有 HMR 会明说需要重启。失败自动回滚到旧目录。
dsh --profile <name> --dump-config | grep -A3 im-tuitui 可以确认插件行已进入组合树。
卸载(两种安装方式卸载命令相同,按包名走):
dsh plugin --profile <name> remove @eayonlee/dsh-tuitui-bot
# 凭据写在 profile 的 cordis.patch.yml 里,需要的话一并手动删除
能做什么
功能一览
| 能力 | 说明 |
|---|---|
| 💬 三种会话形态 | 单聊、群聊、团队频道帖子(含回帖串),各自独立的会话上下文 |
| ⚡ 流式输出 | 首条消息拿到 msgid 后用 modifyText 原地刷新,不刷屏;降级时自动切成追加片段 |
| 🃏 原生交互卡片 | 审批 / 提问用推推交互卡片,点击后 modifyInteractive 原地更新为最终状态 |
| 🖼️ 富媒体理解 | 图片/文件/语音/视频落地到本地媒体目录,交给 agent 读取(视觉工具可选) |
| 📎 文件回传 | tuitui_send_file 工具 + present 交付物自动投递到当前会话 |
| 🧭 上下文感知 | 群历史缓冲、引用消息解析、发送者部门路径、@ 标记清洗 |
| 🧩 斜杠命令 | /new /compact /model /preset /status /stop 等,同步为推推快捷指令 |
| 🧠 原生步骤上报 | 通过 client.agent 上报模型/工具调用及可用的 Token 用量,推推客户端原生展示执行过程 |
| 🔐 四档访问控制 | open / allowlist / blocklist / disabled,单聊 / 群聊 / 帖子分别配置,黑白名单以标签录入 |
| 🗣️ 智能插话 | smart 模式下由模型读群聊上下文自行判断要不要开口,判定提示词可在设置页整段改写 |
| 🛠️ 端内设置页 | 凭据绑定 + 全部常用配置可视化编辑,保存即写 profile 并自动重载;名单是标签,工作区是下拉 |
内置命令
| 命令 | 说明 |
|---|---|
/new(别名 /reset /clear) |
开始新会话(清空上下文) |
/compact |
压缩会话历史(摘要替换旧记录) |
/model |
查看或切换模型(真在生成时会拒绝并提示,避免打断当前回答) |
/preset |
查看或切换 agent preset(新会话生效) |
/status |
当前会话状态(会话 id、模型、preset、消息数) |
/stop |
中止当前生成 |
/bot-ping |
延迟检测(传输 + 处理耗时) |
/bot-version |
版本信息 |
/bot-help |
全部命令 |
/auth |
访问控制自检(当前 peer 是否被允许) |
常用命令会同步到推推的快捷指令面板,用户无需记忆。
工具
| 工具 | 说明 |
|---|---|
tuitui_send_file |
把本地文件/URL/内存内容发到当前会话;默认不限制路径,想发什么发什么 |
tuitui_describe_image |
图像理解(需 vision.enabled):配了 vision.baseUrl 就走自己的端点,否则退回 dsh llm |
tuitui_draw |
图像生成(需 imageGeneration.enabled):出图并直接发到当前会话,返回本地文件路径 |
tuitui_group |
群管理:info / members / robot_in / user_is_in 只读;create / member_add / member_remove 要 confirm=true |
tuitui_history |
拉聊天记录:群或私聊,支持 limit(1–100)、cursor、order_asc。只读 |
tuitui_file |
文件:upload / query / batch_query / list_nodes / list_files / list_team_files;空间增删(add_node / delete_node / add_file)要 confirm=true |
tuitui_send |
消息花样:link / page / mixed;recall / modify / strong_notice / phone_alarm 要 confirm=true。strong_notice / phone_alarm 需单独申请接口权限,没开通时服务端回 errcode 6 |
tuitui_teams |
团队频道:channel_info / channel_posts / post_chain / post_tags / members / member_names / announcement 只读;send_post / edit_post / send_file 要 confirm=true |
tuitui_bot |
机器人自身:info / get_shortcuts 只读;set_name / set_avatar / set_shortcuts / set_workspace_menus 要 confirm=true |
写操作统一规则:不带
confirm=true直接报错退回。模型自己不会"顺手"改群、改身份、发强通知—— 它得先拿到一句明确的「执行」。
能读什么、读不到什么
その他 の他のプラグイン
deepwiki-rs
by sopaco
Turn code into clarity. Generate accurate technical docs and AI-ready context in minutes—perfectly structured for human teams and intelligent agents.
dsh-plugin-radar
by adamplatin123
An ecosystem radar for the DeepSeek Harness (dsh) plugin community that auto-discovers thousands of candidate plugins and runs continuous k8s-level validation, publishing the results as a browsable plugin catalog.
eac-pack
by ebony-vinyl
A bundled suite of DeepSeek Harness plugins designed to work together in one setup.
picgo-core
by picgo
:zap:The ultimate image uploading engine. Both CLI & API supports.
