mirai/docs/mirai-ecology.md

164 lines
33 KiB
Markdown
Raw Normal View History

2020-12-13 13:55:29 +08:00
# A brief introduction of Mirai Ecosystem
Mirai是一个免费开源的QQ机器人框架由于其开源和易拓展的优势现在已经有很多基于Mirai的官方和非官方衍生框架和应用(下文统一称为**项目**),其关系错综复杂。这里将简单为你介绍整个 **Mirai 生态中各个框架和应用的关系**
> 强烈建议你从头并按照**文章顺序和思路**阅读,即使你对 Mirai 生态有一定的了解。
## 目录:
1. Mirai
2. mirai-console
- chat-command
- mirai-api-http
- mirai-native
3. mirai-console-loader
## [Mirai](https://github.com/mamoe/mirai): 使用 [Kotlin](https://www.kotlincn.net/) 编写的高效率 QQ 机器人框架
Mirai正如你所见这个名字不带任何的前缀或后缀它是**整个生态的中心**,在这个生态中,所有的项目都直接或间接与 Mirai 有密不可分的关系Mirai为用户提供了最<u>基础</u><u>核心</u>的功能:**接收消息**与**发送消息**。
你需要明确了解的是Mirai 的定位是<u> QQ 机器人**框架**</u>,或者说它是一个**库(Library)**。<u>如果你觉得理解起来有点困难,你可以把它类比为**建筑的骨架**一栋只有建筑骨架的建筑是不能住人的你需要根据这个骨架来盖好这栋楼它才能住人。同样地Mirai 是不能直接启动的需要使用这个框架并按照你的想法来编写QQ机器人程序</u>
通常来说Mirai 就是一个 <u>QQ 机器人框架</u>,但是它的内部并不是一个单一的结构:
- [mirai-core](https://github.com/mamoe/mirai/tree/dev/mirai-core)QQ 的<u>协议实现</u>模块,它的工作是**解密从QQ服务器接收到的数据包**和**向QQ服务器发送数据包**,是底层的工作,它默认使用的是 **QQAndroidPad 协议**
- [mirai-core-api](https://github.com/mamoe/mirai/tree/dev/mirai-core-api)QQ 的核心功能接口,它依赖于 mirai-core 并提供开放的接口,如**接收消息****发送消息****禁言群员****修改群昵称**等。
它们的关系如下:
[![](https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgY2xhc3NEZWYgY29yZWhpZ2hsaWdodCBmaWxsOiNmOTYs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qPXCIpXG4gICAgbWlyYWljb3JlYXBpIC0tPiB85o-Q5L6b5Z-656GA5Yqf6IO9fG1pcmFpaW50ZXJmYWNlIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifSwidXBkYXRlRWRpdG9yIjpmYWxzZX0)
可以看到,协议内容只在 Mirai 内部使用,只有 mirai-core-api 对外提供了功能。
你需要使用 Kotlin 语言或 Java 语言来编写你的QQ机器人程序可以参考官方示例**[project-mirai/mirai-demos](https://github.com/project-mirai/mirai-demos)**
## [mirai-console](https://github.com/mamoe/mirai-console): Mirai 官方的可拓展式QQ机器人管理控制台
前面我们提到,你可以使用 Mirai 框架提供的对外开放接口来编写个性化QQ机器人程序而 mirai-console 就是 Mirai 官方开发组编写的QQ机器人程序它**在 Mirai 框架提供的基础功能的基础上进行了封装**并**进一步提供了更方便的开放接口**。
比如console 提供了**配置自动登录****自动配置/数据存储**功能,这样你就不需要自己考虑写配置登录或者数据存储了,减少了代码工作量。<u>承接上面的例子mirai-console 就相当于为你在建筑骨架上砌好了墙,分好了房间,这样你就能更容易地盖好这栋楼了</u>
**重要的是mirai-console 有 CLI 即 command-line interface 可以直接在终端运行它,并实时看到你的机器人状态、插件的运行情况,或者通过 console 提供的命令管理指令权限或者执行插件提供的指令等。**
同样,你需要使用 Kotlin 语言或 Java 语言来编写基于 mirai-console 的 QQ机器人程序在 mirai-console 中,你编写的程序被称作**插件(Plugin)**,它将被打包为 jar 文件,这样可以很方便发布你的机器人功能程序给其他人使用,把插件 mirai-console 指定的文件夹下,启动 mirai-console 就可以加载你的程序了。
> 你一定玩过 Minecraft 这里的插件就像 Minecraft 的 mod 一样!
当然,在编写 console 插件时,你**不仅能使用 console 提供的简便接口**,你**还可以同时使用 mirai-core-api 提供的基础接口**。
mirai-console 的内部也不是单一的结构,它分为**前端**和**后端**具体如下:
- [后端(backEnd)](https://github.com/mamoe/mirai-console/tree/master/backend):后端就是做了上述工作,即提供**指令****权限****自动数据**等开放接口。
- [前端(frontEnd)](https://github.com/mamoe/mirai-console/tree/master/frontend):前端就是启动 mirai-console 并监控后端运行状态的端口,上述 CLI 是前端的一种,即 [**mirai-console-terminal**](https://github.com/mamoe/mirai-console/tree/master/frontend/mirai-console-terminal),在终端启动的前端。另外还有其他两个前端,分别是可以在 Android 启动的 **[MiraiAndroid](https://github.com/mzdluo123/MiraiAndroid)** 和正在开发的图形界面 [**mirai-console-graphical**](https://github.com/mamoe/mirai-console/tree/master/frontend/mirai-console-graphical)。
后端就像是“**电脑主机**”,执行着核心工作,前端就像是“**显示器**”、“**鼠标**”和“**键盘**”,可以控制后端。
> 注意这里的比喻并不是完全符合,因为 console 没有前端就无法运行后端,而电脑主机没了显示器等可以自行工作。
将 mirai-console 放入上述关系图:
[![](https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgY2xhc3NEZWYgY29yZWhpZ2hsaWdodCBmaWxsOiNmOTYsc3Ryb2tlOiMzMzMsc3Ryb2tlLXdpZHRoOjNweDtcbiAgICBjbGFzc0RlZiBoaWdobGlnaHQgZmlsbDojZjg4LHN0cm9rZTojMzMzLHN0cm9rZS13aWR0aDozcHhcbiAgICBzdWJncmFwaCBtaXJhaSBbXCJNaXJhaSDmoYbmnrZcIl1cbiAgICAgICAgbWlyYWljb3JlYXBpKG1pcmFpLWNvcmUtYXBpKTo6OmNvcmVoaWdobGlnaHRcbiAgICAgICAgbWlyYWljb3JlcXFhbmRyb2lkKFwibWlyYWktY29yZTxici8-KFFRQW5kcm9pZCDljY_orq4pXCIpXG4gICAgICAgIG1pcmFpY29yZXFxYW5kcm9pZCAtLT4gfOaPkOS-m-WNj-iurnxtaXJhaWNvcmVhcGlcbiAgICBlbmRcbiAgICBtaXJhaWludGVyZmFjZShcIuS9oOe8luWGmeeahDxici8-5py65Zmo5Lq656iL5bqPXCIpXG4gICAgbWlyYWljb3JlYXBpIC0tPiB85o-Q5L6b5Z-656GA5Yqf6IO9fG1pcmFpaW50ZXJmYWNlXG4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uZC1hbmRyb2lkKFwiRnJvbnRFbmQ6IEFuZHJvaWRcIilcbiAgICAgICAgbWlyYWljb25zb2xlYmFja2VuZCAtLT4gbWlyYWljb25zb2xlZnJvbnRlbmQtdGVybWluYWxcbiAgICAgICAgbWlyYWljb25zb2xlYmFja2VuZCAtLT4gbWlyYWljb25zb2xlZnJvbnRlbmQtZ3JhcGhpY2FsXG4gICAgICAgIG1pcmFpY29uc29sZWJhY2tlbmQgLS0-IG1pcmFpY29uc29sZWZyb250ZW5kLWFuZHJvaWRcbiAgICBlbmRcbiAgICBzdWJncmFwaCBjb25zb2xlcGx1Z2lucyBbXCJNaXJhaSBDb25zb2xlIOaPkuS7tlwiXVxuICAgICAgICB5b3VybWlyYWlwbHVnaW4oXCLkvaDnvJblhpnnmoQgQ29uc29sZSDmj5Lku7ZcIilcbiAgICBlbmRcbiAgICB5b3VybWlyYWlwbHVnaW4gLS0-IG1pcmFpY29uc29sZWJhY2tlbmQiLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ)
你可以参考官方示例 [**Him188/mirai-console-example-plugin(Kotlin DSL)**](https://github.com/Him188/mirai-console-example-plugin) 和 **[Karlatemp/mirai-console-example-plugin(Groovy DSL)](https://github.com/Karlatemp/mirai-console-example-plugin)** 来了解如何编写一个 console 插件。
如果你想自己编写一个 console 插件,你可以使用这个模板:**[project-mirai/mirai-console-plugin-template](https://github.com/project-mirai/mirai-console-plugin-template)**。
## [chat-command](https://github.com/project-mirai/chat-command): Mirai Console 的官方的聊天命令插件
在 mirai-console 的前端中,我们提到可以在前端执行 console 内置和插件提供的**命令**,如果我们想在聊天环境(好友聊天/群聊天/临时会话)执行 console 命令,我们就需要官方提供的 chat-command并且console 中的权限管理正是管理群执行权限的。
将 chat-command 放入上述关系图:
[![](https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgY2xhc3NEZWYgY29yZWhpZ2h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ICAgICB5b3VybWlyYWlwbHVnaW4oXCLkvaDnvJblhpnnmoQgQ29uc29sZSDmj5Lku7ZcIilcbiAgICAgICAgY2hhdGNvbW1hbmQoXCJjaGF0LWNvbW1hbmQg5o-S5Lu2XCIpOjo6aGlnaGxpZ2h0XG4gICAgZW5kXG4gICAgeW91cm1pcmFpcGx1Z2luIC0tPiBtaXJhaWNvbnNvbGViYWNrZW5kXG4gICAgY2hhdGNvbW1hbmQgLS0-IG1pcmFpY29uc29sZWJhY2tlbmQiLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ)
## [mirai-api-http](https://github.com/mamoe/mirai-api-http): Mirai Console 的官方HTTP API插件
在 console 中提到,插件也可以使用 mirai-core-api 提供的基础接口, 而 mirai-api-http 插件就是一个将 mirai-core-api 的所有功能封装为 http 服务的插件,同时也提供了 WebSocket 服务。
这样即使你不懂 Java 或 Kotlin使用 mirai-api-http 插件,你也可以与 Mirai 交互,极大地增加了语言拓展性,也因此衍生出了许多基于 mirai-api-http 的社区 SDK。
这些社区 SDK 封装了 mirai-api-http 提供的接口且使用了其他语言的良好特性使编写QQ机器人程序变得更加容易高效。
将 mirai-api-http 和所有社区 SDK 放入上述关系图:
[![](https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgY2xhc3NEZWYgY29yZWhpZ2hsaWdodCBmaWxsOiNmOTYsc3Ryb2tlOiMzMzMsc3Ryb2tlLXdpZHRoOjNweDtcbiAgICBjbGFzc0RlZiBoaWdobGlnaHQgZmlsbDojZjg4LHN0cm9rZTojMzMzLHN0cm9rZS13aWR0aDozcHhcbiAgICBzdWJncmFwaCBtaXJhaSBbXCJNaXJhaSDmoYbmnrZcIl1cbiAgICAgICAgbWlyYWljb3JlYXBpKG1pcmFpLWNvcmUtYXBpKTo6OmNvcmVoaWdobGlnaHRcbiAgICAgICAgbWlyYWljb3JlcXFhbmRyb2lkKFwib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mYWNlXG4gICAgbWlyYWljb3JlYXBpIC0tPiB85bCB6KOF5Z-656GA5Yqf6IO9fG1pcmFpY29uc29sZWJhY2tlbmRcbiAgICBzdWJncmFwaCBtaXJhaWNvbnNvbGUgW1wiTWlyYWkgQ29uc29sZVwiXVxuICAgICAgICBtaXJhaWNvbnNvbGViYWNrZW5kKFwiQmFja0VuZFwiKVxuICAgICAgICBtaXJhaWNvbnNvbGVmcm9udGVuZC10ZXJtaW5hbChcIkZyb250RW5kOiB0ZXJtaW5hbFwiKVxuICAgICAgICBtaXJhaWNvbnNvbGVmcm9udGVuZC1ncmFwaGljYWwoXCJGcm9udEVuZDogZ3JhcGhpY2FsPGJyLz4o5byA5Y-R5LitKVwiKVxuICA
lua-mirai 使用了 [luakt](https://github.com/only52607/luakt) 库实现 Lua 语言和 Kotlin 的直接交互,它是基于 mirai-core-api 的,与 mirai-api-http 没有任何关系(。
## [mirai-native](https://github.com/iTXTech/mirai-native): 与 CoolQ 对接的一个通道
如果你是 酷Q 用户,想在 Mirai 中使用 酷Q 插件,你可以使用 mirai-native 插件,它可以加载 CQP.dll 并兼容**大部分**酷Q插件但**不支持** CPK 和解包的 DLL。
不过 酷Q 已经停止提供服务,我们也不再建议使用 酷Q 的插件。
将 mirai-native 放入上述关系图:
[![](https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgY2xhc3NEZWYgY29yZWhpZ2hsaWdodCBmaWxsOiNmOTYsc3Ryb2tlOiMzMzMsc3Ryb2tlLXdpZHRoOjNweDtcbiAgICBjbGFzc0RlZiBoaWdobGlnaHQgZmlsbDojZjg4LHN0cm9rZTojMzMzLHN0cm9rZS13aWR0aDozcHhcbiAgICBzdWJncmFwaCBtaXJhaSBbXCJNaXJhaSDmoYbmnrZcIl1cbiAgICAgICAgbWlyYWljb3JlYXBpKFwibWlyYWktY29yZS1hcGlcIik6Ojpjb3JlaGlnaGxpZ2h0XG4gICAgICAgIG1pcmFpY29yZXFxYW5kcm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c29sZWZyb250ZW5kLWdyYXBoaWNhbFxuICAgICAgICBtaXJhaWNvbnNvbGViYWNrZW5kIC0tPiBtaXJhaWNvbnNvbGVmcm9udGVuZC1hbmRyb2lkXG4gICAgZW5kXG4gICAgc3ViZ3JhcGggY29uc29sZXBsdWdpbnMgW1wiTWlyYWkgQ29uc29sZSDmj5Lku7ZcIl1cbiAgICAgICAgeW91cm1pcmFpY29uc29sZXBsdWdpbihcIuS9oOe8luWGmeeahCBDb25zb2xlIOaPkuS7tlwiKSAtLT4gbWlyYWljb25zb2xlYmFja2VuZFxuICAgICAgICBtaXJhaWFwaWh0dHAoXCJtaXJhaS1hcGktaHR0cCDmj5Lku7ZcI
## [**mirai-console-loader**](https://github.com/iTXTech/mirai-console-loader): Mirai Console 的官方一键启动器
前面说道我们可以直接在终端运行 mirai-console 的前端 mirai-console-terminal然而想运行起来 mirai-console-terminal 却不是很容易的事情:你需要下载好 Mirai 官方发布的 mirai-coremirai-console 和 mirai-console-terminal的 jar 文件,你还需要知道 terminal 前端的入口是 **net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader**,然后你还需要通过一大串指令启动它。
``java -cp "上述jar文件路径" net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader``
这种复杂的启动方式劝退了许多新手,尤其是未曾听说过 JVM 的新手。
mirai-console-loader 应运而生,它的工作就是简化 console 启动流程,一键帮你下载 jar 文件,自动更新,文件损坏检查...... 你能在手动启动时担心的问题 mirai-console-loader 都帮你想到了!你只需要:
``./mcl``
即可快速启动 mirai-console 的 terminal 前端。同时 mirai-console-loader 还有一些拓展功能,可以自定义你的启动流程。
在 mirai-console-loader 诞生之前,还有一个非官方的 mirai-console-terminal 一键启动器 MiraiOK但是我们已**<u>不推荐</u>**使用 MiraiOK。([为什么?](https://github.com/project-mirai/mirai-api-http/issues/212#issuecomment-743216244))
将 mirai-console-loader 放入上述关系图:
[![](https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgY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gfOWwgeijheWfuuehgOWKn-iDvXxtaXJhaWNvbnNvbGViYWNrZW5kXG4gICAgc3ViZ3JhcGggbWlyYWljb25zb2xlIFtcIk1pcmFpIENvbnNvbGVcIl1cbiAgICAgICAgbWlyYWljb25zb2xlYmFja2VuZChcIkJhY2tFbmRcIilcbiAgICAgICAgbWlyYWljb25zb2xlZnJvbnRlbmQtdGVybWluYWwoXCJGcm9udEVuZDogdGVybWluYWxcIilcbiAgICAgICAgbWlyYWljb25zb2xlZnJvbnRlbmQtZ3JhcGhpY2FsKFwiRnJvbnRFbmQ6IGdyYXBoaWNhbDxici8-KOW8gOWPkeS4rSlcIilcbiAgICAgICAgbWlyYWljb25zb2xlZnJvbnRlbmQtYW5kcm9pZChcIkZyb250RW5kOiBBbmRyb2lkXCIpXG4gICAgICAgIG1pcmFpY29uc29sZWJhY2tlbmQgLS0-IG1pcmFpY29uc29sZWZyb250ZW5kLXRlcm1pbmFsXG4gICAgICAgIG1pcmFpY29uc29sZWJhY2tlbmQgLS0-IG1pcmFpY29uc29sZWZyb250ZW5kLWdyYXBoaWNhbFxuICAgICAgICBtaXJhaWNvbnNvbGViYWNrZW5kIC0tPiBtaXJhaWNvbnNvbGVmcm9udGVuZC1hbmRyb2lkXG4gICAgZW5kXG4gICAgc3ViZ3JhcGggY
------
以上就是整个 Mirai 生态的概览,如有疏漏或错误,欢迎提出 Issue 修正。
实体关系图采用 [Mermaid](https://github.com/mermaid-js/mermaid) 绘制。