@openclaw/whatsapp 2026.7.1 → 2026.7.2-beta.2

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 (62) hide show
  1. package/dist/{access-control-DYE5dXna.js → access-control-DazDX3RB.js} +4 -4
  2. package/dist/{account-config-6PTOSfaI.js → account-config-LiT9wWH9.js} +4 -8
  3. package/dist/{accounts-4YgwroRU.js → accounts-CKOFMPf-.js} +2 -3
  4. package/dist/{action-runtime-DPahAqxV.js → action-runtime-Bf-12TIH.js} +3 -3
  5. package/dist/action-runtime-api.js +1 -1
  6. package/dist/action-runtime.runtime.js +1 -1
  7. package/dist/{active-listener-B4SDebQ6.js → active-listener-5kHap439.js} +2 -2
  8. package/dist/{agent-tools-login-BX7eHgDm.js → agent-tools-login-DfyToBpG.js} +1 -4
  9. package/dist/api.js +17 -18
  10. package/dist/{approval-handler.runtime-DNWS4aYQ.js → approval-handler.runtime-CBiGQuZ5.js} +19 -13
  11. package/dist/approval-reactions-BGQoz25s.js +373 -0
  12. package/dist/{approval-resolver-DF-lu8k5.js → approval-resolver-DoeBBt22.js} +2 -1
  13. package/dist/{auth-store-Db-wfApd.js → auth-store-BQi9pZqQ.js} +31 -19
  14. package/dist/call-tool-api.js +6 -14
  15. package/dist/{channel-BWp7h1uY.js → channel-DbadDUDD.js} +84 -52
  16. package/dist/channel-config-api.js +1 -1
  17. package/dist/channel-plugin-api.js +1 -1
  18. package/dist/{channel-react-action-CKJHL_Wf.js → channel-react-action-PoRWfP9x.js} +7 -7
  19. package/dist/{channel.runtime-CAssfx9p.js → channel.runtime-BDDy4Lhz.js} +5 -5
  20. package/dist/{channel.setup-CURc5rEt.js → channel.setup-BZ-po8fg.js} +4 -5
  21. package/dist/config-schema-BZ8h1hWA.js +40 -0
  22. package/dist/{connection-controller-DkbrFSIn.js → connection-controller-C1rwfWb4.js} +52 -12
  23. package/dist/connection-controller-runtime-context-CbTsqmPT.js +14 -0
  24. package/dist/contract-api.js +2 -2
  25. package/dist/{directory-config-Dijefxc3.js → directory-config-CLBQrjtC.js} +3 -3
  26. package/dist/directory-contract-api.js +1 -1
  27. package/dist/doctor-contract-api.js +89 -4
  28. package/dist/{group-session-key-BhC1RQOE.js → group-session-key-CLTZeH_F.js} +31 -3
  29. package/dist/{identity-Dqft3mFA.js → identity-D7L8LCuH.js} +2 -2
  30. package/dist/legacy-state-migrations-api.js +1 -1
  31. package/dist/light-runtime-api.js +4 -4
  32. package/dist/{login-C48y0jlx.js → login-DGIoToX8.js} +48 -8
  33. package/dist/{login-qr-BjId7dll.js → login-qr-X-CZHOk9.js} +6 -7
  34. package/dist/login-qr-runtime.js +1 -1
  35. package/dist/{monitor-DD8bXohk.js → monitor-BZ8QvCeV.js} +145 -188
  36. package/dist/normalize-C-Z16y7Q.js +2 -0
  37. package/dist/{normalize-target-bVWjgftN.js → normalize-target-DSZnHkKF.js} +14 -10
  38. package/dist/{resolve-outbound-target-CcdugbDf.js → resolve-outbound-target-BR97fAbB.js} +1 -1
  39. package/dist/runtime-api.js +10 -10
  40. package/dist/{send-C5CpFcBG.js → send-D9Ydnn4o.js} +25 -320
  41. package/dist/{send-api-DLlXl8CH.js → send-api-W33lI2nR.js} +28 -88
  42. package/dist/{session-errors-BAj9D2La.js → session-errors-JuazczrA.js} +2 -1
  43. package/dist/{session-DriaHt7V.js → session-mxWFn0eS.js} +181 -19
  44. package/dist/session.runtime-Nsqaehbd.js +16 -0
  45. package/dist/{setup-core-DH-DFPLY.js → setup-core-3aSOoK2T.js} +18 -33
  46. package/dist/{setup-finalize-c8dl34sO.js → setup-finalize-DBf1jjBj.js} +41 -11
  47. package/dist/setup-plugin-api.js +1 -1
  48. package/dist/{setup-surface-DlWb0Z09.js → setup-surface-CiKGdNJv.js} +3 -3
  49. package/dist/{state-migrations-D_BmQUR9.js → state-migrations-CAMTrs2U.js} +1 -8
  50. package/dist/{targets-runtime-C-GiVn6Y.js → targets-runtime-Bsh0HR9y.js} +13 -6
  51. package/dist/text-runtime-BTGkMN0o.js +4 -0
  52. package/npm-shrinkwrap.json +3 -3
  53. package/openclaw.plugin.json +72 -48
  54. package/package.json +4 -4
  55. package/dist/config-schema-mBX2nmn1.js +0 -47
  56. package/dist/connection-controller-registry-TSX_udJp.js +0 -22
  57. package/dist/constants.js +0 -2
  58. package/dist/normalize-Bxwqo-bW.js +0 -2
  59. package/dist/session.runtime-CyooSQvj.js +0 -12
  60. package/dist/socket-timing-DhbVFjah.js +0 -77
  61. package/dist/targets.js +0 -2
  62. package/dist/text-runtime-DdX6-mC_.js +0 -4
@@ -182,33 +182,45 @@
182
182
  "exclusiveMinimum": 0,
183
183
  "maximum": 9007199254740991
184
184
  },
185
- "chunkMode": {
186
- "type": "string",
187
- "enum": [
188
- "length",
189
- "newline"
190
- ]
191
- },
192
- "blockStreaming": {
193
- "type": "boolean"
194
- },
195
- "blockStreamingCoalesce": {
185
+ "streaming": {
196
186
  "type": "object",
197
187
  "properties": {
198
- "minChars": {
199
- "type": "integer",
200
- "exclusiveMinimum": 0,
201
- "maximum": 9007199254740991
202
- },
203
- "maxChars": {
204
- "type": "integer",
205
- "exclusiveMinimum": 0,
206
- "maximum": 9007199254740991
188
+ "chunkMode": {
189
+ "type": "string",
190
+ "enum": [
191
+ "length",
192
+ "newline"
193
+ ]
207
194
  },
208
- "idleMs": {
209
- "type": "integer",
210
- "minimum": 0,
211
- "maximum": 9007199254740991
195
+ "block": {
196
+ "type": "object",
197
+ "properties": {
198
+ "enabled": {
199
+ "type": "boolean"
200
+ },
201
+ "coalesce": {
202
+ "type": "object",
203
+ "properties": {
204
+ "minChars": {
205
+ "type": "integer",
206
+ "exclusiveMinimum": 0,
207
+ "maximum": 9007199254740991
208
+ },
209
+ "maxChars": {
210
+ "type": "integer",
211
+ "exclusiveMinimum": 0,
212
+ "maximum": 9007199254740991
213
+ },
214
+ "idleMs": {
215
+ "type": "integer",
216
+ "minimum": 0,
217
+ "maximum": 9007199254740991
218
+ }
219
+ },
220
+ "additionalProperties": false
221
+ }
222
+ },
223
+ "additionalProperties": false
212
224
  }
213
225
  },
214
226
  "additionalProperties": false
@@ -543,33 +555,45 @@
543
555
  "exclusiveMinimum": 0,
544
556
  "maximum": 9007199254740991
545
557
  },
546
- "chunkMode": {
547
- "type": "string",
548
- "enum": [
549
- "length",
550
- "newline"
551
- ]
552
- },
553
- "blockStreaming": {
554
- "type": "boolean"
555
- },
556
- "blockStreamingCoalesce": {
558
+ "streaming": {
557
559
  "type": "object",
558
560
  "properties": {
559
- "minChars": {
560
- "type": "integer",
561
- "exclusiveMinimum": 0,
562
- "maximum": 9007199254740991
563
- },
564
- "maxChars": {
565
- "type": "integer",
566
- "exclusiveMinimum": 0,
567
- "maximum": 9007199254740991
561
+ "chunkMode": {
562
+ "type": "string",
563
+ "enum": [
564
+ "length",
565
+ "newline"
566
+ ]
568
567
  },
569
- "idleMs": {
570
- "type": "integer",
571
- "minimum": 0,
572
- "maximum": 9007199254740991
568
+ "block": {
569
+ "type": "object",
570
+ "properties": {
571
+ "enabled": {
572
+ "type": "boolean"
573
+ },
574
+ "coalesce": {
575
+ "type": "object",
576
+ "properties": {
577
+ "minChars": {
578
+ "type": "integer",
579
+ "exclusiveMinimum": 0,
580
+ "maximum": 9007199254740991
581
+ },
582
+ "maxChars": {
583
+ "type": "integer",
584
+ "exclusiveMinimum": 0,
585
+ "maximum": 9007199254740991
586
+ },
587
+ "idleMs": {
588
+ "type": "integer",
589
+ "minimum": 0,
590
+ "maximum": 9007199254740991
591
+ }
592
+ },
593
+ "additionalProperties": false
594
+ }
595
+ },
596
+ "additionalProperties": false
573
597
  }
574
598
  },
575
599
  "additionalProperties": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/whatsapp",
3
- "version": "2026.7.1",
3
+ "version": "2026.7.2-beta.2",
4
4
  "description": "OpenClaw WhatsApp channel plugin for WhatsApp Web chats.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "typebox": "1.3.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.7.1"
16
+ "openclaw": ">=2026.7.2-beta.2"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -56,10 +56,10 @@
56
56
  "minHostVersion": ">=2026.4.25"
57
57
  },
58
58
  "compat": {
59
- "pluginApi": ">=2026.7.1"
59
+ "pluginApi": ">=2026.7.2-beta.2"
60
60
  },
61
61
  "build": {
62
- "openclawVersion": "2026.7.1"
62
+ "openclawVersion": "2026.7.2-beta.2"
63
63
  },
64
64
  "release": {
65
65
  "publishToClawHub": true,
@@ -1,47 +0,0 @@
1
- import { WhatsAppConfigSchema, buildChannelConfigSchema } from "openclaw/plugin-sdk/bundled-channel-config-schema";
2
- //#endregion
3
- //#region extensions/whatsapp/src/config-schema.ts
4
- const WhatsAppChannelConfigSchema = buildChannelConfigSchema(WhatsAppConfigSchema, { uiHints: {
5
- "": {
6
- label: "WhatsApp",
7
- 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."
8
- },
9
- dmPolicy: {
10
- label: "WhatsApp DM Policy",
11
- help: "Direct message access control (\"pairing\" recommended). \"open\" requires channels.whatsapp.allowFrom=[\"*\"]."
12
- },
13
- selfChatMode: {
14
- label: "WhatsApp Self-Phone Mode",
15
- help: "Same-phone setup (bot uses your personal WhatsApp number)."
16
- },
17
- debounceMs: {
18
- label: "WhatsApp Message Debounce (ms)",
19
- help: "Debounce window (ms) for batching rapid consecutive messages from the same sender (0 to disable)."
20
- },
21
- configWrites: {
22
- label: "WhatsApp Config Writes",
23
- help: "Allow WhatsApp to write config in response to channel events/commands (default: true)."
24
- },
25
- "actions.calls": {
26
- label: "WhatsApp Voice Calls",
27
- help: "Expose the experimental requester-bound WhatsApp voice-call tool. Default: false. Requires a separately paired MeowCaller CLI."
28
- },
29
- mentionPatterns: {
30
- label: "WhatsApp Mention Pattern Policy",
31
- help: "Scopes configured groupChat mentionPatterns to selected WhatsApp conversation IDs such as 123@g.us."
32
- },
33
- "mentionPatterns.mode": {
34
- label: "WhatsApp Mention Pattern Mode",
35
- help: "\"allow\" enables configured regex mention patterns unless denyIn matches; \"deny\" disables them unless allowIn matches."
36
- },
37
- "mentionPatterns.allowIn": {
38
- label: "WhatsApp Mention Pattern Allowlist",
39
- help: "WhatsApp conversation IDs where configured regex mention patterns are enabled when mode is deny."
40
- },
41
- "mentionPatterns.denyIn": {
42
- label: "WhatsApp Mention Pattern Denylist",
43
- help: "WhatsApp conversation IDs where configured regex mention patterns are disabled."
44
- }
45
- } });
46
- //#endregion
47
- export { WhatsAppChannelConfigSchema as t };
@@ -1,22 +0,0 @@
1
- //#region extensions/whatsapp/src/connection-controller-registry.ts
2
- const CONNECTION_REGISTRY_KEY = Symbol.for("openclaw.whatsapp.connectionControllerRegistry");
3
- function getConnectionRegistryState() {
4
- const globalState = globalThis;
5
- const existing = globalState[CONNECTION_REGISTRY_KEY];
6
- if (existing) return existing;
7
- const created = { controllers: /* @__PURE__ */ new Map() };
8
- globalState[CONNECTION_REGISTRY_KEY] = created;
9
- return created;
10
- }
11
- function getRegisteredWhatsAppConnectionController(accountId) {
12
- return getConnectionRegistryState().controllers.get(accountId) ?? null;
13
- }
14
- function registerWhatsAppConnectionController(accountId, controller) {
15
- getConnectionRegistryState().controllers.set(accountId, controller);
16
- }
17
- function unregisterWhatsAppConnectionController(accountId, controller) {
18
- const controllers = getConnectionRegistryState().controllers;
19
- if (controllers.get(accountId) === controller) controllers.delete(accountId);
20
- }
21
- //#endregion
22
- export { registerWhatsAppConnectionController as n, unregisterWhatsAppConnectionController as r, getRegisteredWhatsAppConnectionController as t };
package/dist/constants.js DELETED
@@ -1,2 +0,0 @@
1
- import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
2
- export { DEFAULT_WEB_MEDIA_BYTES };
@@ -1,2 +0,0 @@
1
- import "./normalize-target-bVWjgftN.js";
2
- export {};
@@ -1,12 +0,0 @@
1
- import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { BufferJSON, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "baileys";
3
- //#region extensions/whatsapp/src/session.runtime.ts
4
- var session_runtime_exports = /* @__PURE__ */ __exportAll({
5
- BufferJSON: () => BufferJSON,
6
- fetchLatestBaileysVersion: () => fetchLatestBaileysVersion,
7
- makeCacheableSignalKeyStore: () => makeCacheableSignalKeyStore,
8
- makeWASocket: () => makeWASocket,
9
- useMultiFileAuthState: () => useMultiFileAuthState
10
- });
11
- //#endregion
12
- export { session_runtime_exports as a, makeWASocket as i, fetchLatestBaileysVersion as n, useMultiFileAuthState as o, makeCacheableSignalKeyStore as r, BufferJSON as t };
@@ -1,77 +0,0 @@
1
- import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
2
- //#region extensions/whatsapp/src/socket-timing.ts
3
- const socketSendMessageQueueTails = /* @__PURE__ */ new WeakMap();
4
- const DEFAULT_WHATSAPP_SOCKET_TIMING = {
5
- keepAliveIntervalMs: 25e3,
6
- connectTimeoutMs: 6e4,
7
- defaultQueryTimeoutMs: 6e4
8
- };
9
- var WhatsAppSocketOperationTimeoutError = class extends Error {
10
- constructor(operation, timeoutMs) {
11
- super(`WhatsApp socket ${operation} timed out after ${timeoutMs}ms; delivery state is unknown`);
12
- this.operation = operation;
13
- this.timeoutMs = timeoutMs;
14
- this.deliveryState = "unknown";
15
- this.name = "WhatsAppSocketOperationTimeoutError";
16
- }
17
- };
18
- function positiveInteger(value) {
19
- return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : void 0;
20
- }
21
- function resolveWhatsAppSocketTiming(cfg, overrides) {
22
- const configured = cfg.web?.whatsapp;
23
- return {
24
- keepAliveIntervalMs: positiveInteger(overrides?.keepAliveIntervalMs) ?? positiveInteger(configured?.keepAliveIntervalMs) ?? DEFAULT_WHATSAPP_SOCKET_TIMING.keepAliveIntervalMs,
25
- connectTimeoutMs: positiveInteger(overrides?.connectTimeoutMs) ?? positiveInteger(configured?.connectTimeoutMs) ?? DEFAULT_WHATSAPP_SOCKET_TIMING.connectTimeoutMs,
26
- defaultQueryTimeoutMs: positiveInteger(overrides?.defaultQueryTimeoutMs) ?? positiveInteger(configured?.defaultQueryTimeoutMs) ?? DEFAULT_WHATSAPP_SOCKET_TIMING.defaultQueryTimeoutMs
27
- };
28
- }
29
- function isWhatsAppSocketOperationTimeoutError(error) {
30
- return error instanceof WhatsAppSocketOperationTimeoutError;
31
- }
32
- function resolveWhatsAppSocketOperationTimeoutMs(timeoutMs) {
33
- return resolveTimerTimeoutMs(timeoutMs, DEFAULT_WHATSAPP_SOCKET_TIMING.defaultQueryTimeoutMs);
34
- }
35
- async function runSerializedSocketSendMessage(sock, run) {
36
- const result = (socketSendMessageQueueTails.get(sock) ?? Promise.resolve()).then(run);
37
- const tail = result.then(() => void 0, () => void 0);
38
- socketSendMessageQueueTails.set(sock, tail);
39
- tail.then(() => {
40
- if (socketSendMessageQueueTails.get(sock) === tail) socketSendMessageQueueTails.delete(sock);
41
- });
42
- return await result;
43
- }
44
- async function withWhatsAppSocketOperationTimeout(operation, promise, timeoutMs, onTimeout) {
45
- const resolvedTimeoutMs = resolveWhatsAppSocketOperationTimeoutMs(timeoutMs);
46
- let timeout = null;
47
- try {
48
- return await Promise.race([promise, new Promise((_, reject) => {
49
- timeout = setTimeout(() => {
50
- onTimeout?.();
51
- reject(new WhatsAppSocketOperationTimeoutError(operation, resolvedTimeoutMs));
52
- }, resolvedTimeoutMs);
53
- timeout.unref?.();
54
- })]);
55
- } finally {
56
- if (timeout) clearTimeout(timeout);
57
- }
58
- }
59
- function createWhatsAppSocketOperationTimeoutAdapter(sock, timeoutMs, hooks) {
60
- const operationTimeoutMs = resolveWhatsAppSocketOperationTimeoutMs(timeoutMs);
61
- return {
62
- sendMessage: (jid, content, options) => {
63
- return runSerializedSocketSendMessage(sock, () => {
64
- const send = options ? sock.sendMessage(jid, content, options) : sock.sendMessage(jid, content);
65
- return withWhatsAppSocketOperationTimeout("sendMessage", send, operationTimeoutMs, hooks?.onSendMessageTimeout ? () => hooks.onSendMessageTimeout?.({
66
- jid,
67
- promise: send
68
- }) : void 0);
69
- });
70
- },
71
- sendPresenceUpdate: (presence, jid) => {
72
- return withWhatsAppSocketOperationTimeout("sendPresenceUpdate", jid === void 0 ? sock.sendPresenceUpdate(presence) : sock.sendPresenceUpdate(presence, jid), operationTimeoutMs);
73
- }
74
- };
75
- }
76
- //#endregion
77
- export { resolveWhatsAppSocketTiming as a, resolveWhatsAppSocketOperationTimeoutMs as i, createWhatsAppSocketOperationTimeoutAdapter as n, withWhatsAppSocketOperationTimeout as o, isWhatsAppSocketOperationTimeoutError as r, DEFAULT_WHATSAPP_SOCKET_TIMING as t };
package/dist/targets.js DELETED
@@ -1,2 +0,0 @@
1
- import { c as normalizeWhatsAppTarget, r as isWhatsAppUserTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
2
- export { isWhatsAppGroupJid, isWhatsAppUserTarget, normalizeWhatsAppTarget };
@@ -1,4 +0,0 @@
1
- import "./targets-runtime-C-GiVn6Y.js";
2
- import { convertMarkdownTables, sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile, stripToolCallXmlTags } from "openclaw/plugin-sdk/text-chunking";
3
- import { normalizeE164, resolveUserPath as resolveUserPath$1, sleep } from "openclaw/plugin-sdk/text-utility-runtime";
4
- export { sanitizeAssistantVisibleTextWithProfile as a, sanitizeAssistantVisibleText as i, normalizeE164 as n, sleep as o, resolveUserPath$1 as r, stripToolCallXmlTags as s, convertMarkdownTables as t };