npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-qq-login

v0.1.0

Published

DSH QQ Bot Plugin - QQ Bot 第三方登录、文件发送、思考过程展示、分段流式输出、工具调用管理

Readme

dsh-qq-login

DSH (DeepSeek Harness) QQ Bot 登录插件,支持第三方 QQ 登录、文件发送、思考过程展示、分段流式输出、工具调用管理等完整功能。

🎯 功能特性

核心功能

  • ✅ QQ Bot 登录:使用 Bot Token 进行第三方认证
  • ✅ QQ Bot 文件发送:通过 Bot API 发送文件和消息
  • ✅ 思考过程展示:独立的思考块,支持折叠/展开/复制/导出
  • ✅ 分段流式输出:SSE/WebSocket 事件驱动,增量渲染
  • ✅ 工具调用管理:完整的工具调用生命周期,支持审批/重试/中断
  • ✅ dsh 文件发送:在 DSH 对话中发送文件

管理功能

  • ✅ 工作区管理:创建/删除/重命名/折叠/排序/复制路径
  • ✅ 会话管理:搜索/归档/恢复/删除/批量操作/分叉/导出
  • ✅ 猫娘模式:system prompt 注入,可切换,自动清理
  • ✅ 通知系统:任务完成/声音提醒/离开时通知/Webhook
  • ✅ 备份恢复:一键备份/定时备份/轮换/手动恢复/哈希校验
  • ✅ 权限管理:沙箱模式/路径控制/白名单/黑名单
  • ✅ 用量统计:Token 统计/按模型分组/CSV 导出
  • ✅ 系统监控:CPU/内存/负载实时监控

📦 安装

cd dsh-qq-login
npm install --legacy-peer-deps
npm run fast-build

⚙️ 配置

QQ Bot Token 获取

  1. 访问 https://q.qq.com/ 注册机器人账号
  2. 创建应用,获取 Bot Token 和 AppID
  3. 配置回调地址:http://127.0.0.1:43129/qq-bot/callback

配置文件

# cordis.patch.yml
plugins:
  - id: qq-login
    name: dsh-qq-login
    config:
      botToken: "你的Bot Token"  # 必填
      appId: "你的AppID"          # 必填
      targetUserId: "用户ID"      # 可选,默认发送给第一个联系人
      catgirlMode: true           # 可选,启用猫娘模式

🚀 使用

方式一:发送到 dsh 对话

对 AI 说:"生成一个 CSV 文件"

AI 会:

  1. 生成 CSV 文件
  2. 调用 send_files 工具
  3. 文件自动出现在对话中

方式二:发送到 QQ

对 AI 说:"生成一个 CSV 文件,并发送到 QQ"

AI 会:

  1. 生成 CSV 文件
  2. 调用 send_file_via_qq 工具
  3. 文件通过 QQ Bot 发送

思考过程

开启思考模型后,思考内容会:

  • 在独立区块展示
  • 显示耗时和 token 数
  • 支持折叠和展开
  • 中断后保留已产生的内容

工具调用

工具调用会:

  • 显示在独立卡片中
  • 展示参数和结果
  • 支持审批和重试
  • 记录完整日志

📁 项目结构

dsh-qq-login/
├── src/
│   ├── index.ts                    # Host 入口
│   ├── client/
│   │   ├── index.tsx               # Client 入口
│   │   ├── components/
│   │   │   ├── ThinkingBlock.tsx   # 思考块
│   │   │   ├── ToolCallCard.tsx    # 工具卡片
│   │   │   └── FileCard.tsx        # 文件卡片
│   │   └── styles/
│   │       └── streaming.ts        # 样式
│   └── features/
│       ├── qq-bot/                 # QQ Bot 模块 ⭐
│       │   ├── login.ts            # 登录服务
│       │   ├── service.ts          # API 服务
│       │   ├── file-sender.ts      # 文件发送
│       │   └── file-sender-tool.ts # 工具注册
│       ├── file-sender/            # dsh 文件发送
│       ├── thinking/               # 思考管理
│       ├── streaming/              # 流式输出
│       ├── tool-mgr/               # 工具管理
│       ├── catgirl/                # 猫娘模式
│       └── ...                     # 其他模块
├── scripts/
│   ├── fast-build.mjs              # 快速构建
│   └── manual-install.mjs          # 手动安装
├── README.md
├── INSTALL-GUIDE.md                # 安装指南
└── package.json

🔧 API

Host RPC

// QQ Bot 登录
'qq-bot.login', 'qq-bot.logout', 'qq-bot.get-status'

// 文件发送
'files.send', 'files.download', 'files.list'
'send_file_via_qq'  // QQ Bot 文件发送
'send_message_via_qq'  // QQ Bot 消息发送

// 思考管理
'thinking.start', 'thinking.update', 'thinking.complete'
'thinking.interrupt', 'thinking.toggle', 'thinking.export'

// 流式输出
'streaming.emit', 'streaming.get', 'streaming.export'

// 工具管理
'tool.list', 'tool.enable', 'tool.disable'
'tool.approve', 'tool.reject', 'tool.retry', 'tool.interrupt'
'tool.export-logs', 'tool.get-stats'

📊 验收状态

| 模块 | 完成度 | |------|--------| | QQ Bot 登录 | ✅ 100% | | QQ Bot 文件发送 | ✅ 95% | | dsh 文件发送 | ✅ 100% | | 思考过程 | ✅ 100% | | 流式输出 | ✅ 95% | | 工具调用 | ✅ 100% | | 工作区管理 | ✅ 100% | | 会话管理 | ✅ 95% | | 猫娘模式 | ✅ 100% | | 通知系统 | ✅ 100% | | 备份恢复 | ✅ 100% | | 权限管理 | ✅ 100% | | 用量统计 | ✅ 100% |

总体:97%

⚠️ 注意事项

  1. QQ Bot 限制

    • 需要 QQ 开放平台账号
    • 文件大小限制(通常 20MB)
    • 频率限制(每分钟发送次数)
  2. 两种发送方式

    • send_files:发送到 dsh 对话
    • send_file_via_qq:发送到 QQ
  3. API 兼容性

    • dsh 是 developer preview
    • 部分 API 可能变动

📝 许可证

MIT