@gakr-gakr/qqbot 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/autobot.plugin.json +700 -47
  2. package/dist/api.js +658 -0
  3. package/dist/channel-B3z48529.js +1102 -0
  4. package/dist/channel-plugin-api.js +2 -0
  5. package/dist/channel.setup-2VZ3Pqqs.js +24 -0
  6. package/dist/config-schema-BxMNWHDm.js +678 -0
  7. package/dist/gateway-DSAGvN9V.js +6495 -0
  8. package/dist/handler-runtime-CfENlXjs.js +118 -0
  9. package/dist/index.js +29 -0
  10. package/dist/outbound-BvICMPYj.js +1326 -0
  11. package/dist/request-context-BsBiCLq-.js +942 -0
  12. package/dist/runtime-CYWTBgFh.js +1992 -0
  13. package/dist/runtime-api.js +2 -0
  14. package/dist/secret-contract-api.js +56 -0
  15. package/dist/setup-entry.js +15 -0
  16. package/dist/setup-plugin-api.js +2 -0
  17. package/dist/string-normalize-DKS36VHd.js +82 -0
  18. package/package.json +17 -4
  19. package/api.ts +0 -56
  20. package/channel-plugin-api.ts +0 -1
  21. package/index.ts +0 -33
  22. package/runtime-api.ts +0 -9
  23. package/secret-contract-api.ts +0 -5
  24. package/setup-entry.ts +0 -13
  25. package/setup-plugin-api.ts +0 -3
  26. package/src/bridge/approval/capability.ts +0 -225
  27. package/src/bridge/approval/handler-runtime.ts +0 -204
  28. package/src/bridge/bootstrap.ts +0 -135
  29. package/src/bridge/channel-entry.ts +0 -18
  30. package/src/bridge/commands/framework-context-adapter.ts +0 -60
  31. package/src/bridge/commands/framework-registration.ts +0 -66
  32. package/src/bridge/commands/from-parser.ts +0 -60
  33. package/src/bridge/commands/result-dispatcher.ts +0 -76
  34. package/src/bridge/config-shared.ts +0 -132
  35. package/src/bridge/config.ts +0 -176
  36. package/src/bridge/gateway.ts +0 -178
  37. package/src/bridge/logger.ts +0 -31
  38. package/src/bridge/narrowing.ts +0 -31
  39. package/src/bridge/plugin-version.ts +0 -102
  40. package/src/bridge/runtime.ts +0 -25
  41. package/src/bridge/sdk-adapter.ts +0 -164
  42. package/src/bridge/setup/finalize.ts +0 -144
  43. package/src/bridge/setup/surface.ts +0 -34
  44. package/src/bridge/tools/channel.ts +0 -58
  45. package/src/bridge/tools/index.ts +0 -15
  46. package/src/bridge/tools/remind.ts +0 -91
  47. package/src/channel.setup.ts +0 -33
  48. package/src/channel.ts +0 -399
  49. package/src/config-schema.ts +0 -84
  50. package/src/engine/access/index.ts +0 -2
  51. package/src/engine/access/resolve-policy.ts +0 -30
  52. package/src/engine/access/sender-match.ts +0 -55
  53. package/src/engine/access/types.ts +0 -2
  54. package/src/engine/adapter/audio.port.ts +0 -27
  55. package/src/engine/adapter/commands.port.ts +0 -22
  56. package/src/engine/adapter/history.port.ts +0 -52
  57. package/src/engine/adapter/index.ts +0 -76
  58. package/src/engine/adapter/mention-gate.port.ts +0 -50
  59. package/src/engine/adapter/types.ts +0 -38
  60. package/src/engine/api/api-client.ts +0 -212
  61. package/src/engine/api/media-chunked.ts +0 -644
  62. package/src/engine/api/media.ts +0 -218
  63. package/src/engine/api/messages.ts +0 -293
  64. package/src/engine/api/retry.ts +0 -217
  65. package/src/engine/api/routes.ts +0 -95
  66. package/src/engine/api/token.ts +0 -277
  67. package/src/engine/approval/index.ts +0 -224
  68. package/src/engine/commands/builtin/log-helpers.ts +0 -341
  69. package/src/engine/commands/builtin/register-all.ts +0 -17
  70. package/src/engine/commands/builtin/register-approve.ts +0 -201
  71. package/src/engine/commands/builtin/register-basic.ts +0 -95
  72. package/src/engine/commands/builtin/register-clear-storage.ts +0 -187
  73. package/src/engine/commands/builtin/register-logs.ts +0 -20
  74. package/src/engine/commands/builtin/register-streaming.ts +0 -138
  75. package/src/engine/commands/builtin/state.ts +0 -31
  76. package/src/engine/commands/slash-command-auth.ts +0 -88
  77. package/src/engine/commands/slash-command-handler.ts +0 -168
  78. package/src/engine/commands/slash-command-test-support.ts +0 -39
  79. package/src/engine/commands/slash-commands-impl.ts +0 -61
  80. package/src/engine/commands/slash-commands.ts +0 -202
  81. package/src/engine/config/credential-backup.ts +0 -108
  82. package/src/engine/config/credentials.ts +0 -76
  83. package/src/engine/config/group.ts +0 -227
  84. package/src/engine/config/resolve.ts +0 -283
  85. package/src/engine/config/setup-logic.ts +0 -84
  86. package/src/engine/gateway/active-cfg.ts +0 -52
  87. package/src/engine/gateway/codec.ts +0 -47
  88. package/src/engine/gateway/constants.ts +0 -117
  89. package/src/engine/gateway/event-dispatcher.ts +0 -177
  90. package/src/engine/gateway/gateway-connection.ts +0 -356
  91. package/src/engine/gateway/gateway.ts +0 -267
  92. package/src/engine/gateway/inbound-attachments.ts +0 -360
  93. package/src/engine/gateway/inbound-context.ts +0 -82
  94. package/src/engine/gateway/inbound-pipeline.ts +0 -171
  95. package/src/engine/gateway/interaction-handler.ts +0 -345
  96. package/src/engine/gateway/message-queue.ts +0 -404
  97. package/src/engine/gateway/outbound-dispatch.ts +0 -590
  98. package/src/engine/gateway/reconnect.ts +0 -199
  99. package/src/engine/gateway/stages/access-stage.ts +0 -99
  100. package/src/engine/gateway/stages/assembly-stage.ts +0 -156
  101. package/src/engine/gateway/stages/content-stage.ts +0 -77
  102. package/src/engine/gateway/stages/envelope-stage.ts +0 -144
  103. package/src/engine/gateway/stages/group-gate-stage.ts +0 -223
  104. package/src/engine/gateway/stages/index.ts +0 -18
  105. package/src/engine/gateway/stages/quote-stage.ts +0 -113
  106. package/src/engine/gateway/stages/refidx-stage.ts +0 -62
  107. package/src/engine/gateway/stages/stub-contexts.ts +0 -77
  108. package/src/engine/gateway/types.ts +0 -230
  109. package/src/engine/gateway/typing-keepalive.ts +0 -102
  110. package/src/engine/gateway/ws-client.ts +0 -16
  111. package/src/engine/group/activation.ts +0 -88
  112. package/src/engine/group/history.ts +0 -321
  113. package/src/engine/group/mention.ts +0 -114
  114. package/src/engine/group/message-gating.ts +0 -108
  115. package/src/engine/messaging/decode-media-path.ts +0 -82
  116. package/src/engine/messaging/media-source.ts +0 -210
  117. package/src/engine/messaging/media-type-detect.ts +0 -27
  118. package/src/engine/messaging/outbound-audio-port.ts +0 -38
  119. package/src/engine/messaging/outbound-deliver.ts +0 -810
  120. package/src/engine/messaging/outbound-media-send.ts +0 -658
  121. package/src/engine/messaging/outbound-reply.ts +0 -27
  122. package/src/engine/messaging/outbound-result-helpers.ts +0 -54
  123. package/src/engine/messaging/outbound-types.ts +0 -47
  124. package/src/engine/messaging/outbound.ts +0 -485
  125. package/src/engine/messaging/reply-dispatcher.ts +0 -597
  126. package/src/engine/messaging/reply-limiter.ts +0 -164
  127. package/src/engine/messaging/sender.ts +0 -741
  128. package/src/engine/messaging/streaming-c2c.ts +0 -1192
  129. package/src/engine/messaging/streaming-media-send.ts +0 -544
  130. package/src/engine/messaging/target-parser.ts +0 -104
  131. package/src/engine/ref/format-message-ref.ts +0 -142
  132. package/src/engine/ref/format-ref-entry.ts +0 -27
  133. package/src/engine/ref/store.ts +0 -211
  134. package/src/engine/ref/types.ts +0 -27
  135. package/src/engine/session/known-users.ts +0 -138
  136. package/src/engine/session/session-store.ts +0 -207
  137. package/src/engine/tools/channel-api.ts +0 -244
  138. package/src/engine/tools/remind-logic.ts +0 -377
  139. package/src/engine/types.ts +0 -313
  140. package/src/engine/utils/attachment-tags.ts +0 -174
  141. package/src/engine/utils/audio.ts +0 -525
  142. package/src/engine/utils/data-paths.ts +0 -38
  143. package/src/engine/utils/diagnostics.ts +0 -93
  144. package/src/engine/utils/file-utils.ts +0 -215
  145. package/src/engine/utils/format.ts +0 -70
  146. package/src/engine/utils/image-size.ts +0 -249
  147. package/src/engine/utils/log.ts +0 -77
  148. package/src/engine/utils/media-tags.ts +0 -177
  149. package/src/engine/utils/payload.ts +0 -157
  150. package/src/engine/utils/platform.ts +0 -265
  151. package/src/engine/utils/request-context.ts +0 -60
  152. package/src/engine/utils/string-normalize.ts +0 -91
  153. package/src/engine/utils/stt.ts +0 -103
  154. package/src/engine/utils/text-parsing.ts +0 -155
  155. package/src/engine/utils/upload-cache.ts +0 -96
  156. package/src/engine/utils/voice-text.ts +0 -15
  157. package/src/exec-approvals.ts +0 -237
  158. package/src/qqbot-test-support.ts +0 -29
  159. package/src/secret-contract.ts +0 -82
  160. package/src/types.ts +0 -210
  161. package/tsconfig.json +0 -16
@@ -3,15 +3,25 @@
3
3
  "activation": {
4
4
  "onStartup": false
5
5
  },
6
- "channels": ["qqbot"],
6
+ "channels": [
7
+ "qqbot"
8
+ ],
7
9
  "contracts": {
8
- "tools": ["qqbot_channel_api", "qqbot_remind"]
10
+ "tools": [
11
+ "qqbot_channel_api",
12
+ "qqbot_remind"
13
+ ]
9
14
  },
10
15
  "channelEnvVars": {
11
- "qqbot": ["QQBOT_APP_ID", "QQBOT_CLIENT_SECRET"]
16
+ "qqbot": [
17
+ "QQBOT_APP_ID",
18
+ "QQBOT_CLIENT_SECRET"
19
+ ]
12
20
  },
13
21
  "enabledByDefault": true,
14
- "skills": ["./skills"],
22
+ "skills": [
23
+ "./skills"
24
+ ],
15
25
  "configSchema": {
16
26
  "type": "object",
17
27
  "additionalProperties": true,
@@ -22,24 +32,40 @@
22
32
  "properties": {
23
33
  "sttDirectFormats": {
24
34
  "type": "array",
25
- "items": { "type": "string" }
35
+ "items": {
36
+ "type": "string"
37
+ }
26
38
  },
27
39
  "uploadDirectFormats": {
28
40
  "type": "array",
29
- "items": { "type": "string" }
41
+ "items": {
42
+ "type": "string"
43
+ }
30
44
  },
31
- "transcodeEnabled": { "type": "boolean" }
45
+ "transcodeEnabled": {
46
+ "type": "boolean"
47
+ }
32
48
  }
33
49
  },
34
50
  "stt": {
35
51
  "type": "object",
36
52
  "additionalProperties": false,
37
53
  "properties": {
38
- "enabled": { "type": "boolean" },
39
- "provider": { "type": "string" },
40
- "baseUrl": { "type": "string" },
41
- "apiKey": { "type": "string" },
42
- "model": { "type": "string" }
54
+ "enabled": {
55
+ "type": "boolean"
56
+ },
57
+ "provider": {
58
+ "type": "string"
59
+ },
60
+ "baseUrl": {
61
+ "type": "string"
62
+ },
63
+ "apiKey": {
64
+ "type": "string"
65
+ },
66
+ "model": {
67
+ "type": "string"
68
+ }
43
69
  }
44
70
  },
45
71
  "secretRef": {
@@ -48,41 +74,88 @@
48
74
  "properties": {
49
75
  "source": {
50
76
  "type": "string",
51
- "enum": ["env", "file", "exec"]
77
+ "enum": [
78
+ "env",
79
+ "file",
80
+ "exec"
81
+ ]
52
82
  },
53
- "provider": { "type": "string" },
54
- "id": { "type": "string" }
83
+ "provider": {
84
+ "type": "string"
85
+ },
86
+ "id": {
87
+ "type": "string"
88
+ }
55
89
  },
56
- "required": ["source", "provider", "id"]
90
+ "required": [
91
+ "source",
92
+ "provider",
93
+ "id"
94
+ ]
57
95
  },
58
96
  "secretInput": {
59
- "anyOf": [{ "type": "string", "minLength": 1 }, { "$ref": "#/$defs/secretRef" }]
97
+ "anyOf": [
98
+ {
99
+ "type": "string",
100
+ "minLength": 1
101
+ },
102
+ {
103
+ "$ref": "#/$defs/secretRef"
104
+ }
105
+ ]
60
106
  },
61
107
  "account": {
62
108
  "type": "object",
63
109
  "additionalProperties": true,
64
110
  "properties": {
65
- "enabled": { "type": "boolean" },
66
- "name": { "type": "string" },
67
- "appId": { "type": "string" },
68
- "clientSecret": { "$ref": "#/$defs/secretInput" },
69
- "clientSecretFile": { "type": "string" },
111
+ "enabled": {
112
+ "type": "boolean"
113
+ },
114
+ "name": {
115
+ "type": "string"
116
+ },
117
+ "appId": {
118
+ "type": "string"
119
+ },
120
+ "clientSecret": {
121
+ "$ref": "#/$defs/secretInput"
122
+ },
123
+ "clientSecretFile": {
124
+ "type": "string"
125
+ },
70
126
  "allowFrom": {
71
127
  "type": "array",
72
- "items": { "type": "string" }
128
+ "items": {
129
+ "type": "string"
130
+ }
131
+ },
132
+ "systemPrompt": {
133
+ "type": "string"
134
+ },
135
+ "markdownSupport": {
136
+ "type": "boolean"
73
137
  },
74
- "systemPrompt": { "type": "string" },
75
- "markdownSupport": { "type": "boolean" },
76
138
  "voiceDirectUploadFormats": {
77
139
  "type": "array",
78
- "items": { "type": "string" }
140
+ "items": {
141
+ "type": "string"
142
+ }
143
+ },
144
+ "audioFormatPolicy": {
145
+ "$ref": "#/$defs/audioFormatPolicy"
146
+ },
147
+ "urlDirectUpload": {
148
+ "type": "boolean"
149
+ },
150
+ "upgradeUrl": {
151
+ "type": "string"
79
152
  },
80
- "audioFormatPolicy": { "$ref": "#/$defs/audioFormatPolicy" },
81
- "urlDirectUpload": { "type": "boolean" },
82
- "upgradeUrl": { "type": "string" },
83
153
  "upgradeMode": {
84
154
  "type": "string",
85
- "enum": ["doc", "hot-reload"]
155
+ "enum": [
156
+ "doc",
157
+ "hot-reload"
158
+ ]
86
159
  },
87
160
  "streaming": {
88
161
  "anyOf": [
@@ -95,7 +168,10 @@
95
168
  "properties": {
96
169
  "mode": {
97
170
  "type": "string",
98
- "enum": ["off", "partial"],
171
+ "enum": [
172
+ "off",
173
+ "partial"
174
+ ],
99
175
  "default": "partial"
100
176
  },
101
177
  "c2cStreamApi": {
@@ -110,28 +186,57 @@
110
186
  }
111
187
  },
112
188
  "properties": {
113
- "enabled": { "type": "boolean" },
114
- "name": { "type": "string" },
115
- "appId": { "type": "string" },
116
- "clientSecret": { "$ref": "#/$defs/secretInput" },
117
- "clientSecretFile": { "type": "string" },
189
+ "enabled": {
190
+ "type": "boolean"
191
+ },
192
+ "name": {
193
+ "type": "string"
194
+ },
195
+ "appId": {
196
+ "type": "string"
197
+ },
198
+ "clientSecret": {
199
+ "$ref": "#/$defs/secretInput"
200
+ },
201
+ "clientSecretFile": {
202
+ "type": "string"
203
+ },
118
204
  "allowFrom": {
119
205
  "type": "array",
120
- "items": { "type": "string" }
206
+ "items": {
207
+ "type": "string"
208
+ }
209
+ },
210
+ "systemPrompt": {
211
+ "type": "string"
212
+ },
213
+ "markdownSupport": {
214
+ "type": "boolean"
121
215
  },
122
- "systemPrompt": { "type": "string" },
123
- "markdownSupport": { "type": "boolean" },
124
216
  "voiceDirectUploadFormats": {
125
217
  "type": "array",
126
- "items": { "type": "string" }
218
+ "items": {
219
+ "type": "string"
220
+ }
221
+ },
222
+ "audioFormatPolicy": {
223
+ "$ref": "#/$defs/audioFormatPolicy"
224
+ },
225
+ "stt": {
226
+ "$ref": "#/$defs/stt"
227
+ },
228
+ "urlDirectUpload": {
229
+ "type": "boolean"
230
+ },
231
+ "upgradeUrl": {
232
+ "type": "string"
127
233
  },
128
- "audioFormatPolicy": { "$ref": "#/$defs/audioFormatPolicy" },
129
- "stt": { "$ref": "#/$defs/stt" },
130
- "urlDirectUpload": { "type": "boolean" },
131
- "upgradeUrl": { "type": "string" },
132
234
  "upgradeMode": {
133
235
  "type": "string",
134
- "enum": ["doc", "hot-reload"]
236
+ "enum": [
237
+ "doc",
238
+ "hot-reload"
239
+ ]
135
240
  },
136
241
  "streaming": {
137
242
  "anyOf": [
@@ -144,7 +249,10 @@
144
249
  "properties": {
145
250
  "mode": {
146
251
  "type": "string",
147
- "enum": ["off", "partial"],
252
+ "enum": [
253
+ "off",
254
+ "partial"
255
+ ],
148
256
  "default": "partial"
149
257
  },
150
258
  "c2cStreamApi": {
@@ -161,7 +269,552 @@
161
269
  "$ref": "#/$defs/account"
162
270
  }
163
271
  },
164
- "defaultAccount": { "type": "string" }
272
+ "defaultAccount": {
273
+ "type": "string"
274
+ }
275
+ }
276
+ },
277
+ "channelConfigs": {
278
+ "qqbot": {
279
+ "schema": {
280
+ "$schema": "http://json-schema.org/draft-07/schema#",
281
+ "type": "object",
282
+ "properties": {
283
+ "enabled": {
284
+ "type": "boolean"
285
+ },
286
+ "name": {
287
+ "type": "string"
288
+ },
289
+ "appId": {
290
+ "type": "string"
291
+ },
292
+ "clientSecret": {
293
+ "anyOf": [
294
+ {
295
+ "type": "string"
296
+ },
297
+ {
298
+ "oneOf": [
299
+ {
300
+ "type": "object",
301
+ "properties": {
302
+ "source": {
303
+ "type": "string",
304
+ "const": "env"
305
+ },
306
+ "provider": {
307
+ "type": "string",
308
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
309
+ },
310
+ "id": {
311
+ "type": "string",
312
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
313
+ }
314
+ },
315
+ "required": [
316
+ "source",
317
+ "provider",
318
+ "id"
319
+ ],
320
+ "additionalProperties": false
321
+ },
322
+ {
323
+ "type": "object",
324
+ "properties": {
325
+ "source": {
326
+ "type": "string",
327
+ "const": "file"
328
+ },
329
+ "provider": {
330
+ "type": "string",
331
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
332
+ },
333
+ "id": {
334
+ "type": "string"
335
+ }
336
+ },
337
+ "required": [
338
+ "source",
339
+ "provider",
340
+ "id"
341
+ ],
342
+ "additionalProperties": false
343
+ },
344
+ {
345
+ "type": "object",
346
+ "properties": {
347
+ "source": {
348
+ "type": "string",
349
+ "const": "exec"
350
+ },
351
+ "provider": {
352
+ "type": "string",
353
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
354
+ },
355
+ "id": {
356
+ "type": "string"
357
+ }
358
+ },
359
+ "required": [
360
+ "source",
361
+ "provider",
362
+ "id"
363
+ ],
364
+ "additionalProperties": false
365
+ }
366
+ ]
367
+ }
368
+ ]
369
+ },
370
+ "clientSecretFile": {
371
+ "type": "string"
372
+ },
373
+ "allowFrom": {
374
+ "type": "array",
375
+ "items": {
376
+ "anyOf": [
377
+ {
378
+ "type": "string"
379
+ },
380
+ {
381
+ "type": "number"
382
+ }
383
+ ]
384
+ }
385
+ },
386
+ "groupAllowFrom": {
387
+ "type": "array",
388
+ "items": {
389
+ "anyOf": [
390
+ {
391
+ "type": "string"
392
+ },
393
+ {
394
+ "type": "number"
395
+ }
396
+ ]
397
+ }
398
+ },
399
+ "dmPolicy": {
400
+ "type": "string",
401
+ "enum": [
402
+ "open",
403
+ "allowlist",
404
+ "disabled"
405
+ ]
406
+ },
407
+ "groupPolicy": {
408
+ "type": "string",
409
+ "enum": [
410
+ "open",
411
+ "allowlist",
412
+ "disabled"
413
+ ]
414
+ },
415
+ "systemPrompt": {
416
+ "type": "string"
417
+ },
418
+ "markdownSupport": {
419
+ "type": "boolean"
420
+ },
421
+ "voiceDirectUploadFormats": {
422
+ "type": "array",
423
+ "items": {
424
+ "type": "string"
425
+ }
426
+ },
427
+ "audioFormatPolicy": {
428
+ "type": "object",
429
+ "properties": {
430
+ "sttDirectFormats": {
431
+ "type": "array",
432
+ "items": {
433
+ "type": "string"
434
+ }
435
+ },
436
+ "uploadDirectFormats": {
437
+ "type": "array",
438
+ "items": {
439
+ "type": "string"
440
+ }
441
+ },
442
+ "transcodeEnabled": {
443
+ "type": "boolean"
444
+ }
445
+ },
446
+ "additionalProperties": false
447
+ },
448
+ "urlDirectUpload": {
449
+ "type": "boolean"
450
+ },
451
+ "upgradeUrl": {
452
+ "type": "string"
453
+ },
454
+ "upgradeMode": {
455
+ "type": "string",
456
+ "enum": [
457
+ "doc",
458
+ "hot-reload"
459
+ ]
460
+ },
461
+ "streaming": {
462
+ "anyOf": [
463
+ {
464
+ "type": "boolean"
465
+ },
466
+ {
467
+ "type": "object",
468
+ "properties": {
469
+ "mode": {
470
+ "default": "partial",
471
+ "type": "string",
472
+ "enum": [
473
+ "off",
474
+ "partial"
475
+ ]
476
+ },
477
+ "c2cStreamApi": {
478
+ "type": "boolean"
479
+ }
480
+ },
481
+ "required": [
482
+ "mode"
483
+ ],
484
+ "additionalProperties": {}
485
+ }
486
+ ]
487
+ },
488
+ "execApprovals": {
489
+ "type": "object",
490
+ "properties": {
491
+ "enabled": {
492
+ "anyOf": [
493
+ {
494
+ "type": "boolean"
495
+ },
496
+ {
497
+ "type": "string",
498
+ "const": "auto"
499
+ }
500
+ ]
501
+ },
502
+ "approvers": {
503
+ "type": "array",
504
+ "items": {
505
+ "type": "string"
506
+ }
507
+ },
508
+ "agentFilter": {
509
+ "type": "array",
510
+ "items": {
511
+ "type": "string"
512
+ }
513
+ },
514
+ "sessionFilter": {
515
+ "type": "array",
516
+ "items": {
517
+ "type": "string"
518
+ }
519
+ },
520
+ "target": {
521
+ "type": "string",
522
+ "enum": [
523
+ "dm",
524
+ "channel",
525
+ "both"
526
+ ]
527
+ }
528
+ },
529
+ "additionalProperties": false
530
+ },
531
+ "stt": {
532
+ "type": "object",
533
+ "properties": {
534
+ "enabled": {
535
+ "type": "boolean"
536
+ },
537
+ "provider": {
538
+ "type": "string"
539
+ },
540
+ "baseUrl": {
541
+ "type": "string"
542
+ },
543
+ "apiKey": {
544
+ "type": "string"
545
+ },
546
+ "model": {
547
+ "type": "string"
548
+ }
549
+ },
550
+ "additionalProperties": false
551
+ },
552
+ "accounts": {
553
+ "type": "object",
554
+ "properties": {},
555
+ "additionalProperties": {
556
+ "type": "object",
557
+ "properties": {
558
+ "enabled": {
559
+ "type": "boolean"
560
+ },
561
+ "name": {
562
+ "type": "string"
563
+ },
564
+ "appId": {
565
+ "type": "string"
566
+ },
567
+ "clientSecret": {
568
+ "anyOf": [
569
+ {
570
+ "type": "string"
571
+ },
572
+ {
573
+ "oneOf": [
574
+ {
575
+ "type": "object",
576
+ "properties": {
577
+ "source": {
578
+ "type": "string",
579
+ "const": "env"
580
+ },
581
+ "provider": {
582
+ "type": "string",
583
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
584
+ },
585
+ "id": {
586
+ "type": "string",
587
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
588
+ }
589
+ },
590
+ "required": [
591
+ "source",
592
+ "provider",
593
+ "id"
594
+ ],
595
+ "additionalProperties": false
596
+ },
597
+ {
598
+ "type": "object",
599
+ "properties": {
600
+ "source": {
601
+ "type": "string",
602
+ "const": "file"
603
+ },
604
+ "provider": {
605
+ "type": "string",
606
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
607
+ },
608
+ "id": {
609
+ "type": "string"
610
+ }
611
+ },
612
+ "required": [
613
+ "source",
614
+ "provider",
615
+ "id"
616
+ ],
617
+ "additionalProperties": false
618
+ },
619
+ {
620
+ "type": "object",
621
+ "properties": {
622
+ "source": {
623
+ "type": "string",
624
+ "const": "exec"
625
+ },
626
+ "provider": {
627
+ "type": "string",
628
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
629
+ },
630
+ "id": {
631
+ "type": "string"
632
+ }
633
+ },
634
+ "required": [
635
+ "source",
636
+ "provider",
637
+ "id"
638
+ ],
639
+ "additionalProperties": false
640
+ }
641
+ ]
642
+ }
643
+ ]
644
+ },
645
+ "clientSecretFile": {
646
+ "type": "string"
647
+ },
648
+ "allowFrom": {
649
+ "type": "array",
650
+ "items": {
651
+ "anyOf": [
652
+ {
653
+ "type": "string"
654
+ },
655
+ {
656
+ "type": "number"
657
+ }
658
+ ]
659
+ }
660
+ },
661
+ "groupAllowFrom": {
662
+ "type": "array",
663
+ "items": {
664
+ "anyOf": [
665
+ {
666
+ "type": "string"
667
+ },
668
+ {
669
+ "type": "number"
670
+ }
671
+ ]
672
+ }
673
+ },
674
+ "dmPolicy": {
675
+ "type": "string",
676
+ "enum": [
677
+ "open",
678
+ "allowlist",
679
+ "disabled"
680
+ ]
681
+ },
682
+ "groupPolicy": {
683
+ "type": "string",
684
+ "enum": [
685
+ "open",
686
+ "allowlist",
687
+ "disabled"
688
+ ]
689
+ },
690
+ "systemPrompt": {
691
+ "type": "string"
692
+ },
693
+ "markdownSupport": {
694
+ "type": "boolean"
695
+ },
696
+ "voiceDirectUploadFormats": {
697
+ "type": "array",
698
+ "items": {
699
+ "type": "string"
700
+ }
701
+ },
702
+ "audioFormatPolicy": {
703
+ "type": "object",
704
+ "properties": {
705
+ "sttDirectFormats": {
706
+ "type": "array",
707
+ "items": {
708
+ "type": "string"
709
+ }
710
+ },
711
+ "uploadDirectFormats": {
712
+ "type": "array",
713
+ "items": {
714
+ "type": "string"
715
+ }
716
+ },
717
+ "transcodeEnabled": {
718
+ "type": "boolean"
719
+ }
720
+ },
721
+ "additionalProperties": false
722
+ },
723
+ "urlDirectUpload": {
724
+ "type": "boolean"
725
+ },
726
+ "upgradeUrl": {
727
+ "type": "string"
728
+ },
729
+ "upgradeMode": {
730
+ "type": "string",
731
+ "enum": [
732
+ "doc",
733
+ "hot-reload"
734
+ ]
735
+ },
736
+ "streaming": {
737
+ "anyOf": [
738
+ {
739
+ "type": "boolean"
740
+ },
741
+ {
742
+ "type": "object",
743
+ "properties": {
744
+ "mode": {
745
+ "default": "partial",
746
+ "type": "string",
747
+ "enum": [
748
+ "off",
749
+ "partial"
750
+ ]
751
+ },
752
+ "c2cStreamApi": {
753
+ "type": "boolean"
754
+ }
755
+ },
756
+ "required": [
757
+ "mode"
758
+ ],
759
+ "additionalProperties": {}
760
+ }
761
+ ]
762
+ },
763
+ "execApprovals": {
764
+ "type": "object",
765
+ "properties": {
766
+ "enabled": {
767
+ "anyOf": [
768
+ {
769
+ "type": "boolean"
770
+ },
771
+ {
772
+ "type": "string",
773
+ "const": "auto"
774
+ }
775
+ ]
776
+ },
777
+ "approvers": {
778
+ "type": "array",
779
+ "items": {
780
+ "type": "string"
781
+ }
782
+ },
783
+ "agentFilter": {
784
+ "type": "array",
785
+ "items": {
786
+ "type": "string"
787
+ }
788
+ },
789
+ "sessionFilter": {
790
+ "type": "array",
791
+ "items": {
792
+ "type": "string"
793
+ }
794
+ },
795
+ "target": {
796
+ "type": "string",
797
+ "enum": [
798
+ "dm",
799
+ "channel",
800
+ "both"
801
+ ]
802
+ }
803
+ },
804
+ "additionalProperties": false
805
+ }
806
+ },
807
+ "additionalProperties": {}
808
+ }
809
+ },
810
+ "defaultAccount": {
811
+ "type": "string"
812
+ }
813
+ },
814
+ "additionalProperties": {}
815
+ },
816
+ "label": "QQ Bot",
817
+ "description": "connect to QQ via official QQ Bot API with group chat and direct message support."
165
818
  }
166
819
  }
167
820
  }