
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Koishi 是一个在 Node.js 环境下运行,基于 CoolQ 和 CQHTTP 的 QQ 机器人框架。
它的名字和图标来源于东方 Project 中的角色古明地恋(Komeiji Koishi)。
Koishi 高度配置化的 CLI 命令可以让你无需写代码就搭建属于你的机器人。与此同时,CLI 还配备了丰富和人性化的提示,进一步提高调试体验。
Koishi 的 API 包括下面几个部分:
每一个部分都经过了精心的编写,可以让你轻松实现任何需求。
参见:API 文档
Koishi 在编写时,也同样编写了大量的官方插件作为补充。它们有些 Koishi 的基础功能,有些则为 Koishi 的使用提供了许多便利。更重要的是,这数十个插件都可以作为 Koishi 插件开发的极好示范。
参见:官方插件
Koishi 原生地支持了多机器人开发,同时为这些机器人之间互通数据、共用服务器、保证数据安全提供了原生的解决方案,这有助于在保持高性能的同时,将腾讯风控造成的影响降低到最小。
参见:多机器人开发
Koishi 在开发时借助了下面的工具:
这保证了其代码的正确性和可读性。
特性 | koishi 1.3.0 | cqhttp 1.2.0 | cq-websocket 2.0.2 | lemon-bot 0.6.0 | @ionjs/core 0.6.5 |
---|---|---|---|---|---|
依赖数量 | 22 / 10 | 62 | 37 | 65 | 73 |
HTTP | ✔️ | ✔️ | ❌ | ✔️ | ✔️ |
WebSocket | ✔️ | ❌ | ✔️ | ❌ | ❌ |
反向 WebSocket | ❌ | ❌ | ❌ | ❌ | ❌ |
监听器 | ✔️ | ✔️ | ✔️ | ❌ | ✔️ |
上下文 | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
中间件 | ✔️ | ❌ | ❌ | ❌ | ✔️ |
命令行 | ✔️ | ❌ | ❌ | ❌ | ❌ |
指令 | ✔️ | ❌ | ❌ | ✔️ | ❌ |
注:依赖数量如果表示为 X/Y,则 X 表示命令行工具依赖数量, Y 表示核心库依赖数量。
# 进入文件夹
cd my-bot
# 安装 Koishi
npm i koishi -g
# 初始化配置文件
koishi init
# 运行你的 Bot
koishi run
现在可以对你的机器人说话了:
> echo hello world
< hello world
注意: Koishi 要求您的 Node.js 的版本不小于 10,CQHTTP 的版本不小于 3.0。过低的 CQHTTP 版本将不会支持 Koishi 的某些功能。因此,我们建议您保持较新的 CQHTTP 版本以确保所有功能可用。
完整的文档在 这里。
参见 releases。
如果想对 Koishi 做出贡献,可以参考下面的指南:
与上面类似,但是针对的是 这个项目。
我们欢迎开发 Koishi 插件并发布到 NPM 供大家使用。如果愿意的话我们也会邀请插件开发者成为 Koishi 团队成员。
我们欢迎编写基于 Koishi 的机器人。如果有得意的作品也可以告诉我们,我们将在未来提供专门用于展示社区机器人的地方。
FAQs
Cross-Platform Chatbot Framework Made with Love
The npm package koishi receives a total of 1,159 weekly downloads. As such, koishi popularity was classified as popular.
We found that koishi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.