forked from dingxiang-me/OpenClaw-Wechat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenclaw.plugin.json
More file actions
1318 lines (1318 loc) · 44.1 KB
/
openclaw.plugin.json
File metadata and controls
1318 lines (1318 loc) · 44.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"id": "openclaw-wechat",
"name": "OpenClaw-Wechat",
"version": "2.0.1",
"description": "WeCom (企业微信) channel plugin for OpenClaw (自建应用回调 + 发送 API).",
"channels": [
"wecom"
],
"extensions": [
"./src/index.js"
],
"configSchema": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^(?!(name|enabled|corpId|corpSecret|agentId|callbackToken|token|callbackAesKey|encodingAesKey|webhookPath|agent|bot|delivery|webhookBot|stream|observability|outboundProxy|webhooks|allowFrom|allowFromRejectMessage|adminUsers|commandAllowlist|commandBlockMessage|commands|workspaceTemplate|groupChat|dynamicAgent|dynamicAgents|dm|debounce|streaming|voiceTranscription|defaultAccount|tools|accounts)$)[A-Za-z0-9_-]+$": {
"type": "object",
"description": "兼容旧配置:inline 多账户(推荐迁移到 channels.wecom.accounts.<id>)"
}
},
"properties": {
"name": {
"type": "string",
"description": "兼容旧配置:渠道显示名(运行时可忽略)"
},
"enabled": {
"type": "boolean",
"default": true,
"description": "是否启用 WeCom 渠道"
},
"corpId": {
"type": "string",
"minLength": 1,
"description": "企业微信 Corp ID"
},
"corpSecret": {
"type": "string",
"minLength": 1,
"description": "企业微信 Corp Secret",
"x-sensitive": true
},
"agentId": {
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^[0-9]+$"
}
],
"description": "企业微信 Agent ID"
},
"callbackToken": {
"type": "string",
"minLength": 1,
"description": "回调 Token",
"x-sensitive": true
},
"token": {
"type": "string",
"minLength": 1,
"description": "兼容字段:默认等价 callbackToken;当使用 legacy agent 配置块时可作为 Bot token 使用",
"x-sensitive": true
},
"callbackAesKey": {
"type": "string",
"minLength": 1,
"description": "回调 AES Key",
"x-sensitive": true
},
"encodingAesKey": {
"type": "string",
"minLength": 1,
"description": "兼容字段:默认等价 callbackAesKey;当使用 legacy agent 配置块时可作为 Bot encodingAesKey 使用",
"x-sensitive": true
},
"webhookPath": {
"type": "string",
"description": "Webhook 路径",
"default": "/wecom/callback"
},
"agent": {
"type": "object",
"description": "兼容旧配置:自建应用凭证块(与顶层 corpId/corpSecret/agentId 等价)",
"additionalProperties": false,
"properties": {
"corpId": {
"type": "string",
"minLength": 1
},
"corpSecret": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"agentId": {
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^[0-9]+$"
}
]
},
"callbackToken": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"token": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"callbackAesKey": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"encodingAesKey": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"webhookPath": {
"type": "string"
}
}
},
"bot": {
"type": "object",
"description": "企业微信 AI 机器人(Bot API 模式)配置(JSON 回调 + 原生 stream)",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用 Bot 模式"
},
"token": {
"type": "string",
"description": "Bot 模式回调 Token"
},
"encodingAesKey": {
"type": "string",
"description": "Bot 模式回调 EncodingAESKey(43 位)",
"x-sensitive": true
},
"webhookPath": {
"type": "string",
"default": "/wecom/bot/callback",
"description": "Bot 模式 webhook 路径"
},
"longConnection": {
"type": "object",
"description": "企业微信智能机器人长连接(WebSocket)配置",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用 Bot 长连接模式"
},
"botId": {
"type": "string",
"minLength": 1,
"description": "企业微信智能机器人 BotID"
},
"secret": {
"type": "string",
"minLength": 1,
"description": "企业微信智能机器人 Secret",
"x-sensitive": true
},
"url": {
"type": "string",
"default": "wss://openws.work.weixin.qq.com",
"description": "企业微信智能机器人长连接地址"
},
"pingIntervalMs": {
"type": "integer",
"minimum": 10000,
"maximum": 120000,
"default": 30000,
"description": "长连接心跳间隔(毫秒)"
},
"reconnectDelayMs": {
"type": "integer",
"minimum": 1000,
"maximum": 60000,
"default": 5000,
"description": "长连接重连基准延迟(毫秒)"
},
"maxReconnectDelayMs": {
"type": "integer",
"minimum": 5000,
"maximum": 300000,
"default": 60000,
"description": "长连接最大重连延迟(毫秒)"
}
}
},
"placeholderText": {
"type": "string",
"default": "消息已收到,正在处理中,请稍等片刻。",
"description": "Bot 模式初始 stream 占位文本"
},
"streamExpireMs": {
"type": "integer",
"minimum": 30000,
"maximum": 3600000,
"default": 600000,
"description": "Bot 流式会话保留时长(毫秒)"
},
"replyTimeoutMs": {
"type": "integer",
"minimum": 15000,
"maximum": 600000,
"default": 90000,
"description": "Bot 模式等待模型回包超时(毫秒)"
},
"lateReplyWatchMs": {
"type": "integer",
"minimum": 30000,
"maximum": 600000,
"default": 180000,
"description": "Bot 超时后异步补发观察窗口(毫秒)"
},
"lateReplyPollMs": {
"type": "integer",
"minimum": 500,
"maximum": 10000,
"default": 2000,
"description": "Bot 异步补发轮询间隔(毫秒)"
},
"card": {
"type": "object",
"description": "Bot 卡片回包策略(response_url / webhook_bot)",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用 Bot 卡片回包(默认关闭,保持兼容)"
},
"mode": {
"type": "string",
"enum": [
"markdown",
"template_card"
],
"default": "markdown",
"description": "卡片模式:markdown(兼容优先)/ template_card(模板卡片)"
},
"title": {
"type": "string",
"description": "卡片标题"
},
"subtitle": {
"type": "string",
"description": "卡片副标题"
},
"footer": {
"type": "string",
"description": "卡片底部说明"
},
"maxContentLength": {
"type": "integer",
"minimum": 200,
"maximum": 4000,
"default": 1400,
"description": "卡片正文最大长度(超出自动截断)"
},
"responseUrlEnabled": {
"type": "boolean",
"default": true,
"description": "是否在 response_url 层启用卡片发送"
},
"webhookBotEnabled": {
"type": "boolean",
"default": true,
"description": "是否在 webhook_bot 层启用卡片发送"
}
}
}
}
},
"delivery": {
"type": "object",
"description": "Bot 模式回包兜底策略(按层降级)",
"additionalProperties": false,
"properties": {
"fallback": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用多层回包兜底(默认关闭,保持兼容)"
},
"order": {
"type": "array",
"description": "回包层级顺序(active_stream/response_url/webhook_bot/agent_push)",
"items": {
"type": "string",
"enum": [
"active_stream",
"response_url",
"webhook_bot",
"agent_push"
]
},
"default": [
"active_stream",
"response_url",
"webhook_bot",
"agent_push"
]
}
}
}
}
},
"webhookBot": {
"type": "object",
"description": "Webhook Bot 出站回包配置(fallback layer)",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用 Webhook Bot 出站回包"
},
"url": {
"type": "string",
"description": "Webhook Bot 完整 URL(含 key)"
},
"key": {
"type": "string",
"description": "Webhook Bot key(与 url 二选一)",
"x-sensitive": true
},
"timeoutMs": {
"type": "integer",
"minimum": 1000,
"maximum": 60000,
"default": 8000,
"description": "Webhook Bot 请求超时(毫秒)"
}
}
},
"stream": {
"type": "object",
"description": "会话级流管理与并发控制(默认关闭)",
"additionalProperties": false,
"properties": {
"manager": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用会话队列(每个会话串行处理)"
},
"timeoutMs": {
"type": "integer",
"minimum": 1000,
"maximum": 600000,
"default": 45000,
"description": "会话流状态保留/等待超时(毫秒)"
},
"maxConcurrentPerSession": {
"type": "integer",
"minimum": 1,
"maximum": 8,
"default": 1,
"description": "每个会话允许并发处理的任务数"
}
}
}
}
},
"observability": {
"type": "object",
"description": "链路可观测性配置",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "是否输出回包链路日志"
},
"logPayloadMeta": {
"type": "boolean",
"default": true,
"description": "是否输出回包元信息(trace、层级、状态)"
}
}
},
"outboundProxy": {
"type": "string",
"description": "可选:WeCom 出站 API 代理(如 http://127.0.0.1:7890)"
},
"defaultAccount": {
"type": "string",
"minLength": 1,
"description": "默认账号 ID;文档工具等多账号能力未显式指定账号时优先使用"
},
"tools": {
"type": "object",
"description": "OpenClaw 工具能力开关",
"additionalProperties": false,
"properties": {
"doc": {
"type": "boolean",
"default": true,
"description": "是否启用企业微信文档工具(wecom_doc)"
},
"docAutoGrantRequesterCollaborator": {
"type": "boolean",
"default": true,
"description": "是否在 WeCom 会话里创建文档后自动把当前发送者加为协作者"
}
}
},
"webhooks": {
"type": "object",
"description": "可选:命名 Webhook 目标映射(key=目标名,value=Webhook URL 或 key:xxx)",
"additionalProperties": {
"type": "string",
"minLength": 1
}
},
"allowFrom": {
"type": "array",
"description": "可选:允许发送消息的用户列表(空=不限制,支持 '*')",
"items": {
"type": "string",
"minLength": 1
}
},
"allowFromRejectMessage": {
"type": "string",
"description": "发送者未授权时的拒绝提示文案"
},
"adminUsers": {
"type": "array",
"description": "管理员用户 ID(可绕过指令白名单)",
"items": {
"type": "string",
"minLength": 1
}
},
"commandAllowlist": {
"type": "array",
"description": "兼容旧配置:命令白名单(等价 commands.allowlist)",
"items": {
"type": "string",
"minLength": 1
}
},
"commandBlockMessage": {
"type": "string",
"description": "兼容旧配置:命令拦截提示(等价 commands.rejectMessage)"
},
"commands": {
"type": "object",
"description": "指令白名单控制(启用后仅允许 allowlist 内的 / 指令)",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用指令白名单(默认关闭,保持兼容)"
},
"allowlist": {
"type": "array",
"description": "允许的指令列表(如 /status、/new)",
"items": {
"type": "string",
"minLength": 1
}
},
"rejectMessage": {
"type": "string",
"description": "命中未授权指令时返回给用户的提示文本"
},
"blockMessage": {
"type": "string",
"description": "兼容旧配置:等价 rejectMessage"
}
}
},
"workspaceTemplate": {
"type": "string",
"description": "兼容旧配置:动态 Agent workspace 模板目录(等价 dynamicAgent.workspaceTemplate)"
},
"groupChat": {
"type": "object",
"description": "群聊触发策略",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "是否启用群聊消息处理"
},
"triggerMode": {
"type": "string",
"enum": [
"direct",
"mention",
"keyword"
],
"default": "direct",
"description": "群聊触发模式:direct=直接触发,mention=@触发,keyword=关键词触发"
},
"requireMention": {
"type": "boolean",
"default": false,
"description": "兼容字段:等价于 triggerMode=mention(新配置优先使用 triggerMode)"
},
"mentionPatterns": {
"type": "array",
"description": "提及匹配关键字(默认 ['@'])",
"items": {
"type": "string",
"minLength": 1
}
},
"triggerKeywords": {
"type": "array",
"description": "triggerMode=keyword 时的关键词列表(命中任意一个即触发)",
"items": {
"type": "string",
"minLength": 1
}
}
}
},
"dynamicAgent": {
"type": "object",
"description": "动态 Agent 路由策略(按用户/群/提及映射到指定 agent)",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用动态 Agent 路由"
},
"mode": {
"type": "string",
"enum": [
"mapping",
"deterministic",
"hybrid"
],
"default": "deterministic",
"description": "路由模式:mapping=纯映射,deterministic=确定性生成,hybrid=映射优先未命中再确定性生成"
},
"idStrategy": {
"type": "string",
"enum": [
"readable-hash"
],
"default": "readable-hash",
"description": "确定性 Agent ID 生成策略"
},
"deterministicPrefix": {
"type": "string",
"default": "wecom",
"description": "确定性 Agent ID 前缀"
},
"autoProvision": {
"type": "boolean",
"default": true,
"description": "是否允许确定性模式下使用未预先声明的 agentId(由 OpenClaw 侧自动处理)"
},
"allowUnknownAgentId": {
"type": "boolean",
"default": true,
"description": "是否允许路由到不在 agents.list 的 agentId(高级选项)"
},
"workspaceTemplate": {
"type": "string",
"description": "可选:动态 Agent 初始化模板目录(首条命中时自动播种 bootstrap 文件)"
},
"defaultAgentId": {
"type": "string",
"description": "未命中映射时的默认 Agent ID"
},
"adminAgentId": {
"type": "string",
"description": "管理员用户强制路由的 Agent ID"
},
"adminUsers": {
"type": "array",
"description": "动态路由管理员用户列表(优先于 userMap)",
"items": {
"type": "string",
"minLength": 1
}
},
"userMap": {
"type": "object",
"description": "用户路由映射:{ \"dingxiang\": \"main\" }",
"additionalProperties": {
"type": "string",
"minLength": 1
}
},
"groupMap": {
"type": "object",
"description": "群路由映射:{ \"chatid_xxx\": \"main\" }",
"additionalProperties": {
"type": "string",
"minLength": 1
}
},
"mentionMap": {
"type": "object",
"description": "提及路由映射:{ \"ai助手\": \"main\" }",
"additionalProperties": {
"type": "string",
"minLength": 1
}
},
"preferMentionMap": {
"type": "boolean",
"default": true,
"description": "群聊中是否优先按提及映射路由"
},
"forceAgentSessionKey": {
"type": "boolean",
"default": true,
"description": "是否将会话键绑定到目标 Agent(避免跨 Agent 串上下文)"
},
"allowFallbackToDefaultRoute": {
"type": "boolean",
"default": true,
"description": "未命中动态映射时是否回退到 OpenClaw 默认路由"
},
"dmCreateAgentOnFirstMessage": {
"type": "boolean",
"default": true,
"description": "私聊是否启用动态 Agent(兼容 dm.createAgentOnFirstMessage)"
},
"groupEnabled": {
"type": "boolean",
"default": true,
"description": "群聊是否启用动态 Agent 路由(消息触发仍受 groupChat 配置控制)"
}
}
},
"dynamicAgents": {
"type": "object",
"description": "兼容旧配置:等价 dynamicAgent(旧项目常用命名)",
"additionalProperties": true
},
"dm": {
"type": "object",
"description": "私聊策略与兼容配置",
"additionalProperties": false,
"properties": {
"mode": {
"type": "string",
"enum": [
"open",
"allowlist",
"deny"
],
"default": "open",
"description": "私聊策略:open=开放,allowlist=白名单,deny=关闭"
},
"rejectMessage": {
"type": "string",
"description": "私聊被拒绝时的提示文案"
},
"createAgentOnFirstMessage": {
"type": "boolean",
"default": true,
"description": "是否为私聊在首条消息时创建动态 Agent(等价 dynamicAgent.dmCreateAgentOnFirstMessage)"
},
"allowFrom": {
"type": "array",
"description": "私聊白名单(mode=allowlist 时生效)",
"items": {
"type": "string",
"minLength": 1
}
}
}
},
"events": {
"type": "object",
"description": "事件消息策略(如 enter_agent 欢迎语)",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "是否处理事件消息(MsgType=event)"
},
"enterAgentWelcomeEnabled": {
"type": "boolean",
"default": false,
"description": "是否在 enter_agent 事件时自动回复欢迎语"
},
"enterAgentWelcomeText": {
"type": "string",
"description": "enter_agent 自动欢迎语文本"
}
}
},
"debounce": {
"type": "object",
"description": "文本消息防抖合并",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用文本防抖(默认关闭,保持兼容)"
},
"windowMs": {
"type": "integer",
"minimum": 100,
"maximum": 10000,
"default": 1200,
"description": "防抖窗口(毫秒)"
},
"maxBatch": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"default": 6,
"description": "单次最多合并消息条数"
}
}
},
"streaming": {
"type": "object",
"description": "Agent 模式增量回包策略(通过多条文本消息模拟,非 Bot 原生 stream)",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用流式回复(默认关闭,保持兼容)"
},
"minChars": {
"type": "integer",
"minimum": 20,
"maximum": 2000,
"default": 120,
"description": "最小增量字符数,达到后才发送下一段"
},
"minIntervalMs": {
"type": "integer",
"minimum": 200,
"maximum": 10000,
"default": 1200,
"description": "两次增量发送的最短间隔(毫秒)"
}
}
},
"voiceTranscription": {
"type": "object",
"description": "语音转写回退配置(当企业微信 Recognition 缺失时使用)",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "是否启用插件侧语音转写回退"
},
"provider": {
"type": "string",
"enum": [
"local-whisper-cli",
"local-whisper"
],
"default": "local-whisper-cli",
"description": "本地转写提供方类型"
},
"command": {
"type": "string",
"description": "可选:本地转写命令(默认按 provider 自动探测)"
},
"apiBaseUrl": {
"type": "string",
"description": "已弃用:历史 OpenAI 转写配置,不再使用"
},
"apiKey": {
"type": "string",
"description": "已弃用:历史 OpenAI 转写配置,不再使用",
"x-sensitive": true
},
"apiKeyEnv": {
"type": "string",
"description": "已弃用:历史 OpenAI 转写配置,不再使用"
},
"modelPath": {
"type": "string",
"description": "local-whisper-cli 使用的本地模型文件路径(如 ggml/gguf)"
},
"model": {
"type": "string",
"default": "base",
"description": "local-whisper 使用的模型名(tiny/base/small/...)"
},
"language": {
"type": "string",
"description": "可选:转写语言(如 zh)"
},
"prompt": {
"type": "string",
"description": "可选:转写提示词"
},
"timeoutMs": {
"type": "integer",
"minimum": 1000,
"default": 20000,
"description": "转写请求超时时间(毫秒)"
},
"maxBytes": {
"type": "integer",
"minimum": 262144,
"default": 10485760,
"description": "允许转写的最大音频大小(字节)"
},
"ffmpegEnabled": {
"type": "boolean",
"default": true,
"description": "当音频格式不兼容时,是否允许使用 ffmpeg 转码到 wav"
},
"transcodeToWav": {
"type": "boolean",
"default": true,
"description": "是否优先将语音统一转码为 wav 再交给本地模型"
},
"requireModelPath": {
"type": "boolean",
"default": true,
"description": "local-whisper-cli 模式下是否强制要求配置 modelPath"
}
}
},
"accounts": {
"type": "object",
"description": "多账户配置(键为账户 ID)",
"minProperties": 1,
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": true
},
"name": {
"type": "string",
"description": "兼容旧配置:账户显示名"
},
"corpId": {
"type": "string",
"minLength": 1
},
"corpSecret": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"agentId": {
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^[0-9]+$"
}
]
},
"callbackToken": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"token": {
"type": "string",
"minLength": 1,
"description": "兼容旧配置:等价 callbackToken",
"x-sensitive": true
},
"callbackAesKey": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"encodingAesKey": {
"type": "string",
"minLength": 1,
"description": "兼容旧配置:等价 callbackAesKey",
"x-sensitive": true
},
"webhookPath": {
"type": "string",
"default": "/wecom/callback",
"description": "Agent 回调路径;非 default 账户未填写时自动使用 /wecom/<accountId>/callback"
},
"agent": {
"type": "object",
"description": "兼容旧配置:该账户自建应用凭证块(与账户顶层 corpId/corpSecret/agentId 等价)",
"additionalProperties": false,
"properties": {
"corpId": {
"type": "string",
"minLength": 1
},
"corpSecret": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"agentId": {
"oneOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^[0-9]+$"
}
]
},
"callbackToken": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"token": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"callbackAesKey": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"encodingAesKey": {
"type": "string",
"minLength": 1,
"x-sensitive": true
},
"webhookPath": {
"type": "string"
}
}
},
"bot": {
"type": "object",
"description": "该账户专用 Bot 模式配置(覆盖 channels.wecom.bot)",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"description": "是否启用该账户 Bot 模式"
},
"token": {
"type": "string",
"description": "Bot 模式回调 Token"
},
"callbackToken": {
"type": "string",
"description": "兼容旧配置:等价 token"
},
"encodingAesKey": {
"type": "string",
"description": "Bot 模式回调 EncodingAESKey(43 位)",
"x-sensitive": true
},
"callbackAesKey": {
"type": "string",
"description": "兼容旧配置:等价 encodingAesKey",
"x-sensitive": true
},
"webhookPath": {
"type": "string",
"default": "/wecom/bot/callback",
"description": "Bot 模式 webhook 路径;非 default 账户未填写时自动使用 /wecom/<accountId>/bot/callback"
},
"longConnection": {