qqbot-cli 1.0.2__tar.gz → 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,18 +17,36 @@ qqbot
17
17
 
18
18
  ## 命令
19
19
 
20
+ 规则只有一条:
21
+
22
+ ```
23
+ qqbot [启动器参数] run [给 run.py 的参数]
24
+ ```
25
+
26
+ - **`run` 前面**:启动器自己的参数(`--dir`、`--upgrade`、`--skip-pip-check`)
27
+ - **`run` 后面**:**全部**原样交给 `run.py`,启动器不解释
28
+
20
29
  | 命令 | 作用 |
21
30
  |---|---|
22
- | `qqbot` | 没装过就走向导,装过了就直接启动 |
23
- | `qqbot init` | 重新走向导(不会删 `data/` 里的数据) |
24
- | `qqbot run` | 只启动,不问任何问题 |
31
+ | `qqbot init` | 首次安装 / 重新走向导(不会删 `data/` 里的数据) |
32
+ | `qqbot run` | 启动(用上次记住的安装目录) |
33
+ | `qqbot --dir D:\bots\qq run` | 指定目录启动 |
34
+ | `qqbot run --port 8888` | 临时换端口 |
35
+ | `qqbot run --no-bots` | 只开网页后台,不连 QQ |
36
+ | `qqbot run --check` | 只做自检,不启动 |
37
+ | `qqbot run --show-token` | 打印网页访问令牌 |
25
38
  | `qqbot export` | 把 `config.json` 和 `data/` 导出成 zip 备份 |
26
39
  | `qqbot uninstall` | 卸载(会问要不要先导出数据) |
27
- | `qqbot --dir D:\bots\qq` | 直接指定安装目录(不追问;可以在一台机器上装多份) |
28
40
  | `qqbot --upgrade` | 重新下载最新版,保留 `config.json` 和 `data/` |
29
41
  | `qqbot --version` | 显示启动器版本 |
30
42
 
31
- 安装目录会被**记住**,所以之后直接 `qqbot` 就能找到它;要换一份就用 `--dir`。
43
+ **单独输入 `qqbot`(不带 `run`)不会启动程序** —— 只会提示你可以做什么。
44
+
45
+ > 从 v2.0.0 起规则变了:以前 `qqbot` 会直接启动、参数要写成
46
+ > `qqbot run -- --port 555`。现在启动必须明确写 `run`,参数直接跟在后面,
47
+ > **不用再写 `--`**(写了会报错提示你去掉)。
48
+
49
+ 安装目录会被**记住**,所以之后直接 `qqbot run` 就能找到它;要换一份就用 `--dir`。
32
50
 
33
51
  ### 卸载
34
52
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qqbot-cli
3
- Version: 1.0.2
3
+ Version: 2.0.0
4
4
  Summary: QQBotMerged 启动器:一条命令装好并启动 QQ 官方机器人多开后台
5
5
  Author: L-web666
6
6
  License-Expression: AGPL-3.0-or-later
@@ -46,18 +46,36 @@ qqbot
46
46
 
47
47
  ## 命令
48
48
 
49
+ 规则只有一条:
50
+
51
+ ```
52
+ qqbot [启动器参数] run [给 run.py 的参数]
53
+ ```
54
+
55
+ - **`run` 前面**:启动器自己的参数(`--dir`、`--upgrade`、`--skip-pip-check`)
56
+ - **`run` 后面**:**全部**原样交给 `run.py`,启动器不解释
57
+
49
58
  | 命令 | 作用 |
50
59
  |---|---|
51
- | `qqbot` | 没装过就走向导,装过了就直接启动 |
52
- | `qqbot init` | 重新走向导(不会删 `data/` 里的数据) |
53
- | `qqbot run` | 只启动,不问任何问题 |
60
+ | `qqbot init` | 首次安装 / 重新走向导(不会删 `data/` 里的数据) |
61
+ | `qqbot run` | 启动(用上次记住的安装目录) |
62
+ | `qqbot --dir D:\bots\qq run` | 指定目录启动 |
63
+ | `qqbot run --port 8888` | 临时换端口 |
64
+ | `qqbot run --no-bots` | 只开网页后台,不连 QQ |
65
+ | `qqbot run --check` | 只做自检,不启动 |
66
+ | `qqbot run --show-token` | 打印网页访问令牌 |
54
67
  | `qqbot export` | 把 `config.json` 和 `data/` 导出成 zip 备份 |
55
68
  | `qqbot uninstall` | 卸载(会问要不要先导出数据) |
56
- | `qqbot --dir D:\bots\qq` | 直接指定安装目录(不追问;可以在一台机器上装多份) |
57
69
  | `qqbot --upgrade` | 重新下载最新版,保留 `config.json` 和 `data/` |
58
70
  | `qqbot --version` | 显示启动器版本 |
59
71
 
60
- 安装目录会被**记住**,所以之后直接 `qqbot` 就能找到它;要换一份就用 `--dir`。
72
+ **单独输入 `qqbot`(不带 `run`)不会启动程序** —— 只会提示你可以做什么。
73
+
74
+ > 从 v2.0.0 起规则变了:以前 `qqbot` 会直接启动、参数要写成
75
+ > `qqbot run -- --port 555`。现在启动必须明确写 `run`,参数直接跟在后面,
76
+ > **不用再写 `--`**(写了会报错提示你去掉)。
77
+
78
+ 安装目录会被**记住**,所以之后直接 `qqbot run` 就能找到它;要换一份就用 `--dir`。
61
79
 
62
80
  ### 卸载
63
81
 
@@ -8,7 +8,7 @@
8
8
  - **能扩**:支持 **AstrBot 官方格式插件**,且可以给每个机器人启用不同的插件;
9
9
  - **能备份**:可选 Cloudflare D1 云同步,换设备/重装可把数据拉回来。
10
10
 
11
- > 网页后台共 **11 个页面**、**57 个 HTTP 接口**,设置页 **18 个分组、118 个配置项**,全部有中文说明。
11
+ > 网页后台共 **11 个页面**、**57 个 HTTP 接口**,设置页 **19 个分组、132 个配置项**,全部有中文说明。
12
12
  > 设置页左侧带**分类导航**(按分组列出,点一下跳到对应区块,搜索时同步过滤),配置再多也不用翻。
13
13
 
14
14
  ---
@@ -153,7 +153,7 @@ python tests/simulate_message.py --type group --text "你好" # 往运行中
153
153
  | 聊天窗口 | 会话列表 + 消息流,发文本/图片/文件,引用、撤回、清空、未读计数 |
154
154
  | 运行状态 | 每个机器人在线状态、存储/插件概览、云同步状态与手动操作 |
155
155
  | 统计 | 今日 / 7 天 / 累计:收消息、回复、AI 调用、媒体数量与占用 |
156
- | 设置 | 18 个分组、118 个配置项;**左侧分类导航**可直接跳到任一分组(搜索时同步过滤);左上角切换「当前机器人」,按机器人的项只作用于它 |
156
+ | 设置 | 19 个分组、132 个配置项;**左侧分类导航**可直接跳到任一分组(搜索时同步过滤);左上角切换「当前机器人」,按机器人的项只作用于它 |
157
157
  | 插件管理 | 插件列表、诊断(未支持的能力会逐条列出)、全局启停、**按机器人勾选**、安全提示 |
158
158
  | 群管理 | 群列表、成员、禁言/解禁、群级配置覆盖、群名刷新 |
159
159
  | 日志查看 | 按文件读取/下载日志,可按关键字排查 |
@@ -360,33 +360,16 @@ python tests/simulate_message.py --type group --text "你好" # 往运行中
360
360
  | 插件数据 / 大文件 | `data/plugin_data/<插件名>/` |
361
361
  | 插件依赖 | `plugins/<插件名>/requirements.txt`(可选) |
362
362
 
363
- 以 `_` 或 `.` 开头的目录、裸 `.py` 文件都会被忽略。最小插件:
363
+ 以 `_` 或 `.` 开头的目录、裸 `.py` 文件都会被忽略。
364
364
 
365
- ```python
366
- from astrbot.api.event import filter, AstrMessageEvent
367
- from astrbot.api.star import Context, Star
368
- from astrbot.api import logger
365
+ > 📖 **插件怎么写、目录长什么样、兼容了哪些接口、哪些不支持** ——
366
+ > 全部在 [`plugins/README.md`](plugins/README.md)(含最小插件示例与要点)。
367
+ > 这里不重复,避免两份说明写出差异。
369
368
 
369
+ > ⚠️ **插件是任意 Python 代码,没有沙箱**:它能读写你机器上的任意文件
370
+ > (包括 `config.json` 里的 AppSecret、AI 密钥),也能联网、起线程。
371
+ > 只放你自己写的、或来源完全可信的插件。详见那份文档开头的警告。
370
372
 
371
- class MyPlugin(Star):
372
- def __init__(self, context: Context, config=None): # 有 _conf_schema.json 时官方会传 config
373
- super().__init__(context)
374
- self.config = config or {}
375
-
376
- @filter.command("hello")
377
- async def hello(self, event: AstrMessageEvent):
378
- """这是指令说明(会显示在指令面板里)"""
379
- yield event.plain_result(f"你好,{event.get_sender_name()}!")
380
-
381
- async def terminate(self):
382
- """插件卸载/停用时调用,可选"""
383
- pass
384
- ```
385
-
386
- - 兼容层实现了 `astrbot.api.*` 的常用子集:`Star` / `filter` / 事件 / 消息链 / 配置 /
387
- KV 存储(`put_kv_data` 等)/ `StarTools` / provider 调用,并模拟 `ASTRBOT_VERSION = 4.9.2`。
388
- - **暂不支持**(插件页会逐个列出,而不是静默失败):插件自带 Web 接口与 Pages、`register_llm_tool`、
389
- 文转图模板、会话控制器、知识库、Agent 执行器等 AstrBot 专有组件。
390
373
  - 仓库自带 4 个示例/实用插件:`astrbot_demo`(文字/图片/管理员指令)、`astrbot_plugin_dice`(骰子)、
391
374
  `astrbot_plugin_daily_checkin`(签到/积分/抽奖)、`astrbot_plugin_ollama`(本地 Ollama 接管普通消息)。
392
375
  - **安装**:把插件目录整个复制进 `plugins/` → 「插件管理」页点「丢弃修改并重载」;
@@ -546,18 +529,18 @@ QQ 官方限制:文件 200MB、图片 20MB;超过阈值会自动改用官方
546
529
  全部测试都是**离线**的(QQ API 客户端换成记录调用的桩,不联网、不消耗 token):
547
530
 
548
531
  ```bash
549
- python tests/test_offline.py # 端到端 575 项:收发、留存、上传、清空、禁言、配置、
532
+ python tests/test_offline.py # 端到端 584 项:收发、留存、上传、清空、禁言、配置、
550
533
  # 插件、AstrBot 官方目录、云同步、Markdown、群 @、指令标签…
551
534
  python tests/unit/test_markdown_send.py # 单元 50 项:Markdown 发送与格式回退
552
535
  python tests/unit/test_at_mentions.py # 单元 23 项:群 @ 官方标签与旧写法转换
553
536
  python tests/unit/test_cmd_tags.py # 单元 26 项:指令标签(回车/参数)与「只在 Markdown 生效」判定
554
- python tests/unit/test_plugin_safety.py # 单元 26 项:插件源码静态安全扫描
537
+ python tests/unit/test_plugin_safety.py # 单元 28 项:插件源码静态安全扫描
555
538
  python tests/unit/test_cloud_secrets.py # 单元 19 项:云同步上传前的敏感字段扫描
556
539
  python tests/check_frontend.py # 前端契约:元素 id、字段类型、分组完整性、机器人隔离
557
540
  node tests/dom_test_messages.js # 消息渲染 40 项(图片去重、文件消息、@ / 指令标签展示…)
558
541
  node tests/dom_test_conversations.js # 会话列表 7 项(防"上下跳动")
559
542
  node tests/dom_test_globals.js # 全局命名空间保护 24 项
560
- python tests/test_instance_lock.py # 单实例保护 12 项
543
+ python tests/test_instance_lock.py # 单实例保护 10 项
561
544
  python run.py --check # 装配自检(配置、存储、路由、表情/无意义判定)
562
545
  ```
563
546
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qqbot-cli"
7
- version = "1.0.2"
7
+ version = "2.0.0"
8
8
  description = "QQBotMerged 启动器:一条命令装好并启动 QQ 官方机器人多开后台"
9
9
  readme = "PACKAGING.md"
10
10
  requires-python = ">=3.9"
@@ -49,4 +49,9 @@ qqbot = "qqbot_cli.cli:main"
49
49
  packages = ["qqbot_cli"]
50
50
 
51
51
  [tool.setuptools.package-data]
52
- qqbot_cli = ["py.typed"]
52
+ qqbot_cli = [
53
+ "py.typed",
54
+ # 包里也放一份启动器说明:装完后用户在本地就能读到(命令、卸载、常见问题),
55
+ # 不用回 GitHub 找。内容与仓库根的 PACKAGING.md 相同,有测试校验一致性。
56
+ "PACKAGING.md",
57
+ ]
@@ -0,0 +1,137 @@
1
+ # QQBotMerged 启动器(`qqbot-cli`)
2
+
3
+ 一条命令装好并运行 [QQBotMerged](https://github.com/L-web666/QQBotMerged) —— 一个可多开的
4
+ QQ 官方机器人后台。
5
+
6
+ ```bash
7
+ pipx install qqbot-cli # 或: pip install --user qqbot-cli
8
+ qqbot
9
+ ```
10
+
11
+ 第一次运行会依次完成:**选安装目录 → 下载最新版 → 建虚拟环境 → 装依赖 → 几个必填项 → 启动**。
12
+ 之后再运行 `qqbot` 就是直接启动。
13
+
14
+ **安装目录由你自己选**:向导第一步就问(直接回车用默认的 `~/QQBotMerged`),
15
+ 也可以一开始就用 `--dir` 指定。配置、数据、日志都在这个目录里,
16
+ 想查看或改东西直接打开它即可 —— 装完向导会把 `cd` 命令打印出来。
17
+
18
+ ## 命令
19
+
20
+ 规则只有一条:
21
+
22
+ ```
23
+ qqbot [启动器参数] run [给 run.py 的参数]
24
+ ```
25
+
26
+ - **`run` 前面**:启动器自己的参数(`--dir`、`--upgrade`、`--skip-pip-check`)
27
+ - **`run` 后面**:**全部**原样交给 `run.py`,启动器不解释
28
+
29
+ | 命令 | 作用 |
30
+ |---|---|
31
+ | `qqbot init` | 首次安装 / 重新走向导(不会删 `data/` 里的数据) |
32
+ | `qqbot run` | 启动(用上次记住的安装目录) |
33
+ | `qqbot --dir D:\bots\qq run` | 指定目录启动 |
34
+ | `qqbot run --port 8888` | 临时换端口 |
35
+ | `qqbot run --no-bots` | 只开网页后台,不连 QQ |
36
+ | `qqbot run --check` | 只做自检,不启动 |
37
+ | `qqbot run --show-token` | 打印网页访问令牌 |
38
+ | `qqbot export` | 把 `config.json` 和 `data/` 导出成 zip 备份 |
39
+ | `qqbot uninstall` | 卸载(会问要不要先导出数据) |
40
+ | `qqbot --upgrade` | 重新下载最新版,保留 `config.json` 和 `data/` |
41
+ | `qqbot --version` | 显示启动器版本 |
42
+
43
+ **单独输入 `qqbot`(不带 `run`)不会启动程序** —— 只会提示你可以做什么。
44
+
45
+ > 从 v2.0.0 起规则变了:以前 `qqbot` 会直接启动、参数要写成
46
+ > `qqbot run -- --port 555`。现在启动必须明确写 `run`,参数直接跟在后面,
47
+ > **不用再写 `--`**(写了会报错提示你去掉)。
48
+
49
+ 安装目录会被**记住**,所以之后直接 `qqbot run` 就能找到它;要换一份就用 `--dir`。
50
+
51
+ ### 卸载
52
+
53
+ ```bash
54
+ qqbot uninstall
55
+ ```
56
+
57
+ 会先列出装了什么、占多大,然后问:
58
+
59
+ 1. **要不要先导出 `config.json` 和 `data/`?**(默认要)
60
+ 导出成一个 zip,里面**只有**这两样 —— 不含程序代码、不含 `.venv`、不含 `__pycache__`。
61
+ 2. **确认删除吗?**(默认否)
62
+
63
+ 只想备份不卸载就 `qqbot export`:
64
+
65
+ ```bash
66
+ qqbot export # 导到安装目录旁边的 xxx-backup-时间.zip
67
+ qqbot export --output D:\bak.zip # 指定位置
68
+ ```
69
+
70
+ 脚本里用可以跳过询问:`qqbot uninstall --no-export -y`。
71
+
72
+ **恢复**:把备份解压回一个目录,`qqbot --dir <那个目录> run` 就能继续用。
73
+
74
+ > 装了启动器不等于装了程序:`pipx uninstall qqbot-cli` 只移除启动器本身,
75
+ > 各安装目录里的程序和数据都不动。
76
+
77
+ ## 支持的系统
78
+
79
+ | 系统 | 支持 | 说明 |
80
+ |---|---|---|
81
+ | Windows 10/11 | ✅ | `cd /d`、`Scripts\python.exe`、`activate.bat` |
82
+ | Linux | ✅ | `cd`、`bin/python`、`source activate` |
83
+ | macOS | ✅ | 同 Linux |
84
+
85
+ 要求 Python **3.9+**(Werkzeug 3.1.9 的要求)。
86
+ Linux 上如果建不了虚拟环境,装一下系统包:`apt install python3-venv`。
87
+
88
+ ## 它做了什么、没做什么
89
+
90
+ **做了什么**
91
+
92
+ - **先问装到哪个目录**(回车用默认值;相对路径按当前目录解析;带引号也能识别)。
93
+ 目录里已有别的东西时会先提示、要求确认,不会闷头覆盖
94
+ - 从 GitHub Release 下载**正式版**(自动跳过草稿和预发布),校验大小上限、限制成员数、
95
+ 拒绝绝对路径与 `..`,防止压缩包搞坏事
96
+ - 在安装目录里建一个 `.venv`,把主程序的依赖装进去 —— **不污染你的系统 Python**
97
+ - 问几个必填项(AppID / AppSecret / AI 配置 / 端口),生成 `config.json`;
98
+ **留空也能装完**,之后在网页「设置」里改
99
+ - 自动生成网页访问令牌,装完直接打印带令牌的地址
100
+ - 用 `<安装目录>/.venv` 里的 python 跑 `run.py`
101
+
102
+ **没做什么**
103
+
104
+ - **不修改主程序的任何代码**:拉下来就是原来那个完整项目目录,
105
+ 它的自动更新、插件、云同步全都照常工作
106
+ - 不接管主程序的配置:主程序启动时会按自己的 schema 补全缺项
107
+ - 程序和数据都在你选的安装目录里,删目录即卸载;
108
+ 启动器只在系统配置目录里留一个小文件,记住「上次装在哪」
109
+ (`qqbot uninstall` 会一并清掉,删掉也不影响使用 —— 只是得用 `--dir` 指定目录)
110
+
111
+ ## 为什么装进虚拟环境
112
+
113
+ 主程序需要 `Werkzeug>=3.1.9`(一个安全修复版本)。直接装进系统 Python 可能和已有包冲突,
114
+ 也可能因为版本不对起不来。每个安装目录一个 `.venv`,互不干扰。
115
+
116
+ 启动器自己只依赖 `requests`,所以适合用 `pipx` 装(和 NoneBot 的 `nb-cli` 一样):
117
+
118
+ ```bash
119
+ pipx install qqbot-cli
120
+ ```
121
+
122
+ ## 目录结构
123
+
124
+ ```
125
+ <安装目录>/
126
+ ├── run.py ← 主程序入口
127
+ ├── config.json ← 启动器向导生成的,之后由主程序读写
128
+ ├── core/ web/ ... ← 主程序代码(随版本更新整体替换)
129
+ ├── data/ ← 你的数据(消息库、媒体、日志)—— 更新时保留
130
+ ├── plugins/ ← 插件
131
+ ├── .venv/ ← 这个安装专用的虚拟环境
132
+ └── .qqbot-install.json ← 启动器的安装记录(版本、sha256)
133
+ ```
134
+
135
+ ## 许可证
136
+
137
+ AGPL-3.0(与主程序一致)。
@@ -13,4 +13,4 @@
13
13
  自动更新、插件机制全都照常工作,不需要改任何一行代码。
14
14
  """
15
15
 
16
- __version__ = "1.0.2"
16
+ __version__ = "2.0.0"
@@ -156,7 +156,7 @@ def _finish_config_only(install_dir: str, marker: Dict) -> int:
156
156
 
157
157
  try:
158
158
  if wizard.ask_yes("现在启动吗?", default=True):
159
- return do_run(install_dir)
159
+ return do_run(install_dir, extra=extra_args)
160
160
  except (EOFError, KeyboardInterrupt):
161
161
  print()
162
162
  print()
@@ -165,10 +165,13 @@ def _finish_config_only(install_dir: str, marker: Dict) -> int:
165
165
 
166
166
 
167
167
  def do_install(install_dir: str = "", force_wizard: bool = False,
168
- upgrade: bool = False, dir_given: bool = False) -> int:
168
+ upgrade: bool = False, dir_given: bool = False,
169
+ skip_pip_check: bool = False,
170
+ extra_args: Optional[List[str]] = None) -> int:
169
171
  """下载 + 建环境 + 向导。返回进程退出码。
170
172
 
171
173
  `dir_given` 表示用户用 `--dir` 明确指定了目录 —— 那种情况不再重复询问。
174
+ `skip_pip_check` 表示用户明确表示"我知道 pip 旧,还是要装"。
172
175
  """
173
176
  runner.check_python()
174
177
 
@@ -180,7 +183,7 @@ def do_install(install_dir: str = "", force_wizard: bool = False,
180
183
 
181
184
  already = runner.is_installed(install_dir)
182
185
  if already and not upgrade and not force_wizard:
183
- return do_run(install_dir)
186
+ return do_run(install_dir, extra=extra_args)
184
187
 
185
188
  # **装好了但还缺配置**(上次向导被取消)→ 只补配置,不重新下载。
186
189
  # 这也是 `qqbot` auto 模式在那种情况下的目标路径。
@@ -228,6 +231,12 @@ def do_install(install_dir: str = "", force_wizard: bool = False,
228
231
  progress=_progress_printer())
229
232
  _finish_progress()
230
233
  _ok("下载并解压完成(sha256 %s…)" % (result.get("sha256") or "")[:12])
234
+ # 把 commit 短 SHA 打出来(审计 R-01 的建议):
235
+ # tag 是可移动的,commit 不是 —— 事后想核对"装的到底是哪一版",
236
+ # 认这个短 SHA 比认 tag 可靠。
237
+ if result.get("commit"):
238
+ _info("来源提交:%s(%s)" % (str(result["commit"])[:12],
239
+ result.get("tag") or "?"))
231
240
  except fetch.FetchError as exc:
232
241
  _finish_progress()
233
242
  _fail(str(exc))
@@ -240,12 +249,18 @@ def do_install(install_dir: str = "", force_wizard: bool = False,
240
249
  _ok("虚拟环境就绪")
241
250
  # 装依赖之前先看 pip 版本:太旧的 pip 可能信任已出事的证书,
242
251
  # 在不可信网络里装包有被中间人顶替的风险(见 runner.MIN_PIP_VERSION)。
243
- pip_info = runner.check_pip(python)
244
- if pip_info.get("ok"):
245
- if pip_info.get("version"):
246
- _ok("pip 版本 %s" % pip_info["version"])
247
- else:
248
- _info("注意:pip 版本偏低,见上面的说明(不影响继续安装)")
252
+ #
253
+ # **不合格就停下**(审计 DEP-PIP-001)。以前只是提示一句就继续,
254
+ # 等于在这个风险最集中的环节(联网装依赖)只挂了个"请注意"的牌子。
255
+ # 版本读不出来也算不合格:无法判断是否安全时应当失败关闭。
256
+ pip_info = runner.check_pip(python, progress=_info)
257
+ if not pip_info.get("ok"):
258
+ if not skip_pip_check:
259
+ _fail(pip_info.get("message") or "pip 版本检查未通过")
260
+ return 1
261
+ _info("已按 --skip-pip-check 跳过 pip 版本检查,继续安装(风险自负)")
262
+ elif pip_info.get("version"):
263
+ _ok("pip 版本 %s" % pip_info["version"])
249
264
  runner.install_requirements(install_dir, python, progress=_info)
250
265
  versions = runner.verify_dependencies(python)
251
266
  _ok("依赖安装完成")
@@ -309,7 +324,7 @@ def do_install(install_dir: str = "", force_wizard: bool = False,
309
324
  # ---- 问一句要不要现在启动
310
325
  try:
311
326
  if wizard.ask_yes("现在启动吗?", default=True):
312
- return do_run(install_dir)
327
+ return do_run(install_dir, extra=extra_args)
313
328
  except (EOFError, KeyboardInterrupt):
314
329
  print()
315
330
  print()
@@ -336,8 +351,13 @@ def do_run(install_dir: str, extra: Optional[List[str]] = None) -> int:
336
351
  _info("重新运行 `qqbot init` 可以重建。")
337
352
  return 1
338
353
  marker = runner.read_marker(install_dir)
354
+
339
355
  print()
340
356
  _info("启动 QQBotMerged(版本 %s)" % (marker.get("tag") or "未知"))
357
+ if extra:
358
+ # 把要传的参数打出来:用户能一眼确认"我写的 --port 555 真的进去了",
359
+ # 而不是启动后发现端口没变再回来怀疑。
360
+ _info("传给主程序的参数:%s" % " ".join(extra))
341
361
  _info("按 Ctrl+C 停止")
342
362
  print()
343
363
  try:
@@ -501,15 +521,40 @@ def do_uninstall(install_dir: str, export: Optional[bool] = None,
501
521
 
502
522
  # ---------------------------------------------------------------- 入口
503
523
  def build_parser() -> argparse.ArgumentParser:
524
+ # 完整说明随包一起装着(qqbot_cli/PACKAGING.md),把路径打在帮助末尾,
525
+ # 用户不用回 GitHub 找。
526
+ doc_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
527
+ "PACKAGING.md")
528
+ doc_hint = ""
529
+ if os.path.exists(doc_path):
530
+ doc_hint = "\n完整说明:%s" % doc_path
504
531
  parser = argparse.ArgumentParser(
505
532
  prog="qqbot",
506
533
  description="QQBotMerged 启动器:下载程序、建环境、走向导、启动、卸载。",
507
- epilog="不给子命令时:没装过就走向导,装过了就直接启动。",
534
+ epilog=(
535
+ "命令规则只有一条:\n"
536
+ " qqbot [启动器参数] run [给 run.py 的参数]\n"
537
+ "\n"
538
+ " · run **前面**:启动器自己的参数(--dir / --upgrade / --skip-pip-check);\n"
539
+ " · run **后面**:全部原样交给 run.py,启动器不解释。\n"
540
+ "\n"
541
+ "常用例子:\n"
542
+ " qqbot init 首次安装\n"
543
+ " qqbot run 启动(用上次记住的目录)\n"
544
+ " qqbot --dir D:/mybot run 指定目录启动\n"
545
+ " qqbot run --port 8888 临时换端口\n"
546
+ " qqbot run --no-bots 只开网页后台,不连 QQ\n"
547
+ " qqbot run --check 只做自检,不启动\n"
548
+ " qqbot run --host 0.0.0.0 --port 9000 让局域网也能访问\n"
549
+ " qqbot run --show-token 打印网页访问令牌\n"
550
+ "\n"
551
+ "**单独输入 qqbot(不带 run)不会启动程序**,只会提示你可以做什么。"
552
+ + doc_hint),
508
553
  formatter_class=argparse.RawDescriptionHelpFormatter)
509
554
  parser.add_argument("command", nargs="?", default="auto",
510
555
  choices=["auto", "init", "run", "export", "uninstall",
511
556
  "version"],
512
- help="auto=智能(默认)/ init=重新走向导 / run=只启动 / "
557
+ help="init=首次安装 / run=启动(后面的参数全部交给 run.py)/ "
513
558
  "export=导出 config.json 与 data/ / uninstall=卸载")
514
559
  parser.add_argument("--dir", dest="install_dir", default="",
515
560
  help="安装目录(默认 %s)" % paths.default_install_dir())
@@ -526,26 +571,109 @@ def build_parser() -> argparse.ArgumentParser:
526
571
  help="卸载时跳过最后的确认(脚本里用)")
527
572
  parser.add_argument("-v", "--version", action="store_true",
528
573
  help="显示启动器版本")
574
+ parser.add_argument("--skip-pip-check", dest="skip_pip_check",
575
+ action="store_true",
576
+ help="跳过 pip 版本检查强行安装(pip 过旧时默认拒绝,"
577
+ "因为旧 pip 可能信任已出事的证书)")
529
578
  return parser
530
579
 
531
580
 
581
+
582
+
583
+ def _split_at_run(argv: List[str]):
584
+ """在 `run` 处把参数切成两段:`(启动器部分, 主程序部分)`。
585
+
586
+ **规则(唯一的一条)**:
587
+ qqbot [启动器参数] run [run.py 的全部参数]
588
+
589
+ · `run` **前面**的一切归启动器(`--dir` / `--upgrade` / `--skip-pip-check`…);
590
+ · `run` **后面**的一切原样给 run.py,启动器不解释 ——
591
+ 所以 `qqbot run --port 8888` 直接就能用,不用写 `--`。
592
+
593
+ 为什么用这种"在子命令处切一刀"的写法,而不是 `parse_known_args`:
594
+ `parse_known_args` 只会把**启动器不认识的**参数捡出来,
595
+ `--dir` 这种两边都可能有的参数就会语义模糊。切成两段以后,
596
+ "run 右边的都是主程序的"这条规则没有例外,用户不用记特例。
597
+
598
+ 找不到 `run` 就返回 `(argv, None)` —— 调用方据此判断"没让启动"。
599
+ """
600
+ items = list(argv or [])
601
+ for index, item in enumerate(items):
602
+ if item == "run":
603
+ return items[:index], items[index + 1:]
604
+ return items, None
605
+
606
+
532
607
  def main(argv: Optional[List[str]] = None) -> int:
608
+ if argv is None:
609
+ argv = sys.argv[1:]
610
+
611
+ # 先在 `run` 处切一刀:右边的全部是给 run.py 的
612
+ launcher_argv, program_args = _split_at_run(argv)
533
613
  parser = build_parser()
534
- args = parser.parse_args(argv)
614
+ args = parser.parse_args(launcher_argv)
535
615
 
536
616
  if args.version or args.command == "version":
537
617
  print("qqbot-cli %s" % __version__)
538
618
  return 0
539
619
 
620
+ # ---- 有没有"要求启动"
621
+ wants_run = program_args is not None
622
+ if args.command in ("init", "export", "uninstall"):
623
+ if wants_run:
624
+ _fail("`%s` 不能和 `run` 一起用" % args.command)
625
+ return 2
626
+ elif args.command == "auto":
627
+ # **`qqbot` 不带子命令不再启动程序**。
628
+ # 以前是"没装过就走向导、装过了就启动"—— 埋了个坑:
629
+ # 想看一眼帮助/版本却把机器人起起来了。现在启动必须明确写 `run`。
630
+ if not wants_run:
631
+ _fail("没有指定要做什么。")
632
+ print()
633
+ print(" 启动程序: qqbot run")
634
+ print(" 首次安装: qqbot init")
635
+ print(" 查看帮助: qqbot --help")
636
+ print()
637
+ _info("要给程序传参数就直接写在 run 后面,例如 `qqbot run --port 8888`")
638
+ return 2
639
+ elif wants_run:
640
+ _fail("`run` 前面应该写子命令或什么都不写,不要写 %r" % args.command)
641
+ return 2
642
+
540
643
  # 用户有没有显式给 --dir:给了就不再追问装到哪
541
644
  dir_given = bool(str(args.install_dir or "").strip())
542
645
  # **没给 --dir 时不要立刻回落到默认目录**:先问用户装哪(首次安装),
543
646
  # 或者用上次记住的目录(之后启动)。所以这里只在给了 --dir 时才展开。
544
647
  install_dir = paths.expand_dir(args.install_dir) if dir_given else ""
648
+ # run 右边的参数就是主程序参数(None 表示"这次不是启动")
649
+ passthrough = list(program_args or [])
650
+
651
+ # **旧写法 `qqbot run -- --port 555` 直接拒绝**,别让它蒙混过去。
652
+ # 新规则下 `run` 后面的一切都归 run.py,那个 `--` 会被原样传过去 ——
653
+ # run.py 的 argparse 会把它当位置参数分隔符,用户以为参数生效了、
654
+ # 实际可能没生效。与其让人踩坑,不如明确说"不用写 -- 了"。
655
+ if "--" in passthrough:
656
+ _fail("不需要再写 `--` 了。")
657
+ print()
658
+ print(" 旧写法: qqbot run -- --port 8888")
659
+ print(" 新写法: qqbot run --port 8888")
660
+ print()
661
+ _info("规则只有一条:run 后面的一切都直接交给 run.py。")
662
+ return 2
545
663
 
546
664
  try:
547
- if args.command == "run":
548
- return do_run(paths.resolve_install_dir(args.install_dir))
665
+ if wants_run:
666
+ # **显式 `run` 时必须指明目录**(`--dir` 写前面,或上次记住的)。
667
+ # 不会在启动时弹"装到哪"的向导 —— 那是 init 的事。
668
+ target = (paths.expand_dir(args.install_dir) if dir_given
669
+ else paths.remembered_install_dir())
670
+ if not target:
671
+ _fail("找不到安装目录。")
672
+ print()
673
+ print(" 指定目录启动: qqbot --dir <安装目录> run")
674
+ print(" 首次安装: qqbot init")
675
+ return 2
676
+ return do_run(target, extra=passthrough)
549
677
  if args.command == "export":
550
678
  target_dir = paths.resolve_install_dir(args.install_dir)
551
679
  if not dir_given and not os.path.isdir(target_dir):
@@ -572,8 +700,11 @@ def main(argv: Optional[List[str]] = None) -> int:
572
700
  dir_given = True
573
701
  return do_install(install_dir, force_wizard=True,
574
702
  upgrade=runner.is_installed(install_dir),
575
- dir_given=True)
576
- # auto:先看记住的那份装没装
703
+ dir_given=True,
704
+ skip_pip_check=args.skip_pip_check,
705
+ extra_args=passthrough)
706
+ # 走到这里只可能是 `qqbot --upgrade`(不带子命令的升级):
707
+ # 对记住的目录重新下载安装。**不启动程序** —— 启动必须写 `run`。
577
708
  remembered = paths.remembered_install_dir()
578
709
  if not dir_given and remembered and runner.is_installed(remembered) \
579
710
  and not args.upgrade:
@@ -583,9 +714,15 @@ def main(argv: Optional[List[str]] = None) -> int:
583
714
  not os.path.exists(os.path.join(remembered, "config.json")):
584
715
  _info("上次没写配置,先补一下(不会重新下载)。")
585
716
  return do_install(remembered, force_wizard=True,
586
- upgrade=False, dir_given=True)
587
- return do_run(remembered)
588
- return do_install(install_dir, upgrade=args.upgrade, dir_given=dir_given)
717
+ upgrade=False, dir_given=True,
718
+ skip_pip_check=args.skip_pip_check,
719
+ extra_args=passthrough)
720
+ _info("已经装在:%s" % remembered)
721
+ _info("启动它请用:qqbot run")
722
+ return 0
723
+ return do_install(install_dir, upgrade=args.upgrade, dir_given=dir_given,
724
+ skip_pip_check=args.skip_pip_check,
725
+ extra_args=passthrough)
589
726
  except KeyboardInterrupt:
590
727
  print()
591
728
  _info("已取消。")
@@ -18,10 +18,15 @@ import tarfile
18
18
  import tempfile
19
19
  import zipfile
20
20
  from typing import Callable, Dict, List, Optional, Tuple
21
+ from urllib.parse import quote as _quote
21
22
  from urllib.parse import urljoin, urlparse
22
23
 
23
24
  from . import paths
24
25
 
26
+ # 仓库标识:和主程序 `core/version.py` 的 REPO_SLUG 保持一致。
27
+ # **启动器不能在安装前 import core**(那时程序还没下载),所以这里写一份。
28
+ REPO_SLUG = "L-web666/QQBotMerged"
29
+
25
30
  logger = logging.getLogger("qqbot_cli")
26
31
  if not logger.handlers:
27
32
  logger.addHandler(logging.NullHandler())
@@ -109,6 +114,85 @@ def _get_following_redirects(requests, url: str, timeout: int,
109
114
  raise FetchError("重定向次数过多(超过 %d 次)" % max_hops)
110
115
 
111
116
 
117
+ _SHA_RE = re.compile(r"^[0-9a-f]{40}$")
118
+ # sha256 是 64 位十六进制,比 git 的 40 位 commit SHA 长 —— 两个不能混用同一个正则
119
+ _SHA256_RE = re.compile(r"^[0-9a-f]{64}$")
120
+
121
+
122
+ def resolve_tag_commit(tag: str, timeout: int = 30) -> str:
123
+ """把 tag 解析成它指向的 commit SHA(审计 R-01 的修复核心)。
124
+
125
+ **为什么必须做这件事**:GitHub 的 tag 是**可移动**的 —— 有人改了它指向,
126
+ `archive/<tag>.tar.gz` 就会给你另一份代码。按 commit 下载就不一样:
127
+ 同一份字节永远对应同一个 commit。
128
+
129
+ 这和应用内更新器(`core/updater.py`)用的是同一套双源校验:
130
+ ① refs 接口说"这个 tag 指向哪个 commit";
131
+ ② 实际按 commit 下载 —— 两者必须对得上。
132
+
133
+ 两种 tag 都要处理:
134
+ · 轻量 tag:ref 直接指向 commit;
135
+ · 附注 tag:ref 指向一个 `tag` 对象,里面 `object.sha` 才是 commit
136
+ (本项目发布用的就是附注 tag,这条分支一定会走到)。
137
+ """
138
+ ref = str(tag or "").strip()
139
+ if not ref:
140
+ raise FetchError("没有指定版本标签")
141
+ url = "https://api.github.com/repos/%s/git/ref/tags/%s" % (
142
+ REPO_SLUG, _quote(ref, safe=""))
143
+ requests = _requests()
144
+ try:
145
+ response = _get_following_redirects(
146
+ requests, url, timeout,
147
+ headers={"User-Agent": USER_AGENT,
148
+ "Accept": "application/vnd.github+json"})
149
+ except FetchError:
150
+ raise
151
+ except Exception as exc:
152
+ raise FetchError("查询 tag %s 失败:%s" % (ref, exc))
153
+ if response.status_code != 200:
154
+ raise FetchError("查询 tag %s 失败:HTTP %s" % (ref, response.status_code))
155
+ try:
156
+ payload = response.json()
157
+ except Exception:
158
+ raise FetchError("tag %s 的信息不是合法 JSON" % ref)
159
+
160
+ target = (payload or {}).get("object") or {}
161
+ sha = str(target.get("sha") or "").lower()
162
+ if str(target.get("type") or "") == "tag":
163
+ # 附注 tag:再解一层,拿到真正的 commit
164
+ inner = "https://api.github.com/repos/%s/git/tags/%s" % (REPO_SLUG, sha)
165
+ try:
166
+ response2 = _get_following_redirects(
167
+ requests, inner, timeout,
168
+ headers={"User-Agent": USER_AGENT,
169
+ "Accept": "application/vnd.github+json"})
170
+ annotated = response2.json()
171
+ except Exception as exc:
172
+ raise FetchError("解析附注 tag %s 失败:%s" % (ref, exc))
173
+ sha = str((((annotated or {}).get("object")) or {}).get("sha") or "").lower()
174
+
175
+ if not _SHA_RE.match(sha):
176
+ raise FetchError("解析 tag %s 的 commit 失败(拿到 %r)" % (ref, sha))
177
+ return sha
178
+
179
+
180
+ def release_digest(release: Dict) -> str:
181
+ """从 release 的 assets 里找官方给的 sha256(GitHub 的 `digest` 字段)。
182
+
183
+ 找得到就返回 `sha256:xxx` 里的 xxx;找不到返回空串。
184
+ 有了它,`verify_sha256()` 就有"可信基准"可比对,不再是死代码。
185
+ """
186
+ for asset in (release.get("assets") or []):
187
+ digest = str((asset or {}).get("digest") or "")
188
+ if digest.startswith("sha256:"):
189
+ value = digest.split(":", 1)[1].strip().lower()
190
+ # 这里必须是 64 位(sha256),不是 40 位(git commit)
191
+ if _SHA256_RE.match(value):
192
+ return value
193
+ return ""
194
+
195
+
112
196
  def list_releases(timeout: int = 30) -> List[Dict]:
113
197
  """取发布列表(新的在前)。"""
114
198
  requests = _requests()
@@ -466,11 +550,33 @@ def _extract_zip(archive: str, target_dir: str) -> None:
466
550
  # ---------------------------------------------------------------- 安装
467
551
  def install_release(release: Dict, install_dir: str,
468
552
  progress: Optional[Callable[[str, int, int], None]] = None) -> Dict:
469
- """下载并解压某个发布到 install_dir。返回 {tag, sha256, commit}。"""
470
- archive_url = release.get("tarball") or release.get("zipball") or ""
471
- if not archive_url:
472
- raise FetchError("这个发布没有提供源码包")
553
+ """下载并解压某个发布到 install_dir。返回 {tag, sha256, commit}。
554
+
555
+ **按 commit 下载,不按 tag**(审计 R-01):
556
+
557
+ GitHub 的 tag 是可移动的。如果按 `archive/<tag>.tar.gz` 下载,
558
+ tag 被改指向另一份代码时,这里会**照装不误** —— 而主程序自己的
559
+ "检查更新"是按 commit 下载的,两条安装路径的信任强度就不一致了。
560
+
561
+ 现在改成:
562
+ ① 先用 refs 接口问"这个 tag 指向哪个 commit";
563
+ ② 再按**那个 commit** 下载 —— 拿到的字节由 commit 决定;
564
+ ③ 拿不到 commit 就直接失败,不退回按 tag 下载。
565
+ 这与 `core/updater.py` 的双源校验是同一套逻辑。
566
+ """
567
+ tag = str(release.get("tag") or "").strip()
568
+ if not tag:
569
+ raise FetchError("这个发布没有版本标签")
473
570
  os.makedirs(install_dir, exist_ok=True)
571
+
572
+ if progress:
573
+ progress("resolving", 0, 0)
574
+ commit = resolve_tag_commit(tag)
575
+
576
+ # 按 commit 下载:同一份字节永远对应同一个 commit
577
+ archive_url = "https://codeload.github.com/%s/tar.gz/%s" % (REPO_SLUG, commit)
578
+ _check_host(archive_url)
579
+
474
580
  # **下载缓冲放在安装目录里,而不是系统临时目录**:
475
581
  # 有些环境(企业机器、容器、受限的 %TEMP%)临时目录不可写,
476
582
  # 用临时目录会让安装直接失败;安装目录我们能确定是可写的。
@@ -491,10 +597,13 @@ def install_release(release: Dict, install_dir: str,
491
597
  progress("downloading", done, total)
492
598
 
493
599
  digest = download(archive_url, archive, progress=_tick)
600
+ # 有官方 digest 就比对(不一致直接抛错、不安装)。
601
+ # 没有的话 check_digest 返回 "skipped" —— 按 commit 下载已经锁定了内容。
602
+ check_digest(archive, release)
494
603
  if progress:
495
604
  progress("extracting", 0, 0)
496
605
  extract(archive, install_dir)
497
- return {"tag": release.get("tag") or "", "sha256": digest, "commit": ""}
606
+ return {"tag": tag, "sha256": digest, "commit": commit}
498
607
  finally:
499
608
  shutil.rmtree(temp_dir, ignore_errors=True)
500
609
 
@@ -506,3 +615,29 @@ def verify_sha256(path: str) -> str:
506
615
  for block in iter(lambda: handle.read(1024 * 1024), b""):
507
616
  digest.update(block)
508
617
  return digest.hexdigest()
618
+
619
+
620
+ def check_digest(archive: str, release: Dict) -> str:
621
+ """有官方 `digest` 时核对一遍,返回 "ok"/"mismatch"/"skipped"。
622
+
623
+ **为什么以前 `verify_sha256` 是死代码**(审计 R-01):
624
+ 它把哈希算出来了,但**没有任何可信基准去比对** —— 算出来的值只用来
625
+ 在界面上显示前 12 位。等于"量了尺寸但没有标尺"。
626
+
627
+ 现在从 GitHub release 的 asset `digest` 字段取基准:
628
+ · 有 digest → 比对,不一致**直接拒绝安装**;
629
+ · 没有 digest(这个项目的 release 目前只有源码包,没有 asset)→
630
+ 返回 "skipped",**不算失败**:按 commit 下载本身已经锁定了内容。
631
+ """
632
+ expected = release_digest(release)
633
+ if not expected:
634
+ return "skipped"
635
+ actual = verify_sha256(archive)
636
+ if actual != expected:
637
+ raise FetchError(
638
+ "下载内容校验不通过,已拒绝安装。\n"
639
+ " 期望 sha256:%s\n"
640
+ " 实际 sha256:%s\n"
641
+ " 这通常意味着下载被劫持或镜像内容有问题。"
642
+ % (expected, actual))
643
+ return "ok"
@@ -81,32 +81,50 @@ def pip_version(python: str) -> tuple:
81
81
 
82
82
 
83
83
  def check_pip(python: str, progress: Optional[Callable[[str], None]] = None) -> dict:
84
- """检查 pip 版本;太旧就**提示**(不静默强行升级)。
84
+ """检查 pip 版本;太旧或**版本读不出来**都算不合格(审计 DEP-PIP-001)。
85
85
 
86
- 为什么只是提示而不是自动升级:升级 pip 本身要联网下载一个包,
87
- 在信任链有问题的情况下"自动去装一个包"反而扩大风险面。
88
- 这里把版本和风险说清楚,选择权交给用户。
86
+ 为什么失败要拦住全部流程,而不只是提示一句:
87
+ 低于 MIN_PIP_VERSION 的 pip 内置证书库仍信任某些已出事的证书
88
+ (CVE-2026-133949),在不可信网络里装依赖时可能被中间人伪造的
89
+ 包索引骗过。安装流程**本身就是"联网装依赖"**,恰恰是这个风险最集中
90
+ 的地方 —— 只在旁边警告一句,用户点几下就滚屏过去了,等于没拦。
89
91
 
90
- 返回 {version, ok, message}。
92
+ **版本读不出来也算不合格**:不知道版本就无法判断是否安全,
93
+ 这种情况应该"失败关闭"(fail closed),而不是默认放行。
94
+
95
+ 返回 {version, ok, message, unknown}。
91
96
  """
92
97
  found = pip_version(python)
93
98
  if not found:
94
- return {"version": "", "ok": True, "message": ""}
99
+ wanted = ".".join(str(x) for x in MIN_PIP_VERSION)
100
+ message = (
101
+ "读不出 pip 版本(可能是 pip 没装好,或者输出格式不认识)。\n"
102
+ " 这是\"无法确认是否安全\"的状态,为稳妥起见先停下。\n"
103
+ " 可以手动确认一下:\n"
104
+ " \"%s\" -m pip --version\n"
105
+ " 确认是 %s 或更高之后,加 --skip-pip-check 跳过这一步。"
106
+ % (python, wanted))
107
+ if progress:
108
+ progress(message)
109
+ return {"version": "", "ok": False, "message": message, "unknown": True}
110
+
95
111
  text = ".".join(str(x) for x in found)
96
112
  if found >= MIN_PIP_VERSION:
97
- return {"version": text, "ok": True, "message": ""}
113
+ return {"version": text, "ok": True, "message": "", "unknown": False}
114
+
98
115
  wanted = ".".join(str(x) for x in MIN_PIP_VERSION)
99
116
  message = (
100
- "pip 版本偏旧:%s(建议 %s 或更高)。\n"
101
- " 低于 %s 的 pip 内置的证书库仍信任某些已出事的证书,\n"
117
+ "pip 版本过旧:%s(需要 %s 或更高)。\n"
118
+ " 低于 %s 的 pip 内置证书库仍信任某些已出事的证书,\n"
102
119
  " 在不可信网络里装依赖时可能被中间人伪造的包索引骗过。\n"
103
- " 想升级可以执行:\n"
120
+ " 先升级 pip 再装:\n"
104
121
  " \"%s\" -m pip install --upgrade pip\n"
105
- " (不自动升级是刻意的:升级本身也要联网,把这个选择留给你)"
122
+ " (不自动升级是刻意的:升级本身也要联网,把这个选择留给你)\n"
123
+ " 确认过风险、确实要跳过:加 --skip-pip-check"
106
124
  % (text, wanted, wanted, python))
107
125
  if progress:
108
126
  progress(message)
109
- return {"version": text, "ok": False, "message": message}
127
+ return {"version": text, "ok": False, "message": message, "unknown": False}
110
128
 
111
129
 
112
130
  def ensure_venv(install_dir: str, progress: Optional[Callable[[str], None]] = None) -> str:
@@ -3,6 +3,7 @@ MANIFEST.in
3
3
  PACKAGING.md
4
4
  README.md
5
5
  pyproject.toml
6
+ qqbot_cli/PACKAGING.md
6
7
  qqbot_cli/__init__.py
7
8
  qqbot_cli/cli.py
8
9
  qqbot_cli/fetch.py
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes