Files
AstrBot/docs/dev/0.overview.md
2026-03-23 21:35:18 +08:00

32 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 开发者日记@lightjunction
为了避免和主分支发生大量冲突新架构设计全部移动至了_internel包
目前API不稳定并不希望外部导入这个内部包
新增astrbot dev子命令用于启动新架构
概念:
核心运行时core runtime
核心运行时是主进程
主要是启动一个后端这个后端将改为使用fastapi开发
插件称呼为star
astrboot这个名字就和星系相关插件当然就是一个一个星星了
Galaxy是星系
我们的核心运行时需要一个协议和插件对话
我思考我们的插件最好是可以做到和lsp服务器或者mcp服务器那样
我们需要一套新的协议
我列举本项目采用的协议如下:
lsp协议client
mcp协议client + server
acp协议client + server
abp协议astrbot protocol client + server (相当于内置插件)
协议层只管传输
runtime则负责响应和调度
异步库使用anyio
## 覆盖率测试
需要完善覆盖率测试
## 类型标注
需要通过ty类型检查
避免使用Any cast
## 代码风格
需要通过ruff检查
## 细节
使用uv run 运行一切别用python xxxx