@openclaw/whatsapp 2026.5.1-beta.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 (239) hide show
  1. package/action-runtime-api.ts +1 -0
  2. package/action-runtime.runtime.ts +1 -0
  3. package/api.ts +213 -0
  4. package/auth-presence.ts +80 -0
  5. package/channel-config-api.ts +1 -0
  6. package/channel-plugin-api.ts +3 -0
  7. package/config-api.ts +4 -0
  8. package/constants.ts +1 -0
  9. package/contract-api.ts +29 -0
  10. package/directory-contract-api.ts +4 -0
  11. package/dist/.boundary-tsc.stamp +1 -0
  12. package/dist/.boundary-tsc.tsbuildinfo +1 -0
  13. package/doctor-contract-api.ts +8 -0
  14. package/index.test.ts +13 -0
  15. package/index.ts +16 -0
  16. package/legacy-session-surface-api.ts +6 -0
  17. package/legacy-state-migrations-api.ts +1 -0
  18. package/light-runtime-api.ts +12 -0
  19. package/login-qr-api.ts +1 -0
  20. package/login-qr-runtime.ts +23 -0
  21. package/openclaw.plugin.json +742 -0
  22. package/outbound-payload-test-api.ts +1 -0
  23. package/package.json +74 -0
  24. package/runtime-api.ts +86 -0
  25. package/secret-contract-api.ts +4 -0
  26. package/security-contract-api.ts +4 -0
  27. package/setup-entry.test.ts +21 -0
  28. package/setup-entry.ts +21 -0
  29. package/setup-plugin-api.ts +3 -0
  30. package/src/account-config.ts +77 -0
  31. package/src/account-ids.ts +13 -0
  32. package/src/account-types.ts +5 -0
  33. package/src/accounts.test.ts +182 -0
  34. package/src/accounts.ts +176 -0
  35. package/src/accounts.whatsapp-auth.test.ts +59 -0
  36. package/src/action-runtime-target-auth.ts +27 -0
  37. package/src/action-runtime.test.ts +330 -0
  38. package/src/action-runtime.ts +76 -0
  39. package/src/active-listener.test.ts +65 -0
  40. package/src/active-listener.ts +17 -0
  41. package/src/agent-tools-login.test.ts +81 -0
  42. package/src/agent-tools-login.ts +113 -0
  43. package/src/approval-auth.test.ts +24 -0
  44. package/src/approval-auth.ts +27 -0
  45. package/src/auth-store.runtime.ts +1 -0
  46. package/src/auth-store.test.ts +311 -0
  47. package/src/auth-store.ts +502 -0
  48. package/src/auto-reply/config.runtime.ts +16 -0
  49. package/src/auto-reply/constants.ts +1 -0
  50. package/src/auto-reply/deliver-reply.test.ts +843 -0
  51. package/src/auto-reply/deliver-reply.ts +279 -0
  52. package/src/auto-reply/heartbeat-runner.runtime.ts +33 -0
  53. package/src/auto-reply/heartbeat-runner.test.ts +214 -0
  54. package/src/auto-reply/heartbeat-runner.ts +330 -0
  55. package/src/auto-reply/loggers.ts +6 -0
  56. package/src/auto-reply/mentions.ts +131 -0
  57. package/src/auto-reply/monitor/ack-reaction.test.ts +170 -0
  58. package/src/auto-reply/monitor/ack-reaction.ts +99 -0
  59. package/src/auto-reply/monitor/audio-preflight.runtime.ts +9 -0
  60. package/src/auto-reply/monitor/broadcast.ts +153 -0
  61. package/src/auto-reply/monitor/commands.ts +19 -0
  62. package/src/auto-reply/monitor/echo.ts +64 -0
  63. package/src/auto-reply/monitor/group-activation.runtime.ts +1 -0
  64. package/src/auto-reply/monitor/group-activation.test.ts +189 -0
  65. package/src/auto-reply/monitor/group-activation.ts +73 -0
  66. package/src/auto-reply/monitor/group-gating.audio-preflight.test.ts +103 -0
  67. package/src/auto-reply/monitor/group-gating.runtime.ts +8 -0
  68. package/src/auto-reply/monitor/group-gating.ts +217 -0
  69. package/src/auto-reply/monitor/group-members.test.ts +56 -0
  70. package/src/auto-reply/monitor/group-members.ts +65 -0
  71. package/src/auto-reply/monitor/inbound-context.test.ts +97 -0
  72. package/src/auto-reply/monitor/inbound-context.ts +92 -0
  73. package/src/auto-reply/monitor/inbound-dispatch.runtime.ts +21 -0
  74. package/src/auto-reply/monitor/inbound-dispatch.test.ts +895 -0
  75. package/src/auto-reply/monitor/inbound-dispatch.ts +422 -0
  76. package/src/auto-reply/monitor/last-route.test.ts +37 -0
  77. package/src/auto-reply/monitor/last-route.ts +61 -0
  78. package/src/auto-reply/monitor/message-line.runtime.ts +38 -0
  79. package/src/auto-reply/monitor/message-line.ts +54 -0
  80. package/src/auto-reply/monitor/on-message.audio-preflight.test.ts +354 -0
  81. package/src/auto-reply/monitor/on-message.ts +291 -0
  82. package/src/auto-reply/monitor/peer.ts +17 -0
  83. package/src/auto-reply/monitor/process-message.audio-preflight.test.ts +420 -0
  84. package/src/auto-reply/monitor/process-message.test.ts +355 -0
  85. package/src/auto-reply/monitor/process-message.ts +531 -0
  86. package/src/auto-reply/monitor/runtime-api.ts +30 -0
  87. package/src/auto-reply/monitor-state.test.ts +64 -0
  88. package/src/auto-reply/monitor-state.ts +106 -0
  89. package/src/auto-reply/monitor.ts +600 -0
  90. package/src/auto-reply/reply-resolver.runtime.ts +1 -0
  91. package/src/auto-reply/session-snapshot.ts +69 -0
  92. package/src/auto-reply/types.ts +48 -0
  93. package/src/auto-reply/util.ts +63 -0
  94. package/src/auto-reply/web-auto-reply-monitor.test.ts +687 -0
  95. package/src/auto-reply/web-auto-reply-utils.test.ts +327 -0
  96. package/src/auto-reply.broadcast-groups.combined.test.ts +246 -0
  97. package/src/auto-reply.broadcast-groups.test-harness.ts +47 -0
  98. package/src/auto-reply.impl.ts +7 -0
  99. package/src/auto-reply.test-harness.ts +421 -0
  100. package/src/auto-reply.ts +1 -0
  101. package/src/auto-reply.web-auto-reply.compresses-common-formats-jpeg-cap.test.ts +427 -0
  102. package/src/auto-reply.web-auto-reply.connection-and-logging.e2e.test.ts +908 -0
  103. package/src/auto-reply.web-auto-reply.last-route.test.ts +184 -0
  104. package/src/channel-actions.runtime.ts +7 -0
  105. package/src/channel-actions.test.ts +216 -0
  106. package/src/channel-actions.ts +84 -0
  107. package/src/channel-outbound.test.ts +131 -0
  108. package/src/channel-outbound.ts +36 -0
  109. package/src/channel-react-action.runtime.ts +7 -0
  110. package/src/channel-react-action.test.ts +294 -0
  111. package/src/channel-react-action.ts +84 -0
  112. package/src/channel.runtime.ts +117 -0
  113. package/src/channel.setup.test.ts +461 -0
  114. package/src/channel.setup.ts +28 -0
  115. package/src/channel.ts +336 -0
  116. package/src/command-policy.ts +7 -0
  117. package/src/config-accessors.test.ts +34 -0
  118. package/src/config-accessors.ts +22 -0
  119. package/src/config-schema.test.ts +121 -0
  120. package/src/config-schema.ts +6 -0
  121. package/src/config-ui-hints.ts +24 -0
  122. package/src/connection-controller-registry.test.ts +27 -0
  123. package/src/connection-controller-registry.ts +49 -0
  124. package/src/connection-controller.test.ts +282 -0
  125. package/src/connection-controller.ts +679 -0
  126. package/src/creds-files.ts +19 -0
  127. package/src/creds-persistence.ts +102 -0
  128. package/src/directory-config.test.ts +60 -0
  129. package/src/directory-config.ts +40 -0
  130. package/src/directory-contract.test.ts +56 -0
  131. package/src/doctor-contract.ts +11 -0
  132. package/src/doctor.test.ts +74 -0
  133. package/src/doctor.ts +56 -0
  134. package/src/group-intro.ts +15 -0
  135. package/src/group-policy.test.ts +36 -0
  136. package/src/group-policy.ts +40 -0
  137. package/src/group-session-contract.ts +20 -0
  138. package/src/group-session-key.test.ts +53 -0
  139. package/src/group-session-key.ts +41 -0
  140. package/src/heartbeat-recipients.runtime.ts +6 -0
  141. package/src/heartbeat-recipients.test.ts +203 -0
  142. package/src/heartbeat-recipients.ts +104 -0
  143. package/src/heartbeat.ts +34 -0
  144. package/src/identity.ts +164 -0
  145. package/src/inbound/access-control.test-harness.ts +37 -0
  146. package/src/inbound/access-control.test.ts +375 -0
  147. package/src/inbound/access-control.ts +237 -0
  148. package/src/inbound/dedupe.ts +132 -0
  149. package/src/inbound/extract.test.ts +282 -0
  150. package/src/inbound/extract.ts +488 -0
  151. package/src/inbound/lifecycle.ts +39 -0
  152. package/src/inbound/media.node.test.ts +83 -0
  153. package/src/inbound/media.ts +102 -0
  154. package/src/inbound/monitor.ts +890 -0
  155. package/src/inbound/runtime-api.ts +7 -0
  156. package/src/inbound/save-media.runtime.ts +1 -0
  157. package/src/inbound/send-api.test.ts +307 -0
  158. package/src/inbound/send-api.ts +141 -0
  159. package/src/inbound/send-result.ts +61 -0
  160. package/src/inbound/types.ts +106 -0
  161. package/src/inbound-context.contract.test.ts +32 -0
  162. package/src/inbound-policy.ts +231 -0
  163. package/src/inbound.media.test.ts +320 -0
  164. package/src/inbound.test.ts +290 -0
  165. package/src/inbound.ts +9 -0
  166. package/src/login-qr.test.ts +483 -0
  167. package/src/login-qr.ts +542 -0
  168. package/src/login.coverage.test.ts +133 -0
  169. package/src/login.test.ts +89 -0
  170. package/src/login.ts +70 -0
  171. package/src/logout.test.ts +162 -0
  172. package/src/media.test.ts +480 -0
  173. package/src/media.ts +10 -0
  174. package/src/monitor-inbox.allows-messages-from-senders-allowfrom-list.test-support.ts +400 -0
  175. package/src/monitor-inbox.append-upsert.test-support.ts +133 -0
  176. package/src/monitor-inbox.behavior.test.ts +5 -0
  177. package/src/monitor-inbox.blocks-messages-from-unauthorized-senders-not-allowfrom.test-support.ts +362 -0
  178. package/src/monitor-inbox.captures-media-path-image-messages.test-support.ts +306 -0
  179. package/src/monitor-inbox.streams-inbound-messages.test-support.ts +729 -0
  180. package/src/monitor-inbox.test-harness.ts +304 -0
  181. package/src/normalize-target.ts +112 -0
  182. package/src/normalize.ts +6 -0
  183. package/src/outbound-adapter.poll.test.ts +62 -0
  184. package/src/outbound-adapter.sendpayload.test.ts +195 -0
  185. package/src/outbound-adapter.ts +36 -0
  186. package/src/outbound-base.test.ts +560 -0
  187. package/src/outbound-base.ts +244 -0
  188. package/src/outbound-media-contract.ts +278 -0
  189. package/src/outbound-media.runtime.ts +36 -0
  190. package/src/outbound-payload.contract.test.ts +61 -0
  191. package/src/outbound-send-deps.ts +1 -0
  192. package/src/outbound-test-support.ts +16 -0
  193. package/src/pairing-security.test-harness.ts +59 -0
  194. package/src/qr-image.ts +1 -0
  195. package/src/qr-terminal.ts +1 -0
  196. package/src/quoted-message.test.ts +83 -0
  197. package/src/quoted-message.ts +184 -0
  198. package/src/reaction-level.test.ts +94 -0
  199. package/src/reaction-level.ts +21 -0
  200. package/src/reconnect.test.ts +51 -0
  201. package/src/reconnect.ts +55 -0
  202. package/src/resolve-outbound-target.test.ts +265 -0
  203. package/src/resolve-outbound-target.ts +54 -0
  204. package/src/resolve-target.test.ts +97 -0
  205. package/src/runtime-api.ts +60 -0
  206. package/src/runtime-group-policy.ts +16 -0
  207. package/src/runtime.ts +9 -0
  208. package/src/security-contract.ts +47 -0
  209. package/src/security-fix.ts +71 -0
  210. package/src/send.test.ts +515 -0
  211. package/src/send.ts +287 -0
  212. package/src/session-contract.test.ts +31 -0
  213. package/src/session-contract.ts +43 -0
  214. package/src/session-errors.ts +125 -0
  215. package/src/session-route.ts +26 -0
  216. package/src/session.runtime.ts +8 -0
  217. package/src/session.test.ts +559 -0
  218. package/src/session.ts +330 -0
  219. package/src/setup-core.ts +52 -0
  220. package/src/setup-finalize.ts +446 -0
  221. package/src/setup-surface.test.ts +367 -0
  222. package/src/setup-surface.ts +69 -0
  223. package/src/setup-test-helpers.ts +216 -0
  224. package/src/shared.ts +291 -0
  225. package/src/socket-timing.test.ts +49 -0
  226. package/src/socket-timing.ts +38 -0
  227. package/src/state-migrations.ts +54 -0
  228. package/src/status-issues.test.ts +137 -0
  229. package/src/status-issues.ts +185 -0
  230. package/src/system-prompt.test.ts +199 -0
  231. package/src/system-prompt.ts +31 -0
  232. package/src/targets-runtime.ts +180 -0
  233. package/src/test-helpers.ts +690 -0
  234. package/src/text-runtime.test.ts +162 -0
  235. package/src/text-runtime.ts +11 -0
  236. package/src/vcard.ts +84 -0
  237. package/targets.ts +5 -0
  238. package/test-api.ts +2 -0
  239. package/tsconfig.json +16 -0
@@ -0,0 +1,742 @@
1
+ {
2
+ "id": "whatsapp",
3
+ "activation": {
4
+ "onStartup": false
5
+ },
6
+ "channels": [
7
+ "whatsapp"
8
+ ],
9
+ "configSchema": {
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "pluginHooks": {
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "properties": {
17
+ "messageReceived": {
18
+ "type": "boolean",
19
+ "description": "Opt in to broadcasting inbound WhatsApp message_received hook payloads to loaded plugins."
20
+ }
21
+ }
22
+ }
23
+ }
24
+ },
25
+ "channelConfigs": {
26
+ "whatsapp": {
27
+ "schema": {
28
+ "$schema": "http://json-schema.org/draft-07/schema#",
29
+ "type": "object",
30
+ "properties": {
31
+ "enabled": {
32
+ "type": "boolean"
33
+ },
34
+ "capabilities": {
35
+ "type": "array",
36
+ "items": {
37
+ "type": "string"
38
+ }
39
+ },
40
+ "markdown": {
41
+ "type": "object",
42
+ "properties": {
43
+ "tables": {
44
+ "type": "string",
45
+ "enum": [
46
+ "off",
47
+ "bullets",
48
+ "code",
49
+ "block"
50
+ ]
51
+ }
52
+ },
53
+ "additionalProperties": false
54
+ },
55
+ "configWrites": {
56
+ "type": "boolean"
57
+ },
58
+ "sendReadReceipts": {
59
+ "type": "boolean"
60
+ },
61
+ "messagePrefix": {
62
+ "type": "string"
63
+ },
64
+ "responsePrefix": {
65
+ "type": "string"
66
+ },
67
+ "dmPolicy": {
68
+ "default": "pairing",
69
+ "type": "string",
70
+ "enum": [
71
+ "pairing",
72
+ "allowlist",
73
+ "open",
74
+ "disabled"
75
+ ]
76
+ },
77
+ "selfChatMode": {
78
+ "type": "boolean"
79
+ },
80
+ "allowFrom": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "string"
84
+ }
85
+ },
86
+ "defaultTo": {
87
+ "type": "string"
88
+ },
89
+ "groupAllowFrom": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "string"
93
+ }
94
+ },
95
+ "groupPolicy": {
96
+ "default": "allowlist",
97
+ "type": "string",
98
+ "enum": [
99
+ "open",
100
+ "disabled",
101
+ "allowlist"
102
+ ]
103
+ },
104
+ "contextVisibility": {
105
+ "type": "string",
106
+ "enum": [
107
+ "all",
108
+ "allowlist",
109
+ "allowlist_quote"
110
+ ]
111
+ },
112
+ "historyLimit": {
113
+ "type": "integer",
114
+ "minimum": 0,
115
+ "maximum": 9007199254740991
116
+ },
117
+ "dmHistoryLimit": {
118
+ "type": "integer",
119
+ "minimum": 0,
120
+ "maximum": 9007199254740991
121
+ },
122
+ "dms": {
123
+ "type": "object",
124
+ "propertyNames": {
125
+ "type": "string"
126
+ },
127
+ "additionalProperties": {
128
+ "type": "object",
129
+ "properties": {
130
+ "historyLimit": {
131
+ "type": "integer",
132
+ "minimum": 0,
133
+ "maximum": 9007199254740991
134
+ }
135
+ },
136
+ "additionalProperties": false
137
+ }
138
+ },
139
+ "textChunkLimit": {
140
+ "type": "integer",
141
+ "exclusiveMinimum": 0,
142
+ "maximum": 9007199254740991
143
+ },
144
+ "chunkMode": {
145
+ "type": "string",
146
+ "enum": [
147
+ "length",
148
+ "newline"
149
+ ]
150
+ },
151
+ "blockStreaming": {
152
+ "type": "boolean"
153
+ },
154
+ "blockStreamingCoalesce": {
155
+ "type": "object",
156
+ "properties": {
157
+ "minChars": {
158
+ "type": "integer",
159
+ "exclusiveMinimum": 0,
160
+ "maximum": 9007199254740991
161
+ },
162
+ "maxChars": {
163
+ "type": "integer",
164
+ "exclusiveMinimum": 0,
165
+ "maximum": 9007199254740991
166
+ },
167
+ "idleMs": {
168
+ "type": "integer",
169
+ "minimum": 0,
170
+ "maximum": 9007199254740991
171
+ }
172
+ },
173
+ "additionalProperties": false
174
+ },
175
+ "groups": {
176
+ "type": "object",
177
+ "propertyNames": {
178
+ "type": "string"
179
+ },
180
+ "additionalProperties": {
181
+ "type": "object",
182
+ "properties": {
183
+ "requireMention": {
184
+ "type": "boolean"
185
+ },
186
+ "tools": {
187
+ "type": "object",
188
+ "properties": {
189
+ "allow": {
190
+ "type": "array",
191
+ "items": {
192
+ "type": "string"
193
+ }
194
+ },
195
+ "alsoAllow": {
196
+ "type": "array",
197
+ "items": {
198
+ "type": "string"
199
+ }
200
+ },
201
+ "deny": {
202
+ "type": "array",
203
+ "items": {
204
+ "type": "string"
205
+ }
206
+ }
207
+ },
208
+ "additionalProperties": false
209
+ },
210
+ "toolsBySender": {
211
+ "type": "object",
212
+ "propertyNames": {
213
+ "type": "string"
214
+ },
215
+ "additionalProperties": {
216
+ "type": "object",
217
+ "properties": {
218
+ "allow": {
219
+ "type": "array",
220
+ "items": {
221
+ "type": "string"
222
+ }
223
+ },
224
+ "alsoAllow": {
225
+ "type": "array",
226
+ "items": {
227
+ "type": "string"
228
+ }
229
+ },
230
+ "deny": {
231
+ "type": "array",
232
+ "items": {
233
+ "type": "string"
234
+ }
235
+ }
236
+ },
237
+ "additionalProperties": false
238
+ }
239
+ },
240
+ "systemPrompt": {
241
+ "type": "string"
242
+ }
243
+ },
244
+ "additionalProperties": false
245
+ }
246
+ },
247
+ "direct": {
248
+ "type": "object",
249
+ "propertyNames": {
250
+ "type": "string"
251
+ },
252
+ "additionalProperties": {
253
+ "type": "object",
254
+ "properties": {
255
+ "systemPrompt": {
256
+ "type": "string"
257
+ }
258
+ },
259
+ "additionalProperties": false
260
+ }
261
+ },
262
+ "ackReaction": {
263
+ "type": "object",
264
+ "properties": {
265
+ "emoji": {
266
+ "type": "string"
267
+ },
268
+ "direct": {
269
+ "default": true,
270
+ "type": "boolean"
271
+ },
272
+ "group": {
273
+ "default": "mentions",
274
+ "type": "string",
275
+ "enum": [
276
+ "always",
277
+ "mentions",
278
+ "never"
279
+ ]
280
+ }
281
+ },
282
+ "required": [
283
+ "direct",
284
+ "group"
285
+ ],
286
+ "additionalProperties": false
287
+ },
288
+ "reactionLevel": {
289
+ "type": "string",
290
+ "enum": [
291
+ "off",
292
+ "ack",
293
+ "minimal",
294
+ "extensive"
295
+ ]
296
+ },
297
+ "debounceMs": {
298
+ "default": 0,
299
+ "type": "integer",
300
+ "minimum": 0,
301
+ "maximum": 9007199254740991
302
+ },
303
+ "replyToMode": {
304
+ "anyOf": [
305
+ {
306
+ "type": "string",
307
+ "const": "off"
308
+ },
309
+ {
310
+ "type": "string",
311
+ "const": "first"
312
+ },
313
+ {
314
+ "type": "string",
315
+ "const": "all"
316
+ },
317
+ {
318
+ "type": "string",
319
+ "const": "batched"
320
+ }
321
+ ]
322
+ },
323
+ "heartbeat": {
324
+ "type": "object",
325
+ "properties": {
326
+ "showOk": {
327
+ "type": "boolean"
328
+ },
329
+ "showAlerts": {
330
+ "type": "boolean"
331
+ },
332
+ "useIndicator": {
333
+ "type": "boolean"
334
+ }
335
+ },
336
+ "additionalProperties": false
337
+ },
338
+ "healthMonitor": {
339
+ "type": "object",
340
+ "properties": {
341
+ "enabled": {
342
+ "type": "boolean"
343
+ }
344
+ },
345
+ "additionalProperties": false
346
+ },
347
+ "accounts": {
348
+ "type": "object",
349
+ "propertyNames": {
350
+ "type": "string"
351
+ },
352
+ "additionalProperties": {
353
+ "type": "object",
354
+ "properties": {
355
+ "enabled": {
356
+ "type": "boolean"
357
+ },
358
+ "capabilities": {
359
+ "type": "array",
360
+ "items": {
361
+ "type": "string"
362
+ }
363
+ },
364
+ "markdown": {
365
+ "type": "object",
366
+ "properties": {
367
+ "tables": {
368
+ "type": "string",
369
+ "enum": [
370
+ "off",
371
+ "bullets",
372
+ "code",
373
+ "block"
374
+ ]
375
+ }
376
+ },
377
+ "additionalProperties": false
378
+ },
379
+ "configWrites": {
380
+ "type": "boolean"
381
+ },
382
+ "sendReadReceipts": {
383
+ "type": "boolean"
384
+ },
385
+ "messagePrefix": {
386
+ "type": "string"
387
+ },
388
+ "responsePrefix": {
389
+ "type": "string"
390
+ },
391
+ "dmPolicy": {
392
+ "type": "string",
393
+ "enum": [
394
+ "pairing",
395
+ "allowlist",
396
+ "open",
397
+ "disabled"
398
+ ]
399
+ },
400
+ "selfChatMode": {
401
+ "type": "boolean"
402
+ },
403
+ "allowFrom": {
404
+ "type": "array",
405
+ "items": {
406
+ "type": "string"
407
+ }
408
+ },
409
+ "defaultTo": {
410
+ "type": "string"
411
+ },
412
+ "groupAllowFrom": {
413
+ "type": "array",
414
+ "items": {
415
+ "type": "string"
416
+ }
417
+ },
418
+ "groupPolicy": {
419
+ "type": "string",
420
+ "enum": [
421
+ "open",
422
+ "disabled",
423
+ "allowlist"
424
+ ]
425
+ },
426
+ "contextVisibility": {
427
+ "type": "string",
428
+ "enum": [
429
+ "all",
430
+ "allowlist",
431
+ "allowlist_quote"
432
+ ]
433
+ },
434
+ "historyLimit": {
435
+ "type": "integer",
436
+ "minimum": 0,
437
+ "maximum": 9007199254740991
438
+ },
439
+ "dmHistoryLimit": {
440
+ "type": "integer",
441
+ "minimum": 0,
442
+ "maximum": 9007199254740991
443
+ },
444
+ "dms": {
445
+ "type": "object",
446
+ "propertyNames": {
447
+ "type": "string"
448
+ },
449
+ "additionalProperties": {
450
+ "type": "object",
451
+ "properties": {
452
+ "historyLimit": {
453
+ "type": "integer",
454
+ "minimum": 0,
455
+ "maximum": 9007199254740991
456
+ }
457
+ },
458
+ "additionalProperties": false
459
+ }
460
+ },
461
+ "textChunkLimit": {
462
+ "type": "integer",
463
+ "exclusiveMinimum": 0,
464
+ "maximum": 9007199254740991
465
+ },
466
+ "chunkMode": {
467
+ "type": "string",
468
+ "enum": [
469
+ "length",
470
+ "newline"
471
+ ]
472
+ },
473
+ "blockStreaming": {
474
+ "type": "boolean"
475
+ },
476
+ "blockStreamingCoalesce": {
477
+ "type": "object",
478
+ "properties": {
479
+ "minChars": {
480
+ "type": "integer",
481
+ "exclusiveMinimum": 0,
482
+ "maximum": 9007199254740991
483
+ },
484
+ "maxChars": {
485
+ "type": "integer",
486
+ "exclusiveMinimum": 0,
487
+ "maximum": 9007199254740991
488
+ },
489
+ "idleMs": {
490
+ "type": "integer",
491
+ "minimum": 0,
492
+ "maximum": 9007199254740991
493
+ }
494
+ },
495
+ "additionalProperties": false
496
+ },
497
+ "groups": {
498
+ "type": "object",
499
+ "propertyNames": {
500
+ "type": "string"
501
+ },
502
+ "additionalProperties": {
503
+ "type": "object",
504
+ "properties": {
505
+ "requireMention": {
506
+ "type": "boolean"
507
+ },
508
+ "tools": {
509
+ "type": "object",
510
+ "properties": {
511
+ "allow": {
512
+ "type": "array",
513
+ "items": {
514
+ "type": "string"
515
+ }
516
+ },
517
+ "alsoAllow": {
518
+ "type": "array",
519
+ "items": {
520
+ "type": "string"
521
+ }
522
+ },
523
+ "deny": {
524
+ "type": "array",
525
+ "items": {
526
+ "type": "string"
527
+ }
528
+ }
529
+ },
530
+ "additionalProperties": false
531
+ },
532
+ "toolsBySender": {
533
+ "type": "object",
534
+ "propertyNames": {
535
+ "type": "string"
536
+ },
537
+ "additionalProperties": {
538
+ "type": "object",
539
+ "properties": {
540
+ "allow": {
541
+ "type": "array",
542
+ "items": {
543
+ "type": "string"
544
+ }
545
+ },
546
+ "alsoAllow": {
547
+ "type": "array",
548
+ "items": {
549
+ "type": "string"
550
+ }
551
+ },
552
+ "deny": {
553
+ "type": "array",
554
+ "items": {
555
+ "type": "string"
556
+ }
557
+ }
558
+ },
559
+ "additionalProperties": false
560
+ }
561
+ },
562
+ "systemPrompt": {
563
+ "type": "string"
564
+ }
565
+ },
566
+ "additionalProperties": false
567
+ }
568
+ },
569
+ "direct": {
570
+ "type": "object",
571
+ "propertyNames": {
572
+ "type": "string"
573
+ },
574
+ "additionalProperties": {
575
+ "type": "object",
576
+ "properties": {
577
+ "systemPrompt": {
578
+ "type": "string"
579
+ }
580
+ },
581
+ "additionalProperties": false
582
+ }
583
+ },
584
+ "ackReaction": {
585
+ "type": "object",
586
+ "properties": {
587
+ "emoji": {
588
+ "type": "string"
589
+ },
590
+ "direct": {
591
+ "default": true,
592
+ "type": "boolean"
593
+ },
594
+ "group": {
595
+ "default": "mentions",
596
+ "type": "string",
597
+ "enum": [
598
+ "always",
599
+ "mentions",
600
+ "never"
601
+ ]
602
+ }
603
+ },
604
+ "required": [
605
+ "direct",
606
+ "group"
607
+ ],
608
+ "additionalProperties": false
609
+ },
610
+ "reactionLevel": {
611
+ "type": "string",
612
+ "enum": [
613
+ "off",
614
+ "ack",
615
+ "minimal",
616
+ "extensive"
617
+ ]
618
+ },
619
+ "debounceMs": {
620
+ "type": "integer",
621
+ "minimum": 0,
622
+ "maximum": 9007199254740991
623
+ },
624
+ "replyToMode": {
625
+ "anyOf": [
626
+ {
627
+ "type": "string",
628
+ "const": "off"
629
+ },
630
+ {
631
+ "type": "string",
632
+ "const": "first"
633
+ },
634
+ {
635
+ "type": "string",
636
+ "const": "all"
637
+ },
638
+ {
639
+ "type": "string",
640
+ "const": "batched"
641
+ }
642
+ ]
643
+ },
644
+ "heartbeat": {
645
+ "type": "object",
646
+ "properties": {
647
+ "showOk": {
648
+ "type": "boolean"
649
+ },
650
+ "showAlerts": {
651
+ "type": "boolean"
652
+ },
653
+ "useIndicator": {
654
+ "type": "boolean"
655
+ }
656
+ },
657
+ "additionalProperties": false
658
+ },
659
+ "healthMonitor": {
660
+ "type": "object",
661
+ "properties": {
662
+ "enabled": {
663
+ "type": "boolean"
664
+ }
665
+ },
666
+ "additionalProperties": false
667
+ },
668
+ "name": {
669
+ "type": "string"
670
+ },
671
+ "authDir": {
672
+ "type": "string"
673
+ },
674
+ "mediaMaxMb": {
675
+ "type": "integer",
676
+ "exclusiveMinimum": 0,
677
+ "maximum": 9007199254740991
678
+ }
679
+ },
680
+ "additionalProperties": false
681
+ }
682
+ },
683
+ "defaultAccount": {
684
+ "type": "string"
685
+ },
686
+ "mediaMaxMb": {
687
+ "default": 50,
688
+ "type": "integer",
689
+ "exclusiveMinimum": 0,
690
+ "maximum": 9007199254740991
691
+ },
692
+ "actions": {
693
+ "type": "object",
694
+ "properties": {
695
+ "reactions": {
696
+ "type": "boolean"
697
+ },
698
+ "sendMessage": {
699
+ "type": "boolean"
700
+ },
701
+ "polls": {
702
+ "type": "boolean"
703
+ }
704
+ },
705
+ "additionalProperties": false
706
+ }
707
+ },
708
+ "required": [
709
+ "dmPolicy",
710
+ "groupPolicy",
711
+ "debounceMs",
712
+ "mediaMaxMb"
713
+ ],
714
+ "additionalProperties": false
715
+ },
716
+ "label": "WhatsApp",
717
+ "description": "works with your own number; recommend a separate phone + eSIM.",
718
+ "uiHints": {
719
+ "": {
720
+ "label": "WhatsApp",
721
+ "help": "WhatsApp channel provider configuration for access policy and message batching behavior. Use this section to tune responsiveness and direct-message routing safety for WhatsApp chats."
722
+ },
723
+ "dmPolicy": {
724
+ "label": "WhatsApp DM Policy",
725
+ "help": "Direct message access control (\"pairing\" recommended). \"open\" requires channels.whatsapp.allowFrom=[\"*\"]."
726
+ },
727
+ "selfChatMode": {
728
+ "label": "WhatsApp Self-Phone Mode",
729
+ "help": "Same-phone setup (bot uses your personal WhatsApp number)."
730
+ },
731
+ "debounceMs": {
732
+ "label": "WhatsApp Message Debounce (ms)",
733
+ "help": "Debounce window (ms) for batching rapid consecutive messages from the same sender (0 to disable)."
734
+ },
735
+ "configWrites": {
736
+ "label": "WhatsApp Config Writes",
737
+ "help": "Allow WhatsApp to write config in response to channel events/commands (default: true)."
738
+ }
739
+ }
740
+ }
741
+ }
742
+ }