@sliverp/qqbot 1.3.0

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.
Files changed (78) hide show
  1. package/README.md +231 -0
  2. package/clawdbot.plugin.json +16 -0
  3. package/dist/index.d.ts +17 -0
  4. package/dist/index.js +22 -0
  5. package/dist/src/api.d.ts +194 -0
  6. package/dist/src/api.js +555 -0
  7. package/dist/src/channel.d.ts +3 -0
  8. package/dist/src/channel.js +146 -0
  9. package/dist/src/config.d.ts +25 -0
  10. package/dist/src/config.js +148 -0
  11. package/dist/src/gateway.d.ts +17 -0
  12. package/dist/src/gateway.js +722 -0
  13. package/dist/src/image-server.d.ts +62 -0
  14. package/dist/src/image-server.js +401 -0
  15. package/dist/src/known-users.d.ts +100 -0
  16. package/dist/src/known-users.js +264 -0
  17. package/dist/src/onboarding.d.ts +10 -0
  18. package/dist/src/onboarding.js +190 -0
  19. package/dist/src/outbound.d.ts +149 -0
  20. package/dist/src/outbound.js +476 -0
  21. package/dist/src/proactive.d.ts +170 -0
  22. package/dist/src/proactive.js +398 -0
  23. package/dist/src/runtime.d.ts +3 -0
  24. package/dist/src/runtime.js +10 -0
  25. package/dist/src/session-store.d.ts +49 -0
  26. package/dist/src/session-store.js +242 -0
  27. package/dist/src/types.d.ts +116 -0
  28. package/dist/src/types.js +1 -0
  29. package/dist/src/utils/image-size.d.ts +51 -0
  30. package/dist/src/utils/image-size.js +234 -0
  31. package/dist/src/utils/payload.d.ts +112 -0
  32. package/dist/src/utils/payload.js +186 -0
  33. package/index.ts +27 -0
  34. package/moltbot.plugin.json +16 -0
  35. package/node_modules/ws/LICENSE +20 -0
  36. package/node_modules/ws/README.md +548 -0
  37. package/node_modules/ws/browser.js +8 -0
  38. package/node_modules/ws/index.js +13 -0
  39. package/node_modules/ws/lib/buffer-util.js +131 -0
  40. package/node_modules/ws/lib/constants.js +19 -0
  41. package/node_modules/ws/lib/event-target.js +292 -0
  42. package/node_modules/ws/lib/extension.js +203 -0
  43. package/node_modules/ws/lib/limiter.js +55 -0
  44. package/node_modules/ws/lib/permessage-deflate.js +528 -0
  45. package/node_modules/ws/lib/receiver.js +706 -0
  46. package/node_modules/ws/lib/sender.js +602 -0
  47. package/node_modules/ws/lib/stream.js +161 -0
  48. package/node_modules/ws/lib/subprotocol.js +62 -0
  49. package/node_modules/ws/lib/validation.js +152 -0
  50. package/node_modules/ws/lib/websocket-server.js +554 -0
  51. package/node_modules/ws/lib/websocket.js +1393 -0
  52. package/node_modules/ws/package.json +69 -0
  53. package/node_modules/ws/wrapper.mjs +8 -0
  54. package/openclaw.plugin.json +16 -0
  55. package/package.json +38 -0
  56. package/qqbot-1.3.0.tgz +0 -0
  57. package/scripts/proactive-api-server.ts +346 -0
  58. package/scripts/send-proactive.ts +273 -0
  59. package/scripts/upgrade.sh +106 -0
  60. package/skills/qqbot-cron/SKILL.md +490 -0
  61. package/skills/qqbot-media/SKILL.md +138 -0
  62. package/src/api.ts +752 -0
  63. package/src/channel.ts +303 -0
  64. package/src/config.ts +172 -0
  65. package/src/gateway.ts +1588 -0
  66. package/src/image-server.ts +474 -0
  67. package/src/known-users.ts +358 -0
  68. package/src/onboarding.ts +254 -0
  69. package/src/openclaw-plugin-sdk.d.ts +483 -0
  70. package/src/outbound.ts +571 -0
  71. package/src/proactive.ts +528 -0
  72. package/src/runtime.ts +14 -0
  73. package/src/session-store.ts +292 -0
  74. package/src/types.ts +123 -0
  75. package/src/utils/image-size.ts +266 -0
  76. package/src/utils/payload.ts +265 -0
  77. package/tsconfig.json +16 -0
  78. package/upgrade-and-run.sh +89 -0
package/README.md ADDED
@@ -0,0 +1,231 @@
1
+ # QQ Bot Channel Plugin for Moltbot
2
+
3
+ QQ 开放平台Bot API 的 Moltbot 渠道插件,支持 C2C 私聊、群聊 @消息、频道消息。
4
+
5
+ ## 功能特性
6
+
7
+ - **多场景支持**:C2C 单聊、QQ 群 @消息、频道公开消息、频道私信
8
+ - **自动重连**:WebSocket 断连后自动重连,支持 Session Resume
9
+ - **消息去重**:自动管理 `msg_seq`,支持对同一消息多次回复
10
+ - **系统提示词**:可配置自定义系统提示词注入到 AI 请求
11
+ - **错误提示**:AI 无响应时自动提示用户检查配置
12
+
13
+ ## 使用示例:
14
+ <img width="952" height="582" alt="image" src="https://github.com/user-attachments/assets/a16d582b-708c-473e-b3a2-e0c4c503a0c8" />
15
+
16
+ ## 版本更新
17
+ **使用`openclaw plugins list`来产看插件版本,建议使用最新版的版本**
18
+ <img width="902" height="248" alt="Clipboard_Screenshot_1769739939" src="https://github.com/user-attachments/assets/d6f37458-900c-4de9-8fdc-f8e6bf5c7ee5" />
19
+
20
+ ### 1.4.0(即将更新)
21
+ - 支持Markdonw格式
22
+
23
+
24
+ ### 1.3.0-2026.02.03
25
+ - 支持图片收发等功能
26
+ <img width="924" height="428" alt="Clipboard_Screenshot_1770112572" src="https://github.com/user-attachments/assets/80f38ae9-dc40-4545-ad17-e7e254064cf4" />
27
+
28
+ - 支持定时任务到时后主动推送
29
+ <img width="930" height="288" alt="Clipboard_Screenshot_1770112539" src="https://github.com/user-attachments/assets/9674cda0-91e9-4860-8dcc-bc50007862a2" />
30
+ - 优化一些已知问题
31
+
32
+
33
+ ### 1.2.5-2026.02.02
34
+ - 解除URL发送限制,现在可以直接在私聊发送URL
35
+ <img width="886" height="276" alt="Clipboard_Screenshot_1770092858" src="https://github.com/user-attachments/assets/c660949e-28a5-4e5f-abc2-77f0a2c67bad" />
36
+ - 更新Bot正在输入中状态
37
+ <img width="740" height="212" alt="Clipboard_Screenshot_1770091969" src="https://github.com/user-attachments/assets/47835c4b-ccd2-4782-aaa6-b873cb58f7d7" />
38
+ - 提供主动推送能力(目前AI还不知道怎么调用主动推送,相关完整Skill能力将在后续版本更新)
39
+ - 优化一些已知问题
40
+ - 优化未收到未收到大模型响应时的提示信息
41
+
42
+
43
+ ### 1.2.2-2026.01.31
44
+ - 支持发送文件
45
+ - 支持openclaw、moltbot命令行
46
+ - 修复[health]检查提示: [health] refresh failed: Cannot read properties of undefined (reading 'appId')的问题(不影响使用)
47
+ - 修复文件发送后clawdbot无法读取的问题
48
+
49
+ ### 1.2.1
50
+ - 解决了长时间使用会断联的问题
51
+ - 解决了频繁重连的问题
52
+ - 增加了大模型调用失败后的提示消息
53
+
54
+
55
+ ### 1.1.0
56
+ - 解决了一些url会被拦截的问题
57
+ - 解决了多轮消息会发送失败的问题
58
+ - 修复了部分图片无法接受的问题
59
+ - 增加支持onboard的方式配置AppId 和 AppSecret
60
+
61
+
62
+ ## 安装
63
+
64
+ 在插件目录下执行:
65
+
66
+ ```bash
67
+ git clone https://github.com/sliverp/qqbot.git && cd qqbot
68
+ clawdbot plugins install . # 这一步会有点久,需要安装一些依赖。稍微耐心等待一下,尤其是小内存机器
69
+ ```
70
+
71
+ ## 配置
72
+
73
+ ### 1. 获取 QQ 机器人凭证
74
+
75
+ 1. 访问 [QQ 开放平台](https://q.qq.com/)
76
+ 2. 创建机器人应用
77
+ 3. 获取 `AppID` 和 `AppSecret`(ClientSecret)
78
+ 4. Token 格式为 `AppID:AppSecret`,例如 `102146862:Xjv7JVhu7KXkxANbp3HVjxCRgvAPeuAQ`
79
+
80
+ ### 2. 添加配置
81
+
82
+ #### 方式一:交互式配置
83
+
84
+ ```bash
85
+ clawdbot channels add
86
+ # 选择 qqbot,按提示输入 Token
87
+ ```
88
+
89
+ #### 方式二:命令行配置
90
+
91
+ ```bash
92
+ clawdbot channels add --channel qqbot --token "AppID:AppSecret"
93
+ ```
94
+
95
+ 示例:
96
+
97
+ ```bash
98
+ clawdbot channels add --channel qqbot --token "102146862:xxxxxxxx"
99
+ ```
100
+
101
+ ### 3. 手动编辑配置(可选)
102
+
103
+ 也可以直接编辑 `~/.clawdbot/clawdbot.json`:
104
+
105
+ ```json
106
+ {
107
+ "channels": {
108
+ "qqbot": {
109
+ "enabled": true,
110
+ "appId": "你的AppID",
111
+ "clientSecret": "你的AppSecret",
112
+ "systemPrompt": "你是一个友好的助手"
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+
119
+
120
+ ## 配置项说明
121
+
122
+ | 配置项 | 类型 | 必填 | 说明 |
123
+ |--------|------|------|------|
124
+ | `appId` | string | 是 | QQ 机器人 AppID |
125
+ | `clientSecret` | string | 是* | AppSecret,与 `clientSecretFile` 二选一 |
126
+ | `clientSecretFile` | string | 是* | AppSecret 文件路径 |
127
+ | `enabled` | boolean | 否 | 是否启用,默认 `true` |
128
+ | `name` | string | 否 | 账户显示名称 |
129
+ | `systemPrompt` | string | 否 | 自定义系统提示词 |
130
+
131
+ ## 支持的消息类型
132
+
133
+ | 事件类型 | 说明 | Intent |
134
+ |----------|------|--------|
135
+ | `C2C_MESSAGE_CREATE` | C2C 单聊消息 | `1 << 25` |
136
+ | `GROUP_AT_MESSAGE_CREATE` | 群聊 @机器人消息 | `1 << 25` |
137
+ | `AT_MESSAGE_CREATE` | 频道 @机器人消息 | `1 << 30` |
138
+ | `DIRECT_MESSAGE_CREATE` | 频道私信 | `1 << 12` |
139
+
140
+ ## 使用
141
+
142
+ ### 启动
143
+
144
+ 后台启动
145
+ ```bash
146
+ clawdbot gateway restart
147
+ ```
148
+
149
+ 前台启动, 方便试试查看日志
150
+ ```bash
151
+ clawdbot gateway --port 18789 --verbose
152
+ ```
153
+
154
+ ### CLI 配置向导
155
+
156
+ ```bash
157
+ clawdbot onboard
158
+ # 选择 QQ Bot 进行交互式配置
159
+ ```
160
+
161
+ ## 注意事项
162
+
163
+ 1. **群消息**:需要在群内 @机器人 才能触发回复
164
+ 2. **沙箱模式**:新创建的机器人默认在沙箱模式,需要添加测试用户
165
+
166
+ ## 升级
167
+
168
+ 如果需要升级插件,先运行升级脚本清理旧版本:
169
+
170
+ ```bash
171
+ git clone https://github.com/sliverp/qqbot.git && cd qqbot
172
+
173
+ # 运行升级脚本(清理旧版本和配置)
174
+ bash ./scripts/upgrade.sh
175
+
176
+ # 重新安装插件
177
+ clawdbot plugins install . # 这一步会有点久,需要安装一些依赖。稍微耐心等待一下,尤其是小内存机器
178
+
179
+ # 重新配置
180
+ clawdbot channels add --channel qqbot --token "AppID:AppSecret"
181
+
182
+ # 重启网关
183
+ clawdbot gateway restart
184
+ ```
185
+
186
+ 升级脚本会自动:
187
+ - 删除 `~/.clawdbot/extensions/qqbot` 目录
188
+ - 清理 `clawdbot.json` 中的 qqbot 相关配置
189
+
190
+ ## 开发
191
+
192
+ ```bash
193
+ # 安装依赖
194
+ npm install
195
+
196
+ # 编译
197
+ npm run build
198
+
199
+ # 监听模式
200
+ npm run dev
201
+ ```
202
+
203
+ ## 文件结构
204
+
205
+ ```
206
+ qqbot/
207
+ ├── index.ts # 入口文件
208
+ ├── src/
209
+ │ ├── api.ts # QQ Bot API 封装
210
+ │ ├── channel.ts # Channel Plugin 定义
211
+ │ ├── config.ts # 配置解析
212
+ │ ├── gateway.ts # WebSocket 网关
213
+ │ ├── onboarding.ts # CLI 配置向导
214
+ │ ├── outbound.ts # 出站消息处理
215
+ │ ├── runtime.ts # 运行时状态
216
+ │ └── types.ts # 类型定义
217
+ ├── scripts/
218
+ │ └── upgrade.sh # 升级脚本
219
+ ├── package.json
220
+ └── tsconfig.json
221
+ ```
222
+
223
+ ## 相关链接
224
+
225
+ - [QQ 机器人官方文档](https://bot.q.qq.com/wiki/)
226
+ - [QQ 开放平台](https://q.qq.com/)
227
+ - [API v2 文档](https://bot.q.qq.com/wiki/develop/api-v2/)
228
+
229
+ ## License
230
+
231
+ MIT
@@ -0,0 +1,16 @@
1
+ {
2
+ "id": "qqbot",
3
+ "name": "QQ Bot Channel",
4
+ "description": "QQ Bot channel plugin with message support, cron jobs, and proactive messaging",
5
+ "channels": ["qqbot"],
6
+ "skills": ["skills/qqbot-cron", "skills/qqbot-media"],
7
+ "capabilities": {
8
+ "proactiveMessaging": true,
9
+ "cronJobs": true
10
+ },
11
+ "configSchema": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "properties": {}
15
+ }
16
+ }
@@ -0,0 +1,17 @@
1
+ import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
2
+ declare const plugin: {
3
+ id: string;
4
+ name: string;
5
+ description: string;
6
+ configSchema: unknown;
7
+ register(api: OpenClawPluginApi): void;
8
+ };
9
+ export default plugin;
10
+ export { qqbotPlugin } from "./src/channel.js";
11
+ export { setQQBotRuntime, getQQBotRuntime } from "./src/runtime.js";
12
+ export { qqbotOnboardingAdapter } from "./src/onboarding.js";
13
+ export * from "./src/types.js";
14
+ export * from "./src/api.js";
15
+ export * from "./src/config.js";
16
+ export * from "./src/gateway.js";
17
+ export * from "./src/outbound.js";
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
2
+ import { qqbotPlugin } from "./src/channel.js";
3
+ import { setQQBotRuntime } from "./src/runtime.js";
4
+ const plugin = {
5
+ id: "qqbot",
6
+ name: "QQ Bot (Stream)",
7
+ description: "QQ Bot channel plugin with streaming message support",
8
+ configSchema: emptyPluginConfigSchema(),
9
+ register(api) {
10
+ setQQBotRuntime(api.runtime);
11
+ api.registerChannel({ plugin: qqbotPlugin });
12
+ },
13
+ };
14
+ export default plugin;
15
+ export { qqbotPlugin } from "./src/channel.js";
16
+ export { setQQBotRuntime, getQQBotRuntime } from "./src/runtime.js";
17
+ export { qqbotOnboardingAdapter } from "./src/onboarding.js";
18
+ export * from "./src/types.js";
19
+ export * from "./src/api.js";
20
+ export * from "./src/config.js";
21
+ export * from "./src/gateway.js";
22
+ export * from "./src/outbound.js";
@@ -0,0 +1,194 @@
1
+ /**
2
+ * QQ Bot API 鉴权和请求封装
3
+ */
4
+ /**
5
+ * 初始化 API 配置
6
+ * @param options.markdownSupport - 是否支持 markdown 消息(默认 false,需要机器人具备该权限才能启用)
7
+ */
8
+ export declare function initApiConfig(options: {
9
+ markdownSupport?: boolean;
10
+ }): void;
11
+ /**
12
+ * 获取当前是否支持 markdown
13
+ */
14
+ export declare function isMarkdownSupport(): boolean;
15
+ /**
16
+ * 获取 AccessToken(带缓存 + singleflight 并发安全)
17
+ *
18
+ * 使用 singleflight 模式:当多个请求同时发现 Token 过期时,
19
+ * 只有第一个请求会真正去获取新 Token,其他请求复用同一个 Promise。
20
+ */
21
+ export declare function getAccessToken(appId: string, clientSecret: string): Promise<string>;
22
+ /**
23
+ * 清除 Token 缓存
24
+ */
25
+ export declare function clearTokenCache(): void;
26
+ /**
27
+ * 获取 Token 缓存状态(用于监控)
28
+ */
29
+ export declare function getTokenStatus(): {
30
+ status: "valid" | "expired" | "refreshing" | "none";
31
+ expiresAt: number | null;
32
+ };
33
+ /**
34
+ * 获取并递增消息序号
35
+ * 返回的 seq 会基于时间戳,避免进程重启后重复
36
+ */
37
+ export declare function getNextMsgSeq(msgId: string): number;
38
+ /**
39
+ * API 请求封装
40
+ */
41
+ export declare function apiRequest<T = unknown>(accessToken: string, method: string, path: string, body?: unknown): Promise<T>;
42
+ /**
43
+ * 获取 WebSocket Gateway URL
44
+ */
45
+ export declare function getGatewayUrl(accessToken: string): Promise<string>;
46
+ /**
47
+ * 消息响应
48
+ */
49
+ export interface MessageResponse {
50
+ id: string;
51
+ timestamp: number | string;
52
+ }
53
+ /**
54
+ * 发送 C2C 单聊消息
55
+ */
56
+ export declare function sendC2CMessage(accessToken: string, openid: string, content: string, msgId?: string): Promise<MessageResponse>;
57
+ /**
58
+ * 发送 C2C 输入状态提示(告知用户机器人正在输入)
59
+ */
60
+ export declare function sendC2CInputNotify(accessToken: string, openid: string, msgId?: string, inputSecond?: number): Promise<void>;
61
+ /**
62
+ * 发送频道消息(不支持流式)
63
+ */
64
+ export declare function sendChannelMessage(accessToken: string, channelId: string, content: string, msgId?: string): Promise<{
65
+ id: string;
66
+ timestamp: string;
67
+ }>;
68
+ /**
69
+ * 发送群聊消息
70
+ */
71
+ export declare function sendGroupMessage(accessToken: string, groupOpenid: string, content: string, msgId?: string): Promise<MessageResponse>;
72
+ /**
73
+ * 主动发送 C2C 单聊消息(不需要 msg_id,每月限 4 条/用户)
74
+ *
75
+ * 注意:
76
+ * 1. 内容不能为空(对应 markdown.content 字段)
77
+ * 2. 不支持流式发送
78
+ */
79
+ export declare function sendProactiveC2CMessage(accessToken: string, openid: string, content: string): Promise<{
80
+ id: string;
81
+ timestamp: number;
82
+ }>;
83
+ /**
84
+ * 主动发送群聊消息(不需要 msg_id,每月限 4 条/群)
85
+ *
86
+ * 注意:
87
+ * 1. 内容不能为空(对应 markdown.content 字段)
88
+ * 2. 不支持流式发送
89
+ */
90
+ export declare function sendProactiveGroupMessage(accessToken: string, groupOpenid: string, content: string): Promise<{
91
+ id: string;
92
+ timestamp: string;
93
+ }>;
94
+ /**
95
+ * 媒体文件类型
96
+ */
97
+ export declare enum MediaFileType {
98
+ IMAGE = 1,
99
+ VIDEO = 2,
100
+ VOICE = 3,
101
+ FILE = 4
102
+ }
103
+ /**
104
+ * 上传富媒体文件的响应
105
+ */
106
+ export interface UploadMediaResponse {
107
+ file_uuid: string;
108
+ file_info: string;
109
+ ttl: number;
110
+ id?: string;
111
+ }
112
+ /**
113
+ * 上传富媒体文件到 C2C 单聊
114
+ * @param url - 公网可访问的图片 URL(与 fileData 二选一)
115
+ * @param fileData - Base64 编码的文件内容(与 url 二选一)
116
+ */
117
+ export declare function uploadC2CMedia(accessToken: string, openid: string, fileType: MediaFileType, url?: string, fileData?: string, srvSendMsg?: boolean): Promise<UploadMediaResponse>;
118
+ /**
119
+ * 上传富媒体文件到群聊
120
+ * @param url - 公网可访问的图片 URL(与 fileData 二选一)
121
+ * @param fileData - Base64 编码的文件内容(与 url 二选一)
122
+ */
123
+ export declare function uploadGroupMedia(accessToken: string, groupOpenid: string, fileType: MediaFileType, url?: string, fileData?: string, srvSendMsg?: boolean): Promise<UploadMediaResponse>;
124
+ /**
125
+ * 发送 C2C 单聊富媒体消息
126
+ */
127
+ export declare function sendC2CMediaMessage(accessToken: string, openid: string, fileInfo: string, msgId?: string, content?: string): Promise<{
128
+ id: string;
129
+ timestamp: number;
130
+ }>;
131
+ /**
132
+ * 发送群聊富媒体消息
133
+ */
134
+ export declare function sendGroupMediaMessage(accessToken: string, groupOpenid: string, fileInfo: string, msgId?: string, content?: string): Promise<{
135
+ id: string;
136
+ timestamp: string;
137
+ }>;
138
+ /**
139
+ * 发送带图片的 C2C 单聊消息(封装上传+发送)
140
+ * @param imageUrl - 图片来源,支持:
141
+ * - 公网 URL: https://example.com/image.png
142
+ * - Base64 Data URL: data:image/png;base64,xxxxx
143
+ */
144
+ export declare function sendC2CImageMessage(accessToken: string, openid: string, imageUrl: string, msgId?: string, content?: string): Promise<{
145
+ id: string;
146
+ timestamp: number;
147
+ }>;
148
+ /**
149
+ * 发送带图片的群聊消息(封装上传+发送)
150
+ * @param imageUrl - 图片来源,支持:
151
+ * - 公网 URL: https://example.com/image.png
152
+ * - Base64 Data URL: data:image/png;base64,xxxxx
153
+ */
154
+ export declare function sendGroupImageMessage(accessToken: string, groupOpenid: string, imageUrl: string, msgId?: string, content?: string): Promise<{
155
+ id: string;
156
+ timestamp: string;
157
+ }>;
158
+ /**
159
+ * 后台 Token 刷新配置
160
+ */
161
+ interface BackgroundTokenRefreshOptions {
162
+ /** 提前刷新时间(毫秒,默认 5 分钟) */
163
+ refreshAheadMs?: number;
164
+ /** 随机偏移范围(毫秒,默认 0-30 秒) */
165
+ randomOffsetMs?: number;
166
+ /** 最小刷新间隔(毫秒,默认 1 分钟) */
167
+ minRefreshIntervalMs?: number;
168
+ /** 失败后重试间隔(毫秒,默认 5 秒) */
169
+ retryDelayMs?: number;
170
+ /** 日志函数 */
171
+ log?: {
172
+ info: (msg: string) => void;
173
+ error: (msg: string) => void;
174
+ debug?: (msg: string) => void;
175
+ };
176
+ }
177
+ /**
178
+ * 启动后台 Token 刷新
179
+ * 在后台定时刷新 Token,避免请求时才发现过期
180
+ *
181
+ * @param appId 应用 ID
182
+ * @param clientSecret 应用密钥
183
+ * @param options 配置选项
184
+ */
185
+ export declare function startBackgroundTokenRefresh(appId: string, clientSecret: string, options?: BackgroundTokenRefreshOptions): void;
186
+ /**
187
+ * 停止后台 Token 刷新
188
+ */
189
+ export declare function stopBackgroundTokenRefresh(): void;
190
+ /**
191
+ * 检查后台 Token 刷新是否正在运行
192
+ */
193
+ export declare function isBackgroundTokenRefreshRunning(): boolean;
194
+ export {};