@aspalagin/openclaw-max 0.7.3 → 0.8.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 (85) hide show
  1. package/LICENSE +2 -0
  2. package/README.md +412 -344
  3. package/README_EN.md +492 -0
  4. package/SKILL.md +45 -37
  5. package/assets/icon.png +0 -0
  6. package/dist/secret-contract-api.js +6 -0
  7. package/dist/src/access-policy.js +123 -0
  8. package/dist/src/accounts.js +170 -23
  9. package/dist/src/action-scope.js +213 -0
  10. package/dist/src/actions.js +159 -31
  11. package/dist/src/api.js +99 -83
  12. package/dist/src/callbacks.js +27 -7
  13. package/dist/src/channel-agent-prompt.js +8 -19
  14. package/dist/src/channel-config.js +25 -3
  15. package/dist/src/channel-lifecycle.js +28 -5
  16. package/dist/src/channel-outbound.js +43 -9
  17. package/dist/src/channel-policy.js +19 -6
  18. package/dist/src/channel.js +16 -0
  19. package/dist/src/command-menu.js +199 -0
  20. package/dist/src/config-schema.js +106 -10
  21. package/dist/src/deliver.js +144 -48
  22. package/dist/src/dispatch.js +12 -11
  23. package/dist/src/gateway-drain.js +40 -0
  24. package/dist/src/group-mention.js +129 -0
  25. package/dist/src/inbound-attachments.js +162 -20
  26. package/dist/src/inbound.js +388 -134
  27. package/dist/src/media-temp.js +31 -20
  28. package/dist/src/network.js +216 -0
  29. package/dist/src/onboarding.js +4 -2
  30. package/dist/src/polling.js +180 -12
  31. package/dist/src/presentation.js +11 -0
  32. package/dist/src/progress-draft.js +168 -0
  33. package/dist/src/runtime.js +15 -0
  34. package/dist/src/secret-contract.js +149 -0
  35. package/dist/src/send.js +250 -46
  36. package/dist/src/stream-draft.js +83 -41
  37. package/dist/src/turn-adoption.js +24 -0
  38. package/dist/src/typing.js +55 -0
  39. package/dist/src/update-journal.js +267 -0
  40. package/dist/src/webhook-queue.js +151 -26
  41. package/dist/src/webhook-runner.js +61 -9
  42. package/dist/src/webhook.js +34 -15
  43. package/openclaw.plugin.json +983 -8
  44. package/package.json +17 -4
  45. package/src/access-policy.ts +154 -0
  46. package/src/accounts.ts +260 -25
  47. package/src/action-scope.ts +274 -0
  48. package/src/actions.ts +188 -35
  49. package/src/api.ts +158 -101
  50. package/src/callbacks.ts +26 -7
  51. package/src/channel-agent-prompt.ts +8 -19
  52. package/src/channel-config.ts +32 -3
  53. package/src/channel-lifecycle.ts +33 -6
  54. package/src/channel-outbound.ts +50 -7
  55. package/src/channel-policy.ts +27 -7
  56. package/src/channel.ts +16 -0
  57. package/src/command-menu.ts +277 -0
  58. package/src/config-schema.ts +111 -10
  59. package/src/deliver.ts +174 -55
  60. package/src/dispatch.ts +12 -11
  61. package/src/gateway-drain.ts +45 -0
  62. package/src/group-mention.ts +191 -0
  63. package/src/inbound-attachments.ts +173 -22
  64. package/src/inbound.ts +443 -130
  65. package/src/media-temp.ts +35 -23
  66. package/src/network.ts +233 -0
  67. package/src/onboarding.ts +4 -2
  68. package/src/polling.ts +221 -15
  69. package/src/presentation.ts +14 -1
  70. package/src/progress-draft.ts +226 -0
  71. package/src/runtime.ts +23 -0
  72. package/src/secret-contract.ts +183 -0
  73. package/src/send.ts +346 -59
  74. package/src/stream-draft.ts +102 -41
  75. package/src/turn-adoption.ts +33 -0
  76. package/src/types.ts +9 -3
  77. package/src/typing.ts +77 -0
  78. package/src/update-journal.ts +302 -0
  79. package/src/webhook-queue.ts +205 -33
  80. package/src/webhook-runner.ts +65 -8
  81. package/src/webhook.ts +39 -18
  82. package/scripts/check-cycles.mjs +0 -38
  83. package/scripts/test-api.mjs +0 -169
  84. package/scripts/test-send.mjs +0 -162
  85. package/scripts/update-schema.mjs +0 -48
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "id": "openclaw-max",
3
3
  "name": "MAX",
4
- "description": "MAX messenger channel plugin (max.ru Bot API via platform-api2.max.ru, long polling or webhook)",
5
- "version": "0.7.3",
4
+ "description": "MAX messenger (max.ru) channel for OpenClaw: private and group chats over webhook or long polling; media, voice messages with transcription and voice replies; inline keyboards and command menus; message edits and pins; several bot accounts",
5
+ "version": "0.8.1",
6
6
  "categories": [
7
7
  "channels"
8
8
  ],
@@ -51,6 +51,10 @@
51
51
  },
52
52
  "systemPrompt": {
53
53
  "type": "string"
54
+ },
55
+ "disableAudioPreflight": {
56
+ "type": "boolean",
57
+ "description": "Do not transcribe a captionless voice message to look for a configured mention pattern in this group."
54
58
  }
55
59
  },
56
60
  "additionalProperties": false
@@ -68,7 +72,106 @@
68
72
  "type": "object"
69
73
  },
70
74
  "botToken": {
71
- "type": "string"
75
+ "anyOf": [
76
+ {
77
+ "type": "string"
78
+ },
79
+ {
80
+ "oneOf": [
81
+ {
82
+ "type": "object",
83
+ "properties": {
84
+ "source": {
85
+ "type": "string",
86
+ "const": "env"
87
+ },
88
+ "provider": {
89
+ "type": "string",
90
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
91
+ },
92
+ "id": {
93
+ "type": "string",
94
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
95
+ }
96
+ },
97
+ "required": [
98
+ "source",
99
+ "provider",
100
+ "id"
101
+ ],
102
+ "additionalProperties": false
103
+ },
104
+ {
105
+ "type": "object",
106
+ "properties": {
107
+ "source": {
108
+ "type": "string",
109
+ "const": "store"
110
+ },
111
+ "provider": {
112
+ "type": "string",
113
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
114
+ },
115
+ "id": {
116
+ "type": "string",
117
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
118
+ }
119
+ },
120
+ "required": [
121
+ "source",
122
+ "provider",
123
+ "id"
124
+ ],
125
+ "additionalProperties": false
126
+ },
127
+ {
128
+ "type": "object",
129
+ "properties": {
130
+ "source": {
131
+ "type": "string",
132
+ "const": "file"
133
+ },
134
+ "provider": {
135
+ "type": "string",
136
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
137
+ },
138
+ "id": {
139
+ "type": "string"
140
+ }
141
+ },
142
+ "required": [
143
+ "source",
144
+ "provider",
145
+ "id"
146
+ ],
147
+ "additionalProperties": false
148
+ },
149
+ {
150
+ "type": "object",
151
+ "properties": {
152
+ "source": {
153
+ "type": "string",
154
+ "const": "exec"
155
+ },
156
+ "provider": {
157
+ "type": "string",
158
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
159
+ },
160
+ "id": {
161
+ "type": "string"
162
+ }
163
+ },
164
+ "required": [
165
+ "source",
166
+ "provider",
167
+ "id"
168
+ ],
169
+ "additionalProperties": false
170
+ }
171
+ ]
172
+ }
173
+ ],
174
+ "description": "MAX Bot API token, or a SecretRef to it ({ source: env|file|exec|store, provider, id }) resolved by the gateway before the account starts. Alternatives: tokenFile, MAX_BOT_TOKEN (default account)."
72
175
  },
73
176
  "tokenFile": {
74
177
  "type": "string"
@@ -81,7 +184,7 @@
81
184
  "open",
82
185
  "disabled"
83
186
  ],
84
- "default": "pairing"
187
+ "description": "Who may message the bot in direct chats (default pairing). Named accounts inherit the channel-level value."
85
188
  },
86
189
  "allowFrom": {
87
190
  "$ref": "#/definitions/allowList"
@@ -96,7 +199,7 @@
96
199
  "open",
97
200
  "disabled"
98
201
  ],
99
- "default": "allowlist"
202
+ "description": "Which group chats the bot answers in (default allowlist: only chats listed in groups). Named accounts inherit the channel-level value."
100
203
  },
101
204
  "groups": {
102
205
  "type": "object",
@@ -104,6 +207,32 @@
104
207
  "$ref": "#/definitions/groupConfig"
105
208
  }
106
209
  },
210
+ "mentionPatterns": {
211
+ "type": "object",
212
+ "properties": {
213
+ "mode": {
214
+ "type": "string",
215
+ "enum": [
216
+ "allow",
217
+ "deny"
218
+ ]
219
+ },
220
+ "allowIn": {
221
+ "type": "array",
222
+ "items": {
223
+ "type": "string"
224
+ }
225
+ },
226
+ "denyIn": {
227
+ "type": "array",
228
+ "items": {
229
+ "type": "string"
230
+ }
231
+ }
232
+ },
233
+ "additionalProperties": false,
234
+ "description": "Where core mention patterns (messages.groupChat / agent groupChat mentionPatterns) apply in MAX groups: mode allow (default) or deny, with allowIn / denyIn group chat ids."
235
+ },
107
236
  "transport": {
108
237
  "type": "string",
109
238
  "enum": [
@@ -117,8 +246,106 @@
117
246
  "description": "Public HTTPS URL (port 443, trusted CA) MAX posts updates to; its path is served on the gateway HTTP server."
118
247
  },
119
248
  "webhookSecret": {
120
- "type": "string",
121
- "description": "X-Max-Bot-Api-Secret value, 5-256 of A-Z a-z 0-9 _ -. Prefer webhookSecretFile; generated and kept in the account state file when neither is set."
249
+ "anyOf": [
250
+ {
251
+ "type": "string"
252
+ },
253
+ {
254
+ "oneOf": [
255
+ {
256
+ "type": "object",
257
+ "properties": {
258
+ "source": {
259
+ "type": "string",
260
+ "const": "env"
261
+ },
262
+ "provider": {
263
+ "type": "string",
264
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
265
+ },
266
+ "id": {
267
+ "type": "string",
268
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
269
+ }
270
+ },
271
+ "required": [
272
+ "source",
273
+ "provider",
274
+ "id"
275
+ ],
276
+ "additionalProperties": false
277
+ },
278
+ {
279
+ "type": "object",
280
+ "properties": {
281
+ "source": {
282
+ "type": "string",
283
+ "const": "store"
284
+ },
285
+ "provider": {
286
+ "type": "string",
287
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
288
+ },
289
+ "id": {
290
+ "type": "string",
291
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
292
+ }
293
+ },
294
+ "required": [
295
+ "source",
296
+ "provider",
297
+ "id"
298
+ ],
299
+ "additionalProperties": false
300
+ },
301
+ {
302
+ "type": "object",
303
+ "properties": {
304
+ "source": {
305
+ "type": "string",
306
+ "const": "file"
307
+ },
308
+ "provider": {
309
+ "type": "string",
310
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
311
+ },
312
+ "id": {
313
+ "type": "string"
314
+ }
315
+ },
316
+ "required": [
317
+ "source",
318
+ "provider",
319
+ "id"
320
+ ],
321
+ "additionalProperties": false
322
+ },
323
+ {
324
+ "type": "object",
325
+ "properties": {
326
+ "source": {
327
+ "type": "string",
328
+ "const": "exec"
329
+ },
330
+ "provider": {
331
+ "type": "string",
332
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
333
+ },
334
+ "id": {
335
+ "type": "string"
336
+ }
337
+ },
338
+ "required": [
339
+ "source",
340
+ "provider",
341
+ "id"
342
+ ],
343
+ "additionalProperties": false
344
+ }
345
+ ]
346
+ }
347
+ ],
348
+ "description": "X-Max-Bot-Api-Secret value, 5-256 of A-Z a-z 0-9 _ -. Prefer webhookSecretFile; generated and kept in the account state file when neither is set. Accepts a SecretRef."
122
349
  },
123
350
  "webhookSecretFile": {
124
351
  "type": "string",
@@ -164,6 +391,156 @@
164
391
  "block"
165
392
  ]
166
393
  },
394
+ "streaming": {
395
+ "type": "object",
396
+ "properties": {
397
+ "mode": {
398
+ "type": "string",
399
+ "enum": [
400
+ "off",
401
+ "partial",
402
+ "block",
403
+ "progress"
404
+ ]
405
+ },
406
+ "chunkMode": {
407
+ "type": "string",
408
+ "enum": [
409
+ "length",
410
+ "newline"
411
+ ]
412
+ },
413
+ "preview": {
414
+ "type": "object",
415
+ "properties": {
416
+ "chunk": {
417
+ "type": "object",
418
+ "properties": {
419
+ "minChars": {
420
+ "type": "integer",
421
+ "exclusiveMinimum": 0,
422
+ "maximum": 9007199254740991
423
+ },
424
+ "maxChars": {
425
+ "type": "integer",
426
+ "exclusiveMinimum": 0,
427
+ "maximum": 9007199254740991
428
+ },
429
+ "breakPreference": {
430
+ "anyOf": [
431
+ {
432
+ "type": "string",
433
+ "const": "paragraph"
434
+ },
435
+ {
436
+ "type": "string",
437
+ "const": "newline"
438
+ },
439
+ {
440
+ "type": "string",
441
+ "const": "sentence"
442
+ }
443
+ ]
444
+ }
445
+ },
446
+ "additionalProperties": false
447
+ },
448
+ "toolProgress": {
449
+ "type": "boolean"
450
+ },
451
+ "commandText": {
452
+ "type": "string",
453
+ "enum": [
454
+ "raw",
455
+ "status"
456
+ ]
457
+ }
458
+ },
459
+ "additionalProperties": false
460
+ },
461
+ "progress": {
462
+ "type": "object",
463
+ "properties": {
464
+ "label": {
465
+ "anyOf": [
466
+ {
467
+ "type": "string"
468
+ },
469
+ {
470
+ "type": "boolean",
471
+ "const": false
472
+ }
473
+ ]
474
+ },
475
+ "labels": {
476
+ "type": "array",
477
+ "items": {
478
+ "type": "string"
479
+ }
480
+ },
481
+ "maxLines": {
482
+ "type": "integer",
483
+ "exclusiveMinimum": 0,
484
+ "maximum": 9007199254740991
485
+ },
486
+ "maxLineChars": {
487
+ "type": "integer",
488
+ "exclusiveMinimum": 0,
489
+ "maximum": 9007199254740991
490
+ },
491
+ "toolProgress": {
492
+ "type": "boolean"
493
+ },
494
+ "commandText": {
495
+ "type": "string",
496
+ "enum": [
497
+ "raw",
498
+ "status"
499
+ ]
500
+ },
501
+ "commentary": {
502
+ "type": "boolean"
503
+ },
504
+ "narration": {
505
+ "type": "boolean"
506
+ }
507
+ },
508
+ "additionalProperties": false
509
+ },
510
+ "block": {
511
+ "type": "object",
512
+ "properties": {
513
+ "enabled": {
514
+ "type": "boolean"
515
+ },
516
+ "coalesce": {
517
+ "type": "object",
518
+ "properties": {
519
+ "minChars": {
520
+ "type": "integer",
521
+ "exclusiveMinimum": 0,
522
+ "maximum": 9007199254740991
523
+ },
524
+ "maxChars": {
525
+ "type": "integer",
526
+ "exclusiveMinimum": 0,
527
+ "maximum": 9007199254740991
528
+ },
529
+ "idleMs": {
530
+ "type": "integer",
531
+ "minimum": 0,
532
+ "maximum": 9007199254740991
533
+ }
534
+ },
535
+ "additionalProperties": false
536
+ }
537
+ },
538
+ "additionalProperties": false
539
+ }
540
+ },
541
+ "additionalProperties": false,
542
+ "description": "Core streaming settings; streaming.mode wins over streamMode. \"progress\" shows one turn-status message edited while the agent works (streaming.progress: label, labels, toolProgress, commandText, maxLines, maxLineChars) and deleted once the answer landed; \"partial\"/\"block\" as streamMode. Default off."
543
+ },
167
544
  "blockStreamingCoalesce": {
168
545
  "type": "object",
169
546
  "properties": {
@@ -186,9 +563,171 @@
186
563
  "type": "number",
187
564
  "exclusiveMinimum": 0
188
565
  },
566
+ "webhookQueue": {
567
+ "type": "object",
568
+ "properties": {
569
+ "mode": {
570
+ "type": "string",
571
+ "enum": [
572
+ "durable",
573
+ "memory"
574
+ ]
575
+ },
576
+ "maxPending": {
577
+ "type": "integer",
578
+ "minimum": 1
579
+ },
580
+ "overflow": {
581
+ "type": "string",
582
+ "enum": [
583
+ "reject",
584
+ "drop"
585
+ ]
586
+ }
587
+ },
588
+ "additionalProperties": false,
589
+ "description": "Webhook queue. mode \"durable\" (default): every accepted update is written to the plugin state directory before MAX gets its 200, so a gateway restart or crash does not lose it; handled updates are deleted. mode \"memory\": the 0.7 in-memory queue. maxPending (default 5000) bounds accepted but unhandled updates; when full, overflow \"reject\" (default) answers 503 so MAX redelivers later, \"drop\" acknowledges and drops."
590
+ },
591
+ "maxEventAgeMinutes": {
592
+ "type": "integer",
593
+ "minimum": 0,
594
+ "description": "Messages, edits, button presses and bot_started older than this many minutes (by MAX event time) are skipped instead of answered, so after a long outage the bot does not reply to hours-old messages (webhook, the queue recovered after a restart and long polling). Default 60; 0 answers any age."
595
+ },
596
+ "logMessagePreview": {
597
+ "type": "boolean",
598
+ "description": "Debug logs of inbound messages include a 50-character text preview, for debugging. Off by default: logs carry the message type, text length and ids, never message text, captions or transcripts."
599
+ },
600
+ "mediaMaxCount": {
601
+ "type": "integer",
602
+ "minimum": 1,
603
+ "description": "Most media attachments (images, stickers, video, audio, files) downloaded per inbound message (default 12), forwarded ones included; the agent gets a note about the rest. Size is limited separately by mediaMaxMb. Named accounts inherit the channel-level value."
604
+ },
189
605
  "markSeen": {
190
606
  "type": "boolean"
191
607
  },
608
+ "actionScope": {
609
+ "type": "string",
610
+ "enum": [
611
+ "admitted",
612
+ "current",
613
+ "off"
614
+ ],
615
+ "description": "Chats message-tool actions (send, sendAttachment, sticker, edit, delete, pin, unpin) may act in. admitted (default): the current chat, owner requests and chats admitted by dmPolicy/allowFrom/pairing and groupPolicy/groups; current: non-owner turns only in their own chat; off: no plugin check. Named accounts inherit the channel-level value."
616
+ },
617
+ "notify": {
618
+ "type": "boolean",
619
+ "description": "Default push notification for sent messages (MAX notify, default true). false sends silently; an explicit value of the call (core silent flag, channelData.max.notify) wins. MAX channels always notify. Named accounts inherit the channel-level value."
620
+ },
621
+ "disableLinkPreview": {
622
+ "type": "boolean",
623
+ "description": "Default: send messages without link previews (MAX disable_link_preview). Unset: previews on, except tool summaries (verbose mode), which go without them; a set value applies to all sends. channelData.max.disableLinkPreview overrides it per message. Named accounts inherit the channel-level value."
624
+ },
625
+ "apiBaseUrl": {
626
+ "type": "string",
627
+ "description": "MAX Bot API base URL (default https://platform-api2.max.ru), e.g. a test stand; a path prefix is kept. https only; http is accepted just for loopback hosts, so the bot token never travels unencrypted. A bad value stops the account at start with an error. Named accounts inherit the channel-level value."
628
+ },
629
+ "httpProxy": {
630
+ "anyOf": [
631
+ {
632
+ "type": "string"
633
+ },
634
+ {
635
+ "oneOf": [
636
+ {
637
+ "type": "object",
638
+ "properties": {
639
+ "source": {
640
+ "type": "string",
641
+ "const": "env"
642
+ },
643
+ "provider": {
644
+ "type": "string",
645
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
646
+ },
647
+ "id": {
648
+ "type": "string",
649
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
650
+ }
651
+ },
652
+ "required": [
653
+ "source",
654
+ "provider",
655
+ "id"
656
+ ],
657
+ "additionalProperties": false
658
+ },
659
+ {
660
+ "type": "object",
661
+ "properties": {
662
+ "source": {
663
+ "type": "string",
664
+ "const": "store"
665
+ },
666
+ "provider": {
667
+ "type": "string",
668
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
669
+ },
670
+ "id": {
671
+ "type": "string",
672
+ "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
673
+ }
674
+ },
675
+ "required": [
676
+ "source",
677
+ "provider",
678
+ "id"
679
+ ],
680
+ "additionalProperties": false
681
+ },
682
+ {
683
+ "type": "object",
684
+ "properties": {
685
+ "source": {
686
+ "type": "string",
687
+ "const": "file"
688
+ },
689
+ "provider": {
690
+ "type": "string",
691
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
692
+ },
693
+ "id": {
694
+ "type": "string"
695
+ }
696
+ },
697
+ "required": [
698
+ "source",
699
+ "provider",
700
+ "id"
701
+ ],
702
+ "additionalProperties": false
703
+ },
704
+ {
705
+ "type": "object",
706
+ "properties": {
707
+ "source": {
708
+ "type": "string",
709
+ "const": "exec"
710
+ },
711
+ "provider": {
712
+ "type": "string",
713
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
714
+ },
715
+ "id": {
716
+ "type": "string"
717
+ }
718
+ },
719
+ "required": [
720
+ "source",
721
+ "provider",
722
+ "id"
723
+ ],
724
+ "additionalProperties": false
725
+ }
726
+ ]
727
+ }
728
+ ],
729
+ "description": "HTTP(S) proxy for all outbound MAX traffic of the account: Bot API calls, file uploads and media downloads, e.g. http://user:pass@proxy.example:3128. MAX TLS (Russian Trusted CA included) is verified inside the tunnel; loopback targets bypass the proxy. Credentials are never logged. Named accounts inherit the channel-level value; \"\" turns an inherited proxy off. Accepts a SecretRef (e.g. when the URL carries credentials)."
730
+ },
192
731
  "actions": {
193
732
  "type": "object",
194
733
  "additionalProperties": {
@@ -249,8 +788,444 @@
249
788
  }
250
789
  }
251
790
  },
791
+ "uiHints": {
792
+ "name": {
793
+ "label": "Account name",
794
+ "help": "Display name of the account. Own: not inherited by named accounts."
795
+ },
796
+ "enabled": {
797
+ "label": "Enabled",
798
+ "help": "false at channel level disables all accounts; in an account, disables that account."
799
+ },
800
+ "markdown": {
801
+ "label": "Markdown (no effect)",
802
+ "help": "Accepted for compatibility with the common channel config; has no effect in MAX.",
803
+ "advanced": true
804
+ },
805
+ "botToken": {
806
+ "label": "Bot token",
807
+ "help": "MAX Bot API token or a SecretRef to it. Own.",
808
+ "sensitive": true
809
+ },
810
+ "tokenFile": {
811
+ "label": "Token file",
812
+ "help": "Absolute path to a regular file with the bot token. Own.",
813
+ "placeholder": "/path/to/max-bot-token",
814
+ "advanced": true
815
+ },
816
+ "dmPolicy": {
817
+ "label": "DM policy",
818
+ "help": "Who may write in private dialogs: pairing (default), allowlist, open or disabled."
819
+ },
820
+ "allowFrom": {
821
+ "label": "Allowed DM senders",
822
+ "help": "MAX user ids allowed in private dialogs; \"*\" allows anyone (required with open)."
823
+ },
824
+ "groupAllowFrom": {
825
+ "label": "Allowed group senders",
826
+ "help": "User ids allowed in admitted groups when the group has no own allowFrom."
827
+ },
828
+ "groupPolicy": {
829
+ "label": "Group policy",
830
+ "help": "Which groups the bot answers in: allowlist (default), open or disabled."
831
+ },
832
+ "groups": {
833
+ "label": "Groups",
834
+ "help": "Allowed groups and per-group settings, keyed by chat id or \"*\"."
835
+ },
836
+ "mentionPatterns": {
837
+ "label": "Mention pattern scope",
838
+ "help": "Where core mention patterns apply in MAX groups: mode allow|deny, allowIn, denyIn.",
839
+ "advanced": true
840
+ },
841
+ "transport": {
842
+ "label": "Transport",
843
+ "help": "polling or webhook; default webhook when webhookUrl is set, else polling. Own."
844
+ },
845
+ "webhookUrl": {
846
+ "label": "Webhook URL",
847
+ "help": "Public HTTPS URL MAX posts updates to. Own.",
848
+ "placeholder": "https://bot.example.com/max/webhook"
849
+ },
850
+ "webhookSecret": {
851
+ "label": "Webhook secret",
852
+ "help": "Secret MAX sends with every webhook call; generated when unset. Plain value or SecretRef. Own.",
853
+ "sensitive": true,
854
+ "advanced": true
855
+ },
856
+ "webhookSecretFile": {
857
+ "label": "Webhook secret file",
858
+ "help": "File with the webhook secret (regular file, not a symlink). Own.",
859
+ "advanced": true
860
+ },
861
+ "webhookPath": {
862
+ "label": "Webhook path",
863
+ "help": "Gateway route path; default: the path of webhookUrl, else /max/webhook. Own.",
864
+ "placeholder": "/max/webhook",
865
+ "advanced": true
866
+ },
867
+ "historyLimit": {
868
+ "label": "Group history limit",
869
+ "help": "Read by OpenClaw core: recent turns of a group session the embedded agent runtime keeps in the prompt.",
870
+ "advanced": true
871
+ },
872
+ "dmHistoryLimit": {
873
+ "label": "DM history limit",
874
+ "help": "Read by OpenClaw core: recent turns of a private-dialog session kept in the prompt.",
875
+ "advanced": true
876
+ },
877
+ "dms": {
878
+ "label": "Per-user DM settings",
879
+ "help": "dms.<userId>.historyLimit, read by OpenClaw core before dmHistoryLimit.",
880
+ "advanced": true
881
+ },
882
+ "textChunkLimit": {
883
+ "label": "Text chunk limit",
884
+ "help": "Characters per outgoing message; values above MAX's 4000 (the default) are capped.",
885
+ "advanced": true
886
+ },
887
+ "blockStreaming": {
888
+ "label": "Block streaming (no effect)",
889
+ "help": "Accepted for compatibility; has no effect in MAX. Use streamMode or streaming.mode \"block\".",
890
+ "advanced": true
891
+ },
892
+ "streamMode": {
893
+ "label": "Stream mode",
894
+ "help": "off (default); partial: one draft edited while the answer streams; block: core block replies."
895
+ },
896
+ "streaming": {
897
+ "label": "Streaming",
898
+ "help": "Core streaming config; streaming.mode (off, partial, block, progress) wins over streamMode; streaming.progress configures turn status.",
899
+ "advanced": true
900
+ },
901
+ "blockStreamingCoalesce": {
902
+ "label": "Block streaming coalesce (no effect)",
903
+ "help": "Accepted for compatibility; has no effect in MAX. Core reads streaming.block.coalesce.",
904
+ "advanced": true
905
+ },
906
+ "responsePrefix": {
907
+ "label": "Response prefix",
908
+ "help": "Prefix of agent replies, applied by OpenClaw core (\"auto\": agent name).",
909
+ "advanced": true
910
+ },
911
+ "mediaMaxMb": {
912
+ "label": "Media size limit, MB",
913
+ "help": "Size limit for downloaded and uploaded media (default 20)."
914
+ },
915
+ "webhookQueue": {
916
+ "label": "Webhook queue",
917
+ "help": "mode durable (default) or memory, maxPending (5000), overflow reject (default) or drop.",
918
+ "advanced": true
919
+ },
920
+ "maxEventAgeMinutes": {
921
+ "label": "Max event age, minutes",
922
+ "help": "Skip messages, edits, button presses and bot starts older than this (default 60); 0: no limit.",
923
+ "advanced": true
924
+ },
925
+ "logMessagePreview": {
926
+ "label": "Log message preview",
927
+ "help": "Add a 50-character text preview to debug logs (default false).",
928
+ "advanced": true
929
+ },
930
+ "mediaMaxCount": {
931
+ "label": "Media per message",
932
+ "help": "Media attachments downloaded per incoming message, forwards included (default 12).",
933
+ "advanced": true
934
+ },
935
+ "markSeen": {
936
+ "label": "Mark as read",
937
+ "help": "Mark incoming messages as read (default true)."
938
+ },
939
+ "actionScope": {
940
+ "label": "Action scope",
941
+ "help": "Chats the message tool may act in: admitted (default), current or off.",
942
+ "advanced": true
943
+ },
944
+ "notify": {
945
+ "label": "Notify",
946
+ "help": "Push notifications for sends; false: silent (not possible in channels)."
947
+ },
948
+ "disableLinkPreview": {
949
+ "label": "Disable link previews",
950
+ "help": "Send messages without link previews."
951
+ },
952
+ "apiBaseUrl": {
953
+ "label": "API base URL",
954
+ "help": "Bot API base URL; https only, http just for loopback.",
955
+ "placeholder": "https://platform-api2.max.ru",
956
+ "advanced": true
957
+ },
958
+ "httpProxy": {
959
+ "label": "HTTP proxy",
960
+ "help": "HTTP(S) proxy for all MAX traffic; \"\" in an account turns an inherited proxy off. Plain value or SecretRef.",
961
+ "placeholder": "http://user:pass@proxy.example:3128",
962
+ "sensitive": true,
963
+ "advanced": true
964
+ },
965
+ "actions": {
966
+ "label": "Message tool actions",
967
+ "help": "false turns an action off: send, edit, delete, sticker, sendAttachment, pin, unpin.",
968
+ "advanced": true
969
+ },
970
+ "groups.*.requireMention": {
971
+ "label": "Require mention",
972
+ "help": "Answer only when the bot is mentioned, replied to or its button is pressed (default true)."
973
+ },
974
+ "groups.*.tools": {
975
+ "label": "Tool policy",
976
+ "help": "Core tool policy for this group.",
977
+ "advanced": true
978
+ },
979
+ "groups.*.skills": {
980
+ "label": "Skills",
981
+ "help": "Skills a turn in this group may load; [] for none.",
982
+ "advanced": true
983
+ },
984
+ "groups.*.enabled": {
985
+ "label": "Enabled",
986
+ "help": "false: ignore this group under any groupPolicy."
987
+ },
988
+ "groups.*.allowFrom": {
989
+ "label": "Allowed senders",
990
+ "help": "Senders allowed in this group (overrides groupAllowFrom)."
991
+ },
992
+ "groups.*.systemPrompt": {
993
+ "label": "System prompt",
994
+ "help": "Extra system prompt for turns in this group.",
995
+ "advanced": true
996
+ },
997
+ "groups.*.disableAudioPreflight": {
998
+ "label": "Disable audio preflight",
999
+ "help": "Do not transcribe captionless voice messages to look for a mention (default false).",
1000
+ "advanced": true
1001
+ },
1002
+ "accounts": {
1003
+ "label": "Accounts",
1004
+ "help": "Named bot accounts; each inherits channel-level options except its own token, name and webhook."
1005
+ },
1006
+ "commands": {
1007
+ "label": "Bot commands",
1008
+ "help": "Commands registered in MAX (up to 32; name up to 64 characters without /, description up to 128).",
1009
+ "advanced": true
1010
+ },
1011
+ "defaultAccount": {
1012
+ "label": "Default account",
1013
+ "help": "Accepted by the schema; the plugin always treats channel-level options as the \"default\" account.",
1014
+ "advanced": true
1015
+ },
1016
+ "accounts.*.name": {
1017
+ "label": "Account name",
1018
+ "help": "Display name of the account. Own: not inherited by named accounts."
1019
+ },
1020
+ "accounts.*.enabled": {
1021
+ "label": "Enabled",
1022
+ "help": "false disables this account; a channel switched off switches off every account."
1023
+ },
1024
+ "accounts.*.markdown": {
1025
+ "label": "Markdown (no effect)",
1026
+ "help": "Accepted for compatibility with the common channel config; has no effect in MAX.",
1027
+ "advanced": true
1028
+ },
1029
+ "accounts.*.botToken": {
1030
+ "label": "Bot token",
1031
+ "help": "MAX Bot API token or a SecretRef to it. Own.",
1032
+ "sensitive": true
1033
+ },
1034
+ "accounts.*.tokenFile": {
1035
+ "label": "Token file",
1036
+ "help": "Absolute path to a regular file with the bot token. Own.",
1037
+ "placeholder": "/path/to/max-bot-token",
1038
+ "advanced": true
1039
+ },
1040
+ "accounts.*.dmPolicy": {
1041
+ "label": "DM policy",
1042
+ "help": "Who may write in private dialogs: pairing (default), allowlist, open or disabled."
1043
+ },
1044
+ "accounts.*.allowFrom": {
1045
+ "label": "Allowed DM senders",
1046
+ "help": "MAX user ids allowed in private dialogs; \"*\" allows anyone (required with open)."
1047
+ },
1048
+ "accounts.*.groupAllowFrom": {
1049
+ "label": "Allowed group senders",
1050
+ "help": "User ids allowed in admitted groups when the group has no own allowFrom."
1051
+ },
1052
+ "accounts.*.groupPolicy": {
1053
+ "label": "Group policy",
1054
+ "help": "Which groups the bot answers in: allowlist (default), open or disabled."
1055
+ },
1056
+ "accounts.*.groups": {
1057
+ "label": "Groups",
1058
+ "help": "Allowed groups and per-group settings, keyed by chat id or \"*\"."
1059
+ },
1060
+ "accounts.*.mentionPatterns": {
1061
+ "label": "Mention pattern scope",
1062
+ "help": "Where core mention patterns apply in MAX groups: mode allow|deny, allowIn, denyIn.",
1063
+ "advanced": true
1064
+ },
1065
+ "accounts.*.transport": {
1066
+ "label": "Transport",
1067
+ "help": "polling or webhook; default webhook when webhookUrl is set, else polling. Own."
1068
+ },
1069
+ "accounts.*.webhookUrl": {
1070
+ "label": "Webhook URL",
1071
+ "help": "Public HTTPS URL MAX posts updates to. Own.",
1072
+ "placeholder": "https://bot.example.com/max/webhook"
1073
+ },
1074
+ "accounts.*.webhookSecret": {
1075
+ "label": "Webhook secret",
1076
+ "help": "Secret MAX sends with every webhook call; generated when unset. Plain value or SecretRef. Own.",
1077
+ "sensitive": true,
1078
+ "advanced": true
1079
+ },
1080
+ "accounts.*.webhookSecretFile": {
1081
+ "label": "Webhook secret file",
1082
+ "help": "File with the webhook secret (regular file, not a symlink). Own.",
1083
+ "advanced": true
1084
+ },
1085
+ "accounts.*.webhookPath": {
1086
+ "label": "Webhook path",
1087
+ "help": "Gateway route path; default: the path of webhookUrl, else /max/webhook. Own.",
1088
+ "placeholder": "/max/webhook",
1089
+ "advanced": true
1090
+ },
1091
+ "accounts.*.historyLimit": {
1092
+ "label": "Group history limit",
1093
+ "help": "Read by OpenClaw core: recent turns of a group session the embedded agent runtime keeps in the prompt.",
1094
+ "advanced": true
1095
+ },
1096
+ "accounts.*.dmHistoryLimit": {
1097
+ "label": "DM history limit",
1098
+ "help": "Read by OpenClaw core: recent turns of a private-dialog session kept in the prompt.",
1099
+ "advanced": true
1100
+ },
1101
+ "accounts.*.dms": {
1102
+ "label": "Per-user DM settings",
1103
+ "help": "dms.<userId>.historyLimit, read by OpenClaw core before dmHistoryLimit.",
1104
+ "advanced": true
1105
+ },
1106
+ "accounts.*.textChunkLimit": {
1107
+ "label": "Text chunk limit",
1108
+ "help": "Characters per outgoing message; values above MAX's 4000 (the default) are capped.",
1109
+ "advanced": true
1110
+ },
1111
+ "accounts.*.blockStreaming": {
1112
+ "label": "Block streaming (no effect)",
1113
+ "help": "Accepted for compatibility; has no effect in MAX. Use streamMode or streaming.mode \"block\".",
1114
+ "advanced": true
1115
+ },
1116
+ "accounts.*.streamMode": {
1117
+ "label": "Stream mode",
1118
+ "help": "off (default); partial: one draft edited while the answer streams; block: core block replies."
1119
+ },
1120
+ "accounts.*.streaming": {
1121
+ "label": "Streaming",
1122
+ "help": "Core streaming config; streaming.mode (off, partial, block, progress) wins over streamMode; streaming.progress configures turn status.",
1123
+ "advanced": true
1124
+ },
1125
+ "accounts.*.blockStreamingCoalesce": {
1126
+ "label": "Block streaming coalesce (no effect)",
1127
+ "help": "Accepted for compatibility; has no effect in MAX. Core reads streaming.block.coalesce.",
1128
+ "advanced": true
1129
+ },
1130
+ "accounts.*.responsePrefix": {
1131
+ "label": "Response prefix",
1132
+ "help": "Prefix of agent replies, applied by OpenClaw core (\"auto\": agent name).",
1133
+ "advanced": true
1134
+ },
1135
+ "accounts.*.mediaMaxMb": {
1136
+ "label": "Media size limit, MB",
1137
+ "help": "Size limit for downloaded and uploaded media (default 20)."
1138
+ },
1139
+ "accounts.*.webhookQueue": {
1140
+ "label": "Webhook queue",
1141
+ "help": "mode durable (default) or memory, maxPending (5000), overflow reject (default) or drop.",
1142
+ "advanced": true
1143
+ },
1144
+ "accounts.*.maxEventAgeMinutes": {
1145
+ "label": "Max event age, minutes",
1146
+ "help": "Skip messages, edits, button presses and bot starts older than this (default 60); 0: no limit.",
1147
+ "advanced": true
1148
+ },
1149
+ "accounts.*.logMessagePreview": {
1150
+ "label": "Log message preview",
1151
+ "help": "Add a 50-character text preview to debug logs (default false).",
1152
+ "advanced": true
1153
+ },
1154
+ "accounts.*.mediaMaxCount": {
1155
+ "label": "Media per message",
1156
+ "help": "Media attachments downloaded per incoming message, forwards included (default 12).",
1157
+ "advanced": true
1158
+ },
1159
+ "accounts.*.markSeen": {
1160
+ "label": "Mark as read",
1161
+ "help": "Mark incoming messages as read (default true)."
1162
+ },
1163
+ "accounts.*.actionScope": {
1164
+ "label": "Action scope",
1165
+ "help": "Chats the message tool may act in: admitted (default), current or off.",
1166
+ "advanced": true
1167
+ },
1168
+ "accounts.*.notify": {
1169
+ "label": "Notify",
1170
+ "help": "Push notifications for sends; false: silent (not possible in channels)."
1171
+ },
1172
+ "accounts.*.disableLinkPreview": {
1173
+ "label": "Disable link previews",
1174
+ "help": "Send messages without link previews."
1175
+ },
1176
+ "accounts.*.apiBaseUrl": {
1177
+ "label": "API base URL",
1178
+ "help": "Bot API base URL; https only, http just for loopback.",
1179
+ "placeholder": "https://platform-api2.max.ru",
1180
+ "advanced": true
1181
+ },
1182
+ "accounts.*.httpProxy": {
1183
+ "label": "HTTP proxy",
1184
+ "help": "HTTP(S) proxy for all MAX traffic; \"\" in an account turns an inherited proxy off. Plain value or SecretRef.",
1185
+ "placeholder": "http://user:pass@proxy.example:3128",
1186
+ "sensitive": true,
1187
+ "advanced": true
1188
+ },
1189
+ "accounts.*.actions": {
1190
+ "label": "Message tool actions",
1191
+ "help": "false turns an action off: send, edit, delete, sticker, sendAttachment, pin, unpin.",
1192
+ "advanced": true
1193
+ },
1194
+ "accounts.*.groups.*.requireMention": {
1195
+ "label": "Require mention",
1196
+ "help": "Answer only when the bot is mentioned, replied to or its button is pressed (default true)."
1197
+ },
1198
+ "accounts.*.groups.*.tools": {
1199
+ "label": "Tool policy",
1200
+ "help": "Core tool policy for this group.",
1201
+ "advanced": true
1202
+ },
1203
+ "accounts.*.groups.*.skills": {
1204
+ "label": "Skills",
1205
+ "help": "Skills a turn in this group may load; [] for none.",
1206
+ "advanced": true
1207
+ },
1208
+ "accounts.*.groups.*.enabled": {
1209
+ "label": "Enabled",
1210
+ "help": "false: ignore this group under any groupPolicy."
1211
+ },
1212
+ "accounts.*.groups.*.allowFrom": {
1213
+ "label": "Allowed senders",
1214
+ "help": "Senders allowed in this group (overrides groupAllowFrom)."
1215
+ },
1216
+ "accounts.*.groups.*.systemPrompt": {
1217
+ "label": "System prompt",
1218
+ "help": "Extra system prompt for turns in this group.",
1219
+ "advanced": true
1220
+ },
1221
+ "accounts.*.groups.*.disableAudioPreflight": {
1222
+ "label": "Disable audio preflight",
1223
+ "help": "Do not transcribe captionless voice messages to look for a mention (default false).",
1224
+ "advanced": true
1225
+ }
1226
+ },
252
1227
  "label": "MAX",
253
- "description": "MAX messenger channel (max.ru Bot API)."
1228
+ "description": "MAX messenger channel (max.ru Bot API): private and group chats over webhook or long polling."
254
1229
  }
255
1230
  },
256
1231
  "configSchema": {