@zhin.js/runtime 1.1.7 → 1.1.9

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.
@@ -4,42 +4,699 @@
4
4
  "additionalProperties": false,
5
5
  "properties": {
6
6
  "http": {
7
- "type": "object", "additionalProperties": true,
7
+ "type": "object",
8
+ "additionalProperties": true,
8
9
  "description": "HTTP, Console, REST/RPC/SSE, and Webhook Host.",
9
10
  "x-descriptionZh": "HTTP、Console、REST/RPC/SSE 与 Webhook Host。",
10
11
  "properties": {
11
12
  "readiness": {
12
- "type": "object", "additionalProperties": false,
13
+ "type": "object",
14
+ "additionalProperties": false,
13
15
  "description": "Required runtime components for /pub/ready; no external network probes.",
14
16
  "x-descriptionZh": "/pub/ready 要求就绪的运行时组件;不执行外部网络探测。",
15
17
  "properties": {
16
18
  "database": {
17
- "type": "boolean", "default": true,
19
+ "type": "boolean",
20
+ "default": true,
18
21
  "description": "Require an initialized Database Host (not a live database query).",
19
22
  "x-descriptionZh": "要求 Database Host 已初始化(不执行实时数据库查询)。"
20
23
  },
21
24
  "endpoints": {
22
- "type": "array", "uniqueItems": true,
25
+ "type": "array",
26
+ "uniqueItems": true,
23
27
  "description": "Required Endpoint admission slots, selected by exact plugin owner and stable slot name.",
24
28
  "x-descriptionZh": "必须开放入站的 Endpoint,按插件 owner 与稳定槽名精确选择。",
25
29
  "items": {
26
- "type": "object", "additionalProperties": false, "required": ["owner", "name"],
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": [
33
+ "owner",
34
+ "name"
35
+ ],
27
36
  "properties": {
28
- "owner": { "type": "string", "pattern": "^root(?:/[a-z0-9][a-z0-9-]*)*$" },
29
- "name": { "type": "string", "minLength": 1, "pattern": "^[^\\u0000]+$" }
37
+ "owner": {
38
+ "type": "string",
39
+ "pattern": "^root(?:/[a-z0-9][a-z0-9-]*)*$"
40
+ },
41
+ "name": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "pattern": "^[^\\u0000]+$"
45
+ }
30
46
  }
31
47
  }
32
48
  },
33
49
  "agents": {
34
- "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 },
50
+ "type": "array",
51
+ "uniqueItems": true,
52
+ "items": {
53
+ "type": "string",
54
+ "minLength": 1
55
+ },
35
56
  "description": "Required configured Agent bindings; does not verify model credentials or provider reachability.",
36
57
  "x-descriptionZh": "必须存在的 Agent binding;不验证模型凭据或 Provider 网络可用性。"
37
58
  }
38
59
  }
60
+ },
61
+ "host": {
62
+ "type": [
63
+ "string",
64
+ "null"
65
+ ],
66
+ "description": "监听地址。"
67
+ },
68
+ "port": {
69
+ "type": [
70
+ "number",
71
+ "string",
72
+ "null"
73
+ ],
74
+ "description": "监听端口。"
75
+ },
76
+ "token": {
77
+ "type": [
78
+ "string",
79
+ "null"
80
+ ],
81
+ "description": "HTTP Host 访问令牌。",
82
+ "writeOnly": true,
83
+ "x-zhin-config": {
84
+ "secret": true
85
+ }
86
+ },
87
+ "tokens": {
88
+ "type": [
89
+ "array",
90
+ "null"
91
+ ],
92
+ "items": {
93
+ "type": [
94
+ "object",
95
+ "null"
96
+ ],
97
+ "additionalProperties": true,
98
+ "properties": {
99
+ "token": {
100
+ "type": [
101
+ "string",
102
+ "null"
103
+ ],
104
+ "description": "访问令牌。",
105
+ "writeOnly": true,
106
+ "x-zhin-config": {
107
+ "secret": true
108
+ }
109
+ },
110
+ "scope": {
111
+ "type": [
112
+ "string",
113
+ "null"
114
+ ],
115
+ "description": "令牌作用范围。",
116
+ "x-zhin-config": {
117
+ "options": [
118
+ {
119
+ "label": "完整管理",
120
+ "value": "full"
121
+ },
122
+ {
123
+ "label": "只读演示",
124
+ "value": "demo"
125
+ }
126
+ ]
127
+ }
128
+ },
129
+ "principalId": {
130
+ "type": [
131
+ "string",
132
+ "null"
133
+ ],
134
+ "description": "稳定管理主体身份。"
135
+ }
136
+ }
137
+ }
138
+ },
139
+ "corsOrigins": {
140
+ "type": [
141
+ "array",
142
+ "null"
143
+ ],
144
+ "items": {
145
+ "type": [
146
+ "string",
147
+ "null"
148
+ ]
149
+ }
150
+ },
151
+ "base": {
152
+ "type": [
153
+ "string",
154
+ "null"
155
+ ],
156
+ "description": "API 路径前缀。"
157
+ },
158
+ "tls": {
159
+ "anyOf": [
160
+ {
161
+ "const": false
162
+ },
163
+ {
164
+ "type": "null"
165
+ },
166
+ {
167
+ "type": "object",
168
+ "additionalProperties": true,
169
+ "properties": {
170
+ "enabled": {
171
+ "type": [
172
+ "boolean",
173
+ "string"
174
+ ],
175
+ "description": "是否启用 TLS;省略时由 HTTP Host 的 TLS 解析规则决定。"
176
+ },
177
+ "keyFile": {
178
+ "type": "string",
179
+ "description": "TLS 私钥文件路径。"
180
+ },
181
+ "certFile": {
182
+ "type": "string",
183
+ "description": "TLS 证书文件路径。"
184
+ },
185
+ "caFile": {
186
+ "type": "string",
187
+ "description": "CA 证书文件路径。"
188
+ },
189
+ "passphrase": {
190
+ "type": "string",
191
+ "description": "私钥口令。",
192
+ "writeOnly": true,
193
+ "x-zhin-config": {
194
+ "secret": true
195
+ }
196
+ },
197
+ "minVersion": {
198
+ "type": "string",
199
+ "description": "最低 TLS 版本。"
200
+ },
201
+ "ciphers": {
202
+ "type": "string",
203
+ "description": "TLS cipher 列表。"
204
+ }
205
+ }
206
+ }
207
+ ]
208
+ },
209
+ "listeners": {
210
+ "type": "array",
211
+ "items": {
212
+ "type": "object",
213
+ "additionalProperties": true,
214
+ "properties": {
215
+ "enabled": {
216
+ "type": [
217
+ "boolean",
218
+ "string"
219
+ ],
220
+ "description": "是否启用此监听器。"
221
+ },
222
+ "host": {
223
+ "type": "string",
224
+ "description": "监听地址。"
225
+ },
226
+ "port": {
227
+ "type": [
228
+ "number",
229
+ "string"
230
+ ],
231
+ "description": "监听端口。"
232
+ },
233
+ "tls": {
234
+ "anyOf": [
235
+ {
236
+ "const": false
237
+ },
238
+ {
239
+ "type": "null"
240
+ },
241
+ {
242
+ "type": "object",
243
+ "additionalProperties": true,
244
+ "properties": {
245
+ "enabled": {
246
+ "type": [
247
+ "boolean",
248
+ "string"
249
+ ],
250
+ "description": "是否启用 TLS;省略时由 HTTP Host 的 TLS 解析规则决定。"
251
+ },
252
+ "keyFile": {
253
+ "type": "string",
254
+ "description": "TLS 私钥文件路径。"
255
+ },
256
+ "certFile": {
257
+ "type": "string",
258
+ "description": "TLS 证书文件路径。"
259
+ },
260
+ "caFile": {
261
+ "type": "string",
262
+ "description": "CA 证书文件路径。"
263
+ },
264
+ "passphrase": {
265
+ "type": "string",
266
+ "description": "私钥口令。",
267
+ "writeOnly": true,
268
+ "x-zhin-config": {
269
+ "secret": true
270
+ }
271
+ },
272
+ "minVersion": {
273
+ "type": "string",
274
+ "description": "最低 TLS 版本。"
275
+ },
276
+ "ciphers": {
277
+ "type": "string",
278
+ "description": "TLS cipher 列表。"
279
+ }
280
+ }
281
+ }
282
+ ]
283
+ }
284
+ }
285
+ }
286
+ }
287
+ }
288
+ },
289
+ "database": {
290
+ "type": "object",
291
+ "additionalProperties": true,
292
+ "description": "Database Host and dialect connection options.",
293
+ "x-descriptionZh": "Database Host 与方言连接参数。",
294
+ "properties": {
295
+ "dialect": {
296
+ "type": "string",
297
+ "description": "数据库方言。",
298
+ "x-zhin-config": {
299
+ "options": [
300
+ {
301
+ "value": "memory",
302
+ "label": "memory"
303
+ },
304
+ {
305
+ "value": "sqlite",
306
+ "label": "sqlite"
307
+ },
308
+ {
309
+ "value": "mysql",
310
+ "label": "mysql"
311
+ },
312
+ {
313
+ "value": "pg",
314
+ "label": "pg"
315
+ },
316
+ {
317
+ "value": "mongodb",
318
+ "label": "mongodb"
319
+ },
320
+ {
321
+ "value": "redis",
322
+ "label": "redis"
323
+ }
324
+ ]
325
+ }
326
+ },
327
+ "filename": {
328
+ "type": "string",
329
+ "description": "SQLite 文件路径。"
330
+ },
331
+ "mode": {
332
+ "type": "string",
333
+ "description": "SQLite 兼容模式字段。"
334
+ },
335
+ "host": {
336
+ "type": "string",
337
+ "description": "数据库主机。"
338
+ },
339
+ "port": {
340
+ "type": [
341
+ "number",
342
+ "string"
343
+ ],
344
+ "description": "网络数据库端口。"
345
+ },
346
+ "user": {
347
+ "type": "string",
348
+ "description": "MySQL / PostgreSQL 用户名。"
349
+ },
350
+ "username": {
351
+ "type": "string",
352
+ "description": "Redis 用户名。"
353
+ },
354
+ "password": {
355
+ "type": "string",
356
+ "description": "连接密码。",
357
+ "writeOnly": true,
358
+ "x-zhin-config": {
359
+ "secret": true
360
+ }
361
+ },
362
+ "database": {
363
+ "type": [
364
+ "string",
365
+ "number"
366
+ ],
367
+ "description": "MySQL / PostgreSQL 数据库名,或 Redis 数据库索引。"
368
+ },
369
+ "uri": {
370
+ "type": "string",
371
+ "description": "MySQL 连接 URI(可能含凭据)。",
372
+ "writeOnly": true,
373
+ "x-zhin-config": {
374
+ "secret": true
375
+ }
376
+ },
377
+ "connectionString": {
378
+ "type": "string",
379
+ "description": "PostgreSQL 连接串(可能含凭据)。",
380
+ "writeOnly": true,
381
+ "x-zhin-config": {
382
+ "secret": true
383
+ }
384
+ },
385
+ "url": {
386
+ "type": "string",
387
+ "description": "MongoDB / Redis 连接 URL(可能含凭据)。",
388
+ "writeOnly": true,
389
+ "x-zhin-config": {
390
+ "secret": true
391
+ }
392
+ },
393
+ "dbName": {
394
+ "type": "string",
395
+ "description": "MongoDB 数据库名。"
396
+ },
397
+ "pool": {
398
+ "type": [
399
+ "object",
400
+ "null"
401
+ ],
402
+ "additionalProperties": true,
403
+ "properties": {
404
+ "min": {
405
+ "type": [
406
+ "number",
407
+ "string",
408
+ "null"
409
+ ],
410
+ "description": "最少连接数。"
411
+ },
412
+ "max": {
413
+ "type": [
414
+ "number",
415
+ "string",
416
+ "null"
417
+ ],
418
+ "description": "最多连接数。"
419
+ },
420
+ "acquireTimeoutMillis": {
421
+ "type": [
422
+ "number",
423
+ "string",
424
+ "null"
425
+ ],
426
+ "description": "获取连接超时毫秒。"
427
+ },
428
+ "idleTimeoutMillis": {
429
+ "type": [
430
+ "number",
431
+ "string",
432
+ "null"
433
+ ],
434
+ "description": "空闲连接超时毫秒。"
435
+ }
436
+ }
437
+ },
438
+ "socket": {
439
+ "type": "object",
440
+ "additionalProperties": true,
441
+ "properties": {
442
+ "host": {
443
+ "type": "string",
444
+ "description": "Redis 主机。"
445
+ },
446
+ "port": {
447
+ "type": [
448
+ "number",
449
+ "string"
450
+ ],
451
+ "description": "Redis 端口。"
452
+ },
453
+ "path": {
454
+ "type": "string",
455
+ "description": "Unix socket 路径。"
456
+ },
457
+ "connectTimeout": {
458
+ "type": [
459
+ "number",
460
+ "string"
461
+ ],
462
+ "description": "连接超时毫秒。"
463
+ },
464
+ "tls": {
465
+ "type": [
466
+ "boolean",
467
+ "string"
468
+ ],
469
+ "description": "启用 TLS。"
470
+ },
471
+ "keepAlive": {
472
+ "type": [
473
+ "number",
474
+ "string"
475
+ ],
476
+ "description": "TCP keep-alive 毫秒。"
477
+ },
478
+ "noDelay": {
479
+ "type": [
480
+ "boolean",
481
+ "string"
482
+ ],
483
+ "description": "TCP noDelay。"
484
+ }
485
+ }
486
+ },
487
+ "ssl": {
488
+ "anyOf": [
489
+ {
490
+ "type": [
491
+ "boolean",
492
+ "string"
493
+ ]
494
+ },
495
+ {
496
+ "type": "object",
497
+ "additionalProperties": true,
498
+ "properties": {
499
+ "rejectUnauthorized": {
500
+ "type": [
501
+ "boolean",
502
+ "string"
503
+ ],
504
+ "description": "校验证书。"
505
+ },
506
+ "ca": {
507
+ "anyOf": [
508
+ {
509
+ "type": "string"
510
+ },
511
+ {
512
+ "type": "array",
513
+ "items": {
514
+ "type": "string"
515
+ }
516
+ },
517
+ {
518
+ "type": "object",
519
+ "additionalProperties": true,
520
+ "description": "驱动可识别的二进制证书;非普通文本编辑项。"
521
+ }
522
+ ],
523
+ "description": "CA 证书内容或路径;由驱动解释。"
524
+ },
525
+ "cert": {
526
+ "anyOf": [
527
+ {
528
+ "type": "string"
529
+ },
530
+ {
531
+ "type": "array",
532
+ "items": {
533
+ "type": "string"
534
+ }
535
+ },
536
+ {
537
+ "type": "object",
538
+ "additionalProperties": true,
539
+ "description": "驱动可识别的二进制证书;非普通文本编辑项。"
540
+ }
541
+ ],
542
+ "description": "客户端证书。"
543
+ },
544
+ "key": {
545
+ "anyOf": [
546
+ {
547
+ "type": "string"
548
+ },
549
+ {
550
+ "type": "array",
551
+ "items": {
552
+ "type": "string"
553
+ }
554
+ },
555
+ {
556
+ "type": "object",
557
+ "additionalProperties": true,
558
+ "description": "驱动可识别的二进制证书;非普通文本编辑项。"
559
+ }
560
+ ],
561
+ "description": "客户端私钥。",
562
+ "writeOnly": true,
563
+ "x-zhin-config": {
564
+ "secret": true
565
+ }
566
+ },
567
+ "passphrase": {
568
+ "type": "string",
569
+ "description": "私钥口令。",
570
+ "writeOnly": true,
571
+ "x-zhin-config": {
572
+ "secret": true
573
+ }
574
+ },
575
+ "servername": {
576
+ "type": "string",
577
+ "description": "TLS server name。"
578
+ }
579
+ }
580
+ }
581
+ ]
582
+ },
583
+ "charset": {
584
+ "type": "string",
585
+ "description": "MySQL 字符集。"
586
+ },
587
+ "timezone": {
588
+ "type": "string",
589
+ "description": "MySQL 时区。"
590
+ },
591
+ "connectTimeout": {
592
+ "type": [
593
+ "number",
594
+ "string"
595
+ ],
596
+ "description": "MySQL 连接超时毫秒。"
597
+ },
598
+ "connectionTimeoutMillis": {
599
+ "type": [
600
+ "number",
601
+ "string"
602
+ ],
603
+ "description": "PostgreSQL 连接超时毫秒。"
604
+ },
605
+ "query_timeout": {
606
+ "type": [
607
+ "number",
608
+ "string"
609
+ ],
610
+ "description": "PostgreSQL 查询超时毫秒。"
611
+ },
612
+ "statement_timeout": {
613
+ "type": [
614
+ "number",
615
+ "string"
616
+ ],
617
+ "description": "PostgreSQL statement 超时毫秒。"
618
+ },
619
+ "application_name": {
620
+ "type": "string",
621
+ "description": "PostgreSQL 应用名称。"
622
+ },
623
+ "maxPoolSize": {
624
+ "type": [
625
+ "number",
626
+ "string"
627
+ ],
628
+ "description": "MongoDB 最大连接池大小。"
629
+ },
630
+ "minPoolSize": {
631
+ "type": [
632
+ "number",
633
+ "string"
634
+ ],
635
+ "description": "MongoDB 最小连接池大小。"
636
+ },
637
+ "serverSelectionTimeoutMS": {
638
+ "type": [
639
+ "number",
640
+ "string"
641
+ ],
642
+ "description": "MongoDB server 选择超时毫秒。"
643
+ },
644
+ "connectTimeoutMS": {
645
+ "type": [
646
+ "number",
647
+ "string"
648
+ ],
649
+ "description": "MongoDB 连接超时毫秒。"
650
+ },
651
+ "socketTimeoutMS": {
652
+ "type": [
653
+ "number",
654
+ "string"
655
+ ],
656
+ "description": "MongoDB socket 超时毫秒。"
657
+ },
658
+ "authSource": {
659
+ "type": "string",
660
+ "description": "MongoDB 认证数据库。"
661
+ },
662
+ "replicaSet": {
663
+ "type": "string",
664
+ "description": "MongoDB 副本集。"
665
+ },
666
+ "auth": {
667
+ "type": "object",
668
+ "additionalProperties": true,
669
+ "properties": {
670
+ "username": {
671
+ "type": "string",
672
+ "description": "MongoDB 用户名。"
673
+ },
674
+ "password": {
675
+ "type": "string",
676
+ "description": "MongoDB 密码。",
677
+ "writeOnly": true,
678
+ "x-zhin-config": {
679
+ "secret": true
680
+ }
681
+ }
682
+ }
683
+ },
684
+ "disableOfflineQueue": {
685
+ "type": [
686
+ "boolean",
687
+ "string"
688
+ ],
689
+ "description": "Redis 禁止离线队列。"
690
+ },
691
+ "pingInterval": {
692
+ "type": [
693
+ "number",
694
+ "string"
695
+ ],
696
+ "description": "Redis 心跳间隔毫秒。"
39
697
  }
40
698
  }
41
699
  },
42
- "database": { "type": "object", "additionalProperties": true, "description": "Database Host and dialect connection options.", "x-descriptionZh": "Database Host 与方言连接参数。" },
43
700
  "ai": {
44
701
  "type": "object",
45
702
  "additionalProperties": true,
@@ -49,16 +706,33 @@
49
706
  "decisions": {
50
707
  "type": "object",
51
708
  "additionalProperties": false,
52
- "required": ["provider"],
709
+ "required": [
710
+ "provider"
711
+ ],
53
712
  "description": "Optional structured-decision service. Missing tasks are off; use shadow before active.",
54
713
  "x-descriptionZh": "可选的结构化决策服务。未配置的任务关闭;建议先用 shadow 验证。",
55
714
  "properties": {
56
- "provider": { "type": "string", "pattern": "^root(/[a-z0-9][a-z0-9-]*)+$", "description": "Exact enabled DecisionProvider Plugin owner, such as root/typesafe.", "x-descriptionZh": "提供已启用 DecisionProvider 的精确插件身份,例如 root/typesafe。" },
57
- "skills": { "$ref": "#/$defs/decisionTask" },
58
- "tools": { "$ref": "#/$defs/decisionTask" },
59
- "memory": { "$ref": "#/$defs/decisionTask" },
60
- "agents": { "$ref": "#/$defs/decisionTask" },
61
- "approval": { "$ref": "#/$defs/decisionTask" }
715
+ "provider": {
716
+ "type": "string",
717
+ "pattern": "^root(/[a-z0-9][a-z0-9-]*)+$",
718
+ "description": "Exact enabled DecisionProvider Plugin owner, such as root/typesafe.",
719
+ "x-descriptionZh": "提供已启用 DecisionProvider 的精确插件身份,例如 root/typesafe。"
720
+ },
721
+ "skills": {
722
+ "$ref": "#/$defs/decisionTask"
723
+ },
724
+ "tools": {
725
+ "$ref": "#/$defs/decisionTask"
726
+ },
727
+ "memory": {
728
+ "$ref": "#/$defs/decisionTask"
729
+ },
730
+ "agents": {
731
+ "$ref": "#/$defs/decisionTask"
732
+ },
733
+ "approval": {
734
+ "$ref": "#/$defs/decisionTask"
735
+ }
62
736
  }
63
737
  },
64
738
  "workroom": {
@@ -69,7 +743,10 @@
69
743
  "properties": {
70
744
  "trustedPackPublishers": {
71
745
  "type": "array",
72
- "items": { "type": "string", "minLength": 1 },
746
+ "items": {
747
+ "type": "string",
748
+ "minLength": 1
749
+ },
73
750
  "uniqueItems": true,
74
751
  "description": "Authenticated Console principal ids allowed to publish shared Capability Packs.",
75
752
  "x-descriptionZh": "允许发布共享 Capability Pack 的 Console 认证 principalId。"
@@ -80,25 +757,81 @@
80
757
  "description": "Explicit P12 model processor contracts for Workroom disclosure bootstrap.",
81
758
  "x-descriptionZh": "Workroom 披露初始化使用的显式 P12 模型处理方契约。",
82
759
  "properties": {
83
- "tenantId": { "type": "string", "minLength": 1 },
760
+ "tenantId": {
761
+ "type": "string",
762
+ "minLength": 1
763
+ },
84
764
  "modelProviders": {
85
765
  "type": "object",
86
766
  "additionalProperties": {
87
767
  "type": "object",
88
768
  "additionalProperties": false,
89
- "required": ["endpoint", "processingRegions", "maxConfidentiality", "external", "noTraining", "loggingMode", "maximumRetentionSeconds", "allowsRedisclosure", "supportsDeletion"],
769
+ "required": [
770
+ "endpoint",
771
+ "processingRegions",
772
+ "maxConfidentiality",
773
+ "external",
774
+ "noTraining",
775
+ "loggingMode",
776
+ "maximumRetentionSeconds",
777
+ "allowsRedisclosure",
778
+ "supportsDeletion"
779
+ ],
90
780
  "properties": {
91
- "endpoint": { "type": "string", "minLength": 1 },
92
- "owner": { "type": "string", "minLength": 1 },
93
- "trustDomain": { "type": "string", "minLength": 1 },
94
- "processingRegions": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
95
- "maxConfidentiality": { "type": "string", "enum": ["public", "project_internal", "confidential", "restricted"] },
96
- "external": { "type": "boolean" },
97
- "noTraining": { "type": "boolean" },
98
- "loggingMode": { "type": "string", "enum": ["disabled", "metadata_only", "full"] },
99
- "maximumRetentionSeconds": { "type": "integer", "minimum": 1 },
100
- "allowsRedisclosure": { "type": "boolean" },
101
- "supportsDeletion": { "type": "boolean" }
781
+ "endpoint": {
782
+ "type": "string",
783
+ "minLength": 1
784
+ },
785
+ "owner": {
786
+ "type": "string",
787
+ "minLength": 1
788
+ },
789
+ "trustDomain": {
790
+ "type": "string",
791
+ "minLength": 1
792
+ },
793
+ "processingRegions": {
794
+ "type": "array",
795
+ "minItems": 1,
796
+ "uniqueItems": true,
797
+ "items": {
798
+ "type": "string",
799
+ "minLength": 1
800
+ }
801
+ },
802
+ "maxConfidentiality": {
803
+ "type": "string",
804
+ "enum": [
805
+ "public",
806
+ "project_internal",
807
+ "confidential",
808
+ "restricted"
809
+ ]
810
+ },
811
+ "external": {
812
+ "type": "boolean"
813
+ },
814
+ "noTraining": {
815
+ "type": "boolean"
816
+ },
817
+ "loggingMode": {
818
+ "type": "string",
819
+ "enum": [
820
+ "disabled",
821
+ "metadata_only",
822
+ "full"
823
+ ]
824
+ },
825
+ "maximumRetentionSeconds": {
826
+ "type": "integer",
827
+ "minimum": 1
828
+ },
829
+ "allowsRedisclosure": {
830
+ "type": "boolean"
831
+ },
832
+ "supportsDeletion": {
833
+ "type": "boolean"
834
+ }
102
835
  }
103
836
  }
104
837
  }
@@ -120,7 +853,10 @@
120
853
  "properties": {
121
854
  "groupMode": {
122
855
  "type": "string",
123
- "enum": ["supersede", "fifo"],
856
+ "enum": [
857
+ "supersede",
858
+ "fifo"
859
+ ],
124
860
  "description": "supersede (default): a sender's new message replaces their own unanswered turn; fifo: every message waits in arrival order. Other members' messages always queue.",
125
861
  "x-descriptionZh": "supersede(默认):同一发起人的新消息会替换他自己尚未回复的回合;fifo:全部按到达顺序排队。其他成员的消息总是排队。"
126
862
  },
@@ -137,18 +873,33 @@
137
873
  "default": 5,
138
874
  "description": "Turns allowed to wait behind the running turn of one conversation; further messages get a short busy reply.",
139
875
  "x-descriptionZh": "同一会话中允许排在当前回合之后的回合数;超出时回复一句“正在忙”。"
876
+ },
877
+ "coalesceWindowMs": {
878
+ "type": [
879
+ "number",
880
+ "string"
881
+ ]
140
882
  }
141
883
  }
142
884
  },
143
885
  "execSecurity": {
144
886
  "type": "string",
145
- "enum": ["deny", "allowlist", "full"],
887
+ "enum": [
888
+ "deny",
889
+ "allowlist",
890
+ "full"
891
+ ],
146
892
  "description": "Shell command security boundary.",
147
893
  "x-descriptionZh": "Shell 命令安全边界。"
148
894
  },
149
895
  "execPreset": {
150
896
  "type": "string",
151
- "enum": ["readonly", "network", "development", "custom"],
897
+ "enum": [
898
+ "readonly",
899
+ "network",
900
+ "development",
901
+ "custom"
902
+ ],
152
903
  "description": "Command allowlist preset used outside full mode.",
153
904
  "x-descriptionZh": "非 full 模式使用的命令白名单预设。"
154
905
  },
@@ -166,7 +917,9 @@
166
917
  },
167
918
  "allowedDomains": {
168
919
  "type": "array",
169
- "items": { "type": "string" },
920
+ "items": {
921
+ "type": "string"
922
+ },
170
923
  "description": "When non-empty, only these domains (and their subdomains) are reachable.",
171
924
  "x-descriptionZh": "非空时只允许访问这些域名(含子域名)。"
172
925
  }
@@ -174,7 +927,10 @@
174
927
  },
175
928
  "masterShell": {
176
929
  "type": "string",
177
- "enum": ["off", "isolated"],
930
+ "enum": [
931
+ "off",
932
+ "isolated"
933
+ ],
178
934
  "default": "off",
179
935
  "description": "Shell access for the master in IM private chats. off: no bash in IM turns. isolated: master DMs run bash inside a Docker container (workspace writable, no network, development allowlist, approval for anything else); fails closed when Docker is unavailable.",
180
936
  "x-descriptionZh": "IM 私聊中 master 的 Shell 权限。off:IM 会话不提供 bash;isolated:master 私聊在 Docker 容器内执行 bash(工作区可写、无网络、development 白名单、其余命令需审批),宿主无 Docker 时直接失败。"
@@ -184,19 +940,105 @@
184
940
  "description": "Progress-aware tool-call budget. maxIterations is a soft budget extended while the turn makes progress; hard caps always apply.",
185
941
  "x-descriptionZh": "进度感知的工具调用预算。maxIterations 为软上限,回合有进展时自动延长;硬上限始终生效。",
186
942
  "properties": {
187
- "extendBy": { "type": "integer", "minimum": 0, "default": 10, "description": "Steps added per extension when progressing; 0 disables.", "x-descriptionZh": "有进展时每次延长的步数;0 关闭。" },
188
- "progressWindow": { "type": "integer", "minimum": 0, "default": 5, "description": "Progress must have happened within this many recent steps.", "x-descriptionZh": "最近多少步内有进展才延长。" },
189
- "maxTotalIterations": { "type": "integer", "minimum": 0, "default": 40, "description": "Hard step cap per turn segment.", "x-descriptionZh": "每段回合的硬步数上限。" },
190
- "maxSubagentTotalIterations": { "type": "integer", "minimum": 0, "default": 30, "description": "Hard step cap for an in-turn sub-agent.", "x-descriptionZh": "回合内子 Agent 的硬步数上限。" },
191
- "maxWallClockMs": { "type": "integer", "minimum": 0, "default": 600000, "description": "Wall-clock cap for the whole turn in ms; 0 disables.", "x-descriptionZh": "整个回合的时间上限(毫秒);0 关闭。" },
192
- "maxTotalTokens": { "type": "integer", "minimum": 0, "default": 0, "description": "Token cap for the whole turn; 0 disables.", "x-descriptionZh": "整个回合的 Token 上限;0 关闭。" },
193
- "failureStreakLimit": { "type": "integer", "minimum": 0, "default": 3, "description": "Consecutive tool failures that stop extensions.", "x-descriptionZh": "连续失败多少次后不再延长。" },
194
- "repeatLimit": { "type": "integer", "minimum": 0, "default": 2, "description": "Consecutive identical repeated calls that stop extensions.", "x-descriptionZh": "连续重复相同调用多少次后不再延长。" },
195
- "autoContinue": { "type": "string", "enum": ["off", "master_dm", "on"], "default": "master_dm", "description": "Auto-continue a progressing turn that hit its budget: off, only in the master's private chat, or always. Continuations reuse the same turn (same policy and approvals).", "x-descriptionZh": "回合有进展但预算用尽时自动续跑:off 关闭;master_dm 仅主人私聊;on 总是。续跑沿用同一回合的策略与审批。" },
196
- "maxContinuations": { "type": "integer", "minimum": 0, "default": 2, "description": "Maximum automatic continuations per turn.", "x-descriptionZh": "每回合最多自动续跑次数。" },
197
- "progressUpdates": { "type": "string", "enum": ["off", "private", "all"], "default": "private", "description": "Brief natural-language progress updates during long turns: off, private chats only, or all chats (groups opt in).", "x-descriptionZh": "长回合中的简短进度更新:off 关闭;private 仅私聊;all 包括群聊(群聊需显式开启)。" },
198
- "progressMinIntervalMs": { "type": "integer", "minimum": 0, "default": 45000, "description": "Minimum time between progress updates in ms.", "x-descriptionZh": "两次进度更新的最小间隔(毫秒)。" },
199
- "progressMaxUpdates": { "type": "integer", "minimum": 0, "default": 3, "description": "Maximum progress updates per turn; 0 disables.", "x-descriptionZh": "每回合最多进度更新次数;0 关闭。" }
943
+ "extendBy": {
944
+ "type": "integer",
945
+ "minimum": 0,
946
+ "default": 10,
947
+ "description": "Steps added per extension when progressing; 0 disables.",
948
+ "x-descriptionZh": "有进展时每次延长的步数;0 关闭。"
949
+ },
950
+ "progressWindow": {
951
+ "type": "integer",
952
+ "minimum": 0,
953
+ "default": 5,
954
+ "description": "Progress must have happened within this many recent steps.",
955
+ "x-descriptionZh": "最近多少步内有进展才延长。"
956
+ },
957
+ "maxTotalIterations": {
958
+ "type": "integer",
959
+ "minimum": 0,
960
+ "default": 40,
961
+ "description": "Hard step cap per turn segment.",
962
+ "x-descriptionZh": "每段回合的硬步数上限。"
963
+ },
964
+ "maxSubagentTotalIterations": {
965
+ "type": "integer",
966
+ "minimum": 0,
967
+ "default": 30,
968
+ "description": "Hard step cap for an in-turn sub-agent.",
969
+ "x-descriptionZh": "回合内子 Agent 的硬步数上限。"
970
+ },
971
+ "maxWallClockMs": {
972
+ "type": "integer",
973
+ "minimum": 0,
974
+ "default": 600000,
975
+ "description": "Wall-clock cap for the whole turn in ms; 0 disables.",
976
+ "x-descriptionZh": "整个回合的时间上限(毫秒);0 关闭。"
977
+ },
978
+ "maxTotalTokens": {
979
+ "type": "integer",
980
+ "minimum": 0,
981
+ "default": 0,
982
+ "description": "Token cap for the whole turn; 0 disables.",
983
+ "x-descriptionZh": "整个回合的 Token 上限;0 关闭。"
984
+ },
985
+ "failureStreakLimit": {
986
+ "type": "integer",
987
+ "minimum": 0,
988
+ "default": 3,
989
+ "description": "Consecutive tool failures that stop extensions.",
990
+ "x-descriptionZh": "连续失败多少次后不再延长。"
991
+ },
992
+ "repeatLimit": {
993
+ "type": "integer",
994
+ "minimum": 0,
995
+ "default": 2,
996
+ "description": "Consecutive identical repeated calls that stop extensions.",
997
+ "x-descriptionZh": "连续重复相同调用多少次后不再延长。"
998
+ },
999
+ "autoContinue": {
1000
+ "type": "string",
1001
+ "enum": [
1002
+ "off",
1003
+ "master_dm",
1004
+ "on"
1005
+ ],
1006
+ "default": "master_dm",
1007
+ "description": "Auto-continue a progressing turn that hit its budget: off, only in the master's private chat, or always. Continuations reuse the same turn (same policy and approvals).",
1008
+ "x-descriptionZh": "回合有进展但预算用尽时自动续跑:off 关闭;master_dm 仅主人私聊;on 总是。续跑沿用同一回合的策略与审批。"
1009
+ },
1010
+ "maxContinuations": {
1011
+ "type": "integer",
1012
+ "minimum": 0,
1013
+ "default": 2,
1014
+ "description": "Maximum automatic continuations per turn.",
1015
+ "x-descriptionZh": "每回合最多自动续跑次数。"
1016
+ },
1017
+ "progressUpdates": {
1018
+ "type": "string",
1019
+ "enum": [
1020
+ "off",
1021
+ "private",
1022
+ "all"
1023
+ ],
1024
+ "default": "private",
1025
+ "description": "Brief natural-language progress updates during long turns: off, private chats only, or all chats (groups opt in).",
1026
+ "x-descriptionZh": "长回合中的简短进度更新:off 关闭;private 仅私聊;all 包括群聊(群聊需显式开启)。"
1027
+ },
1028
+ "progressMinIntervalMs": {
1029
+ "type": "integer",
1030
+ "minimum": 0,
1031
+ "default": 45000,
1032
+ "description": "Minimum time between progress updates in ms.",
1033
+ "x-descriptionZh": "两次进度更新的最小间隔(毫秒)。"
1034
+ },
1035
+ "progressMaxUpdates": {
1036
+ "type": "integer",
1037
+ "minimum": 0,
1038
+ "default": 3,
1039
+ "description": "Maximum progress updates per turn; 0 disables.",
1040
+ "x-descriptionZh": "每回合最多进度更新次数;0 关闭。"
1041
+ }
200
1042
  }
201
1043
  },
202
1044
  "injectionGuard": {
@@ -204,9 +1046,35 @@
204
1046
  "description": "Prompt-injection defences. After lower-trust content (tool results, web pages, files, sub-agent reports, background messages) enters a turn, high-risk actions (shell, messaging other conversations, config changes, scheduling) need approval; replies are checked for system-prompt, secret and other-session memory leaks.",
205
1047
  "x-descriptionZh": "注入防护。外部内容(工具结果、网页、文件、子 agent 报告、群聊背景消息)进入回合后,高危动作(执行命令、向其他会话发消息、改配置、定时任务)必须审批;出站回复检查系统提示、密钥与其他会话记忆泄露。",
206
1048
  "properties": {
207
- "confirmHighRisk": { "type": "string", "enum": ["external_content", "off"], "default": "external_content", "description": "external_content: high-risk actions after external content always ask for approval (denied in unattended turns). off: disabled.", "x-descriptionZh": "external_content:读取外部内容后的高危动作一律审批(无人值守回合直接拒绝);off:关闭。" },
208
- "outboundCheck": { "type": "string", "enum": ["redact", "off"], "default": "redact", "description": "redact: mask leaked system-prompt lines, secrets and other sessions' memory in replies and outbound tool messages. off: disabled.", "x-descriptionZh": "redact:在回复和外发工具消息中屏蔽泄露的系统提示、密钥和其他会话记忆;off:关闭。" },
209
- "trustedOutputTools": { "type": "array", "items": { "type": "string" }, "default": [], "description": "Tools whose results do not count as external content.", "x-descriptionZh": "结果不算外部内容的工具。" }
1049
+ "confirmHighRisk": {
1050
+ "type": "string",
1051
+ "enum": [
1052
+ "external_content",
1053
+ "off"
1054
+ ],
1055
+ "default": "external_content",
1056
+ "description": "external_content: high-risk actions after external content always ask for approval (denied in unattended turns). off: disabled.",
1057
+ "x-descriptionZh": "external_content:读取外部内容后的高危动作一律审批(无人值守回合直接拒绝);off:关闭。"
1058
+ },
1059
+ "outboundCheck": {
1060
+ "type": "string",
1061
+ "enum": [
1062
+ "redact",
1063
+ "off"
1064
+ ],
1065
+ "default": "redact",
1066
+ "description": "redact: mask leaked system-prompt lines, secrets and other sessions' memory in replies and outbound tool messages. off: disabled.",
1067
+ "x-descriptionZh": "redact:在回复和外发工具消息中屏蔽泄露的系统提示、密钥和其他会话记忆;off:关闭。"
1068
+ },
1069
+ "trustedOutputTools": {
1070
+ "type": "array",
1071
+ "items": {
1072
+ "type": "string"
1073
+ },
1074
+ "default": [],
1075
+ "description": "Tools whose results do not count as external content.",
1076
+ "x-descriptionZh": "结果不算外部内容的工具。"
1077
+ }
210
1078
  }
211
1079
  },
212
1080
  "usageQuota": {
@@ -214,61 +1082,147 @@
214
1082
  "description": "Per-user and per-group token quotas and a per-group rate limit. All limits are off (0) by default; the owner is exempt by default. Counters are kept in memory.",
215
1083
  "x-descriptionZh": "按用户 / 按群的 token 配额与群速率限制。默认全部关闭(0),主人默认不受限;计数保存在内存中。",
216
1084
  "properties": {
217
- "windowMs": { "type": "integer", "minimum": 60000, "default": 86400000, "description": "Quota window in ms.", "x-descriptionZh": "配额周期(毫秒)。" },
218
- "perUserTokens": { "type": "integer", "minimum": 0, "default": 0, "description": "Tokens one user may use per window; 0 = unlimited.", "x-descriptionZh": "每个用户每周期可用的 token;0 不限。" },
219
- "perGroupTokens": { "type": "integer", "minimum": 0, "default": 0, "description": "Tokens one group may use per window; 0 = unlimited.", "x-descriptionZh": "每个群每周期可用的 token;0 不限。" },
220
- "perGroupRequestsPerMinute": { "type": "integer", "minimum": 0, "default": 0, "description": "Turns one group may start per minute; 0 = unlimited.", "x-descriptionZh": "每个群每分钟可发起的回合数;0 不限。" },
221
- "exemptOwner": { "type": "boolean", "default": true, "description": "The owner is never limited.", "x-descriptionZh": "主人不受限制。" }
1085
+ "windowMs": {
1086
+ "type": "integer",
1087
+ "minimum": 60000,
1088
+ "default": 86400000,
1089
+ "description": "Quota window in ms.",
1090
+ "x-descriptionZh": "配额周期(毫秒)。"
1091
+ },
1092
+ "perUserTokens": {
1093
+ "type": "integer",
1094
+ "minimum": 0,
1095
+ "default": 0,
1096
+ "description": "Tokens one user may use per window; 0 = unlimited.",
1097
+ "x-descriptionZh": "每个用户每周期可用的 token;0 不限。"
1098
+ },
1099
+ "perGroupTokens": {
1100
+ "type": "integer",
1101
+ "minimum": 0,
1102
+ "default": 0,
1103
+ "description": "Tokens one group may use per window; 0 = unlimited.",
1104
+ "x-descriptionZh": "每个群每周期可用的 token;0 不限。"
1105
+ },
1106
+ "perGroupRequestsPerMinute": {
1107
+ "type": "integer",
1108
+ "minimum": 0,
1109
+ "default": 0,
1110
+ "description": "Turns one group may start per minute; 0 = unlimited.",
1111
+ "x-descriptionZh": "每个群每分钟可发起的回合数;0 不限。"
1112
+ },
1113
+ "exemptOwner": {
1114
+ "type": "boolean",
1115
+ "default": true,
1116
+ "description": "The owner is never limited.",
1117
+ "x-descriptionZh": "主人不受限制。"
1118
+ }
222
1119
  }
223
1120
  },
224
1121
  "subagentTurnMode": {
225
1122
  "type": "string",
226
- "enum": ["off", "sync"],
1123
+ "enum": [
1124
+ "off",
1125
+ "sync"
1126
+ ],
227
1127
  "default": "off",
228
1128
  "description": "Sub-agents in IM turns. off: no spawn_task. sync: spawn_task runs a sub-agent inside the current turn with at most the parent's permissions (never wider; no bash unless the parent could run it) and approvals routed to the same conversation.",
229
1129
  "x-descriptionZh": "IM 回合中的子 Agent。off:不提供 spawn_task;sync:spawn_task 在当前回合内同步运行子 Agent,权限不超过父回合(父回合不能运行 bash 时子 Agent 也没有),审批发往同一会话。"
230
1130
  },
231
- "execApprovalMode": { "type": "string", "enum": ["ask", "bypass", "auto"], "description": "Approval policy for main Agent commands.", "x-descriptionZh": "主 Agent 命令的审批策略。" },
232
- "subagentExecApprovalMode": { "type": "string", "enum": ["ask", "bypass", "auto"], "description": "Approval policy for sub-Agent commands.", "x-descriptionZh": "子 Agent 命令的审批策略。" },
233
- "workerExecApprovalMode": { "type": "string", "enum": ["ask", "bypass", "auto"], "description": "Approval policy for worker commands.", "x-descriptionZh": "Worker 命令的审批策略。" },
1131
+ "execApprovalMode": {
1132
+ "type": "string",
1133
+ "enum": [
1134
+ "ask",
1135
+ "bypass",
1136
+ "auto"
1137
+ ],
1138
+ "description": "Approval policy for main Agent commands.",
1139
+ "x-descriptionZh": "主 Agent 命令的审批策略。"
1140
+ },
1141
+ "subagentExecApprovalMode": {
1142
+ "type": "string",
1143
+ "enum": [
1144
+ "ask",
1145
+ "bypass",
1146
+ "auto"
1147
+ ],
1148
+ "description": "Approval policy for sub-Agent commands.",
1149
+ "x-descriptionZh": "子 Agent 命令的审批策略。"
1150
+ },
1151
+ "workerExecApprovalMode": {
1152
+ "type": "string",
1153
+ "enum": [
1154
+ "ask",
1155
+ "bypass",
1156
+ "auto"
1157
+ ],
1158
+ "description": "Approval policy for worker commands.",
1159
+ "x-descriptionZh": "Worker 命令的审批策略。"
1160
+ },
234
1161
  "toolExecution": {
235
1162
  "type": "string",
236
- "enum": ["parallel", "sequential", "tiered"],
1163
+ "enum": [
1164
+ "parallel",
1165
+ "sequential",
1166
+ "tiered"
1167
+ ],
237
1168
  "description": "How tool calls in one model step are scheduled.",
238
1169
  "x-descriptionZh": "同一模型步骤中的工具调用调度方式。"
239
1170
  },
240
1171
  "modelSizeHint": {
241
1172
  "type": "string",
242
- "enum": ["", "small", "medium", "large"],
1173
+ "enum": [
1174
+ "",
1175
+ "small",
1176
+ "medium",
1177
+ "large"
1178
+ ],
243
1179
  "description": "Optional model-size hint; an empty string clears the hint.",
244
1180
  "x-descriptionZh": "可选模型尺寸提示;空字符串表示清除提示。"
245
1181
  },
246
1182
  "promptCacheRetention": {
247
1183
  "type": "string",
248
- "enum": ["in_memory", "24h"],
1184
+ "enum": [
1185
+ "in_memory",
1186
+ "24h"
1187
+ ],
249
1188
  "description": "Provider prompt-cache retention policy.",
250
1189
  "x-descriptionZh": "Provider Prompt Cache 保留策略。"
251
1190
  },
252
1191
  "steeringMode": {
253
1192
  "type": "string",
254
- "enum": ["one-at-a-time", "all"],
1193
+ "enum": [
1194
+ "one-at-a-time",
1195
+ "all"
1196
+ ],
255
1197
  "description": "Process steering messages one at a time or drain all pending messages together.",
256
1198
  "x-descriptionZh": "逐条处理 Steering 消息,或一次取出全部待处理消息。"
257
1199
  },
258
1200
  "followUpMode": {
259
1201
  "type": "string",
260
- "enum": ["one-at-a-time", "all"],
1202
+ "enum": [
1203
+ "one-at-a-time",
1204
+ "all"
1205
+ ],
261
1206
  "description": "Process follow-up messages one at a time or drain all pending messages together.",
262
1207
  "x-descriptionZh": "逐条处理 Follow-up 消息,或一次取出全部待处理消息。"
263
1208
  },
264
1209
  "outputSchema": {
265
1210
  "anyOf": [
266
- { "type": "boolean" },
267
- { "type": "string", "enum": ["segments"] },
268
- { "type": "object" }
1211
+ {
1212
+ "type": "boolean"
1213
+ },
1214
+ {
1215
+ "type": "string",
1216
+ "enum": [
1217
+ "segments"
1218
+ ]
1219
+ },
1220
+ {
1221
+ "type": "object"
1222
+ }
269
1223
  ],
270
- "description": "Structured final-output mode: false for text, true or segments for canonical message segments, or a custom JSON Schema object.",
271
- "x-descriptionZh": "结构化最终输出:false 表示文本,true 或 segments 表示规范消息段,也可传入自定义 JSON Schema 对象。"
1224
+ "description": "Final-output mode: defaults to segments for IM conversations; false for text, true or segments for ordered canonical segments, or a custom JSON Schema object. Detached and non-IM turns do not inherit the IM preset.",
1225
+ "x-descriptionZh": "最终输出默认在 IM 会话使用 segments:false 显式使用文本,true 或 segments 使用有序规范消息段,也可传入自定义 JSON Schema。隔离及非 IM 调用不应用 IM 预设。"
272
1226
  },
273
1227
  "schedule": {
274
1228
  "type": "object",
@@ -284,103 +1238,2852 @@
284
1238
  "properties": {
285
1239
  "execPreset": {
286
1240
  "type": "string",
287
- "enum": ["readonly", "network"],
1241
+ "enum": [
1242
+ "readonly",
1243
+ "network"
1244
+ ],
288
1245
  "description": "Schedule Jobs may use only the read-only or network preset.",
289
1246
  "x-descriptionZh": "Schedule Job 只能使用只读或网络预设。"
1247
+ },
1248
+ "allowedDomains": {
1249
+ "type": "array",
1250
+ "items": {
1251
+ "type": "string"
1252
+ }
1253
+ }
1254
+ }
1255
+ },
1256
+ "budget": {
1257
+ "type": "object",
1258
+ "additionalProperties": true,
1259
+ "properties": {
1260
+ "maxTokens": {
1261
+ "type": [
1262
+ "number",
1263
+ "string"
1264
+ ]
1265
+ },
1266
+ "maxToolCalls": {
1267
+ "type": [
1268
+ "number",
1269
+ "string"
1270
+ ]
1271
+ },
1272
+ "timeoutMs": {
1273
+ "type": [
1274
+ "number",
1275
+ "string"
1276
+ ]
1277
+ }
1278
+ }
1279
+ }
1280
+ }
1281
+ },
1282
+ "execAllowlist": {
1283
+ "type": "array",
1284
+ "items": {
1285
+ "type": "string"
1286
+ },
1287
+ "description": "allowlist 模式下允许的命令(支持正则字符串,如 \"^ls \"、\"^cat \"),与 preset 合并"
1288
+ },
1289
+ "phaseTrace": {
1290
+ "type": [
1291
+ "boolean",
1292
+ "string"
1293
+ ],
1294
+ "description": "观测主回合阶段日志(或通过 ZHIN_AGENT_PHASE_TRACE=1 开启)"
1295
+ },
1296
+ "modelHarness": {
1297
+ "type": "object",
1298
+ "additionalProperties": true,
1299
+ "properties": {
1300
+ "models": {
1301
+ "type": "object",
1302
+ "additionalProperties": {
1303
+ "type": "object",
1304
+ "additionalProperties": true,
1305
+ "properties": {
1306
+ "maxIterations": {
1307
+ "type": [
1308
+ "number",
1309
+ "string"
1310
+ ]
1311
+ },
1312
+ "explorationBudget": {
1313
+ "type": [
1314
+ "number",
1315
+ "string"
1316
+ ],
1317
+ "description": "连续只读探索调用达到该次数时注入提示;0 关闭"
1318
+ },
1319
+ "explorationGuidance": {
1320
+ "type": [
1321
+ "boolean",
1322
+ "string"
1323
+ ],
1324
+ "description": "在系统提示中加入\"先规划、限定目标文件\"的探索纪律"
1325
+ },
1326
+ "iterationExtension": {
1327
+ "type": [
1328
+ "number",
1329
+ "string"
1330
+ ],
1331
+ "description": "每次有进展时延长的步数(覆盖 toolBudget.extendBy)"
1332
+ },
1333
+ "maxTotalIterations": {
1334
+ "type": [
1335
+ "number",
1336
+ "string"
1337
+ ],
1338
+ "description": "单段回合的硬步数上限(覆盖 toolBudget.maxTotalIterations)"
1339
+ },
1340
+ "emptyReplyRetries": {
1341
+ "type": [
1342
+ "number",
1343
+ "string"
1344
+ ],
1345
+ "description": "空回复(无文本且无工具调用)时额外重试次数;默认 0"
1346
+ },
1347
+ "requestTimeoutMs": {
1348
+ "type": [
1349
+ "number",
1350
+ "string"
1351
+ ],
1352
+ "description": "单次模型请求超时(毫秒);0 关闭"
1353
+ }
1354
+ }
1355
+ },
1356
+ "description": "模型级覆盖:支持 \"gpt-4o\" 或 \"openai:gpt-4o\""
1357
+ },
1358
+ "providerPatterns": {
1359
+ "type": "object",
1360
+ "additionalProperties": {
1361
+ "type": "object",
1362
+ "additionalProperties": true,
1363
+ "properties": {
1364
+ "maxIterations": {
1365
+ "type": [
1366
+ "number",
1367
+ "string"
1368
+ ]
1369
+ },
1370
+ "explorationBudget": {
1371
+ "type": [
1372
+ "number",
1373
+ "string"
1374
+ ],
1375
+ "description": "连续只读探索调用达到该次数时注入提示;0 关闭"
1376
+ },
1377
+ "explorationGuidance": {
1378
+ "type": [
1379
+ "boolean",
1380
+ "string"
1381
+ ],
1382
+ "description": "在系统提示中加入\"先规划、限定目标文件\"的探索纪律"
1383
+ },
1384
+ "iterationExtension": {
1385
+ "type": [
1386
+ "number",
1387
+ "string"
1388
+ ],
1389
+ "description": "每次有进展时延长的步数(覆盖 toolBudget.extendBy)"
1390
+ },
1391
+ "maxTotalIterations": {
1392
+ "type": [
1393
+ "number",
1394
+ "string"
1395
+ ],
1396
+ "description": "单段回合的硬步数上限(覆盖 toolBudget.maxTotalIterations)"
1397
+ },
1398
+ "emptyReplyRetries": {
1399
+ "type": [
1400
+ "number",
1401
+ "string"
1402
+ ],
1403
+ "description": "空回复(无文本且无工具调用)时额外重试次数;默认 0"
1404
+ },
1405
+ "requestTimeoutMs": {
1406
+ "type": [
1407
+ "number",
1408
+ "string"
1409
+ ],
1410
+ "description": "单次模型请求超时(毫秒);0 关闭"
1411
+ }
1412
+ }
1413
+ },
1414
+ "description": "provider 模式覆盖(支持 * 通配符)"
1415
+ }
1416
+ },
1417
+ "description": "按模型 / provider 模式覆盖 model harness"
1418
+ },
1419
+ "providerResilience": {
1420
+ "type": "object",
1421
+ "additionalProperties": true,
1422
+ "properties": {
1423
+ "maxRetries": {
1424
+ "type": [
1425
+ "number",
1426
+ "string"
1427
+ ],
1428
+ "description": "Retries per model after the first attempt. Default 2. `0` disables retry."
1429
+ },
1430
+ "baseDelayMs": {
1431
+ "type": [
1432
+ "number",
1433
+ "string"
1434
+ ],
1435
+ "description": "First backoff delay in ms; doubles each retry. Default 1000."
1436
+ },
1437
+ "maxDelayMs": {
1438
+ "type": [
1439
+ "number",
1440
+ "string"
1441
+ ],
1442
+ "description": "Upper bound for one backoff delay in ms. Default 10000."
1443
+ },
1444
+ "maxRetryAfterMs": {
1445
+ "type": [
1446
+ "number",
1447
+ "string"
1448
+ ],
1449
+ "description": "A `Retry-After` longer than this skips retry and goes to fallback. Default 30000."
1450
+ },
1451
+ "requestTimeoutMs": {
1452
+ "type": [
1453
+ "number",
1454
+ "string"
1455
+ ],
1456
+ "description": "Per-attempt timeout in ms (whole streamed completion). Default 180000. `0` disables."
1457
+ },
1458
+ "emptyReplyRetries": {
1459
+ "type": [
1460
+ "number",
1461
+ "string"
1462
+ ],
1463
+ "description": "Extra attempts when the model returns neither text nor tool calls (or a tool call\nwithout a name). Default 0: the reply is passed through unchanged. Quirk presets\n(see model harness) raise this for models known to emit spurious empty replies."
1464
+ },
1465
+ "fallback": {
1466
+ "type": [
1467
+ "boolean",
1468
+ "string"
1469
+ ],
1470
+ "description": "Try the next entry of `modelCandidates` after retries are exhausted. Default true."
1471
+ }
1472
+ },
1473
+ "description": "Provider 韧性:重试 / 退避 / 超时 / fallback(见 ProviderResilienceConfig,默认保守)"
1474
+ },
1475
+ "deferredTools": {
1476
+ "type": "object",
1477
+ "additionalProperties": true,
1478
+ "properties": {
1479
+ "maxLoadedPerSession": {
1480
+ "type": [
1481
+ "number",
1482
+ "string"
1483
+ ]
1484
+ },
1485
+ "discoverTopK": {
1486
+ "type": [
1487
+ "number",
1488
+ "string"
1489
+ ]
1490
+ },
1491
+ "alwaysLoadedTools": {
1492
+ "type": "array",
1493
+ "items": {
1494
+ "type": "string"
1495
+ },
1496
+ "description": "额外常驻工具;默认在内置常驻集合基础上追加"
1497
+ },
1498
+ "alwaysLoadedMode": {
1499
+ "type": "string",
1500
+ "x-zhin-config": {
1501
+ "options": [
1502
+ {
1503
+ "label": "extend",
1504
+ "value": "extend"
1505
+ },
1506
+ {
1507
+ "label": "replace",
1508
+ "value": "replace"
1509
+ }
1510
+ ]
1511
+ },
1512
+ "description": "`extend`(默认)追加到内置常驻集合;`replace` 完全替换"
1513
+ },
1514
+ "mcpServers": {
1515
+ "type": "object",
1516
+ "additionalProperties": {
1517
+ "type": "object",
1518
+ "additionalProperties": true,
1519
+ "properties": {
1520
+ "alwaysLoaded": {
1521
+ "type": "array",
1522
+ "items": {
1523
+ "type": "string"
1524
+ }
1525
+ }
1526
+ }
1527
+ }
1528
+ }
1529
+ },
1530
+ "description": "工具 schema 按需加载"
1531
+ },
1532
+ "workerBaseTools": {
1533
+ "type": "array",
1534
+ "items": {
1535
+ "type": "string"
1536
+ },
1537
+ "description": "Deferred Worker 基础工具"
1538
+ },
1539
+ "persona": {
1540
+ "type": "string"
1541
+ },
1542
+ "maxIterations": {
1543
+ "type": [
1544
+ "number",
1545
+ "string"
1546
+ ]
1547
+ },
1548
+ "timeout": {
1549
+ "type": [
1550
+ "number",
1551
+ "string"
1552
+ ]
1553
+ },
1554
+ "preExecTimeout": {
1555
+ "type": [
1556
+ "number",
1557
+ "string"
1558
+ ]
1559
+ },
1560
+ "maxTools": {
1561
+ "type": [
1562
+ "number",
1563
+ "string"
1564
+ ]
1565
+ },
1566
+ "contextTailMessageLimit": {
1567
+ "type": [
1568
+ "number",
1569
+ "string"
1570
+ ]
1571
+ },
1572
+ "rateLimit": {
1573
+ "type": "object",
1574
+ "additionalProperties": true,
1575
+ "properties": {
1576
+ "maxRequestsPerMinute": {
1577
+ "type": [
1578
+ "number",
1579
+ "string"
1580
+ ],
1581
+ "description": "每分钟最大请求数(默认 20)"
1582
+ },
1583
+ "cooldownSeconds": {
1584
+ "type": [
1585
+ "number",
1586
+ "string"
1587
+ ],
1588
+ "description": "冷却时间(秒),超限后需等待(默认 10)"
1589
+ }
1590
+ }
1591
+ },
1592
+ "toneAwareness": {
1593
+ "type": [
1594
+ "boolean",
1595
+ "string"
1596
+ ]
1597
+ },
1598
+ "contextTokens": {
1599
+ "type": [
1600
+ "number",
1601
+ "string"
1602
+ ]
1603
+ },
1604
+ "maxHistoryShare": {
1605
+ "type": [
1606
+ "number",
1607
+ "string"
1608
+ ]
1609
+ },
1610
+ "compaction": {
1611
+ "type": "object",
1612
+ "additionalProperties": true,
1613
+ "properties": {
1614
+ "enabled": {
1615
+ "type": [
1616
+ "boolean",
1617
+ "string"
1618
+ ]
1619
+ },
1620
+ "auto": {
1621
+ "type": [
1622
+ "boolean",
1623
+ "string"
1624
+ ]
1625
+ },
1626
+ "keepRecentTokens": {
1627
+ "type": [
1628
+ "number",
1629
+ "string"
1630
+ ]
1631
+ },
1632
+ "minKeepCount": {
1633
+ "type": [
1634
+ "number",
1635
+ "string"
1636
+ ]
1637
+ },
1638
+ "thresholdRatio": {
1639
+ "type": [
1640
+ "number",
1641
+ "string"
1642
+ ],
1643
+ "description": "Share of the model context window (system prompt and tools included) at\nwhich auto-compaction runs. Default 0.7 (#730)."
1644
+ }
1645
+ }
1646
+ },
1647
+ "disabledTools": {
1648
+ "type": "array",
1649
+ "items": {
1650
+ "type": "string"
1651
+ }
1652
+ },
1653
+ "allowedTools": {
1654
+ "type": "array",
1655
+ "items": {
1656
+ "type": "string"
1657
+ }
1658
+ },
1659
+ "maxParallelSubagents": {
1660
+ "type": [
1661
+ "number",
1662
+ "string"
1663
+ ]
1664
+ },
1665
+ "subagentAutoContinue": {
1666
+ "type": [
1667
+ "boolean",
1668
+ "string"
1669
+ ]
1670
+ },
1671
+ "subagentDirectImDelivery": {
1672
+ "type": [
1673
+ "boolean",
1674
+ "string"
1675
+ ]
1676
+ },
1677
+ "maxSubagentIterations": {
1678
+ "type": [
1679
+ "number",
1680
+ "string"
1681
+ ]
1682
+ },
1683
+ "subagentTools": {
1684
+ "type": "array",
1685
+ "items": {
1686
+ "type": "string"
1687
+ }
1688
+ },
1689
+ "subagentTurnWaitMs": {
1690
+ "type": [
1691
+ "number",
1692
+ "string"
1693
+ ]
1694
+ },
1695
+ "skillInstructionMaxChars": {
1696
+ "type": [
1697
+ "number",
1698
+ "string"
1699
+ ]
1700
+ },
1701
+ "promptTrace": {
1702
+ "type": [
1703
+ "boolean",
1704
+ "string"
1705
+ ]
1706
+ },
1707
+ "promptTraceVerbose": {
1708
+ "type": [
1709
+ "boolean",
1710
+ "string"
1711
+ ]
1712
+ },
1713
+ "promptCache": {
1714
+ "type": [
1715
+ "boolean",
1716
+ "string"
1717
+ ]
1718
+ },
1719
+ "promptCacheKeyPrefix": {
1720
+ "type": "string"
1721
+ },
1722
+ "deferredAutoContinue": {
1723
+ "type": [
1724
+ "boolean",
1725
+ "string"
1726
+ ]
1727
+ },
1728
+ "deferredAutoContinueMaxDepth": {
1729
+ "type": [
1730
+ "number",
1731
+ "string"
1732
+ ]
1733
+ },
1734
+ "gitStatus": {
1735
+ "type": [
1736
+ "boolean",
1737
+ "string"
1738
+ ],
1739
+ "description": "§1 Runtime 注入单行 git 状态摘要(非 git 仓库自动跳过)"
1740
+ },
1741
+ "contextPaths": {
1742
+ "type": "array",
1743
+ "items": {
1744
+ "type": "string"
1745
+ },
1746
+ "description": "追加的上下文文件路径(支持 ~ 与相对路径;默认另加载 ~/.config/zhin/AGENTS.md 等全局路径)"
1747
+ },
1748
+ "systemPromptMaxChars": {
1749
+ "type": [
1750
+ "number",
1751
+ "string"
1752
+ ],
1753
+ "description": "系统提示词总字符上限;按 retention/order 让出预算,required 内容放不下则失败。"
1754
+ },
1755
+ "thinkingPreview": {
1756
+ "type": [
1757
+ "boolean",
1758
+ "string"
1759
+ ],
1760
+ "description": "Activity feedback 展示 LLM 实际 thinking 内容(截断),而非静态 \"思考中...\"。"
1761
+ },
1762
+ "thinkingPreviewMaxLength": {
1763
+ "type": [
1764
+ "number",
1765
+ "string"
1766
+ ],
1767
+ "description": "thinkingPreview 展示的最大字符数。"
1768
+ }
1769
+ }
1770
+ },
1771
+ "enabled": {
1772
+ "type": [
1773
+ "boolean",
1774
+ "string"
1775
+ ]
1776
+ },
1777
+ "providers": {
1778
+ "type": [
1779
+ "object",
1780
+ "null"
1781
+ ],
1782
+ "additionalProperties": {
1783
+ "type": [
1784
+ "object",
1785
+ "null"
1786
+ ],
1787
+ "additionalProperties": true,
1788
+ "properties": {
1789
+ "sdk": {
1790
+ "type": "string",
1791
+ "x-zhin-config": {
1792
+ "options": [
1793
+ {
1794
+ "label": "openai",
1795
+ "value": "openai"
1796
+ },
1797
+ {
1798
+ "label": "anthropic",
1799
+ "value": "anthropic"
1800
+ },
1801
+ {
1802
+ "label": "google",
1803
+ "value": "google"
1804
+ },
1805
+ {
1806
+ "label": "deepseek",
1807
+ "value": "deepseek"
1808
+ },
1809
+ {
1810
+ "label": "minimax",
1811
+ "value": "minimax"
1812
+ },
1813
+ {
1814
+ "label": "ollama",
1815
+ "value": "ollama"
1816
+ },
1817
+ {
1818
+ "label": "openai-compatible",
1819
+ "value": "openai-compatible"
1820
+ }
1821
+ ]
1822
+ }
1823
+ },
1824
+ "apiKey": {
1825
+ "type": "string",
1826
+ "writeOnly": true,
1827
+ "x-zhin-config": {
1828
+ "secret": true
1829
+ }
1830
+ },
1831
+ "authScheme": {
1832
+ "type": "string",
1833
+ "description": "Authorization 头方案。不写时用各 SDK 默认(OpenAI 系 `Bearer`,Anthropic `x-api-key`,Google `x-goog-api-key`);\n设为 `''` 时 `Authorization: <key>`;设为 `'Bearer'` / `'Token'` 等时 `Authorization: <scheme> <key>`(结尾空格可有可无)。"
1834
+ },
1835
+ "baseUrl": {
1836
+ "type": "string"
1837
+ },
1838
+ "defaultModel": {
1839
+ "type": "string"
1840
+ },
1841
+ "models": {
1842
+ "type": "array",
1843
+ "items": {
1844
+ "type": "string"
1845
+ }
1846
+ },
1847
+ "timeout": {
1848
+ "type": [
1849
+ "number",
1850
+ "string"
1851
+ ],
1852
+ "description": "单次请求超时(ms),覆盖 `ai.providerResilience.requestTimeoutMs`;模型 harness 的 `requestTimeoutMs` 优先。0 关闭。"
1853
+ },
1854
+ "maxRetries": {
1855
+ "type": [
1856
+ "number",
1857
+ "string"
1858
+ ],
1859
+ "description": "每个模型的重试次数,覆盖 `ai.providerResilience.maxRetries`。"
1860
+ },
1861
+ "firstChunkTimeoutMs": {
1862
+ "type": [
1863
+ "number",
1864
+ "string"
1865
+ ],
1866
+ "description": "流式请求首个 chunk 超时(ms,含等待响应头),默认关闭;超时按 timeout 重试 / 切换备用模型。"
1867
+ },
1868
+ "chunkTimeoutMs": {
1869
+ "type": [
1870
+ "number",
1871
+ "string"
1872
+ ],
1873
+ "description": "流式请求两个 chunk 之间的静默超时(ms),默认关闭。"
1874
+ },
1875
+ "headers": {
1876
+ "type": "object",
1877
+ "additionalProperties": {
1878
+ "type": "string",
1879
+ "writeOnly": true,
1880
+ "x-zhin-config": {
1881
+ "secret": true
1882
+ }
1883
+ }
1884
+ },
1885
+ "contextWindow": {
1886
+ "type": [
1887
+ "number",
1888
+ "string"
1889
+ ],
1890
+ "description": "上下文窗口大小(token 数),各 Provider 映射到自身参数"
1891
+ },
1892
+ "maxOutputTokens": {
1893
+ "type": [
1894
+ "number",
1895
+ "string"
1896
+ ],
1897
+ "description": "每次请求的输出 token 上限,默认 8192;Gemini/Claude 的思考 token 也计入"
1898
+ },
1899
+ "thinkingLevel": {
1900
+ "type": "string",
1901
+ "x-zhin-config": {
1902
+ "options": [
1903
+ {
1904
+ "label": "off",
1905
+ "value": "off"
1906
+ },
1907
+ {
1908
+ "label": "low",
1909
+ "value": "low"
1910
+ },
1911
+ {
1912
+ "label": "medium",
1913
+ "value": "medium"
1914
+ },
1915
+ {
1916
+ "label": "high",
1917
+ "value": "high"
290
1918
  }
1919
+ ]
1920
+ },
1921
+ "description": "思考深度:`off` | `low` | `medium` | `high`;不填用 provider 默认;`providerOptions` 里的思考设置优先"
1922
+ },
1923
+ "capabilities": {
1924
+ "type": "object",
1925
+ "additionalProperties": true,
1926
+ "properties": {
1927
+ "input": {
1928
+ "type": "array",
1929
+ "items": {
1930
+ "type": "string",
1931
+ "x-zhin-config": {
1932
+ "options": [
1933
+ {
1934
+ "label": "text",
1935
+ "value": "text"
1936
+ },
1937
+ {
1938
+ "label": "image",
1939
+ "value": "image"
1940
+ },
1941
+ {
1942
+ "label": "audio",
1943
+ "value": "audio"
1944
+ },
1945
+ {
1946
+ "label": "video",
1947
+ "value": "video"
1948
+ },
1949
+ {
1950
+ "label": "file",
1951
+ "value": "file"
1952
+ }
1953
+ ]
1954
+ }
1955
+ },
1956
+ "description": "Explicit model input modalities. Absence is text-only (fail closed), except Gemini chat models on `sdk: google` (see `defaultModelInput`)."
1957
+ },
1958
+ "streaming": {
1959
+ "type": [
1960
+ "boolean",
1961
+ "string"
1962
+ ]
1963
+ },
1964
+ "toolCalling": {
1965
+ "type": [
1966
+ "boolean",
1967
+ "string"
1968
+ ]
1969
+ },
1970
+ "thinking": {
1971
+ "type": [
1972
+ "boolean",
1973
+ "string"
1974
+ ]
1975
+ }
1976
+ },
1977
+ "description": "Provider 能力声明"
1978
+ },
1979
+ "input": {
1980
+ "type": "array",
1981
+ "items": {
1982
+ "type": "string",
1983
+ "x-zhin-config": {
1984
+ "options": [
1985
+ {
1986
+ "label": "text",
1987
+ "value": "text"
1988
+ },
1989
+ {
1990
+ "label": "image",
1991
+ "value": "image"
1992
+ },
1993
+ {
1994
+ "label": "audio",
1995
+ "value": "audio"
1996
+ },
1997
+ {
1998
+ "label": "video",
1999
+ "value": "video"
2000
+ },
2001
+ {
2002
+ "label": "file",
2003
+ "value": "file"
2004
+ }
2005
+ ]
2006
+ }
2007
+ },
2008
+ "description": "Explicit model input modalities. Prefer this over inferred provider identity."
2009
+ },
2010
+ "providerOptions": {
2011
+ "type": "object",
2012
+ "additionalProperties": {
2013
+ "type": "object",
2014
+ "additionalProperties": {
2015
+ "anyOf": [
2016
+ {
2017
+ "type": "null"
2018
+ },
2019
+ {
2020
+ "type": "string"
2021
+ },
2022
+ {
2023
+ "type": [
2024
+ "number",
2025
+ "string"
2026
+ ]
2027
+ },
2028
+ {
2029
+ "type": [
2030
+ "boolean",
2031
+ "string"
2032
+ ]
2033
+ },
2034
+ {
2035
+ "type": [
2036
+ "boolean",
2037
+ "string"
2038
+ ]
2039
+ },
2040
+ {
2041
+ "type": "object",
2042
+ "additionalProperties": {
2043
+ "anyOf": [
2044
+ {
2045
+ "type": "null"
2046
+ },
2047
+ {
2048
+ "type": "string"
2049
+ },
2050
+ {
2051
+ "type": [
2052
+ "number",
2053
+ "string"
2054
+ ]
2055
+ },
2056
+ {
2057
+ "type": [
2058
+ "boolean",
2059
+ "string"
2060
+ ]
2061
+ },
2062
+ {
2063
+ "type": [
2064
+ "boolean",
2065
+ "string"
2066
+ ]
2067
+ },
2068
+ {
2069
+ "description": "任意 JSON 值;由对应服务解释。"
2070
+ },
2071
+ {
2072
+ "type": "array",
2073
+ "items": {
2074
+ "description": "任意 JSON 值;由对应服务解释。"
2075
+ }
2076
+ }
2077
+ ]
2078
+ }
2079
+ },
2080
+ {
2081
+ "type": "array",
2082
+ "items": {
2083
+ "description": "任意 JSON 值;由对应服务解释。"
2084
+ }
2085
+ }
2086
+ ]
2087
+ }
2088
+ },
2089
+ "description": "Extra AI SDK `providerOptions`, merged into every request of this provider,\nkeyed by SDK provider id. For Gemini: `{ google: { safetySettings: [...],\nthinkingConfig: { thinkingLevel: 'low' } } }`. See ai.google.dev safety settings."
2090
+ },
2091
+ "contextCache": {
2092
+ "type": "object",
2093
+ "additionalProperties": true,
2094
+ "properties": {
2095
+ "mode": {
2096
+ "type": "string",
2097
+ "x-zhin-config": {
2098
+ "options": [
2099
+ {
2100
+ "label": "implicit",
2101
+ "value": "implicit"
2102
+ },
2103
+ {
2104
+ "label": "explicit",
2105
+ "value": "explicit"
2106
+ }
2107
+ ]
2108
+ },
2109
+ "description": "`implicit` (default) leaves requests untouched. `explicit` creates cachedContents."
2110
+ },
2111
+ "ttlSeconds": {
2112
+ "type": [
2113
+ "number",
2114
+ "string"
2115
+ ],
2116
+ "description": "Lifetime of each created cache. Default 600."
2117
+ },
2118
+ "minPrefixChars": {
2119
+ "type": [
2120
+ "number",
2121
+ "string"
2122
+ ],
2123
+ "description": "Prefixes shorter than this (characters of JSON) are not worth a cache. Default 8000 (~2k tokens)."
291
2124
  }
2125
+ },
2126
+ "description": "Gemini context caching (`sdk: google`): `{ mode: 'explicit', ttlSeconds }`. Default implicit."
2127
+ },
2128
+ "imageGeneration": {
2129
+ "type": "object",
2130
+ "additionalProperties": true,
2131
+ "properties": {
2132
+ "watermarkEnabled": {
2133
+ "type": [
2134
+ "boolean",
2135
+ "string"
2136
+ ],
2137
+ "description": "智谱 API `watermark_enabled`;默认 true"
2138
+ },
2139
+ "defaultModel": {
2140
+ "type": "string"
2141
+ },
2142
+ "defaultSize": {
2143
+ "type": "string",
2144
+ "description": "智谱:如 1024x1024、1280x1280"
2145
+ },
2146
+ "numSteps": {
2147
+ "type": [
2148
+ "number",
2149
+ "string"
2150
+ ],
2151
+ "description": "Cloudflare Flux:推理步数,默认 4"
2152
+ },
2153
+ "quality": {
2154
+ "type": "string",
2155
+ "description": "OpenAI GPT Image:low | medium | high | auto"
2156
+ },
2157
+ "aspectRatio": {
2158
+ "type": "string",
2159
+ "description": "Gemini:如 1:1、16:9"
2160
+ },
2161
+ "imageSize": {
2162
+ "type": "string",
2163
+ "description": "Gemini:如 1K、2K、4K"
2164
+ },
2165
+ "promptSuffix": {
2166
+ "type": "string",
2167
+ "description": "追加到 agent/用户 prompt 末尾的风格约束(如写实摄影)。\n需要动漫风时不要配置,或在工具 prompt 里写明即可。"
2168
+ }
2169
+ },
2170
+ "description": "文生图默认(zhipu / cloudflare 等支持 generateImage 的 driver)"
2171
+ },
2172
+ "host": {
2173
+ "type": "string"
2174
+ },
2175
+ "num_ctx": {
2176
+ "type": [
2177
+ "number",
2178
+ "string"
2179
+ ]
2180
+ }
2181
+ }
2182
+ },
2183
+ "description": "命名 provider 实例"
2184
+ },
2185
+ "agents": {
2186
+ "type": [
2187
+ "object",
2188
+ "null"
2189
+ ],
2190
+ "additionalProperties": {
2191
+ "type": "object",
2192
+ "additionalProperties": true,
2193
+ "properties": {
2194
+ "provider": {
2195
+ "type": "string"
2196
+ },
2197
+ "model": {
2198
+ "type": "string"
2199
+ },
2200
+ "mcpServers": {
2201
+ "type": [
2202
+ "array",
2203
+ "null"
2204
+ ],
2205
+ "items": {
2206
+ "type": "string"
292
2207
  }
2208
+ },
2209
+ "nickname": {
2210
+ "type": "string",
2211
+ "description": "Agent 昵称(LLM 自称 + IM 协作展示,ADR 0024)。"
293
2212
  }
294
2213
  }
2214
+ },
2215
+ "description": "per-agent 绑定(协作角色如 researcher 亦用 agents.<role>);IM 入站总是交给 zhin"
2216
+ },
2217
+ "sessions": {
2218
+ "type": [
2219
+ "object",
2220
+ "null"
2221
+ ],
2222
+ "additionalProperties": true,
2223
+ "properties": {
2224
+ "maxHistory": {
2225
+ "type": [
2226
+ "number",
2227
+ "string"
2228
+ ],
2229
+ "description": "最大历史消息数(数据库模式默认200,内存模式默认100)"
2230
+ },
2231
+ "expireMs": {
2232
+ "type": [
2233
+ "number",
2234
+ "string"
2235
+ ],
2236
+ "description": "会话过期时间(毫秒,数据库模式默认7天,内存模式默认24小时)"
2237
+ },
2238
+ "useDatabase": {
2239
+ "type": [
2240
+ "boolean",
2241
+ "string"
2242
+ ],
2243
+ "description": "是否使用数据库持久化存储(默认 true)"
2244
+ },
2245
+ "coldStartMaxMessages": {
2246
+ "type": [
2247
+ "number",
2248
+ "string"
2249
+ ],
2250
+ "description": "无摘要时冷启动最多条数(默认 50)"
2251
+ },
2252
+ "coldStartMaxAgeMs": {
2253
+ "type": [
2254
+ "number",
2255
+ "string"
2256
+ ],
2257
+ "description": "冷启动时间窗(毫秒,默认 24h)"
2258
+ },
2259
+ "sessionIdleArchiveMs": {
2260
+ "type": [
2261
+ "number",
2262
+ "string"
2263
+ ],
2264
+ "description": "空闲后自动归档 active 会话(毫秒,默认 7 天;0=关闭)"
2265
+ }
295
2266
  }
296
- }
297
- }
298
- },
299
- "mcp": { "type": "object", "additionalProperties": true, "description": "Expose Bot tools through an MCP Server.", "x-descriptionZh": "把 Bot 工具公开为 MCP Server。" },
300
- "a2a": { "type": "object", "additionalProperties": true, "description": "A2A Agent Card, remote execution, and Workroom callbacks.", "x-descriptionZh": "A2A Agent Card、远程执行与 Workroom 回调。" },
301
- "speech": { "type": "object", "additionalProperties": true, "description": "Speech-to-text and text-to-speech Host.", "x-descriptionZh": "语音识别与语音合成 Host。" },
302
- "htmlRenderer": {
303
- "type": "object",
304
- "additionalProperties": true,
305
- "description": "HTML and image rendering options backed by Shotium.",
306
- "x-descriptionZh": "基于 Shotium 的 HTML/图片渲染参数。",
307
- "properties": {
308
- "width": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Default layout width in CSS pixels.", "x-descriptionZh": "默认排版宽度(CSS 像素)。" },
309
- "defaultWidth": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Legacy alias of width.", "x-descriptionZh": "width 的旧别名。" },
310
- "viewport": {
311
- "type": "object",
2267
+ },
2268
+ "context": {
2269
+ "type": [
2270
+ "object",
2271
+ "null"
2272
+ ],
312
2273
  "additionalProperties": true,
313
- "description": "Default viewport for Shotium rendering.",
314
- "x-descriptionZh": "Shotium 渲染默认视窗。",
315
2274
  "properties": {
316
- "width": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Viewport width in CSS pixels.", "x-descriptionZh": "视窗宽度(CSS 像素)。" },
317
- "height": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Viewport height in CSS pixels.", "x-descriptionZh": "视窗高度(CSS 像素)。" }
2275
+ "enabled": {
2276
+ "type": [
2277
+ "boolean",
2278
+ "string"
2279
+ ],
2280
+ "description": "是否启用消息记录(默认 true)"
2281
+ },
2282
+ "maxRecentMessages": {
2283
+ "type": [
2284
+ "number",
2285
+ "string"
2286
+ ],
2287
+ "description": "读取的最近消息数量(默认 100)"
2288
+ },
2289
+ "summaryThreshold": {
2290
+ "type": [
2291
+ "number",
2292
+ "string"
2293
+ ],
2294
+ "description": "触发总结的消息数量阈值(默认 50)"
2295
+ },
2296
+ "keepAfterSummary": {
2297
+ "type": [
2298
+ "number",
2299
+ "string"
2300
+ ],
2301
+ "description": "总结后保留的消息数量(默认 10)"
2302
+ },
2303
+ "maxContextTokens": {
2304
+ "type": [
2305
+ "number",
2306
+ "string"
2307
+ ],
2308
+ "description": "上下文最大 token 估算(默认 4000)"
2309
+ },
2310
+ "summaryPrompt": {
2311
+ "type": "string",
2312
+ "description": "自定义总结提示词"
2313
+ }
318
2314
  }
319
2315
  },
320
- "backgroundColor": { "type": "string", "description": "Fragment background color.", "x-descriptionZh": "HTML 片段背景色。" },
321
- "defaultBackgroundColor": { "type": "string", "description": "Legacy alias of backgroundColor.", "x-descriptionZh": "backgroundColor 的旧别名。" },
322
- "scale": { "type": "number", "minimum": 0.01, "maximum": 8, "description": "Device scale factor.", "x-descriptionZh": "设备像素比。" },
323
- "type": { "type": "string", "enum": ["png", "jpeg", "webp"], "description": "Default raster output format.", "x-descriptionZh": "默认位图输出格式。" },
324
- "quality": { "type": "number", "minimum": 1, "maximum": 100, "description": "Quality for jpeg/webp output.", "x-descriptionZh": "jpeg/webp 输出质量。" },
325
- "timeout": { "type": "number", "minimum": 1, "maximum": 600000, "description": "Navigation timeout in milliseconds.", "x-descriptionZh": "导航超时(毫秒)。" },
326
- "waitUntil": { "type": "string", "enum": ["load", "networkidle"], "description": "Navigation wait strategy.", "x-descriptionZh": "导航等待策略。" },
327
- "fontFamily": { "type": "string", "description": "Default font-family for fragments.", "x-descriptionZh": "HTML 片段默认字体栈。" },
328
- "maxImageHeight": { "type": "number", "minimum": 0, "maximum": 100000, "description": "Split overly tall PNGs above this height; 0 disables splitting.", "x-descriptionZh": "超过该高度时切分 PNG;0 表示不切分。" },
329
- "sliceCompression": { "type": "number", "minimum": 0, "maximum": 9, "description": "Compression level used when splitting PNGs.", "x-descriptionZh": "PNG 切片时使用的压缩级别。" },
330
- "allowFileAccess": { "type": "boolean", "description": "Allow local file subresources.", "x-descriptionZh": "允许访问本地文件子资源。" },
331
- "takeOverHtmlSegments": { "type": "boolean", "description": "Take over html/markdown rich-segment image rendering.", "x-descriptionZh": "接管 html/markdown 富媒体段转图。" },
332
- "cacheDir": { "type": "string", "description": "HTTP cache directory; use off to disable.", "x-descriptionZh": "HTTP 缓存目录;off 表示关闭。" },
333
- "cacheMaxBytes": { "type": "number", "minimum": 0, "description": "Maximum HTTP cache size in bytes.", "x-descriptionZh": "HTTP 缓存最大字节数。" },
334
- "userAgent": { "type": "string", "description": "Custom user agent string.", "x-descriptionZh": "自定义 User-Agent。" },
335
- "idleTimeoutMs": { "type": "number", "minimum": 0, "maximum": 86400000, "description": "Daemon idle-exit timeout in milliseconds.", "x-descriptionZh": "daemon 空闲退出超时(毫秒)。" },
336
- "logStats": { "type": "boolean", "description": "Log render timing statistics.", "x-descriptionZh": "记录渲染耗时统计。" },
337
- "mode": { "type": "string", "enum": ["inprocess", "daemon"], "description": "Whether Shotium runs in-process or as a daemon.", "x-descriptionZh": "Shotium 在进程内运行还是以 daemon 运行。" },
338
- "aiTextAsImage": {
339
- "anyOf": [
340
- { "type": "boolean" },
341
- {
2316
+ "imageGeneration": {
2317
+ "type": [
2318
+ "object",
2319
+ "null"
2320
+ ],
2321
+ "additionalProperties": true,
2322
+ "properties": {
2323
+ "watermarkEnabled": {
2324
+ "type": [
2325
+ "boolean",
2326
+ "string"
2327
+ ],
2328
+ "description": "智谱 API `watermark_enabled`;默认 true"
2329
+ },
2330
+ "defaultModel": {
2331
+ "type": "string"
2332
+ },
2333
+ "defaultSize": {
2334
+ "type": "string",
2335
+ "description": "智谱:如 1024x1024、1280x1280"
2336
+ },
2337
+ "numSteps": {
2338
+ "type": [
2339
+ "number",
2340
+ "string"
2341
+ ],
2342
+ "description": "Cloudflare Flux:推理步数,默认 4"
2343
+ },
2344
+ "quality": {
2345
+ "type": "string",
2346
+ "description": "OpenAI GPT Image:low | medium | high | auto"
2347
+ },
2348
+ "aspectRatio": {
2349
+ "type": "string",
2350
+ "description": "Gemini:如 1:1、16:9"
2351
+ },
2352
+ "imageSize": {
2353
+ "type": "string",
2354
+ "description": "Gemini:如 1K、2K、4K"
2355
+ },
2356
+ "promptSuffix": {
2357
+ "type": "string",
2358
+ "description": "追加到 agent/用户 prompt 末尾的风格约束(如写实摄影)。\n需要动漫风时不要配置,或在工具 prompt 里写明即可。"
2359
+ }
2360
+ },
2361
+ "description": "文生图全局默认(可被 `providers.<alias>.imageGeneration` 覆盖)。\n智谱:`watermarkEnabled: false` 需先在智谱开放平台签署去水印免责声明。"
2362
+ },
2363
+ "multimodal": {
2364
+ "type": [
2365
+ "object",
2366
+ "null"
2367
+ ],
2368
+ "additionalProperties": true,
2369
+ "properties": {
2370
+ "enabled": {
2371
+ "type": [
2372
+ "boolean",
2373
+ "string"
2374
+ ]
2375
+ },
2376
+ "maxFileBytes": {
2377
+ "type": [
2378
+ "number",
2379
+ "string"
2380
+ ]
2381
+ },
2382
+ "inboundDir": {
2383
+ "type": "string"
2384
+ },
2385
+ "outboundDir": {
2386
+ "type": "string"
2387
+ },
2388
+ "image": {
342
2389
  "type": "object",
343
2390
  "additionalProperties": true,
344
- "description": "Convert plain text output to an image before send.",
345
- "x-descriptionZh": "发送前将纯文本输出转成图片。",
346
2391
  "properties": {
347
- "enabled": { "type": "boolean", "description": "Enable text-to-image conversion.", "x-descriptionZh": "启用文本转图片。" },
348
- "onlyAdapters": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true, "description": "Only apply to these adapter names.", "x-descriptionZh": "仅对这些适配器名称生效。" },
349
- "minLength": { "type": "number", "minimum": 1, "description": "Minimum plain-text length to trigger conversion; defaults to 1 at runtime.", "x-descriptionZh": "触发转换的最小纯文本长度;运行时默认为 1。" },
350
- "maxLength": { "type": "number", "minimum": 1, "description": "Maximum plain-text length to convert; defaults to 12000 at runtime.", "x-descriptionZh": "允许转换的最大纯文本长度;运行时默认为 12000。" },
351
- "skipIfRich": { "type": "boolean", "description": "Skip when content already contains rich segments; defaults to true at runtime.", "x-descriptionZh": "内容已包含富媒体段时跳过;运行时默认为 true。" },
352
- "width": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Image width in CSS pixels.", "x-descriptionZh": "图片宽度(CSS 像素)。" },
353
- "height": { "type": "number", "minimum": 1, "maximum": 30000, "description": "Image height in CSS pixels.", "x-descriptionZh": "图片高度(CSS 像素)。" },
354
- "backgroundColor": { "type": "string", "description": "Image background color.", "x-descriptionZh": "图片背景色。" },
355
- "fontSize": { "type": "number", "minimum": 1, "description": "Font size in CSS pixels.", "x-descriptionZh": "字体大小(CSS 像素)。" },
356
- "color": { "type": "string", "description": "Text color.", "x-descriptionZh": "文字颜色。" },
357
- "padding": { "type": "number", "minimum": 0, "description": "Image padding in CSS pixels.", "x-descriptionZh": "图片内边距(CSS 像素)。" },
358
- "scale": { "type": "number", "minimum": 0.01, "maximum": 8, "description": "Device scale factor.", "x-descriptionZh": "设备像素比。" },
359
- "fileName": { "type": "string", "minLength": 1, "description": "Image file name.", "x-descriptionZh": "图片文件名。" }
2392
+ "maxDimension": {
2393
+ "type": [
2394
+ "number",
2395
+ "string"
2396
+ ]
2397
+ },
2398
+ "preferNativeVision": {
2399
+ "type": [
2400
+ "boolean",
2401
+ "string"
2402
+ ]
2403
+ }
360
2404
  }
361
- }
362
- ],
363
- "description": "Optional plain-text to image conversion before send.",
364
- "x-descriptionZh": "发送前可选的纯文本转图片。"
2405
+ },
2406
+ "audio": {
2407
+ "type": "object",
2408
+ "additionalProperties": true,
2409
+ "properties": {
2410
+ "strategy": {
2411
+ "type": "string",
2412
+ "x-zhin-config": {
2413
+ "options": [
2414
+ {
2415
+ "label": "transcribe",
2416
+ "value": "transcribe"
2417
+ },
2418
+ {
2419
+ "label": "mcp",
2420
+ "value": "mcp"
2421
+ },
2422
+ {
2423
+ "label": "text-only",
2424
+ "value": "text-only"
2425
+ }
2426
+ ]
2427
+ }
2428
+ }
2429
+ }
2430
+ },
2431
+ "video": {
2432
+ "type": "object",
2433
+ "additionalProperties": true,
2434
+ "properties": {
2435
+ "strategy": {
2436
+ "type": "string",
2437
+ "x-zhin-config": {
2438
+ "options": [
2439
+ {
2440
+ "label": "mcp",
2441
+ "value": "mcp"
2442
+ },
2443
+ {
2444
+ "label": "text-only",
2445
+ "value": "text-only"
2446
+ }
2447
+ ]
2448
+ }
2449
+ },
2450
+ "mcpServer": {
2451
+ "type": "string"
2452
+ },
2453
+ "maxFrames": {
2454
+ "type": [
2455
+ "number",
2456
+ "string"
2457
+ ]
2458
+ }
2459
+ }
2460
+ },
2461
+ "outbound": {
2462
+ "type": "object",
2463
+ "additionalProperties": true,
2464
+ "properties": {
2465
+ "splitMessages": {
2466
+ "type": "string",
2467
+ "x-zhin-config": {
2468
+ "options": [
2469
+ {
2470
+ "label": "auto",
2471
+ "value": "auto"
2472
+ },
2473
+ {
2474
+ "label": "single",
2475
+ "value": "single"
2476
+ },
2477
+ {
2478
+ "label": "always_split",
2479
+ "value": "always_split"
2480
+ }
2481
+ ]
2482
+ }
2483
+ }
2484
+ }
2485
+ },
2486
+ "perception": {
2487
+ "type": [
2488
+ "object",
2489
+ "null"
2490
+ ],
2491
+ "additionalProperties": true,
2492
+ "properties": {
2493
+ "provider": {
2494
+ "type": "string",
2495
+ "description": "`ai.providers` alias of the perception model."
2496
+ },
2497
+ "model": {
2498
+ "type": "string"
2499
+ },
2500
+ "kinds": {
2501
+ "type": "array",
2502
+ "items": {
2503
+ "type": "string",
2504
+ "x-zhin-config": {
2505
+ "options": [
2506
+ {
2507
+ "label": "image",
2508
+ "value": "image"
2509
+ },
2510
+ {
2511
+ "label": "video",
2512
+ "value": "video"
2513
+ },
2514
+ {
2515
+ "label": "file",
2516
+ "value": "file"
2517
+ }
2518
+ ]
2519
+ }
2520
+ },
2521
+ "description": "Kinds to describe. Default `['image']`; `file` covers PDFs only."
2522
+ },
2523
+ "maxChars": {
2524
+ "type": [
2525
+ "number",
2526
+ "string"
2527
+ ],
2528
+ "description": "Description length cap in characters. Default 800."
2529
+ },
2530
+ "timeoutMs": {
2531
+ "type": [
2532
+ "number",
2533
+ "string"
2534
+ ],
2535
+ "description": "Per-attempt timeout in ms. Default 30000."
2536
+ },
2537
+ "maxItemsPerTurn": {
2538
+ "type": [
2539
+ "number",
2540
+ "string"
2541
+ ],
2542
+ "description": "Media described per turn; the rest keep the placeholder. Default 4."
2543
+ }
2544
+ },
2545
+ "description": "Perception pre-pass: when the turn's model cannot take an image / video / PDF,\nthis media-capable model describes it and the description is injected as\nuntrusted text (`[图片描述] …`). Unset = off (placeholders as before)."
2546
+ }
2547
+ },
2548
+ "description": "入站/出站多模态(base64 契约;平台 adapter 负责编解码与发送)"
2549
+ },
2550
+ "memory": {
2551
+ "type": [
2552
+ "object",
2553
+ "null"
2554
+ ],
2555
+ "additionalProperties": true,
2556
+ "properties": {
2557
+ "enabled": {
2558
+ "type": [
2559
+ "boolean",
2560
+ "string"
2561
+ ]
2562
+ },
2563
+ "semantic": {
2564
+ "type": [
2565
+ "object",
2566
+ "null"
2567
+ ],
2568
+ "additionalProperties": true,
2569
+ "properties": {
2570
+ "enabled": {
2571
+ "type": [
2572
+ "boolean",
2573
+ "string"
2574
+ ]
2575
+ },
2576
+ "autoConsolidate": {
2577
+ "type": [
2578
+ "boolean",
2579
+ "string"
2580
+ ]
2581
+ },
2582
+ "recall": {
2583
+ "type": [
2584
+ "object",
2585
+ "null"
2586
+ ],
2587
+ "additionalProperties": true,
2588
+ "properties": {
2589
+ "enabled": {
2590
+ "type": [
2591
+ "boolean",
2592
+ "string"
2593
+ ]
2594
+ },
2595
+ "topK": {
2596
+ "type": [
2597
+ "number",
2598
+ "string",
2599
+ "null"
2600
+ ]
2601
+ },
2602
+ "maxTokens": {
2603
+ "type": [
2604
+ "number",
2605
+ "string",
2606
+ "null"
2607
+ ]
2608
+ }
2609
+ },
2610
+ "description": "Per-turn recall (#734): BM25 top-k entries relevant to the current\nmessage are added to the turn context. Default on when semantic memory\nis enabled; topK 5, maxTokens 400."
2611
+ }
2612
+ },
2613
+ "description": "L4 语义记忆:memory_entries 表 + memory_search/upsert 工具"
2614
+ },
2615
+ "budgets": {
2616
+ "type": "object",
2617
+ "additionalProperties": true,
2618
+ "properties": {
2619
+ "session": {
2620
+ "type": [
2621
+ "number",
2622
+ "string"
2623
+ ]
2624
+ },
2625
+ "platform": {
2626
+ "type": [
2627
+ "number",
2628
+ "string"
2629
+ ]
2630
+ },
2631
+ "global": {
2632
+ "type": [
2633
+ "number",
2634
+ "string"
2635
+ ]
2636
+ },
2637
+ "daily": {
2638
+ "type": [
2639
+ "number",
2640
+ "string"
2641
+ ]
2642
+ }
2643
+ }
2644
+ }
2645
+ },
2646
+ "description": "三层 Markdown 文件记忆(global / platform / session)。\n默认启用;设 enabled: false 可关闭注入。"
2647
+ },
2648
+ "knowledge": {
2649
+ "type": "object",
2650
+ "additionalProperties": true,
2651
+ "properties": {
2652
+ "baseDir": {
2653
+ "type": "string",
2654
+ "description": "项目根目录内的知识库目录路径。配置该段时必须显式声明。"
2655
+ }
2656
+ },
2657
+ "description": "本地知识库(knowledge_search 工具数据源)。\n放置 .md / .txt 文件到 baseDir,Agent 可通过 knowledge_search 工具检索。"
2658
+ },
2659
+ "githubMcp": {
2660
+ "type": "object",
2661
+ "additionalProperties": true,
2662
+ "properties": {
2663
+ "token": {
2664
+ "type": "string",
2665
+ "writeOnly": true,
2666
+ "x-zhin-config": {
2667
+ "secret": true
2668
+ }
2669
+ },
2670
+ "enabled": {
2671
+ "type": [
2672
+ "boolean",
2673
+ "string"
2674
+ ],
2675
+ "description": "为 true 时注册 server-github MCP(PAT,人身份);默认 false,Bot 写操作用 adapter github_* 工具"
2676
+ }
2677
+ },
2678
+ "description": "PAT for adapter-github auto-registered server-github MCP (overrides env when set)."
2679
+ },
2680
+ "mcpServers": {
2681
+ "type": [
2682
+ "array",
2683
+ "null"
2684
+ ],
2685
+ "items": {
2686
+ "type": "object",
2687
+ "additionalProperties": true,
2688
+ "properties": {
2689
+ "name": {
2690
+ "type": "string"
2691
+ },
2692
+ "transport": {
2693
+ "type": "string",
2694
+ "x-zhin-config": {
2695
+ "options": [
2696
+ {
2697
+ "label": "stdio",
2698
+ "value": "stdio"
2699
+ },
2700
+ {
2701
+ "label": "streamable-http",
2702
+ "value": "streamable-http"
2703
+ },
2704
+ {
2705
+ "label": "sse",
2706
+ "value": "sse"
2707
+ }
2708
+ ]
2709
+ }
2710
+ },
2711
+ "url": {
2712
+ "type": "string"
2713
+ },
2714
+ "command": {
2715
+ "type": "string"
2716
+ },
2717
+ "args": {
2718
+ "type": "array",
2719
+ "items": {
2720
+ "type": "string"
2721
+ }
2722
+ },
2723
+ "env": {
2724
+ "type": "object",
2725
+ "additionalProperties": {
2726
+ "type": "string",
2727
+ "writeOnly": true,
2728
+ "x-zhin-config": {
2729
+ "secret": true
2730
+ }
2731
+ }
2732
+ },
2733
+ "headers": {
2734
+ "type": "object",
2735
+ "additionalProperties": {
2736
+ "type": "string",
2737
+ "writeOnly": true,
2738
+ "x-zhin-config": {
2739
+ "secret": true
2740
+ }
2741
+ }
2742
+ }
2743
+ }
2744
+ },
2745
+ "description": "External MCP servers for the Agent MCP client (global, all bots).\nListed servers are exposed to ZhinAgent tool pool when connected."
2746
+ },
2747
+ "access": {
2748
+ "type": [
2749
+ "object",
2750
+ "null"
2751
+ ],
2752
+ "additionalProperties": true,
2753
+ "properties": {
2754
+ "mode": {
2755
+ "type": "string",
2756
+ "x-zhin-config": {
2757
+ "options": [
2758
+ {
2759
+ "label": "open",
2760
+ "value": "open"
2761
+ },
2762
+ {
2763
+ "label": "closed",
2764
+ "value": "closed"
2765
+ },
2766
+ {
2767
+ "label": "whitelist",
2768
+ "value": "whitelist"
2769
+ }
2770
+ ]
2771
+ },
2772
+ "description": "open | closed | whitelist,默认 open"
2773
+ },
2774
+ "users": {
2775
+ "type": "array",
2776
+ "items": {
2777
+ "type": "string"
2778
+ },
2779
+ "description": "允许触发 AI 的 sender.id"
2780
+ },
2781
+ "groups": {
2782
+ "type": "array",
2783
+ "items": {
2784
+ "type": "string"
2785
+ },
2786
+ "description": "允许触发 AI 的 group/channel id"
2787
+ },
2788
+ "denyMessage": {
2789
+ "type": "string",
2790
+ "description": "私聊拒绝时的回复文案"
2791
+ }
2792
+ },
2793
+ "description": "AI 访问控制(平台 AIGC 合规;Endpoint 可用 aiAccess 覆盖)"
2794
+ },
2795
+ "trigger": {
2796
+ "type": [
2797
+ "object",
2798
+ "null"
2799
+ ],
2800
+ "additionalProperties": true,
2801
+ "properties": {
2802
+ "enabled": {
2803
+ "type": [
2804
+ "boolean",
2805
+ "string"
2806
+ ],
2807
+ "description": "是否启用(默认 true)"
2808
+ },
2809
+ "prefixes": {
2810
+ "type": "array",
2811
+ "items": {
2812
+ "type": "string"
2813
+ },
2814
+ "description": "触发前缀列表(默认 ['#', 'AI:'])"
2815
+ },
2816
+ "respondToAt": {
2817
+ "type": [
2818
+ "boolean",
2819
+ "string"
2820
+ ],
2821
+ "description": "是否响应 @ 机器人(默认 true)"
2822
+ },
2823
+ "respondToPrivate": {
2824
+ "type": [
2825
+ "boolean",
2826
+ "string"
2827
+ ],
2828
+ "description": "是否响应私聊(默认 true)"
2829
+ },
2830
+ "keywords": {
2831
+ "type": "array",
2832
+ "items": {
2833
+ "type": "string"
2834
+ },
2835
+ "description": "触发关键词(可选)"
2836
+ },
2837
+ "ignorePrefixes": {
2838
+ "type": "array",
2839
+ "items": {
2840
+ "type": "string"
2841
+ },
2842
+ "description": "忽略的前缀(命令前缀,避免与命令冲突,默认 ['/', '!', '!'])"
2843
+ },
2844
+ "timeout": {
2845
+ "type": [
2846
+ "number",
2847
+ "string"
2848
+ ],
2849
+ "description": "超时时间(毫秒,默认 60000)"
2850
+ },
2851
+ "thinkingMessage": {
2852
+ "type": "string",
2853
+ "description": "思考中提示语(可选,设置后会在处理前发送)"
2854
+ },
2855
+ "errorTemplate": {
2856
+ "type": "string",
2857
+ "description": "错误提示模板(默认 '❌ AI 处理失败: {error}')"
2858
+ }
2859
+ },
2860
+ "description": "AI 触发配置"
2861
+ }
2862
+ }
2863
+ },
2864
+ "menuKeyword": {
2865
+ "type": [
2866
+ "string",
2867
+ "boolean"
2868
+ ],
2869
+ "anyOf": [
2870
+ {
2871
+ "type": "string"
2872
+ },
2873
+ {
2874
+ "const": false
2875
+ }
2876
+ ],
2877
+ "description": "Built-in command menu keyword. Defaults to 菜单; false or an empty string disables the menu.",
2878
+ "x-descriptionZh": "内置指令菜单关键词;默认 菜单,false 或空字符串关闭菜单。"
2879
+ },
2880
+ "menuStyle": {
2881
+ "type": "object",
2882
+ "additionalProperties": false,
2883
+ "description": "Command menu appearance when an HTML renderer is available; plain text fallback remains available.",
2884
+ "x-descriptionZh": "HTML 渲染可用时的指令菜单外观;始终保留纯文本降级。",
2885
+ "properties": {
2886
+ "title": {
2887
+ "type": "string",
2888
+ "description": "Menu title.",
2889
+ "x-descriptionZh": "菜单标题。"
2890
+ },
2891
+ "subtitle": {
2892
+ "type": "string",
2893
+ "description": "Menu subtitle.",
2894
+ "x-descriptionZh": "菜单副标题。"
2895
+ },
2896
+ "accentColor": {
2897
+ "type": "string",
2898
+ "description": "Six-digit hex accent color; invalid values use the renderer default.",
2899
+ "x-descriptionZh": "六位十六进制强调色;无效值使用渲染器默认值。"
2900
+ },
2901
+ "backgroundImage": {
2902
+ "type": "string",
2903
+ "description": "HTTP(S) image or PNG/JPEG/WebP data URL; unsupported values use the renderer default.",
2904
+ "x-descriptionZh": "HTTP(S) 图片或 PNG/JPEG/WebP data URL;不支持的值使用渲染器默认值。"
2905
+ }
2906
+ }
2907
+ },
2908
+ "mcp": {
2909
+ "type": "object",
2910
+ "additionalProperties": true,
2911
+ "description": "Expose Bot tools through an MCP Server.",
2912
+ "x-descriptionZh": "把 Bot 工具公开为 MCP Server。",
2913
+ "properties": {
2914
+ "enabled": {
2915
+ "type": [
2916
+ "boolean",
2917
+ "string"
2918
+ ]
2919
+ },
2920
+ "path": {
2921
+ "type": [
2922
+ "string",
2923
+ "null"
2924
+ ]
2925
+ },
2926
+ "token": {
2927
+ "type": [
2928
+ "string",
2929
+ "null"
2930
+ ],
2931
+ "writeOnly": true,
2932
+ "x-zhin-config": {
2933
+ "secret": true
2934
+ }
2935
+ },
2936
+ "allowUnauthenticatedLocalhost": {
2937
+ "type": [
2938
+ "boolean",
2939
+ "string"
2940
+ ]
2941
+ }
2942
+ }
2943
+ },
2944
+ "a2a": {
2945
+ "type": "object",
2946
+ "additionalProperties": true,
2947
+ "description": "A2A Agent Card, remote execution, and Workroom callbacks.",
2948
+ "x-descriptionZh": "A2A Agent Card、远程执行与 Workroom 回调。",
2949
+ "properties": {
2950
+ "enabled": {
2951
+ "type": [
2952
+ "boolean",
2953
+ "string"
2954
+ ]
2955
+ },
2956
+ "path": {
2957
+ "type": [
2958
+ "string",
2959
+ "null"
2960
+ ]
2961
+ },
2962
+ "token": {
2963
+ "type": [
2964
+ "string",
2965
+ "null"
2966
+ ],
2967
+ "writeOnly": true,
2968
+ "x-zhin-config": {
2969
+ "secret": true
2970
+ }
2971
+ },
2972
+ "publicUrl": {
2973
+ "type": [
2974
+ "string",
2975
+ "null"
2976
+ ]
2977
+ },
2978
+ "workroomCallbacks": {
2979
+ "type": [
2980
+ "object",
2981
+ "null"
2982
+ ],
2983
+ "additionalProperties": true,
2984
+ "properties": {
2985
+ "enabled": {
2986
+ "type": [
2987
+ "boolean",
2988
+ "string"
2989
+ ]
2990
+ },
2991
+ "path": {
2992
+ "type": "string",
2993
+ "description": "Must remain outside the ordinary `/a2a/{agent}/*` route tree."
2994
+ },
2995
+ "maxBodyBytes": {
2996
+ "type": [
2997
+ "number",
2998
+ "string"
2999
+ ]
3000
+ },
3001
+ "maxSequenceGap": {
3002
+ "type": [
3003
+ "number",
3004
+ "string"
3005
+ ]
3006
+ },
3007
+ "bindings": {
3008
+ "type": "array",
3009
+ "items": {
3010
+ "type": "object",
3011
+ "additionalProperties": true,
3012
+ "properties": {
3013
+ "endpointId": {
3014
+ "type": "string"
3015
+ },
3016
+ "tenantId": {
3017
+ "type": "string"
3018
+ },
3019
+ "cardDigest": {
3020
+ "type": "string"
3021
+ },
3022
+ "authBindingId": {
3023
+ "type": "string"
3024
+ },
3025
+ "trustDomain": {
3026
+ "type": "string"
3027
+ },
3028
+ "extensionDigest": {
3029
+ "type": "string"
3030
+ },
3031
+ "credentialId": {
3032
+ "type": "string"
3033
+ },
3034
+ "credential": {
3035
+ "anyOf": [
3036
+ {
3037
+ "type": "object",
3038
+ "additionalProperties": true,
3039
+ "properties": {
3040
+ "source": {
3041
+ "anyOf": [
3042
+ {
3043
+ "const": "config"
3044
+ },
3045
+ {
3046
+ "type": "string",
3047
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*(?::[-=][^}]*)?\\}$"
3048
+ }
3049
+ ]
3050
+ },
3051
+ "value": {
3052
+ "type": "string",
3053
+ "writeOnly": true,
3054
+ "x-zhin-config": {
3055
+ "secret": true
3056
+ }
3057
+ }
3058
+ }
3059
+ },
3060
+ {
3061
+ "type": "object",
3062
+ "additionalProperties": true,
3063
+ "properties": {
3064
+ "source": {
3065
+ "anyOf": [
3066
+ {
3067
+ "const": "secure_provider"
3068
+ },
3069
+ {
3070
+ "type": "string",
3071
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*(?::[-=][^}]*)?\\}$"
3072
+ }
3073
+ ]
3074
+ },
3075
+ "secretRef": {
3076
+ "type": "string"
3077
+ }
3078
+ }
3079
+ }
3080
+ ]
3081
+ },
3082
+ "enabled": {
3083
+ "type": [
3084
+ "boolean",
3085
+ "string"
3086
+ ]
3087
+ },
3088
+ "expiresAt": {
3089
+ "type": [
3090
+ "number",
3091
+ "string"
3092
+ ]
3093
+ }
3094
+ }
3095
+ }
3096
+ }
3097
+ }
3098
+ },
3099
+ "workroomRemoteExecutors": {
3100
+ "type": [
3101
+ "object",
3102
+ "null"
3103
+ ],
3104
+ "additionalProperties": true,
3105
+ "properties": {
3106
+ "enabled": {
3107
+ "type": [
3108
+ "boolean",
3109
+ "string"
3110
+ ]
3111
+ },
3112
+ "maxResponseBytes": {
3113
+ "type": [
3114
+ "number",
3115
+ "string"
3116
+ ]
3117
+ },
3118
+ "bindings": {
3119
+ "type": "array",
3120
+ "items": {
3121
+ "type": "object",
3122
+ "additionalProperties": true,
3123
+ "properties": {
3124
+ "endpointId": {
3125
+ "type": "string"
3126
+ },
3127
+ "cardDigest": {
3128
+ "type": "string"
3129
+ },
3130
+ "authBindingId": {
3131
+ "type": "string"
3132
+ },
3133
+ "dispatchUrl": {
3134
+ "type": "string"
3135
+ },
3136
+ "pollUrl": {
3137
+ "type": "string"
3138
+ },
3139
+ "credential": {
3140
+ "anyOf": [
3141
+ {
3142
+ "type": "object",
3143
+ "additionalProperties": true,
3144
+ "properties": {
3145
+ "source": {
3146
+ "anyOf": [
3147
+ {
3148
+ "const": "config"
3149
+ },
3150
+ {
3151
+ "type": "string",
3152
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*(?::[-=][^}]*)?\\}$"
3153
+ }
3154
+ ]
3155
+ },
3156
+ "value": {
3157
+ "type": "string",
3158
+ "writeOnly": true,
3159
+ "x-zhin-config": {
3160
+ "secret": true
3161
+ }
3162
+ }
3163
+ }
3164
+ },
3165
+ {
3166
+ "type": "object",
3167
+ "additionalProperties": true,
3168
+ "properties": {
3169
+ "source": {
3170
+ "anyOf": [
3171
+ {
3172
+ "const": "secure_provider"
3173
+ },
3174
+ {
3175
+ "type": "string",
3176
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*(?::[-=][^}]*)?\\}$"
3177
+ }
3178
+ ]
3179
+ },
3180
+ "secretRef": {
3181
+ "type": "string"
3182
+ }
3183
+ }
3184
+ }
3185
+ ]
3186
+ },
3187
+ "authority": {
3188
+ "type": "object",
3189
+ "additionalProperties": true,
3190
+ "properties": {
3191
+ "workroomExtension": {
3192
+ "anyOf": [
3193
+ {
3194
+ "const": "https://zhin.dev/extensions/workroom-executor/v1"
3195
+ },
3196
+ {
3197
+ "type": "string",
3198
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*(?::[-=][^}]*)?\\}$"
3199
+ }
3200
+ ]
3201
+ },
3202
+ "idempotentDispatch": {
3203
+ "type": [
3204
+ "boolean",
3205
+ "string"
3206
+ ]
3207
+ },
3208
+ "typedCompletionEnvelope": {
3209
+ "type": [
3210
+ "boolean",
3211
+ "string"
3212
+ ]
3213
+ },
3214
+ "workspaceProviders": {
3215
+ "type": "array",
3216
+ "items": {
3217
+ "type": "string"
3218
+ }
3219
+ }
3220
+ }
3221
+ },
3222
+ "enabled": {
3223
+ "type": [
3224
+ "boolean",
3225
+ "string"
3226
+ ]
3227
+ }
3228
+ }
3229
+ }
3230
+ }
3231
+ },
3232
+ "description": "Transport endpoints only. Project/Workroom topology remains in the persistent Catalog."
365
3233
  }
366
3234
  }
367
3235
  },
368
- "assistant": { "type": "object", "additionalProperties": true, "description": "Scheduled jobs, event ingress, and failure notifications.", "x-descriptionZh": "调度任务、事件入口和失败通知。" },
369
- "log_level": { "type": ["string", "number"], "description": "Runtime log level.", "x-descriptionZh": "Runtime 日志级别。" },
370
- "plugin": { "type": "object", "description": "Root Plugin configuration; replaced by its project schema during composition.", "x-descriptionZh": "Root Plugin 配置;组合时由项目 Schema 替换。" }
3236
+ "speech": {
3237
+ "type": "object",
3238
+ "additionalProperties": true,
3239
+ "description": "Speech-to-text and text-to-speech Host.",
3240
+ "x-descriptionZh": "语音识别与语音合成 Host。",
3241
+ "properties": {
3242
+ "stt": {
3243
+ "type": [
3244
+ "object",
3245
+ "null"
3246
+ ],
3247
+ "additionalProperties": true,
3248
+ "properties": {
3249
+ "enabled": {
3250
+ "type": [
3251
+ "boolean",
3252
+ "string"
3253
+ ]
3254
+ },
3255
+ "provider": {
3256
+ "type": "string",
3257
+ "x-zhin-config": {
3258
+ "options": [
3259
+ {
3260
+ "label": "openai",
3261
+ "value": "openai"
3262
+ },
3263
+ {
3264
+ "label": "ollama",
3265
+ "value": "ollama"
3266
+ }
3267
+ ]
3268
+ }
3269
+ },
3270
+ "model": {
3271
+ "type": "string"
3272
+ },
3273
+ "host": {
3274
+ "type": "string"
3275
+ },
3276
+ "apiKey": {
3277
+ "type": "string",
3278
+ "writeOnly": true,
3279
+ "x-zhin-config": {
3280
+ "secret": true
3281
+ }
3282
+ }
3283
+ }
3284
+ },
3285
+ "tts": {
3286
+ "type": [
3287
+ "object",
3288
+ "null"
3289
+ ],
3290
+ "additionalProperties": true,
3291
+ "properties": {
3292
+ "enabled": {
3293
+ "type": [
3294
+ "boolean",
3295
+ "string"
3296
+ ]
3297
+ },
3298
+ "provider": {
3299
+ "type": "string",
3300
+ "x-zhin-config": {
3301
+ "options": [
3302
+ {
3303
+ "label": "openai",
3304
+ "value": "openai"
3305
+ },
3306
+ {
3307
+ "label": "custom",
3308
+ "value": "custom"
3309
+ },
3310
+ {
3311
+ "label": "edge",
3312
+ "value": "edge"
3313
+ },
3314
+ {
3315
+ "label": "azure",
3316
+ "value": "azure"
3317
+ }
3318
+ ]
3319
+ }
3320
+ },
3321
+ "voice": {
3322
+ "type": "string"
3323
+ },
3324
+ "model": {
3325
+ "type": "string"
3326
+ },
3327
+ "host": {
3328
+ "type": "string"
3329
+ },
3330
+ "apiKey": {
3331
+ "type": "string",
3332
+ "writeOnly": true,
3333
+ "x-zhin-config": {
3334
+ "secret": true
3335
+ }
3336
+ },
3337
+ "rate": {
3338
+ "type": "string",
3339
+ "description": "edge-tts"
3340
+ },
3341
+ "pitch": {
3342
+ "type": "string"
3343
+ },
3344
+ "edgeTtsCommand": {
3345
+ "type": "string"
3346
+ },
3347
+ "region": {
3348
+ "type": "string",
3349
+ "description": "azure"
3350
+ },
3351
+ "subscriptionKey": {
3352
+ "type": "string",
3353
+ "writeOnly": true,
3354
+ "x-zhin-config": {
3355
+ "secret": true
3356
+ }
3357
+ },
3358
+ "baseUrl": {
3359
+ "type": "string",
3360
+ "description": "custom OpenAI-compatible"
3361
+ },
3362
+ "headers": {
3363
+ "type": "object",
3364
+ "additionalProperties": {
3365
+ "type": "string",
3366
+ "writeOnly": true,
3367
+ "x-zhin-config": {
3368
+ "secret": true
3369
+ }
3370
+ }
3371
+ },
3372
+ "speed": {
3373
+ "type": [
3374
+ "number",
3375
+ "string"
3376
+ ]
3377
+ }
3378
+ }
3379
+ }
3380
+ }
3381
+ },
3382
+ "htmlRenderer": {
3383
+ "type": "object",
3384
+ "additionalProperties": true,
3385
+ "description": "HTML and image rendering options backed by Shotium.",
3386
+ "x-descriptionZh": "基于 Shotium 的 HTML/图片渲染参数。",
3387
+ "properties": {
3388
+ "width": {
3389
+ "type": "number",
3390
+ "minimum": 1,
3391
+ "maximum": 30000,
3392
+ "description": "Default layout width in CSS pixels.",
3393
+ "x-descriptionZh": "默认排版宽度(CSS 像素)。"
3394
+ },
3395
+ "defaultWidth": {
3396
+ "type": "number",
3397
+ "minimum": 1,
3398
+ "maximum": 30000,
3399
+ "description": "Legacy alias of width.",
3400
+ "x-descriptionZh": "width 的旧别名。"
3401
+ },
3402
+ "viewport": {
3403
+ "type": "object",
3404
+ "additionalProperties": true,
3405
+ "description": "Default viewport for Shotium rendering.",
3406
+ "x-descriptionZh": "Shotium 渲染默认视窗。",
3407
+ "properties": {
3408
+ "width": {
3409
+ "type": "number",
3410
+ "minimum": 1,
3411
+ "maximum": 30000,
3412
+ "description": "Viewport width in CSS pixels.",
3413
+ "x-descriptionZh": "视窗宽度(CSS 像素)。"
3414
+ },
3415
+ "height": {
3416
+ "type": "number",
3417
+ "minimum": 1,
3418
+ "maximum": 30000,
3419
+ "description": "Viewport height in CSS pixels.",
3420
+ "x-descriptionZh": "视窗高度(CSS 像素)。"
3421
+ }
3422
+ }
3423
+ },
3424
+ "backgroundColor": {
3425
+ "type": "string",
3426
+ "description": "Fragment background color.",
3427
+ "x-descriptionZh": "HTML 片段背景色。"
3428
+ },
3429
+ "defaultBackgroundColor": {
3430
+ "type": "string",
3431
+ "description": "Legacy alias of backgroundColor.",
3432
+ "x-descriptionZh": "backgroundColor 的旧别名。"
3433
+ },
3434
+ "scale": {
3435
+ "type": "number",
3436
+ "minimum": 0.01,
3437
+ "maximum": 8,
3438
+ "description": "Device scale factor.",
3439
+ "x-descriptionZh": "设备像素比。"
3440
+ },
3441
+ "type": {
3442
+ "type": "string",
3443
+ "enum": [
3444
+ "png",
3445
+ "jpeg",
3446
+ "webp"
3447
+ ],
3448
+ "description": "Default raster output format.",
3449
+ "x-descriptionZh": "默认位图输出格式。"
3450
+ },
3451
+ "quality": {
3452
+ "type": "number",
3453
+ "minimum": 1,
3454
+ "maximum": 100,
3455
+ "description": "Quality for jpeg/webp output.",
3456
+ "x-descriptionZh": "jpeg/webp 输出质量。"
3457
+ },
3458
+ "timeout": {
3459
+ "type": "number",
3460
+ "minimum": 1,
3461
+ "maximum": 600000,
3462
+ "description": "Navigation timeout in milliseconds.",
3463
+ "x-descriptionZh": "导航超时(毫秒)。"
3464
+ },
3465
+ "waitUntil": {
3466
+ "type": "string",
3467
+ "enum": [
3468
+ "load",
3469
+ "networkidle"
3470
+ ],
3471
+ "description": "Navigation wait strategy.",
3472
+ "x-descriptionZh": "导航等待策略。"
3473
+ },
3474
+ "fontFamily": {
3475
+ "type": "string",
3476
+ "description": "Default font-family for fragments.",
3477
+ "x-descriptionZh": "HTML 片段默认字体栈。"
3478
+ },
3479
+ "maxImageHeight": {
3480
+ "type": "number",
3481
+ "minimum": 0,
3482
+ "maximum": 100000,
3483
+ "description": "Split overly tall PNGs above this height; 0 disables splitting.",
3484
+ "x-descriptionZh": "超过该高度时切分 PNG;0 表示不切分。"
3485
+ },
3486
+ "sliceCompression": {
3487
+ "type": "number",
3488
+ "minimum": 0,
3489
+ "maximum": 9,
3490
+ "description": "Compression level used when splitting PNGs.",
3491
+ "x-descriptionZh": "PNG 切片时使用的压缩级别。"
3492
+ },
3493
+ "allowFileAccess": {
3494
+ "type": "boolean",
3495
+ "description": "Allow local file subresources.",
3496
+ "x-descriptionZh": "允许访问本地文件子资源。"
3497
+ },
3498
+ "takeOverHtmlSegments": {
3499
+ "type": "boolean",
3500
+ "description": "Take over html/markdown rich-segment image rendering.",
3501
+ "x-descriptionZh": "接管 html/markdown 富媒体段转图。"
3502
+ },
3503
+ "cacheDir": {
3504
+ "type": "string",
3505
+ "description": "HTTP cache directory; use off to disable.",
3506
+ "x-descriptionZh": "HTTP 缓存目录;off 表示关闭。"
3507
+ },
3508
+ "cacheMaxBytes": {
3509
+ "type": "number",
3510
+ "minimum": 0,
3511
+ "description": "Maximum HTTP cache size in bytes.",
3512
+ "x-descriptionZh": "HTTP 缓存最大字节数。"
3513
+ },
3514
+ "userAgent": {
3515
+ "type": "string",
3516
+ "description": "Custom user agent string.",
3517
+ "x-descriptionZh": "自定义 User-Agent。"
3518
+ },
3519
+ "idleTimeoutMs": {
3520
+ "type": "number",
3521
+ "minimum": 0,
3522
+ "maximum": 86400000,
3523
+ "description": "Daemon idle-exit timeout in milliseconds.",
3524
+ "x-descriptionZh": "daemon 空闲退出超时(毫秒)。"
3525
+ },
3526
+ "logStats": {
3527
+ "type": "boolean",
3528
+ "description": "Log render timing statistics.",
3529
+ "x-descriptionZh": "记录渲染耗时统计。"
3530
+ },
3531
+ "mode": {
3532
+ "type": "string",
3533
+ "enum": [
3534
+ "inprocess",
3535
+ "daemon"
3536
+ ],
3537
+ "description": "Whether Shotium runs in-process or as a daemon.",
3538
+ "x-descriptionZh": "Shotium 在进程内运行还是以 daemon 运行。"
3539
+ },
3540
+ "aiTextAsImage": {
3541
+ "anyOf": [
3542
+ {
3543
+ "type": "boolean"
3544
+ },
3545
+ {
3546
+ "type": "object",
3547
+ "additionalProperties": true,
3548
+ "description": "Convert plain text output to an image before send.",
3549
+ "x-descriptionZh": "发送前将纯文本输出转成图片。",
3550
+ "properties": {
3551
+ "enabled": {
3552
+ "type": "boolean",
3553
+ "description": "Enable text-to-image conversion.",
3554
+ "x-descriptionZh": "启用文本转图片。"
3555
+ },
3556
+ "onlyAdapters": {
3557
+ "type": "array",
3558
+ "items": {
3559
+ "type": "string",
3560
+ "minLength": 1
3561
+ },
3562
+ "uniqueItems": true,
3563
+ "description": "Only apply to these adapter names.",
3564
+ "x-descriptionZh": "仅对这些适配器名称生效。"
3565
+ },
3566
+ "minLength": {
3567
+ "type": "number",
3568
+ "minimum": 1,
3569
+ "description": "Minimum plain-text length to trigger conversion; defaults to 1 at runtime.",
3570
+ "x-descriptionZh": "触发转换的最小纯文本长度;运行时默认为 1。"
3571
+ },
3572
+ "maxLength": {
3573
+ "type": "number",
3574
+ "minimum": 1,
3575
+ "description": "Maximum plain-text length to convert; defaults to 12000 at runtime.",
3576
+ "x-descriptionZh": "允许转换的最大纯文本长度;运行时默认为 12000。"
3577
+ },
3578
+ "skipIfRich": {
3579
+ "type": "boolean",
3580
+ "description": "Skip when content already contains rich segments; defaults to true at runtime.",
3581
+ "x-descriptionZh": "内容已包含富媒体段时跳过;运行时默认为 true。"
3582
+ },
3583
+ "width": {
3584
+ "type": "number",
3585
+ "minimum": 1,
3586
+ "maximum": 30000,
3587
+ "description": "Image width in CSS pixels.",
3588
+ "x-descriptionZh": "图片宽度(CSS 像素)。"
3589
+ },
3590
+ "height": {
3591
+ "type": "number",
3592
+ "minimum": 1,
3593
+ "maximum": 30000,
3594
+ "description": "Image height in CSS pixels.",
3595
+ "x-descriptionZh": "图片高度(CSS 像素)。"
3596
+ },
3597
+ "backgroundColor": {
3598
+ "type": "string",
3599
+ "description": "Image background color.",
3600
+ "x-descriptionZh": "图片背景色。"
3601
+ },
3602
+ "fontSize": {
3603
+ "type": "number",
3604
+ "minimum": 1,
3605
+ "description": "Font size in CSS pixels.",
3606
+ "x-descriptionZh": "字体大小(CSS 像素)。"
3607
+ },
3608
+ "color": {
3609
+ "type": "string",
3610
+ "description": "Text color.",
3611
+ "x-descriptionZh": "文字颜色。"
3612
+ },
3613
+ "padding": {
3614
+ "type": "number",
3615
+ "minimum": 0,
3616
+ "description": "Image padding in CSS pixels.",
3617
+ "x-descriptionZh": "图片内边距(CSS 像素)。"
3618
+ },
3619
+ "scale": {
3620
+ "type": "number",
3621
+ "minimum": 0.01,
3622
+ "maximum": 8,
3623
+ "description": "Device scale factor.",
3624
+ "x-descriptionZh": "设备像素比。"
3625
+ },
3626
+ "fileName": {
3627
+ "type": "string",
3628
+ "minLength": 1,
3629
+ "description": "Image file name.",
3630
+ "x-descriptionZh": "图片文件名。"
3631
+ }
3632
+ }
3633
+ }
3634
+ ],
3635
+ "description": "Optional plain-text to image conversion before send.",
3636
+ "x-descriptionZh": "发送前可选的纯文本转图片。"
3637
+ }
3638
+ }
3639
+ },
3640
+ "assistant": {
3641
+ "type": "object",
3642
+ "additionalProperties": true,
3643
+ "description": "Scheduled jobs, event ingress, and failure notifications.",
3644
+ "x-descriptionZh": "调度任务、事件入口和失败通知。",
3645
+ "properties": {
3646
+ "enabled": {
3647
+ "type": [
3648
+ "boolean",
3649
+ "string"
3650
+ ],
3651
+ "description": "启用统一 JobStore(默认 false,Stable 行为不变)"
3652
+ },
3653
+ "queue": {
3654
+ "type": [
3655
+ "object",
3656
+ "null"
3657
+ ],
3658
+ "additionalProperties": true,
3659
+ "properties": {
3660
+ "maxConcurrency": {
3661
+ "type": [
3662
+ "number",
3663
+ "string",
3664
+ "null"
3665
+ ],
3666
+ "description": "Schedule execution 并发上限"
3667
+ },
3668
+ "maxRetries": {
3669
+ "type": [
3670
+ "number",
3671
+ "string",
3672
+ "null"
3673
+ ]
3674
+ },
3675
+ "defaultTimeoutMs": {
3676
+ "type": [
3677
+ "number",
3678
+ "string",
3679
+ "null"
3680
+ ]
3681
+ }
3682
+ },
3683
+ "description": "Schedule execution queue(重试 / 并发 / 死信)"
3684
+ },
3685
+ "defaults": {
3686
+ "type": [
3687
+ "object",
3688
+ "null"
3689
+ ],
3690
+ "additionalProperties": true,
3691
+ "properties": {
3692
+ "notify": {
3693
+ "anyOf": [
3694
+ {
3695
+ "type": "object",
3696
+ "additionalProperties": true,
3697
+ "properties": {
3698
+ "channel": {
3699
+ "anyOf": [
3700
+ {
3701
+ "const": "im"
3702
+ },
3703
+ {
3704
+ "type": "string",
3705
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*(?::[-=][^}]*)?\\}$"
3706
+ }
3707
+ ]
3708
+ },
3709
+ "target": {
3710
+ "type": "object",
3711
+ "additionalProperties": true,
3712
+ "properties": {
3713
+ "channel": {
3714
+ "anyOf": [
3715
+ {
3716
+ "const": "im"
3717
+ },
3718
+ {
3719
+ "type": "string",
3720
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*(?::[-=][^}]*)?\\}$"
3721
+ }
3722
+ ]
3723
+ },
3724
+ "scene": {
3725
+ "type": "object",
3726
+ "additionalProperties": true,
3727
+ "properties": {
3728
+ "platform": {
3729
+ "type": "string"
3730
+ },
3731
+ "endpointKey": {
3732
+ "type": "string"
3733
+ },
3734
+ "sceneId": {
3735
+ "type": "string"
3736
+ },
3737
+ "kind": {
3738
+ "type": "string",
3739
+ "x-zhin-config": {
3740
+ "options": [
3741
+ {
3742
+ "label": "private",
3743
+ "value": "private"
3744
+ },
3745
+ {
3746
+ "label": "group",
3747
+ "value": "group"
3748
+ },
3749
+ {
3750
+ "label": "channel",
3751
+ "value": "channel"
3752
+ }
3753
+ ]
3754
+ }
3755
+ },
3756
+ "senderId": {
3757
+ "type": "string"
3758
+ },
3759
+ "parent": {
3760
+ "type": "object",
3761
+ "additionalProperties": true,
3762
+ "properties": {
3763
+ "kind": {
3764
+ "type": "string",
3765
+ "x-zhin-config": {
3766
+ "options": [
3767
+ {
3768
+ "label": "group",
3769
+ "value": "group"
3770
+ },
3771
+ {
3772
+ "label": "guild",
3773
+ "value": "guild"
3774
+ }
3775
+ ]
3776
+ }
3777
+ },
3778
+ "sceneId": {
3779
+ "type": "string"
3780
+ }
3781
+ }
3782
+ }
3783
+ }
3784
+ },
3785
+ "threadId": {
3786
+ "type": "string"
3787
+ },
3788
+ "quoteId": {
3789
+ "type": "string"
3790
+ }
3791
+ }
3792
+ }
3793
+ }
3794
+ },
3795
+ {
3796
+ "type": "object",
3797
+ "additionalProperties": true,
3798
+ "properties": {
3799
+ "channel": {
3800
+ "anyOf": [
3801
+ {
3802
+ "const": "silent"
3803
+ },
3804
+ {
3805
+ "type": "string",
3806
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*(?::[-=][^}]*)?\\}$"
3807
+ }
3808
+ ]
3809
+ }
3810
+ }
3811
+ },
3812
+ {
3813
+ "type": "object",
3814
+ "additionalProperties": true,
3815
+ "properties": {
3816
+ "channel": {
3817
+ "anyOf": [
3818
+ {
3819
+ "const": "log"
3820
+ },
3821
+ {
3822
+ "type": "string",
3823
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*(?::[-=][^}]*)?\\}$"
3824
+ }
3825
+ ]
3826
+ }
3827
+ }
3828
+ },
3829
+ {
3830
+ "type": "object",
3831
+ "additionalProperties": true,
3832
+ "properties": {
3833
+ "channel": {
3834
+ "anyOf": [
3835
+ {
3836
+ "const": "ha"
3837
+ },
3838
+ {
3839
+ "type": "string",
3840
+ "pattern": "^\\$\\{[A-Za-z_][A-Za-z0-9_]*(?::[-=][^}]*)?\\}$"
3841
+ }
3842
+ ]
3843
+ },
3844
+ "service": {
3845
+ "type": "string"
3846
+ },
3847
+ "target": {
3848
+ "type": "string"
3849
+ },
3850
+ "data": {
3851
+ "type": "object",
3852
+ "additionalProperties": {
3853
+ "description": "任意 JSON 值;由对应服务解释。"
3854
+ }
3855
+ }
3856
+ }
3857
+ },
3858
+ {
3859
+ "type": "null"
3860
+ }
3861
+ ],
3862
+ "description": "未显式指定 notify 时的默认投递目标(M3)"
3863
+ },
3864
+ "notifyOnFailure": {
3865
+ "type": [
3866
+ "boolean",
3867
+ "string"
3868
+ ],
3869
+ "description": "Job 失败时是否通知(默认 false)"
3870
+ }
3871
+ }
3872
+ },
3873
+ "profile": {
3874
+ "type": [
3875
+ "object",
3876
+ "null"
3877
+ ],
3878
+ "additionalProperties": true,
3879
+ "properties": {
3880
+ "enabled": {
3881
+ "type": [
3882
+ "boolean",
3883
+ "string"
3884
+ ],
3885
+ "description": "启用 Profile 覆盖 Bootstrap(默认 false)"
3886
+ },
3887
+ "file": {
3888
+ "type": [
3889
+ "string",
3890
+ "null"
3891
+ ],
3892
+ "description": "相对项目根路径,默认 assistant.profile.yml"
3893
+ }
3894
+ }
3895
+ },
3896
+ "home": {
3897
+ "type": [
3898
+ "object",
3899
+ "null"
3900
+ ],
3901
+ "additionalProperties": true,
3902
+ "properties": {
3903
+ "enabled": {
3904
+ "type": [
3905
+ "boolean",
3906
+ "string"
3907
+ ]
3908
+ },
3909
+ "restUrl": {
3910
+ "type": "string",
3911
+ "description": "HA REST 基址,如 http://homeassistant.local:8123"
3912
+ },
3913
+ "restToken": {
3914
+ "type": "string",
3915
+ "description": "HA 长期访问令牌",
3916
+ "writeOnly": true,
3917
+ "x-zhin-config": {
3918
+ "secret": true
3919
+ }
3920
+ },
3921
+ "mcpServer": {
3922
+ "type": "string",
3923
+ "description": "可选:ai.mcpServers 中的名称(REST 为主,MCP 仅校验)"
3924
+ },
3925
+ "aliases": {
3926
+ "type": [
3927
+ "object",
3928
+ "null"
3929
+ ],
3930
+ "additionalProperties": {
3931
+ "type": "string"
3932
+ },
3933
+ "description": "中文/友好名 → entity_id"
3934
+ },
3935
+ "policy": {
3936
+ "type": [
3937
+ "object",
3938
+ "null"
3939
+ ],
3940
+ "additionalProperties": true,
3941
+ "properties": {
3942
+ "requireMaster": {
3943
+ "type": [
3944
+ "boolean",
3945
+ "string"
3946
+ ],
3947
+ "description": "仅 master 可调用 home_*(默认 true)"
3948
+ },
3949
+ "confirmServices": {
3950
+ "type": [
3951
+ "array",
3952
+ "null"
3953
+ ],
3954
+ "items": {
3955
+ "type": "string"
3956
+ },
3957
+ "description": "写操作需 Owner 审批的 HA domain(默认 lock、alarm_control_panel)"
3958
+ },
3959
+ "allowedServiceDomains": {
3960
+ "type": [
3961
+ "array",
3962
+ "null"
3963
+ ],
3964
+ "items": {
3965
+ "type": "string"
3966
+ },
3967
+ "description": "home_call_service 允许的 domain 白名单(默认 light/climate/scene/cover/script)"
3968
+ }
3969
+ }
3970
+ },
3971
+ "watch": {
3972
+ "type": [
3973
+ "array",
3974
+ "null"
3975
+ ],
3976
+ "items": {
3977
+ "type": "string"
3978
+ },
3979
+ "description": "要通过 HA WebSocket 订阅状态变化的设备别名列表"
3980
+ },
3981
+ "debounceMs": {
3982
+ "type": [
3983
+ "number",
3984
+ "string",
3985
+ "null"
3986
+ ],
3987
+ "description": "同实体状态变化推送的防抖间隔(毫秒,默认 5000)"
3988
+ }
3989
+ }
3990
+ },
3991
+ "events": {
3992
+ "type": [
3993
+ "object",
3994
+ "null"
3995
+ ],
3996
+ "additionalProperties": true,
3997
+ "properties": {
3998
+ "enabled": {
3999
+ "type": [
4000
+ "boolean",
4001
+ "string"
4002
+ ],
4003
+ "description": "启用 POST /api/assistant/events(需 assistant.enabled)"
4004
+ },
4005
+ "token": {
4006
+ "type": "string",
4007
+ "description": "可选专用 Bearer;未设时复用 http.token(路由仍在 /api 下受全局鉴权保护)。",
4008
+ "writeOnly": true,
4009
+ "x-zhin-config": {
4010
+ "secret": true
4011
+ }
4012
+ },
4013
+ "allowedSources": {
4014
+ "type": "array",
4015
+ "items": {
4016
+ "type": "string"
4017
+ },
4018
+ "description": "允许的来源白名单;空数组表示不限制"
4019
+ },
4020
+ "rateLimitPerMinute": {
4021
+ "type": [
4022
+ "number",
4023
+ "string",
4024
+ "null"
4025
+ ],
4026
+ "description": "每来源每分钟最大请求数(默认 60)"
4027
+ }
4028
+ }
4029
+ }
4030
+ }
4031
+ },
4032
+ "log_level": {
4033
+ "type": [
4034
+ "string",
4035
+ "number"
4036
+ ],
4037
+ "description": "Runtime log level.",
4038
+ "x-descriptionZh": "Runtime 日志级别。"
4039
+ },
4040
+ "plugin": {
4041
+ "type": "object",
4042
+ "description": "Root Plugin configuration; replaced by its project schema during composition.",
4043
+ "x-descriptionZh": "Root Plugin 配置;组合时由项目 Schema 替换。"
4044
+ }
371
4045
  },
372
4046
  "$defs": {
373
4047
  "decisionTask": {
374
4048
  "type": "object",
375
4049
  "additionalProperties": false,
376
- "required": ["mode"],
4050
+ "required": [
4051
+ "mode"
4052
+ ],
377
4053
  "properties": {
378
- "mode": { "type": "string", "enum": ["off", "shadow", "active"] },
379
- "timeoutMs": { "type": "integer", "minimum": 1, "maximum": 2147483647 },
380
- "minConfidence": { "type": "number", "minimum": 0, "maximum": 1 },
381
- "topK": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
382
- "maxCandidates": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
383
- "maxSelections": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }
4054
+ "mode": {
4055
+ "type": "string",
4056
+ "enum": [
4057
+ "off",
4058
+ "shadow",
4059
+ "active"
4060
+ ]
4061
+ },
4062
+ "timeoutMs": {
4063
+ "type": "integer",
4064
+ "minimum": 1,
4065
+ "maximum": 2147483647
4066
+ },
4067
+ "minConfidence": {
4068
+ "type": "number",
4069
+ "minimum": 0,
4070
+ "maximum": 1
4071
+ },
4072
+ "topK": {
4073
+ "type": "integer",
4074
+ "minimum": 1,
4075
+ "maximum": 9007199254740991
4076
+ },
4077
+ "maxCandidates": {
4078
+ "type": "integer",
4079
+ "minimum": 1,
4080
+ "maximum": 9007199254740991
4081
+ },
4082
+ "maxSelections": {
4083
+ "type": "integer",
4084
+ "minimum": 1,
4085
+ "maximum": 9007199254740991
4086
+ }
384
4087
  }
385
4088
  }
386
4089
  }