Repository navigation
Expand file tree
/
Copy pathpersona-extensions.json
More file actions
859 lines (859 loc) · 40.4 KB
/
Copy pathpersona-extensions.json
File metadata and controls
859 lines (859 loc) · 40.4 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
{
"market_version": 1,
"name": "OpenMate",
"description": "OpenMate:把飞书等聊天软件接进 Persona 的开源扩展(MIT)。",
"homepage": "https://github.com/NginxL/openmate",
"extensions": [
{
"manifest": {
"manifest_version": 1,
"id": "openmate-feishu",
"name": "飞书(OpenMate)",
"version": "0.11.83",
"description": "把飞书私聊和群消息接进 Persona 的收件箱和知识库,通过确认卡片以你的身份发消息,支持 /agent。通过你自己安装的 LarkAgentX(非官方网页协议)连接,与飞书官方无关。",
"publisher": "NginxL",
"homepage": "https://github.com/NginxL/openmate",
"engines": {
"persona": ">=202611220000",
"extension_protocol": 1
},
"runtime": {
"command": "bin/openmate-feishu"
},
"activation_events": [
"on_startup"
],
"contributes": {
"connectors": [
{
"id": "matefeishu",
"name": "飞书(OpenMate)",
"capabilities": [
"status",
"tools",
"actions",
"events",
"inbox",
"archive",
"history",
"login",
"threads",
"outbound_send",
"items"
],
"agent_tools": [
"matefeishu_status",
"matefeishu_chats",
"matefeishu_messages",
"matefeishu_search",
"matefeishu_docs",
"matefeishu_agent_reply",
"matefeishu_starkmesh",
"matefeishu_media",
"matefeishu_members",
"matefeishu_meetings",
"matefeishu_mail",
"matefeishu_mail_reply"
],
"confirm_always": [
"matefeishu_*"
],
"sends_as_user": true,
"poll_seconds": 60,
"kinds": [
"dm",
"mention",
"group",
"mail"
],
"kind_descriptions": {
"dm": "类型:飞书私聊里别人发给我、我还没回的消息",
"mention": "类型:飞书群里有人 @我、我还没回的消息",
"group": "类型:飞书群里的新消息,没有 @我",
"mail": "类型:飞书邮箱里发给我、标为重要、还没读的邮件"
}
}
],
"channel": [
{
"id": "matefeishu",
"name": "飞书(OpenMate)",
"kind": "im",
"connector": "matefeishu",
"bind": "qr",
"description": "把你指定的一个飞书会话(扩展设置里的「Persona 渠道会话」)当成你和 Persona 的对话:你在那里说的话都交给 Persona,回答(连同回答里的图片)以你的身份回到提问处;Agent 要你回答或批准的问题也发到那里,直接回复就是作答,在 App 里答了会自动撤回。没指定会话时什么都不收也不发。",
"capabilities": {
"images_in": false,
"images_out": true,
"files_in": false,
"voice_in": false,
"format": "plain",
"max_text": 0,
"asks": "text",
"push": true,
"typing": false,
"progress": false,
"threads": false
}
}
],
"assistant": [
{
"id": "matefeishu",
"instructions": "assistant/instructions.md"
}
],
"ui": [
{
"id": "openmate-today",
"title": "今天",
"placement": "nav_page",
"icon": "sun"
},
{
"id": "today-card",
"title": "今天",
"placement": "overview_card",
"opens": "openmate-today"
},
{
"id": "openmate-agents",
"title": "Agent 进度",
"placement": "nav_page",
"icon": "robot"
},
{
"id": "agents-card",
"title": "Agent 进度",
"placement": "overview_card",
"opens": "openmate-agents"
},
{
"id": "chats",
"title": "飞书",
"placement": "nav_page",
"icon": "chat"
},
{
"id": "calendar",
"title": "日程",
"placement": "nav_page",
"icon": "calendar"
},
{
"id": "starkmesh",
"title": "中转站",
"placement": "nav_page",
"icon": "wallet"
},
{
"id": "starkmesh-card",
"title": "中转站",
"placement": "overview_card",
"opens": "starkmesh"
}
],
"usage": [
{
"id": "starkmesh",
"name": "StarkMesh"
}
]
},
"configuration": {
"type": "object",
"properties": {
"larkx_python": {
"type": "string",
"title": "LarkAgentX 的 Python",
"description": "装了 LarkAgentX 的 Python 解释器的绝对路径(例如某个 venv 里的 bin/python)。LarkAgentX 需要你自己安装,本扩展不附带。",
"maxLength": 1024
},
"larkx_commit": {
"type": "string",
"title": "LarkAgentX 版本",
"description": "这个扩展适配的 LarkAgentX 提交(40 位十六进制)。只有确认换了 LarkAgentX 版本时才改。",
"default": "97ad48e69e34bd8c78ee30f795b7c3759dd81659",
"pattern": "^[0-9a-f]{40}$"
},
"region": {
"type": "string",
"title": "区域",
"description": "飞书(中国)或 Lark(国际版)",
"default": "feishu",
"oneOf": [
{
"const": "feishu",
"title": "飞书"
},
{
"const": "lark",
"title": "Lark(国际版)"
}
]
},
"http_proxy": {
"type": "string",
"title": "代理",
"description": "连接飞书时用的代理,只支持 http:// 或 https://,例如 http://127.0.0.1:7890,只对这个扩展生效。留空就用系统设置;系统代理是 SOCKS 时,LarkAgentX 的 Python 里要装 python-socks。",
"maxLength": 512
},
"agent": {
"type": "boolean",
"title": "启用 /agent",
"description": "你在飞书里发以前缀开头的消息(或 @ 你自己的消息,见下面的开关)时,交给 Agent 处理,并以你的身份回复。",
"default": false,
"x-confirm": "打开后,你自己在飞书里发的 /agent 消息(和 @ 你自己的消息)会让 Agent 用你的全部权限处理,并以你的身份回复到原话题。确定打开吗?"
},
"agent_prefix": {
"type": "string",
"title": "/agent 前缀",
"description": "以“/”开头、不含空格,不能是 /stop。",
"default": "/agent",
"pattern": "^/\\S+$",
"maxLength": 32
},
"agent_self_mention": {
"type": "boolean",
"title": "@自己 也交给 Agent",
"description": "你自己发的消息里 @ 了你自己(真正的 @,不是手打的文字)时,也当作一次 /agent 请求,@ 后面的话就是要办的事。不以“/”开头,群里别的机器人不会把它当成自己的命令。要先打开 /agent。",
"default": true
},
"agent_machine": {
"type": "string",
"format": "machine",
"title": "/agent 在哪台电脑上跑",
"description": "不设置就用助手所在的电脑;它忙时按负载开到别的电脑上(见「忙时分到空闲的电脑」)。设置了就总在这台电脑上跑。"
},
"agent_balance": {
"type": "boolean",
"title": "忙时分到空闲的电脑",
"description": "没设置「/agent 在哪台电脑上跑」时:新的 /agent 照旧开在助手所在的电脑上;那台电脑忙(1 分钟负载超过 CPU 核数的 75%,或可用内存不到 2 GiB)时,开到负载最低、也不忙的另一台在线电脑上。已经开着的会话不会换电脑:话题里接着问的,照旧交给原来的会话(或它派出去做事的 Agent);话题里再开新会话,也回到这个话题之前用的电脑。设置了「/agent 用哪个启动器」时不分流;Persona 里「Lark /agent」用的启动器要在别的电脑上也能用(内置的 claude 哪台都有)。",
"default": true
},
"agent_launcher": {
"type": "string",
"format": "launcher",
"title": "/agent 用哪个启动器",
"description": "不设置就用 Persona 里“Lark /agent”的模型设置。"
},
"agent_forward": {
"type": "boolean",
"title": "话题里的追问直接转给干活的 Agent",
"description": "/agent 派出的任务还在做时,你在同一话题里再发的 /agent 直接转给做这件事的 Agent,话题里回一句“已转给正在做这件事的 Agent”,结果照常回到话题。写“问 Persona”或“问助手”,或者任务已经结束,仍交给助手。关掉就总是交给助手。",
"default": true
},
"channel_chat": {
"type": "string",
"title": "Persona 渠道会话",
"description": "「设置 › 渠道」里的飞书(OpenMate)只在这个会话里收发:填会话 id(问 Persona 助手「飞书里 xx 群的 chat id」,它会用 matefeishu_chats 查出 chat=… 那一串),要是这个扩展收到过消息的会话。在这里你自己说的每一句都交给 Persona 的渠道流程(开头的 /agent 可写可不写;默认进主对话,可在「设置 › 渠道」改),回答以你的身份回到提问处;Agent 要你回答或批准的问题也以你的身份发到这里,直接回复就是作答,在 App 里答了会自动撤回。这个会话里别人能看到这些消息,请用只有你自己的群。留空就不用(默认),渠道什么都不收也不发,/agent 照旧。",
"maxLength": 256
},
"agent_reply_header": {
"type": "string",
"title": "AI 回复标记",
"description": "每条 /agent 回复带的 AI 标记行,{agent} 换成实际回答的 Agent(如 claude code、codex),{model} 换成回答它的模型(如 Opus 5.5),{effort} 换成思考强度(只在打开“AI 标记写上思考强度”时才写);放在哪由“AI 标记位置”决定。留空表示不加。",
"default": "> 🤖 AI 回复 · {model} · {effort}",
"maxLength": 200
},
"agent_mark_position": {
"type": "string",
"title": "AI 标记位置",
"description": "AI 标记行放在回复末尾(话题折叠时直接显示答案)还是第一行。",
"oneOf": [
{
"const": "end",
"title": "末尾"
},
{
"const": "top",
"title": "第一行"
}
],
"default": "end"
},
"agent_mark_effort": {
"type": "boolean",
"title": "AI 标记写上思考强度",
"description": "打开后 AI 标记里 {effort} 换成回答它的思考强度(如 high);关着 {effort} 留空,连同它前面的“ · ”一起去掉,只写模型。",
"default": false
},
"agent_ack_reaction": {
"type": "string",
"title": "接单表情",
"description": "收到 /agent 请求时在那条消息上点的表情(飞书表情代号,如 THINKING、OnIt、OK)。留空表示不点。",
"default": "THINKING",
"maxLength": 40
},
"agent_done_reaction": {
"type": "string",
"title": "完成表情",
"description": "/agent 这一轮做完时,把接单表情换成这个(飞书表情代号,如 DONE、CheckMark、OK)。留空表示只撤掉接单表情。",
"default": "DONE",
"maxLength": 40
},
"agent_fail_reaction": {
"type": "string",
"title": "失败表情",
"description": "/agent 失败或超时时,把接单表情换成这个(飞书表情代号,如 CrossMark、ERROR)。留空表示只撤掉接单表情。",
"default": "CrossMark",
"maxLength": 40
},
"auto_reply": {
"type": "boolean",
"title": "自动代答",
"description": "在“飞书”页里开了自动代答的群,有人或机器人 @ 你时 AI 可以直接以你的身份回复,不用确认(要先打开 /agent)。机器人只在它向你提问、要你确认或补充信息时才代答,只汇报进度、结果的不回,同一话题每天最多 3 次。私聊和 @所有人 不代答。",
"default": true
},
"auto_reply_docs": {
"type": "boolean",
"title": "文档评论代答",
"description": "有人在飞书文档或知识库的评论里 @ 你时,AI 直接以你的身份在那条评论下回复,不用确认(要先打开 /agent;用 lark-cli 发回复)。默认关。打开后,每次回复前会核对 lark-cli 登录的是不是同一个飞书账号,不是就不回。",
"default": false
},
"auto_reply_daily_most": {
"type": "integer",
"title": "每个群每天最多代答",
"description": "超过后当天不再代答,留给你自己回复。",
"default": 20,
"minimum": 1,
"maximum": 100
},
"auto_reply_hourly_most": {
"type": "integer",
"title": "每个群每小时最多代答",
"description": "一个群(或一篇文档)一小时内最多自动代答几次;同时最多 3 个代答在跑。",
"default": 6,
"minimum": 1,
"maximum": 30
},
"auto_reply_header": {
"type": "string",
"title": "代答标记",
"description": "自动代答回复带的 AI 标记行,{agent} 换成实际回答的 Agent(如 claude code、codex),{model} 换成回答它的模型(如 Opus 5.5),{effort} 换成思考强度(只在打开“AI 标记写上思考强度”时才写);位置同“AI 标记位置”。留空表示不加。",
"default": "> 🤖 AI 代答 · {model} · {effort}",
"maxLength": 200
},
"auto_reply_at_asker": {
"type": "boolean",
"title": "代答时 @ 对方",
"description": "自动代答的回复开头真正 @ 提问的人,对方会收到 @ 提醒;同一个问题只 @ 一次。代答标记留空、或改得认不出时不 @(标记要在回复的第一行或最后一行、以「🤖 AI」开头),免得两边的自动代答互相 @ 起来。",
"default": true
},
"auto_reply_full": {
"type": "boolean",
"title": "代答用完整能力",
"description": "打开后,自动代答和文档代答可以像 /agent 一样查消息、知识库、文件、日志和代码再回答。关闭后,群代答只能根据群里最近的消息回答,文档代答只能根据评论和文档节选回答。",
"default": true
},
"agent_reply_suffix": {
"type": "string",
"title": "AI 代答标记",
"description": "加在每条 /agent 回复末尾,例如“> 🤖 AI 代答,仅供参考”。写 \\n 表示换行;留空表示不加。",
"default": "",
"maxLength": 200
},
"history_chats": {
"type": "integer",
"title": "首次补收的会话数",
"description": "第一次登录后,补收最近多少个会话的历史消息(0–50)。",
"default": 20,
"minimum": 0,
"maximum": 50
},
"triage_rules": {
"type": "string",
"title": "收件箱分拣规则",
"description": "用你自己的话写飞书消息该怎么分拣(哪些要你处理、哪些看看就行、哪些是噪音)。留空就用 Persona 的全局规则。没有 @你 的群消息按噪音处理,不调用模型;在飞书里设了消息免打扰的群,没有 @你 的消息直接算已读,不留在待处理里(照旧存进知识库)。下面“照常分拣的群”里列的群例外。",
"maxLength": 4000
},
"inbox_triage_chats": {
"type": "array",
"title": "照常分拣的群",
"description": "这些群里没有 @你 的消息也交给收件箱的 AI 按分拣规则分拣,群设了免打扰也一样。填群的会话 id(问 Persona 助手“飞书里 xx 群的 chat id”,或看 matefeishu_chats),一行一个。默认不填:没有 @你 的群消息照旧按噪音处理。",
"items": {
"type": "string",
"maxLength": 64
},
"maxItems": 100,
"default": []
},
"inbox_private_dms": {
"type": "array",
"title": "不交给收件箱 AI 的私聊",
"description": "这些私聊照常进收件箱,但不交给 AI 分拣,一律按“要你处理”放,条目里也不带消息内容(打开会话看)。填私聊的会话 id 或对方的用户 id(matefeishu_chats、matefeishu_search 给出),一行一个。默认不填:所有私聊照旧由 AI 分拣。",
"items": {
"type": "string",
"maxLength": 64
},
"maxItems": 100,
"default": []
},
"lark_cli": {
"type": "string",
"title": "lark-cli 路径",
"description": "日程页用飞书 lark-cli 只读地读你的日历(calendar +agenda)。留空时在 PATH 和登录 shell 里找 lark-cli。"
},
"lark_cli_profile": {
"type": "string",
"title": "lark-cli 配置档",
"description": "lark-cli 的 --profile:你为 Persona 登录的那个飞书应用。留空用 lark-cli 的默认配置档。需要日历只读权限(calendar:calendar.event:read)。"
},
"meetings": {
"type": "boolean",
"title": "会议和妙记",
"description": "通过 lark-cli 只读读取你参加过的飞书视频会议的智能纪要和妙记,在今天页和日程页显示,并存进知识库。",
"default": true
},
"meetings_kb": {
"type": "boolean",
"title": "会议纪要进知识库",
"default": true
},
"meeting_transcript": {
"type": "boolean",
"title": "逐字稿也进知识库",
"description": "逐字稿很长,会多占知识库整理用的模型额度。",
"default": false
},
"meetings_days": {
"type": "integer",
"title": "会议回看天数",
"minimum": 1,
"maximum": 30,
"default": 14
},
"approvals": {
"type": "boolean",
"title": "审批和飞书任务",
"description": "只读显示等你审批的单子和分给你的飞书任务,点开到飞书里处理。OpenMate 不替你同意、拒绝或完成。",
"default": true
},
"mail": {
"type": "boolean",
"title": "飞书邮箱",
"description": "通过 lark-cli 只读同步飞书邮箱里最近的邮件,在今天页显示,重要邮件进收件箱和知识库。回复邮件默认只存草稿,要你在确认卡片上批准。",
"default": true
},
"mail_inbox": {
"type": "boolean",
"title": "重要邮件进收件箱",
"default": true
},
"mail_kb": {
"type": "boolean",
"title": "邮件进知识库",
"default": true
},
"mail_send": {
"type": "boolean",
"title": "回复邮件可以直接发出",
"description": "打开后,确认卡片批准即直接发出邮件,需要先给 lark-cli 配置档用的飞书应用授权发信权限(mail:user_mailbox.message:send)。关着时回复只存草稿,到飞书邮箱的草稿箱里检查后再发。",
"default": false
},
"starkmesh_url": {
"type": "string",
"format": "uri",
"title": "StarkMesh 地址",
"description": "StarkMesh 网关的地址(这台电脑上能访问到的,例如 http://127.0.0.1:18080)。StarkMesh 页和“今天”页的额度卡片从这里只读地读账号和用量。地址和下面的密钥都填了才会显示。"
},
"starkmesh_alerts": {
"type": "boolean",
"title": "StarkMesh 后台告警",
"description": "先填好 StarkMesh 地址和只读管理密钥。打开后每 5 分钟在后台检查一次,号池额度快用完、Claude 号出错或全部不可用、StarkMesh 持续读不到时,给你的设备发 Persona 通知。",
"default": false
},
"starkmesh_alert_left": {
"type": "integer",
"title": "额度告警线(剩余 %)",
"description": "号池某个额度条的剩余百分比达到或低于这条线时提醒。",
"default": 10,
"minimum": 5,
"maximum": 50
},
"needs_hours": {
"type": "integer",
"title": "“需要我”只看多久内的",
"description": "飞书私聊和群里 @我 的消息,超过这么多小时就不再算“需要我”(仍在“飞书”页里)。",
"default": 24,
"minimum": 1,
"maximum": 168
},
"bookmarks": {
"type": "array",
"title": "书签",
"description": "“今天”页的书签,一行一个:标题 | https://链接 | 说明(说明可以不写)。只认 https 链接,最多 30 个。",
"items": {
"type": "string",
"maxLength": 2200
},
"maxItems": 30
}
}
},
"secrets": [
{
"name": "starkmesh_key",
"title": "StarkMesh 只读管理密钥",
"hint": "last4",
"description": "在 StarkMesh 后台 设置 › 管理密钥 新建,只勾读取权限:accounts.read、accounts.usage.read、accounts.stats.read、dashboard.read。不填就不显示 StarkMesh。"
}
],
"permissions": {
"network": [
"feishu.cn",
"*.feishu.cn",
"larksuite.com",
"*.larksuite.com",
"larkoffice.com",
"*.larkoffice.com",
"config:starkmesh_url:http"
],
"hub": [
"agents.control",
"agents.read",
"assistant.ask",
"extensions.call:openmate-wechat",
"inbox.read",
"kb.read",
"machines.read",
"notify",
"todos.read"
],
"launcher_keys": true
},
"host_integrations": [
{
"id": "lark-cli",
"version": ">=1.0.72 <2.0.0"
}
]
},
"tags": [
"飞书",
"Lark",
"聊天",
"收件箱",
"知识库",
"OpenMate"
],
"icon": "assets/icon.png",
"packages": [
{
"url": "packages/openmate-feishu/0.11.83/openmate-feishu-0.11.83.tar.gz",
"sha256": "4ed90e9b9d0cd0cd916d854bb8f4bbd8cf7644b09aabc0ffb41ba6bb89b6f3c9",
"size": 423002
}
]
},
{
"manifest": {
"manifest_version": 1,
"id": "openmate-wechat",
"name": "微信(OpenMate)",
"version": "0.1.78",
"description": "把微信私聊和群里 @你 的消息接进 Persona 的收件箱和会话页,私聊进知识库;在微信里用 /agent 让 Agent 以你的身份处理和回复,勾选的群里有人 @ 你时自动代答,助手代发的消息都要你在确认卡片上确认。以一台新电脑的身份登录你的微信(非官方协议),与腾讯官方无关。",
"publisher": "NginxL",
"homepage": "https://github.com/NginxL/openmate",
"engines": {
"persona": ">=202611110000",
"extension_protocol": 1
},
"runtime": {
"command": "bin/openmate-wechat",
"http": true
},
"activation_events": [
"on_startup"
],
"contributes": {
"connectors": [
{
"id": "matewechat",
"name": "微信(OpenMate)",
"capabilities": [
"status",
"tools",
"actions",
"events",
"inbox",
"archive",
"login",
"threads"
],
"agent_tools": [
"matewechat_status",
"matewechat_chats",
"matewechat_messages",
"matewechat_search",
"matewechat_media",
"matewechat_group_notice",
"matewechat_agent_reply"
],
"confirm_always": [
"matewechat_*"
],
"sends_as_user": true,
"poll_seconds": 60,
"kinds": [
"dm",
"mention",
"group"
],
"kind_descriptions": {
"dm": "类型:微信私聊里别人发给我、我还没回的消息。微信没有已读回执,“没回”只表示我最后没发过消息。熟人的问题、约定、请求才需要我;服务通知、推销、验证码算噪音。",
"mention": "类型:微信群里有人真正 @我(不是手打名字)、我还没回的消息。只 @所有人 的多是通知。",
"group": "类型:微信群里的新消息,没有 @我:多数知悉即可;红包、接龙、拼单、广告是噪音。"
}
}
],
"channel": [
{
"id": "matewechat",
"name": "微信(OpenMate)",
"kind": "im",
"connector": "matewechat",
"bind": "qr",
"description": "把你指定的一个微信会话(扩展设置里的「Persona 渠道会话」)当成你和 Persona 的对话:你在那里说的话都交给 Persona,回答以你的身份回到这个会话;Agent 要你回答或批准的问题也发到那里,直接回复就是作答(微信撤回不了,在 App 里答了的问题会留在会话里)。没指定会话时什么都不收也不发。",
"capabilities": {
"images_in": false,
"files_in": false,
"voice_in": false,
"format": "plain",
"max_text": 3500,
"asks": "text",
"push": true,
"typing": false,
"progress": false,
"threads": false
}
}
],
"assistant": [
{
"id": "matewechat",
"instructions": "assistant/instructions.md"
}
],
"ui": [
{
"id": "wechat-chats",
"title": "微信",
"placement": "nav_page",
"icon": "person"
}
]
},
"configuration": {
"type": "object",
"properties": {
"agent": {
"type": "boolean",
"title": "启用 /agent",
"description": "你在微信里(手机或任何设备)发以前缀开头的消息时,交给 Agent 处理,并以你的身份回复到原会话。",
"default": false,
"x-confirm": "打开后,你自己在微信里发的 /agent 消息会让 Agent 用你的全部权限处理,并以你的身份回复到原会话。确定打开吗?"
},
"agent_prefix": {
"type": "string",
"title": "/agent 前缀",
"description": "以“/”开头、不含空格,不能是 /stop。",
"default": "/agent",
"pattern": "^/\\S+$",
"maxLength": 32
},
"agent_machine": {
"type": "string",
"format": "machine",
"title": "/agent 在哪台电脑上跑",
"description": "不设置就用助手所在的电脑;它忙时按负载开到别的电脑上(见「忙时分到空闲的电脑」)。设置了就总在这台电脑上跑。"
},
"agent_balance": {
"type": "boolean",
"title": "忙时分到空闲的电脑",
"description": "没设置「/agent 在哪台电脑上跑」时:新的 /agent 照旧开在助手所在的电脑上;那台电脑忙(1 分钟负载超过 CPU 核数的 75%,或可用内存不到 2 GiB)时,开到负载最低、也不忙的另一台在线电脑上。已经开着的 /agent 会话不会换电脑;每条新的 /agent 按当时的负载选电脑。设置了「/agent 用哪个启动器」时不分流;Persona 里「Lark /agent」用的启动器要在别的电脑上也能用(内置的 claude 哪台都有)。",
"default": true
},
"agent_launcher": {
"type": "string",
"format": "launcher",
"title": "/agent 用哪个启动器",
"description": "不设置就用 Persona 里“Lark /agent”的模型设置(和飞书 /agent 共用)。"
},
"channel_chat": {
"type": "string",
"title": "Persona 渠道会话",
"description": "「设置 › 渠道」里的微信(OpenMate)只在这个会话里收发:填会话 id(问 Persona 助手「微信里 xx 的会话 id」,它会用 matewechat_chats 查出 chat=… 那一串),要是这个扩展收到过消息的会话。在这里你自己说的每一句都交给 Persona 的渠道流程(开头的 /agent 可写可不写;默认进主对话,可在「设置 › 渠道」改),回答以你的身份回到这个会话;Agent 要你回答或批准的问题也以你的身份发到这里,直接回复就是作答(微信撤回不了,在 App 里答了的问题会留在会话里)。这个会话里别人能看到这些消息,请用只有你自己的会话。留空就不用(默认),渠道什么都不收也不发,/agent 照旧。",
"maxLength": 256
},
"agent_reply_header": {
"type": "string",
"title": "AI 回复标记",
"description": "每条 /agent 回复带的 AI 标记行,{agent} 换成实际回答的 Agent(如 claude code、codex),{model} 换成回答它的模型(如 Opus 5.5),{effort} 换成思考强度(只在打开“AI 标记写上思考强度”时才写);放在哪由“AI 标记位置”决定。留空表示不加。",
"default": "> 🤖 AI 回复 · {model} · {effort}",
"maxLength": 200
},
"agent_mark_position": {
"type": "string",
"title": "AI 标记位置",
"description": "AI 标记行放在回复末尾还是第一行。",
"oneOf": [
{
"const": "end",
"title": "末尾"
},
{
"const": "top",
"title": "第一行"
}
],
"default": "end"
},
"agent_mark_effort": {
"type": "boolean",
"title": "AI 标记写上思考强度",
"description": "打开后 AI 标记里 {effort} 换成回答它的思考强度(如 high);关着 {effort} 留空,连同它前面的“ · ”一起去掉,只写模型。",
"default": false
},
"agent_ack_reaction": {
"type": "string",
"title": "接单提示",
"description": "收到你的 /agent 时,先引用那条消息在原会话发这一句(以你的身份,大家都看得到,不会撤回),表示已经在处理。群里有人 @ 你的自动代答不发,直接回答。留空表示 /agent 也不发。",
"default": "🤖 处理中...",
"maxLength": 40
},
"agent_done_reaction": {
"type": "string",
"title": "完成表情",
"description": "微信没有表情回应,保持留空(填了也不会发)。",
"default": "",
"maxLength": 40
},
"agent_fail_reaction": {
"type": "string",
"title": "失败表情",
"description": "微信没有表情回应,保持留空(填了也不会发)。",
"default": "",
"maxLength": 40
},
"auto_reply": {
"type": "boolean",
"title": "自动代答",
"description": "在“微信”页里开了自动代答的群,有人真正 @ 你(不是手打名字)时,AI 可以直接以你的身份引用并 @ 对方回复,不用确认(要先打开 /agent)。私聊、公众号和只 @所有人 不代答。",
"default": true
},
"auto_reply_daily_most": {
"type": "integer",
"title": "每个群每天最多代答",
"description": "超过后当天不再代答,留给你自己回复。",
"default": 20,
"minimum": 1,
"maximum": 100
},
"auto_reply_hourly_most": {
"type": "integer",
"title": "每个群每小时最多代答",
"description": "一个群一小时内最多自动代答几次;同时最多 3 个代答在跑。",
"default": 6,
"minimum": 1,
"maximum": 30
},
"auto_reply_header": {
"type": "string",
"title": "代答标记",
"description": "自动代答回复带的 AI 标记行,{agent} 换成实际回答的 Agent(如 claude code、codex),{model} 换成回答它的模型(如 Opus 5.5),{effort} 换成思考强度(只在打开“AI 标记写上思考强度”时才写);位置同“AI 标记位置”。留空表示不加。",
"default": "> 🤖 AI 代答 · {model} · {effort}",
"maxLength": 200
},
"auto_reply_full": {
"type": "boolean",
"title": "代答用完整能力",
"description": "打开后,群里的自动代答可以像 /agent 一样查消息、知识库、文件、日志和代码再回答。关闭后,只能根据群里最近的消息回答。微信里多是私人群,默认关闭。",
"default": false
},
"triage_rules": {
"type": "string",
"title": "收件箱分拣规则",
"description": "用你自己的话写微信消息该怎么分拣(哪些要你处理、哪些看看就行、哪些是噪音)。留空就用 Persona 的全局规则。没有 @你 的群消息总是按噪音处理。",
"maxLength": 4000
},
"needs_hours": {
"type": "integer",
"title": "“需要我”只看多久内的",
"description": "微信私聊和群里 @我 的消息,超过这么多小时就不再算“需要我”(仍在“微信”页里)。",
"default": 24,
"minimum": 1,
"maximum": 168
},
"archive_groups": {
"type": "boolean",
"title": "群聊进知识库",
"description": "私聊和文件传输助手会进知识库;群聊默认不进(群里其他人没同意被记录)。公众号和服务号从不进。",
"default": false
},
"voice_to_text": {
"type": "string",
"title": "语音转文字命令(可选)",
"description": "收到的语音会存成 WAV 文件;填一条本机命令(例如 whisper-cli 的完整路径和参数),扩展把 WAV 文件路径加在最后运行它,它打印出的文字附在语音消息后面。留空表示不转文字。",
"maxLength": 1024
},
"native_path": {
"type": "string",
"title": "微信组件路径(开发用)",
"description": "留空:首次启动时下载本扩展钉住版本的 matewechat-native 并校验 SHA-256。只有调试自己编译的版本时才填绝对路径。",
"maxLength": 1024
},
"hub_url": {
"type": "string",
"format": "uri",
"title": "AgentWechat 地址(可选)",
"description": "填了就改连这台电脑上的 AgentWechat(例如 http://127.0.0.1:6174):微信在 AgentWechat 里登录,你用它的桌面端聊天,扩展只是它的一个客户端,不再自己登录、也不占电脑端名额。要同时填下面的“AgentWechat 访问密钥”。留空就用内置的微信组件。"
}
}
},
"secrets": [
{
"name": "hub_token",
"title": "AgentWechat 访问密钥",
"hint": "last4",
"description": "只给读、发、媒体三项权限并限定一个账号:wx tokens create openmate --accounts <账号ID> --scopes read --scopes send --scopes media。只在填了 AgentWechat 地址时用。"
}
],
"permissions": {
"network": [
"config:hub_url:http",
"weixin.qq.com",
"*.weixin.qq.com",
"wechat.com",
"*.wechat.com",
"*.qpic.cn",
"github.com",
"*.githubusercontent.com"
],
"hub": [
"agents.control",
"agents.read",
"assistant.ask",
"kb.read",
"machines.read"
]
}
},
"tags": [
"微信",
"WeChat",
"聊天",
"Agent",
"OpenMate"
],
"icon": "assets/icon.png",
"packages": [
{
"url": "packages/openmate-wechat/0.1.78/openmate-wechat-0.1.78.tar.gz",
"sha256": "edf834f9404f53a2db2dc30e9d53c5c82b436c492dd8ccfc491fe45143d57fa7",
"size": 321965
}
]
}
]
}