@openclaw-china/qqbot 2026.3.9 → 2026.3.10
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 +112 -1
- package/dist/index.js +430 -18
- package/dist/index.js.map +1 -1
- package/openclaw.plugin.json +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ declare const QQBotAccountSchema: z.ZodObject<{
|
|
|
33
33
|
longTaskNoticeDelayMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
34
34
|
maxFileSizeMB: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
35
35
|
mediaTimeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
36
|
+
autoSendLocalPathMedia: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
36
37
|
inboundMedia: z.ZodOptional<z.ZodObject<{
|
|
37
38
|
dir: z.ZodOptional<z.ZodString>;
|
|
38
39
|
keepDays: z.ZodOptional<z.ZodNumber>;
|
|
@@ -54,6 +55,7 @@ declare const QQBotAccountSchema: z.ZodObject<{
|
|
|
54
55
|
longTaskNoticeDelayMs: number;
|
|
55
56
|
maxFileSizeMB: number;
|
|
56
57
|
mediaTimeoutMs: number;
|
|
58
|
+
autoSendLocalPathMedia: boolean;
|
|
57
59
|
name?: string | undefined;
|
|
58
60
|
enabled?: boolean | undefined;
|
|
59
61
|
appId?: string | undefined;
|
|
@@ -93,6 +95,7 @@ declare const QQBotAccountSchema: z.ZodObject<{
|
|
|
93
95
|
longTaskNoticeDelayMs?: number | undefined;
|
|
94
96
|
maxFileSizeMB?: number | undefined;
|
|
95
97
|
mediaTimeoutMs?: number | undefined;
|
|
98
|
+
autoSendLocalPathMedia?: boolean | undefined;
|
|
96
99
|
inboundMedia?: {
|
|
97
100
|
dir?: string | undefined;
|
|
98
101
|
keepDays?: number | undefined;
|
|
@@ -131,6 +134,7 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
131
134
|
longTaskNoticeDelayMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
132
135
|
maxFileSizeMB: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
133
136
|
mediaTimeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
137
|
+
autoSendLocalPathMedia: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
134
138
|
inboundMedia: z.ZodOptional<z.ZodObject<{
|
|
135
139
|
dir: z.ZodOptional<z.ZodString>;
|
|
136
140
|
keepDays: z.ZodOptional<z.ZodNumber>;
|
|
@@ -176,6 +180,7 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
176
180
|
longTaskNoticeDelayMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
177
181
|
maxFileSizeMB: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
178
182
|
mediaTimeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
183
|
+
autoSendLocalPathMedia: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
179
184
|
inboundMedia: z.ZodOptional<z.ZodObject<{
|
|
180
185
|
dir: z.ZodOptional<z.ZodString>;
|
|
181
186
|
keepDays: z.ZodOptional<z.ZodNumber>;
|
|
@@ -197,6 +202,7 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
197
202
|
longTaskNoticeDelayMs: number;
|
|
198
203
|
maxFileSizeMB: number;
|
|
199
204
|
mediaTimeoutMs: number;
|
|
205
|
+
autoSendLocalPathMedia: boolean;
|
|
200
206
|
name?: string | undefined;
|
|
201
207
|
enabled?: boolean | undefined;
|
|
202
208
|
appId?: string | undefined;
|
|
@@ -236,6 +242,7 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
236
242
|
longTaskNoticeDelayMs?: number | undefined;
|
|
237
243
|
maxFileSizeMB?: number | undefined;
|
|
238
244
|
mediaTimeoutMs?: number | undefined;
|
|
245
|
+
autoSendLocalPathMedia?: boolean | undefined;
|
|
239
246
|
inboundMedia?: {
|
|
240
247
|
dir?: string | undefined;
|
|
241
248
|
keepDays?: number | undefined;
|
|
@@ -252,6 +259,7 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
252
259
|
longTaskNoticeDelayMs: number;
|
|
253
260
|
maxFileSizeMB: number;
|
|
254
261
|
mediaTimeoutMs: number;
|
|
262
|
+
autoSendLocalPathMedia: boolean;
|
|
255
263
|
name?: string | undefined;
|
|
256
264
|
enabled?: boolean | undefined;
|
|
257
265
|
appId?: string | undefined;
|
|
@@ -280,6 +288,7 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
280
288
|
longTaskNoticeDelayMs: number;
|
|
281
289
|
maxFileSizeMB: number;
|
|
282
290
|
mediaTimeoutMs: number;
|
|
291
|
+
autoSendLocalPathMedia: boolean;
|
|
283
292
|
name?: string | undefined;
|
|
284
293
|
enabled?: boolean | undefined;
|
|
285
294
|
appId?: string | undefined;
|
|
@@ -320,6 +329,7 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
320
329
|
longTaskNoticeDelayMs?: number | undefined;
|
|
321
330
|
maxFileSizeMB?: number | undefined;
|
|
322
331
|
mediaTimeoutMs?: number | undefined;
|
|
332
|
+
autoSendLocalPathMedia?: boolean | undefined;
|
|
323
333
|
inboundMedia?: {
|
|
324
334
|
dir?: string | undefined;
|
|
325
335
|
keepDays?: number | undefined;
|
|
@@ -348,6 +358,7 @@ declare const QQBotConfigSchema: z.ZodObject<{
|
|
|
348
358
|
longTaskNoticeDelayMs?: number | undefined;
|
|
349
359
|
maxFileSizeMB?: number | undefined;
|
|
350
360
|
mediaTimeoutMs?: number | undefined;
|
|
361
|
+
autoSendLocalPathMedia?: boolean | undefined;
|
|
351
362
|
inboundMedia?: {
|
|
352
363
|
dir?: string | undefined;
|
|
353
364
|
keepDays?: number | undefined;
|
|
@@ -376,6 +387,29 @@ interface QQBotSendResult {
|
|
|
376
387
|
timestamp?: number | string;
|
|
377
388
|
error?: string;
|
|
378
389
|
}
|
|
390
|
+
type QQChatType = "direct" | "group" | "channel";
|
|
391
|
+
|
|
392
|
+
interface WizardPrompter {
|
|
393
|
+
note: (message: string, title?: string) => Promise<void>;
|
|
394
|
+
text: (opts: {
|
|
395
|
+
message: string;
|
|
396
|
+
placeholder?: string;
|
|
397
|
+
initialValue?: string;
|
|
398
|
+
validate?: (value: string | undefined) => string | undefined;
|
|
399
|
+
}) => Promise<string | symbol>;
|
|
400
|
+
confirm: (opts: {
|
|
401
|
+
message: string;
|
|
402
|
+
initialValue?: boolean;
|
|
403
|
+
}) => Promise<boolean>;
|
|
404
|
+
select: <T>(opts: {
|
|
405
|
+
message: string;
|
|
406
|
+
options: Array<{
|
|
407
|
+
value: T;
|
|
408
|
+
label: string;
|
|
409
|
+
}>;
|
|
410
|
+
initialValue?: T;
|
|
411
|
+
}) => Promise<T | symbol>;
|
|
412
|
+
}
|
|
379
413
|
|
|
380
414
|
declare const qqbotPlugin: {
|
|
381
415
|
id: string;
|
|
@@ -398,6 +432,7 @@ declare const qqbotPlugin: {
|
|
|
398
432
|
reply: boolean;
|
|
399
433
|
polls: boolean;
|
|
400
434
|
blockStreaming: boolean;
|
|
435
|
+
activeSend: boolean;
|
|
401
436
|
};
|
|
402
437
|
messaging: {
|
|
403
438
|
normalizeTarget: (raw: string) => string | undefined;
|
|
@@ -496,6 +531,9 @@ declare const qqbotPlugin: {
|
|
|
496
531
|
mediaTimeoutMs: {
|
|
497
532
|
type: string;
|
|
498
533
|
};
|
|
534
|
+
autoSendLocalPathMedia: {
|
|
535
|
+
type: string;
|
|
536
|
+
};
|
|
499
537
|
inboundMedia: {
|
|
500
538
|
type: string;
|
|
501
539
|
additionalProperties: boolean;
|
|
@@ -592,6 +630,9 @@ declare const qqbotPlugin: {
|
|
|
592
630
|
mediaTimeoutMs: {
|
|
593
631
|
type: string;
|
|
594
632
|
};
|
|
633
|
+
autoSendLocalPathMedia: {
|
|
634
|
+
type: string;
|
|
635
|
+
};
|
|
595
636
|
inboundMedia: {
|
|
596
637
|
type: string;
|
|
597
638
|
additionalProperties: boolean;
|
|
@@ -614,6 +655,28 @@ declare const qqbotPlugin: {
|
|
|
614
655
|
reload: {
|
|
615
656
|
configPrefixes: string[];
|
|
616
657
|
};
|
|
658
|
+
onboarding: {
|
|
659
|
+
channel: "qqbot";
|
|
660
|
+
getStatus: (params: {
|
|
661
|
+
cfg: PluginConfig;
|
|
662
|
+
}) => Promise<{
|
|
663
|
+
channel: "qqbot";
|
|
664
|
+
configured: boolean;
|
|
665
|
+
statusLines: string[];
|
|
666
|
+
selectionHint: string;
|
|
667
|
+
quickstartScore: number;
|
|
668
|
+
}>;
|
|
669
|
+
configure: (params: {
|
|
670
|
+
cfg: PluginConfig;
|
|
671
|
+
prompter: WizardPrompter;
|
|
672
|
+
shouldPromptAccountIds?: boolean;
|
|
673
|
+
accountOverrides?: Record<string, string>;
|
|
674
|
+
}) => Promise<{
|
|
675
|
+
cfg: PluginConfig;
|
|
676
|
+
accountId: string;
|
|
677
|
+
}>;
|
|
678
|
+
disable: (cfg: PluginConfig) => PluginConfig;
|
|
679
|
+
};
|
|
617
680
|
config: {
|
|
618
681
|
listAccountIds: (cfg: PluginConfig) => string[];
|
|
619
682
|
resolveAccount: (cfg: PluginConfig, accountId?: string) => ResolvedQQBotAccount;
|
|
@@ -836,6 +899,48 @@ interface PluginRuntime {
|
|
|
836
899
|
declare function setQQBotRuntime(next: PluginRuntime): void;
|
|
837
900
|
declare function getQQBotRuntime(): PluginRuntime;
|
|
838
901
|
|
|
902
|
+
type KnownQQBotTargetKind = "user" | "group" | "channel";
|
|
903
|
+
type KnownQQBotTargetStoreOptions = {
|
|
904
|
+
filePath?: string;
|
|
905
|
+
};
|
|
906
|
+
interface KnownQQBotTarget {
|
|
907
|
+
accountId: string;
|
|
908
|
+
kind: KnownQQBotTargetKind;
|
|
909
|
+
target: string;
|
|
910
|
+
displayName?: string;
|
|
911
|
+
sourceChatType: QQChatType;
|
|
912
|
+
firstSeenAt: number;
|
|
913
|
+
lastSeenAt: number;
|
|
914
|
+
}
|
|
915
|
+
interface ListKnownQQBotTargetsParams extends KnownQQBotTargetStoreOptions {
|
|
916
|
+
accountId?: string;
|
|
917
|
+
kind?: KnownQQBotTargetKind;
|
|
918
|
+
limit?: number;
|
|
919
|
+
}
|
|
920
|
+
interface GetKnownQQBotTargetParams extends KnownQQBotTargetStoreOptions {
|
|
921
|
+
accountId?: string;
|
|
922
|
+
target: string;
|
|
923
|
+
}
|
|
924
|
+
interface RemoveKnownQQBotTargetParams extends KnownQQBotTargetStoreOptions {
|
|
925
|
+
accountId?: string;
|
|
926
|
+
target: string;
|
|
927
|
+
}
|
|
928
|
+
interface ClearKnownQQBotTargetsParams extends KnownQQBotTargetStoreOptions {
|
|
929
|
+
accountId?: string;
|
|
930
|
+
kind?: KnownQQBotTargetKind;
|
|
931
|
+
}
|
|
932
|
+
declare function listKnownQQBotTargets(params?: ListKnownQQBotTargetsParams): KnownQQBotTarget[];
|
|
933
|
+
declare function getKnownQQBotTarget(params: GetKnownQQBotTargetParams): KnownQQBotTarget | undefined;
|
|
934
|
+
declare function removeKnownQQBotTarget(params: RemoveKnownQQBotTargetParams): boolean;
|
|
935
|
+
declare function clearKnownQQBotTargets(params?: ClearKnownQQBotTargetsParams): number;
|
|
936
|
+
declare function sendProactiveQQBotMessage(params: {
|
|
937
|
+
cfg: PluginConfig;
|
|
938
|
+
to: string;
|
|
939
|
+
text?: string;
|
|
940
|
+
mediaUrl?: string;
|
|
941
|
+
accountId?: string;
|
|
942
|
+
}): Promise<QQBotSendResult>;
|
|
943
|
+
|
|
839
944
|
/**
|
|
840
945
|
* @openclaw-china/qqbot
|
|
841
946
|
* QQ Bot 渠道插件入口
|
|
@@ -936,6 +1041,9 @@ declare const plugin: {
|
|
|
936
1041
|
mediaTimeoutMs: {
|
|
937
1042
|
type: string;
|
|
938
1043
|
};
|
|
1044
|
+
autoSendLocalPathMedia: {
|
|
1045
|
+
type: string;
|
|
1046
|
+
};
|
|
939
1047
|
inboundMedia: {
|
|
940
1048
|
type: string;
|
|
941
1049
|
additionalProperties: boolean;
|
|
@@ -1032,6 +1140,9 @@ declare const plugin: {
|
|
|
1032
1140
|
mediaTimeoutMs: {
|
|
1033
1141
|
type: string;
|
|
1034
1142
|
};
|
|
1143
|
+
autoSendLocalPathMedia: {
|
|
1144
|
+
type: string;
|
|
1145
|
+
};
|
|
1035
1146
|
inboundMedia: {
|
|
1036
1147
|
type: string;
|
|
1037
1148
|
additionalProperties: boolean;
|
|
@@ -1053,4 +1164,4 @@ declare const plugin: {
|
|
|
1053
1164
|
register(api: MoltbotPluginApi): void;
|
|
1054
1165
|
};
|
|
1055
1166
|
|
|
1056
|
-
export { DEFAULT_ACCOUNT_ID, type MoltbotPluginApi, type QQBotAccountConfig, type QQBotConfig, type QQBotSendResult, type ResolvedQQBotAccount, plugin as default, getQQBotRuntime, qqbotPlugin, setQQBotRuntime };
|
|
1167
|
+
export { DEFAULT_ACCOUNT_ID, type KnownQQBotTarget, type MoltbotPluginApi, type QQBotAccountConfig, type QQBotConfig, type QQBotSendResult, type ResolvedQQBotAccount, clearKnownQQBotTargets, plugin as default, getKnownQQBotTarget, getQQBotRuntime, listKnownQQBotTargets, qqbotPlugin, removeKnownQQBotTarget, sendProactiveQQBotMessage, setQQBotRuntime };
|