@openclaw-china/qqbot 2026.3.2 → 2026.3.4-1
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.
- package/dist/index.d.ts +423 -26
- package/dist/index.js +468 -211
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,85 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
declare const QQBotAccountSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodOptional<z.ZodString>;
|
|
5
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
appId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
7
|
+
clientSecret: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
8
|
+
asr: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
10
|
+
appId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
11
|
+
secretId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
12
|
+
secretKey: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
appId?: string | undefined;
|
|
16
|
+
secretId?: string | undefined;
|
|
17
|
+
secretKey?: string | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
enabled?: boolean | undefined;
|
|
20
|
+
appId?: unknown;
|
|
21
|
+
secretId?: unknown;
|
|
22
|
+
secretKey?: unknown;
|
|
23
|
+
}>>;
|
|
24
|
+
markdownSupport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
25
|
+
dmPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["open", "pairing", "allowlist"]>>>;
|
|
26
|
+
groupPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["open", "allowlist", "disabled"]>>>;
|
|
27
|
+
requireMention: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
28
|
+
allowFrom: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
29
|
+
groupAllowFrom: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
30
|
+
historyLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
31
|
+
textChunkLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
32
|
+
replyFinalOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
33
|
+
maxFileSizeMB: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
34
|
+
mediaTimeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
markdownSupport: boolean;
|
|
37
|
+
dmPolicy: "open" | "pairing" | "allowlist";
|
|
38
|
+
groupPolicy: "open" | "allowlist" | "disabled";
|
|
39
|
+
requireMention: boolean;
|
|
40
|
+
historyLimit: number;
|
|
41
|
+
textChunkLimit: number;
|
|
42
|
+
replyFinalOnly: boolean;
|
|
43
|
+
maxFileSizeMB: number;
|
|
44
|
+
mediaTimeoutMs: number;
|
|
45
|
+
name?: string | undefined;
|
|
46
|
+
enabled?: boolean | undefined;
|
|
47
|
+
appId?: string | undefined;
|
|
48
|
+
clientSecret?: string | undefined;
|
|
49
|
+
asr?: {
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
appId?: string | undefined;
|
|
52
|
+
secretId?: string | undefined;
|
|
53
|
+
secretKey?: string | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
allowFrom?: string[] | undefined;
|
|
56
|
+
groupAllowFrom?: string[] | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
name?: string | undefined;
|
|
59
|
+
enabled?: boolean | undefined;
|
|
60
|
+
appId?: unknown;
|
|
61
|
+
clientSecret?: unknown;
|
|
62
|
+
asr?: {
|
|
63
|
+
enabled?: boolean | undefined;
|
|
64
|
+
appId?: unknown;
|
|
65
|
+
secretId?: unknown;
|
|
66
|
+
secretKey?: unknown;
|
|
67
|
+
} | undefined;
|
|
68
|
+
markdownSupport?: boolean | undefined;
|
|
69
|
+
dmPolicy?: "open" | "pairing" | "allowlist" | undefined;
|
|
70
|
+
groupPolicy?: "open" | "allowlist" | "disabled" | undefined;
|
|
71
|
+
requireMention?: boolean | undefined;
|
|
72
|
+
allowFrom?: string[] | undefined;
|
|
73
|
+
groupAllowFrom?: string[] | undefined;
|
|
74
|
+
historyLimit?: number | undefined;
|
|
75
|
+
textChunkLimit?: number | undefined;
|
|
76
|
+
replyFinalOnly?: boolean | undefined;
|
|
77
|
+
maxFileSizeMB?: number | undefined;
|
|
78
|
+
mediaTimeoutMs?: number | undefined;
|
|
79
|
+
}>;
|
|
3
80
|
declare const QQBotConfigSchema: z.ZodObject<{
|
|
4
|
-
|
|
81
|
+
name: z.ZodOptional<z.ZodString>;
|
|
82
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
5
83
|
appId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
6
84
|
clientSecret: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
7
85
|
asr: z.ZodOptional<z.ZodObject<{
|
|
@@ -31,8 +109,86 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
31
109
|
replyFinalOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
32
110
|
maxFileSizeMB: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
33
111
|
mediaTimeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
112
|
+
} & {
|
|
113
|
+
defaultAccount: z.ZodOptional<z.ZodString>;
|
|
114
|
+
accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
115
|
+
name: z.ZodOptional<z.ZodString>;
|
|
116
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
appId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
118
|
+
clientSecret: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
119
|
+
asr: z.ZodOptional<z.ZodObject<{
|
|
120
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
121
|
+
appId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
122
|
+
secretId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
123
|
+
secretKey: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
enabled: boolean;
|
|
126
|
+
appId?: string | undefined;
|
|
127
|
+
secretId?: string | undefined;
|
|
128
|
+
secretKey?: string | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
enabled?: boolean | undefined;
|
|
131
|
+
appId?: unknown;
|
|
132
|
+
secretId?: unknown;
|
|
133
|
+
secretKey?: unknown;
|
|
134
|
+
}>>;
|
|
135
|
+
markdownSupport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
136
|
+
dmPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["open", "pairing", "allowlist"]>>>;
|
|
137
|
+
groupPolicy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["open", "allowlist", "disabled"]>>>;
|
|
138
|
+
requireMention: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
139
|
+
allowFrom: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
140
|
+
groupAllowFrom: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
141
|
+
historyLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
142
|
+
textChunkLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
143
|
+
replyFinalOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
144
|
+
maxFileSizeMB: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
145
|
+
mediaTimeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
markdownSupport: boolean;
|
|
148
|
+
dmPolicy: "open" | "pairing" | "allowlist";
|
|
149
|
+
groupPolicy: "open" | "allowlist" | "disabled";
|
|
150
|
+
requireMention: boolean;
|
|
151
|
+
historyLimit: number;
|
|
152
|
+
textChunkLimit: number;
|
|
153
|
+
replyFinalOnly: boolean;
|
|
154
|
+
maxFileSizeMB: number;
|
|
155
|
+
mediaTimeoutMs: number;
|
|
156
|
+
name?: string | undefined;
|
|
157
|
+
enabled?: boolean | undefined;
|
|
158
|
+
appId?: string | undefined;
|
|
159
|
+
clientSecret?: string | undefined;
|
|
160
|
+
asr?: {
|
|
161
|
+
enabled: boolean;
|
|
162
|
+
appId?: string | undefined;
|
|
163
|
+
secretId?: string | undefined;
|
|
164
|
+
secretKey?: string | undefined;
|
|
165
|
+
} | undefined;
|
|
166
|
+
allowFrom?: string[] | undefined;
|
|
167
|
+
groupAllowFrom?: string[] | undefined;
|
|
168
|
+
}, {
|
|
169
|
+
name?: string | undefined;
|
|
170
|
+
enabled?: boolean | undefined;
|
|
171
|
+
appId?: unknown;
|
|
172
|
+
clientSecret?: unknown;
|
|
173
|
+
asr?: {
|
|
174
|
+
enabled?: boolean | undefined;
|
|
175
|
+
appId?: unknown;
|
|
176
|
+
secretId?: unknown;
|
|
177
|
+
secretKey?: unknown;
|
|
178
|
+
} | undefined;
|
|
179
|
+
markdownSupport?: boolean | undefined;
|
|
180
|
+
dmPolicy?: "open" | "pairing" | "allowlist" | undefined;
|
|
181
|
+
groupPolicy?: "open" | "allowlist" | "disabled" | undefined;
|
|
182
|
+
requireMention?: boolean | undefined;
|
|
183
|
+
allowFrom?: string[] | undefined;
|
|
184
|
+
groupAllowFrom?: string[] | undefined;
|
|
185
|
+
historyLimit?: number | undefined;
|
|
186
|
+
textChunkLimit?: number | undefined;
|
|
187
|
+
replyFinalOnly?: boolean | undefined;
|
|
188
|
+
maxFileSizeMB?: number | undefined;
|
|
189
|
+
mediaTimeoutMs?: number | undefined;
|
|
190
|
+
}>>>;
|
|
34
191
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
enabled: boolean;
|
|
36
192
|
markdownSupport: boolean;
|
|
37
193
|
dmPolicy: "open" | "pairing" | "allowlist";
|
|
38
194
|
groupPolicy: "open" | "allowlist" | "disabled";
|
|
@@ -42,6 +198,8 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
42
198
|
replyFinalOnly: boolean;
|
|
43
199
|
maxFileSizeMB: number;
|
|
44
200
|
mediaTimeoutMs: number;
|
|
201
|
+
name?: string | undefined;
|
|
202
|
+
enabled?: boolean | undefined;
|
|
45
203
|
appId?: string | undefined;
|
|
46
204
|
clientSecret?: string | undefined;
|
|
47
205
|
asr?: {
|
|
@@ -52,7 +210,32 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
52
210
|
} | undefined;
|
|
53
211
|
allowFrom?: string[] | undefined;
|
|
54
212
|
groupAllowFrom?: string[] | undefined;
|
|
213
|
+
defaultAccount?: string | undefined;
|
|
214
|
+
accounts?: Record<string, {
|
|
215
|
+
markdownSupport: boolean;
|
|
216
|
+
dmPolicy: "open" | "pairing" | "allowlist";
|
|
217
|
+
groupPolicy: "open" | "allowlist" | "disabled";
|
|
218
|
+
requireMention: boolean;
|
|
219
|
+
historyLimit: number;
|
|
220
|
+
textChunkLimit: number;
|
|
221
|
+
replyFinalOnly: boolean;
|
|
222
|
+
maxFileSizeMB: number;
|
|
223
|
+
mediaTimeoutMs: number;
|
|
224
|
+
name?: string | undefined;
|
|
225
|
+
enabled?: boolean | undefined;
|
|
226
|
+
appId?: string | undefined;
|
|
227
|
+
clientSecret?: string | undefined;
|
|
228
|
+
asr?: {
|
|
229
|
+
enabled: boolean;
|
|
230
|
+
appId?: string | undefined;
|
|
231
|
+
secretId?: string | undefined;
|
|
232
|
+
secretKey?: string | undefined;
|
|
233
|
+
} | undefined;
|
|
234
|
+
allowFrom?: string[] | undefined;
|
|
235
|
+
groupAllowFrom?: string[] | undefined;
|
|
236
|
+
}> | undefined;
|
|
55
237
|
}, {
|
|
238
|
+
name?: string | undefined;
|
|
56
239
|
enabled?: boolean | undefined;
|
|
57
240
|
appId?: unknown;
|
|
58
241
|
clientSecret?: unknown;
|
|
@@ -73,8 +256,39 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
73
256
|
replyFinalOnly?: boolean | undefined;
|
|
74
257
|
maxFileSizeMB?: number | undefined;
|
|
75
258
|
mediaTimeoutMs?: number | undefined;
|
|
259
|
+
defaultAccount?: string | undefined;
|
|
260
|
+
accounts?: Record<string, {
|
|
261
|
+
name?: string | undefined;
|
|
262
|
+
enabled?: boolean | undefined;
|
|
263
|
+
appId?: unknown;
|
|
264
|
+
clientSecret?: unknown;
|
|
265
|
+
asr?: {
|
|
266
|
+
enabled?: boolean | undefined;
|
|
267
|
+
appId?: unknown;
|
|
268
|
+
secretId?: unknown;
|
|
269
|
+
secretKey?: unknown;
|
|
270
|
+
} | undefined;
|
|
271
|
+
markdownSupport?: boolean | undefined;
|
|
272
|
+
dmPolicy?: "open" | "pairing" | "allowlist" | undefined;
|
|
273
|
+
groupPolicy?: "open" | "allowlist" | "disabled" | undefined;
|
|
274
|
+
requireMention?: boolean | undefined;
|
|
275
|
+
allowFrom?: string[] | undefined;
|
|
276
|
+
groupAllowFrom?: string[] | undefined;
|
|
277
|
+
historyLimit?: number | undefined;
|
|
278
|
+
textChunkLimit?: number | undefined;
|
|
279
|
+
replyFinalOnly?: boolean | undefined;
|
|
280
|
+
maxFileSizeMB?: number | undefined;
|
|
281
|
+
mediaTimeoutMs?: number | undefined;
|
|
282
|
+
}> | undefined;
|
|
76
283
|
}>;
|
|
77
284
|
type QQBotConfig = z.infer<typeof QQBotConfigSchema>;
|
|
285
|
+
type QQBotAccountConfig = z.infer<typeof QQBotAccountSchema>;
|
|
286
|
+
interface PluginConfig {
|
|
287
|
+
channels?: {
|
|
288
|
+
qqbot?: QQBotConfig;
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
declare const DEFAULT_ACCOUNT_ID = "default";
|
|
78
292
|
|
|
79
293
|
interface ResolvedQQBotAccount {
|
|
80
294
|
accountId: string;
|
|
@@ -90,22 +304,6 @@ interface QQBotSendResult {
|
|
|
90
304
|
error?: string;
|
|
91
305
|
}
|
|
92
306
|
|
|
93
|
-
/**
|
|
94
|
-
* QQ Bot 出站适配器
|
|
95
|
-
*/
|
|
96
|
-
|
|
97
|
-
interface OutboundConfig {
|
|
98
|
-
channels?: {
|
|
99
|
-
qqbot?: QQBotConfig;
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
declare const DEFAULT_ACCOUNT_ID = "default";
|
|
104
|
-
interface PluginConfig {
|
|
105
|
-
channels?: {
|
|
106
|
-
qqbot?: QQBotConfig;
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
307
|
declare const qqbotPlugin: {
|
|
110
308
|
id: string;
|
|
111
309
|
meta: {
|
|
@@ -148,6 +346,12 @@ declare const qqbotPlugin: {
|
|
|
148
346
|
enabled: {
|
|
149
347
|
type: string;
|
|
150
348
|
};
|
|
349
|
+
name: {
|
|
350
|
+
type: string;
|
|
351
|
+
};
|
|
352
|
+
defaultAccount: {
|
|
353
|
+
type: string;
|
|
354
|
+
};
|
|
151
355
|
appId: {
|
|
152
356
|
type: string;
|
|
153
357
|
};
|
|
@@ -209,6 +413,94 @@ declare const qqbotPlugin: {
|
|
|
209
413
|
replyFinalOnly: {
|
|
210
414
|
type: string;
|
|
211
415
|
};
|
|
416
|
+
maxFileSizeMB: {
|
|
417
|
+
type: string;
|
|
418
|
+
};
|
|
419
|
+
mediaTimeoutMs: {
|
|
420
|
+
type: string;
|
|
421
|
+
};
|
|
422
|
+
accounts: {
|
|
423
|
+
type: string;
|
|
424
|
+
additionalProperties: {
|
|
425
|
+
type: string;
|
|
426
|
+
additionalProperties: boolean;
|
|
427
|
+
properties: {
|
|
428
|
+
name: {
|
|
429
|
+
type: string;
|
|
430
|
+
};
|
|
431
|
+
enabled: {
|
|
432
|
+
type: string;
|
|
433
|
+
};
|
|
434
|
+
appId: {
|
|
435
|
+
type: string;
|
|
436
|
+
};
|
|
437
|
+
clientSecret: {
|
|
438
|
+
type: string;
|
|
439
|
+
};
|
|
440
|
+
asr: {
|
|
441
|
+
type: string;
|
|
442
|
+
additionalProperties: boolean;
|
|
443
|
+
properties: {
|
|
444
|
+
enabled: {
|
|
445
|
+
type: string;
|
|
446
|
+
};
|
|
447
|
+
appId: {
|
|
448
|
+
type: string;
|
|
449
|
+
};
|
|
450
|
+
secretId: {
|
|
451
|
+
type: string;
|
|
452
|
+
};
|
|
453
|
+
secretKey: {
|
|
454
|
+
type: string;
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
markdownSupport: {
|
|
459
|
+
type: string;
|
|
460
|
+
};
|
|
461
|
+
dmPolicy: {
|
|
462
|
+
type: string;
|
|
463
|
+
enum: string[];
|
|
464
|
+
};
|
|
465
|
+
groupPolicy: {
|
|
466
|
+
type: string;
|
|
467
|
+
enum: string[];
|
|
468
|
+
};
|
|
469
|
+
requireMention: {
|
|
470
|
+
type: string;
|
|
471
|
+
};
|
|
472
|
+
allowFrom: {
|
|
473
|
+
type: string;
|
|
474
|
+
items: {
|
|
475
|
+
type: string;
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
groupAllowFrom: {
|
|
479
|
+
type: string;
|
|
480
|
+
items: {
|
|
481
|
+
type: string;
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
historyLimit: {
|
|
485
|
+
type: string;
|
|
486
|
+
minimum: number;
|
|
487
|
+
};
|
|
488
|
+
textChunkLimit: {
|
|
489
|
+
type: string;
|
|
490
|
+
minimum: number;
|
|
491
|
+
};
|
|
492
|
+
replyFinalOnly: {
|
|
493
|
+
type: string;
|
|
494
|
+
};
|
|
495
|
+
maxFileSizeMB: {
|
|
496
|
+
type: string;
|
|
497
|
+
};
|
|
498
|
+
mediaTimeoutMs: {
|
|
499
|
+
type: string;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
};
|
|
212
504
|
};
|
|
213
505
|
};
|
|
214
506
|
};
|
|
@@ -216,17 +508,19 @@ declare const qqbotPlugin: {
|
|
|
216
508
|
configPrefixes: string[];
|
|
217
509
|
};
|
|
218
510
|
config: {
|
|
219
|
-
listAccountIds: (
|
|
511
|
+
listAccountIds: (cfg: PluginConfig) => string[];
|
|
220
512
|
resolveAccount: (cfg: PluginConfig, accountId?: string) => ResolvedQQBotAccount;
|
|
221
513
|
defaultAccountId: () => string;
|
|
222
514
|
setAccountEnabled: (params: {
|
|
223
515
|
cfg: PluginConfig;
|
|
516
|
+
accountId?: string;
|
|
224
517
|
enabled: boolean;
|
|
225
518
|
}) => PluginConfig;
|
|
226
519
|
deleteAccount: (params: {
|
|
227
520
|
cfg: PluginConfig;
|
|
521
|
+
accountId?: string;
|
|
228
522
|
}) => PluginConfig;
|
|
229
|
-
isConfigured: (_account: ResolvedQQBotAccount, cfg: PluginConfig) => boolean;
|
|
523
|
+
isConfigured: (_account: ResolvedQQBotAccount, cfg: PluginConfig, accountId?: string) => boolean;
|
|
230
524
|
describeAccount: (account: ResolvedQQBotAccount) => {
|
|
231
525
|
accountId: string;
|
|
232
526
|
enabled: boolean;
|
|
@@ -234,6 +528,7 @@ declare const qqbotPlugin: {
|
|
|
234
528
|
};
|
|
235
529
|
resolveAllowFrom: (params: {
|
|
236
530
|
cfg: PluginConfig;
|
|
531
|
+
accountId?: string;
|
|
237
532
|
}) => string[];
|
|
238
533
|
formatAllowFrom: (params: {
|
|
239
534
|
allowFrom: (string | number)[];
|
|
@@ -245,9 +540,14 @@ declare const qqbotPlugin: {
|
|
|
245
540
|
}) => string[];
|
|
246
541
|
};
|
|
247
542
|
setup: {
|
|
248
|
-
resolveAccountId: (
|
|
543
|
+
resolveAccountId: (params: {
|
|
544
|
+
cfg: PluginConfig;
|
|
545
|
+
accountId?: string;
|
|
546
|
+
}) => string;
|
|
249
547
|
applyAccountConfig: (params: {
|
|
250
548
|
cfg: PluginConfig;
|
|
549
|
+
accountId?: string;
|
|
550
|
+
config?: Record<string, unknown>;
|
|
251
551
|
}) => PluginConfig;
|
|
252
552
|
};
|
|
253
553
|
outbound: {
|
|
@@ -255,23 +555,26 @@ declare const qqbotPlugin: {
|
|
|
255
555
|
textChunkLimit: number;
|
|
256
556
|
chunkerMode: "markdown";
|
|
257
557
|
sendText: (params: {
|
|
258
|
-
cfg:
|
|
558
|
+
cfg: PluginConfig;
|
|
259
559
|
to: string;
|
|
260
560
|
text: string;
|
|
261
561
|
replyToId?: string;
|
|
562
|
+
accountId?: string;
|
|
262
563
|
}) => Promise<QQBotSendResult>;
|
|
263
564
|
sendMedia: (params: {
|
|
264
|
-
cfg:
|
|
565
|
+
cfg: PluginConfig;
|
|
265
566
|
to: string;
|
|
266
567
|
text?: string;
|
|
267
568
|
mediaUrl?: string;
|
|
268
569
|
replyToId?: string;
|
|
570
|
+
accountId?: string;
|
|
269
571
|
}) => Promise<QQBotSendResult>;
|
|
270
572
|
sendTyping: (params: {
|
|
271
|
-
cfg:
|
|
573
|
+
cfg: PluginConfig;
|
|
272
574
|
to: string;
|
|
273
575
|
replyToId?: string;
|
|
274
576
|
inputSecond?: number;
|
|
577
|
+
accountId?: string;
|
|
275
578
|
}) => Promise<QQBotSendResult>;
|
|
276
579
|
};
|
|
277
580
|
gateway: {
|
|
@@ -286,7 +589,7 @@ declare const qqbotPlugin: {
|
|
|
286
589
|
error: (msg: string) => void;
|
|
287
590
|
};
|
|
288
591
|
}) => Promise<void>;
|
|
289
|
-
stopAccount: (
|
|
592
|
+
stopAccount: (ctx: {
|
|
290
593
|
accountId: string;
|
|
291
594
|
}) => Promise<void>;
|
|
292
595
|
getStatus: () => {
|
|
@@ -446,6 +749,12 @@ declare const plugin: {
|
|
|
446
749
|
enabled: {
|
|
447
750
|
type: string;
|
|
448
751
|
};
|
|
752
|
+
name: {
|
|
753
|
+
type: string;
|
|
754
|
+
};
|
|
755
|
+
defaultAccount: {
|
|
756
|
+
type: string;
|
|
757
|
+
};
|
|
449
758
|
appId: {
|
|
450
759
|
type: string;
|
|
451
760
|
};
|
|
@@ -507,9 +816,97 @@ declare const plugin: {
|
|
|
507
816
|
replyFinalOnly: {
|
|
508
817
|
type: string;
|
|
509
818
|
};
|
|
819
|
+
maxFileSizeMB: {
|
|
820
|
+
type: string;
|
|
821
|
+
};
|
|
822
|
+
mediaTimeoutMs: {
|
|
823
|
+
type: string;
|
|
824
|
+
};
|
|
825
|
+
accounts: {
|
|
826
|
+
type: string;
|
|
827
|
+
additionalProperties: {
|
|
828
|
+
type: string;
|
|
829
|
+
additionalProperties: boolean;
|
|
830
|
+
properties: {
|
|
831
|
+
name: {
|
|
832
|
+
type: string;
|
|
833
|
+
};
|
|
834
|
+
enabled: {
|
|
835
|
+
type: string;
|
|
836
|
+
};
|
|
837
|
+
appId: {
|
|
838
|
+
type: string;
|
|
839
|
+
};
|
|
840
|
+
clientSecret: {
|
|
841
|
+
type: string;
|
|
842
|
+
};
|
|
843
|
+
asr: {
|
|
844
|
+
type: string;
|
|
845
|
+
additionalProperties: boolean;
|
|
846
|
+
properties: {
|
|
847
|
+
enabled: {
|
|
848
|
+
type: string;
|
|
849
|
+
};
|
|
850
|
+
appId: {
|
|
851
|
+
type: string;
|
|
852
|
+
};
|
|
853
|
+
secretId: {
|
|
854
|
+
type: string;
|
|
855
|
+
};
|
|
856
|
+
secretKey: {
|
|
857
|
+
type: string;
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
markdownSupport: {
|
|
862
|
+
type: string;
|
|
863
|
+
};
|
|
864
|
+
dmPolicy: {
|
|
865
|
+
type: string;
|
|
866
|
+
enum: string[];
|
|
867
|
+
};
|
|
868
|
+
groupPolicy: {
|
|
869
|
+
type: string;
|
|
870
|
+
enum: string[];
|
|
871
|
+
};
|
|
872
|
+
requireMention: {
|
|
873
|
+
type: string;
|
|
874
|
+
};
|
|
875
|
+
allowFrom: {
|
|
876
|
+
type: string;
|
|
877
|
+
items: {
|
|
878
|
+
type: string;
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
groupAllowFrom: {
|
|
882
|
+
type: string;
|
|
883
|
+
items: {
|
|
884
|
+
type: string;
|
|
885
|
+
};
|
|
886
|
+
};
|
|
887
|
+
historyLimit: {
|
|
888
|
+
type: string;
|
|
889
|
+
minimum: number;
|
|
890
|
+
};
|
|
891
|
+
textChunkLimit: {
|
|
892
|
+
type: string;
|
|
893
|
+
minimum: number;
|
|
894
|
+
};
|
|
895
|
+
replyFinalOnly: {
|
|
896
|
+
type: string;
|
|
897
|
+
};
|
|
898
|
+
maxFileSizeMB: {
|
|
899
|
+
type: string;
|
|
900
|
+
};
|
|
901
|
+
mediaTimeoutMs: {
|
|
902
|
+
type: string;
|
|
903
|
+
};
|
|
904
|
+
};
|
|
905
|
+
};
|
|
906
|
+
};
|
|
510
907
|
};
|
|
511
908
|
};
|
|
512
909
|
register(api: MoltbotPluginApi): void;
|
|
513
910
|
};
|
|
514
911
|
|
|
515
|
-
export { DEFAULT_ACCOUNT_ID, type MoltbotPluginApi, type QQBotConfig, type QQBotSendResult, type ResolvedQQBotAccount, plugin as default, getQQBotRuntime, qqbotPlugin, setQQBotRuntime };
|
|
912
|
+
export { DEFAULT_ACCOUNT_ID, type MoltbotPluginApi, type QQBotAccountConfig, type QQBotConfig, type QQBotSendResult, type ResolvedQQBotAccount, plugin as default, getQQBotRuntime, qqbotPlugin, setQQBotRuntime };
|