@openclaw/whatsapp 2026.7.2-beta.3 → 2026.7.2-beta.5

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 (149) hide show
  1. package/README.md +1 -1
  2. package/dist/{access-control-tjy_em01.js → access-control-pZcxTmd5.js} +4 -5
  3. package/dist/{accounts-ejK8sXPU.js → accounts-CSqLvCY5.js} +1 -2
  4. package/dist/{action-runtime-p0V390gA.js → action-runtime-B2bNDUwE.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-BbdlXooT.js → active-listener-BEjWsCNM.js} +1 -1
  8. package/dist/api.js +13 -22
  9. package/dist/{approval-handler.runtime-BO1oJ-b8.js → approval-handler.runtime-CmtqgLSQ.js} +6 -6
  10. package/dist/{approval-reactions-CrZFAyf-.js → approval-reactions-Cu66aYdq.js} +4 -4
  11. package/dist/{auth-store-BQi9pZqQ.js → auth-store-DcEpIOmE.js} +4 -3
  12. package/dist/call-tool-api.js +4 -4
  13. package/dist/{channel-B2I4Opzb.js → channel-DcWBc3Hb.js} +39 -67
  14. package/dist/channel-config-api.js +1 -1
  15. package/dist/channel-plugin-api.js +1 -1
  16. package/dist/{channel-react-action-CPRQE-s3.js → channel-react-action-DUIkjl6w.js} +12 -15
  17. package/dist/{channel.runtime-CjkhQzk8.js → channel.runtime-Q5fJ2I2b.js} +5 -5
  18. package/dist/{channel.setup-BMWE9LmN.js → channel.setup-C_1u6HN6.js} +3 -6
  19. package/dist/{config-schema-BZ8h1hWA.js → config-schema-DARep0Nn.js} +7 -5
  20. package/dist/{connection-controller-HGaffeFb.js → connection-controller-BOB2MVKY.js} +8 -10
  21. package/dist/{connection-controller-runtime-context-9mEeAvu1.js → connection-controller-runtime-context-DG0tuYuw.js} +3 -3
  22. package/dist/contract-api.js +2 -2
  23. package/dist/{directory-config-BZ775eGX.js → directory-config-DalGrfGN.js} +7 -7
  24. package/dist/directory-contract-api.js +1 -1
  25. package/dist/doctor-CwzVXKoE.js +10 -0
  26. package/dist/doctor-contract-api.js +35 -79
  27. package/dist/{group-session-key-Dh8WZun_.js → group-session-key-DVMZlO3x.js} +11 -6
  28. package/dist/{identity-D7L8LCuH.js → identity-CPrT5aEU.js} +2 -2
  29. package/dist/light-runtime-api.js +2 -2
  30. package/dist/{login-ifOXCBjo.js → login-CvY2Dhch.js} +6 -7
  31. package/dist/{login-qr-DUHzVH_Y.js → login-qr-Bncpb6js.js} +7 -8
  32. package/dist/login-qr-runtime.js +1 -1
  33. package/dist/{monitor-_jqDKBXj.js → monitor-B7phZF9w.js} +427 -525
  34. package/dist/normalize-C7Hkc_vE.js +2 -0
  35. package/dist/{normalize-target-DSZnHkKF.js → normalize-target-CugRyONv.js} +6 -2
  36. package/dist/{question-reactions-C0qJ6wGA.js → question-reactions-CRsnyoMK.js} +1 -1
  37. package/dist/{resolve-outbound-target-BR97fAbB.js → resolve-outbound-target-1GqbT1uX.js} +1 -1
  38. package/dist/runtime-BLlToOi6.js +21 -0
  39. package/dist/runtime-api.js +10 -10
  40. package/dist/runtime-setter-api.js +1 -1
  41. package/dist/{send-SB-4JrVZ.js → send-BTXJAyK4.js} +40 -86
  42. package/dist/{send-api-BG0MgoFI.js → send-api-BY_AkSiB.js} +41 -35
  43. package/dist/{setup-finalize-Cc-4iWGj.js → setup-finalize-C-m-vCl9.js} +4 -4
  44. package/dist/setup-plugin-api.js +1 -1
  45. package/dist/{setup-surface-DhnXEZir.js → setup-surface-BjvUbR6M.js} +3 -3
  46. package/dist/{setup-core-BbIgEl2M.js → shared-UcAwtJaq.js} +79 -57
  47. package/dist/{socket-close-jNGyZY4T.js → socket-close-DridEuzz.js} +5 -6
  48. package/dist/{targets-runtime-Bsh0HR9y.js → targets-runtime-TMk0lGuy.js} +133 -29
  49. package/dist/text-runtime-CaKLhowd.js +4 -0
  50. package/node_modules/@protobufjs/utf8/CHANGELOG.md +8 -0
  51. package/node_modules/@protobufjs/utf8/index.js +29 -18
  52. package/node_modules/@protobufjs/utf8/package.json +2 -2
  53. package/node_modules/@protobufjs/utf8/tests/index.js +5 -0
  54. package/node_modules/@thi.ng/bitstream/package.json +4 -4
  55. package/node_modules/@thi.ng/errors/package.json +4 -4
  56. package/node_modules/@types/node/README.md +1 -1
  57. package/node_modules/@types/node/fs/promises.d.ts +16 -6
  58. package/node_modules/@types/node/package.json +2 -2
  59. package/node_modules/audio-type/package.json +3 -2
  60. package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -1
  61. package/node_modules/lru-cache/dist/commonjs/browser/index.js +11 -4
  62. package/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -1
  63. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +1 -1
  64. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +3 -3
  65. package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
  66. package/node_modules/lru-cache/dist/commonjs/index.js +11 -4
  67. package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
  68. package/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  69. package/node_modules/lru-cache/dist/commonjs/index.min.js.map +3 -3
  70. package/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -1
  71. package/node_modules/lru-cache/dist/commonjs/node/index.js +11 -4
  72. package/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -1
  73. package/node_modules/lru-cache/dist/commonjs/node/index.min.js +1 -1
  74. package/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +3 -3
  75. package/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
  76. package/node_modules/lru-cache/dist/esm/browser/index.js +11 -4
  77. package/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
  78. package/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
  79. package/node_modules/lru-cache/dist/esm/browser/index.min.js.map +3 -3
  80. package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
  81. package/node_modules/lru-cache/dist/esm/index.js +11 -4
  82. package/node_modules/lru-cache/dist/esm/index.js.map +1 -1
  83. package/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  84. package/node_modules/lru-cache/dist/esm/index.min.js.map +3 -3
  85. package/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
  86. package/node_modules/lru-cache/dist/esm/node/index.js +11 -4
  87. package/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
  88. package/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
  89. package/node_modules/lru-cache/dist/esm/node/index.min.js.map +3 -3
  90. package/node_modules/lru-cache/package.json +1 -1
  91. package/node_modules/music-metadata/lib/common/Util.d.ts +1 -1
  92. package/node_modules/music-metadata/lib/common/Util.js +7 -1
  93. package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +23 -3
  94. package/node_modules/music-metadata/lib/id3v2/FrameParser.js +2 -2
  95. package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +1 -1
  96. package/node_modules/music-metadata/lib/mp4/AtomToken.js +38 -13
  97. package/node_modules/music-metadata/lib/mpeg/MpegParser.js +1 -1
  98. package/node_modules/music-metadata/package.json +6 -6
  99. package/node_modules/p-queue/dist/index.js +17 -6
  100. package/node_modules/p-queue/package.json +1 -1
  101. package/node_modules/protobufjs/dist/light/protobuf.js +145 -188
  102. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  103. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  104. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  105. package/node_modules/protobufjs/dist/minimal/protobuf.js +33 -76
  106. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  107. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
  108. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  109. package/node_modules/protobufjs/dist/protobuf.js +168 -208
  110. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  111. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  112. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  113. package/node_modules/protobufjs/index.d.ts +0 -8
  114. package/node_modules/protobufjs/package.json +2 -3
  115. package/node_modules/protobufjs/src/parse.js +3 -0
  116. package/node_modules/protobufjs/src/util/minimal.js +0 -3
  117. package/node_modules/typebox/build/compile/validator.d.mts +1 -4
  118. package/node_modules/typebox/build/guard/guard.d.mts +1 -1
  119. package/node_modules/typebox/build/guard/guard.mjs +5 -2
  120. package/node_modules/typebox/build/guard/string.mjs +16 -4
  121. package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  122. package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
  123. package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
  124. package/node_modules/typebox/build/typebox.d.mts +1 -1
  125. package/node_modules/typebox/build/typebox.mjs +1 -1
  126. package/node_modules/typebox/package.json +1 -1
  127. package/node_modules/typebox/readme.md +29 -32
  128. package/node_modules/ws/lib/receiver.js +15 -32
  129. package/node_modules/ws/lib/websocket-server.js +4 -4
  130. package/node_modules/ws/lib/websocket.js +4 -4
  131. package/node_modules/ws/package.json +5 -1
  132. package/openclaw.plugin.json +138 -194
  133. package/package.json +21 -12
  134. package/dist/doctor-By3SB4lm.js +0 -48
  135. package/dist/normalize-C-Z16y7Q.js +0 -2
  136. package/dist/runtime-BfAdAEYT.js +0 -8
  137. package/dist/text-runtime-BTGkMN0o.js +0 -4
  138. package/node_modules/@protobufjs/inquire/CHANGELOG.md +0 -8
  139. package/node_modules/@protobufjs/inquire/LICENSE +0 -26
  140. package/node_modules/@protobufjs/inquire/README.md +0 -13
  141. package/node_modules/@protobufjs/inquire/index.d.ts +0 -10
  142. package/node_modules/@protobufjs/inquire/index.js +0 -38
  143. package/node_modules/@protobufjs/inquire/package.json +0 -21
  144. package/node_modules/@protobufjs/inquire/tests/data/array.js +0 -1
  145. package/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +0 -1
  146. package/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +0 -1
  147. package/node_modules/@protobufjs/inquire/tests/data/object.js +0 -1
  148. package/node_modules/@protobufjs/inquire/tests/index.js +0 -20
  149. package/npm-shrinkwrap.json +0 -958
@@ -0,0 +1,2 @@
1
+ import "./normalize-target-CugRyONv.js";
2
+ export {};
@@ -1,5 +1,6 @@
1
- import { normalizeLowercaseStringOrEmpty, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
1
+ import { normalizeLowercaseStringOrEmpty, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
2
2
  import { normalizeE164 } from "openclaw/plugin-sdk/account-resolution";
3
+ import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
3
4
  //#region extensions/whatsapp/src/normalize-target.ts
4
5
  const WHATSAPP_USER_JID_RE = /^(\d+)(?::\d+)?@s\.whatsapp\.net$/i;
5
6
  const WHATSAPP_LEGACY_USER_JID_RE = /^(\d+)@c\.us$/i;
@@ -76,7 +77,10 @@ function normalizeWhatsAppMessagingTarget(raw) {
76
77
  return normalizeWhatsAppTarget(trimmed) ?? void 0;
77
78
  }
78
79
  function normalizeWhatsAppAllowFromEntries(allowFrom) {
79
- return uniqueStrings(normalizeStringEntries(allowFrom).map(normalizeWhatsAppAllowFromEntry).filter((entry) => Boolean(entry)));
80
+ return uniqueStrings(formatNormalizedAllowFromEntries({
81
+ allowFrom,
82
+ normalizeEntry: normalizeWhatsAppAllowFromEntry
83
+ }));
80
84
  }
81
85
  function normalizeWhatsAppAllowFromEntry(entry) {
82
86
  if (entry === "*") return entry;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { a as resolveWhatsAppAccount } from "./accounts-ejK8sXPU.js";
2
+ import { a as resolveWhatsAppAccount } from "./accounts-CSqLvCY5.js";
3
3
  import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
4
4
  //#region extensions/whatsapp/src/question-reactions.ts
5
5
  var question_reactions_exports = /* @__PURE__ */ __exportAll({
@@ -1,4 +1,4 @@
1
- import { c as normalizeWhatsAppTarget, n as isWhatsAppNewsletterJid, t as isWhatsAppGroupJid } from "./normalize-target-DSZnHkKF.js";
1
+ import { c as normalizeWhatsAppTarget, n as isWhatsAppNewsletterJid, t as isWhatsAppGroupJid } from "./normalize-target-CugRyONv.js";
2
2
  import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { missingTargetError } from "openclaw/plugin-sdk/channel-feedback";
4
4
  //#region extensions/whatsapp/src/resolve-outbound-target.ts
@@ -0,0 +1,21 @@
1
+ import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
2
+ //#region extensions/whatsapp/src/runtime.ts
3
+ const runtimeStore = createPluginRuntimeStore({
4
+ pluginId: "whatsapp",
5
+ errorMessage: "WhatsApp runtime not initialized"
6
+ });
7
+ const channelRuntimeStore = createPluginRuntimeStore({
8
+ key: "plugin-runtime:whatsapp:channel-context-owner",
9
+ errorMessage: "WhatsApp channel runtime not initialized"
10
+ });
11
+ /** Injects current helpers while preserving the process-lifetime channel context owner. */
12
+ function setWhatsAppRuntime(next) {
13
+ if (!channelRuntimeStore.tryGetRuntime()) channelRuntimeStore.setRuntime(next.channel);
14
+ runtimeStore.setRuntime(next);
15
+ }
16
+ const getWhatsAppRuntime = runtimeStore.getRuntime;
17
+ const getOptionalWhatsAppRuntime = runtimeStore.tryGetRuntime;
18
+ const getWhatsAppChannelRuntime = channelRuntimeStore.getRuntime;
19
+ const getOptionalWhatsAppChannelRuntime = channelRuntimeStore.tryGetRuntime;
20
+ //#endregion
21
+ export { setWhatsAppRuntime as a, getWhatsAppRuntime as i, getOptionalWhatsAppRuntime as n, getWhatsAppChannelRuntime as r, getOptionalWhatsAppChannelRuntime as t };
@@ -1,16 +1,16 @@
1
1
  import { o as resolveWebCredsBackupPath, r as hasWebCredsSync, s as resolveWebCredsPath } from "./creds-files-B1kSWtBg.js";
2
- import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-p0V390gA.js";
3
- import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-SB-4JrVZ.js";
4
- import { r as setWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
2
+ import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-B2bNDUwE.js";
3
+ import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-BTXJAyK4.js";
4
+ import { a as setWhatsAppRuntime } from "./runtime-BLlToOi6.js";
5
5
  import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
6
6
  import { t as createWhatsAppLoginTool } from "./agent-tools-login-DfyToBpG.js";
7
- import { C as waitForCredsSaveQueue, T as writeCredsJsonAtomically, _ as readWebSelfIdentity, a as formatWhatsAppWebAuthStatusState, b as restoreCredsFromBackupIfNeeded, c as logoutWeb, d as readWebAuthExistsBestEffort, f as readWebAuthExistsForDecision, g as readWebSelfId, h as readWebAuthState, l as pickWebChannel, m as readWebAuthSnapshotBestEffort, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as getWebAuthAgeMs, p as readWebAuthSnapshot, r as WhatsAppAuthUnstableError, s as logWebSelfId, t as WA_WEB_AUTH_DIR, u as readCredsJsonRaw, v as readWebSelfIdentityForDecision, w as waitForCredsSaveQueueWithTimeout, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./auth-store-BQi9pZqQ.js";
7
+ import { C as waitForCredsSaveQueue, T as writeCredsJsonAtomically, _ as readWebSelfIdentity, a as formatWhatsAppWebAuthStatusState, b as restoreCredsFromBackupIfNeeded, c as logoutWeb, d as readWebAuthExistsBestEffort, f as readWebAuthExistsForDecision, g as readWebSelfId, h as readWebAuthState, l as pickWebChannel, m as readWebAuthSnapshotBestEffort, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as getWebAuthAgeMs, p as readWebAuthSnapshot, r as WhatsAppAuthUnstableError, s as logWebSelfId, t as WA_WEB_AUTH_DIR, u as readCredsJsonRaw, v as readWebSelfIdentityForDecision, w as waitForCredsSaveQueueWithTimeout, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./auth-store-DcEpIOmE.js";
8
8
  import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
9
- import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-BbdlXooT.js";
10
- import { a as waitForWaConnection, i as newConnectionId, r as createWaSocket } from "./socket-close-jNGyZY4T.js";
9
+ import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-BEjWsCNM.js";
10
+ import { a as waitForWaConnection, i as newConnectionId, r as createWaSocket } from "./socket-close-DridEuzz.js";
11
11
  import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
12
- import { _ as extractLocationData, b as extractText, m as extractContactContext, v as extractMediaPlaceholder } from "./send-api-BG0MgoFI.js";
13
- import { a as loadWebMediaRaw, c as monitorWebInbox, i as loadWebMedia, l as resetWebInboundDedupe, n as LocalMediaAccessError, o as optimizeImageToJpeg, r as getDefaultLocalRoots, s as optimizeImageToPng, t as monitorWebChannel } from "./monitor-_jqDKBXj.js";
14
- import { t as loginWeb } from "./login-ifOXCBjo.js";
12
+ import { g as extractLocationData, p as extractContactContext, y as extractText } from "./send-api-BY_AkSiB.js";
13
+ import { a as loadWebMediaRaw, c as monitorWebInbox, i as loadWebMedia, l as resetWebInboundDedupe, n as LocalMediaAccessError, o as optimizeImageToJpeg, r as getDefaultLocalRoots, s as optimizeImageToPng, t as monitorWebChannel } from "./monitor-B7phZF9w.js";
14
+ import { t as loginWeb } from "./login-CvY2Dhch.js";
15
15
  import { HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, SILENT_REPLY_TOKEN, stripHeartbeatToken } from "openclaw/plugin-sdk/reply-runtime";
16
- export { DEFAULT_WEB_MEDIA_BYTES, HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, LocalMediaAccessError, SILENT_REPLY_TOKEN, WA_WEB_AUTH_DIR, WHATSAPP_AUTH_UNSTABLE_CODE, WhatsAppAuthUnstableError, createWaSocket, createWhatsAppLoginTool, extractContactContext, extractLocationData, extractMediaPlaceholder, extractText, formatError, formatWhatsAppWebAuthStatusState, getActiveWebListener, getDefaultLocalRoots, getStatusCode, getWebAuthAgeMs, handleWhatsAppAction, hasWebCredsSync, loadWebMedia, loadWebMediaRaw, logWebSelfId, loginWeb, logoutWeb, monitorWebChannel, monitorWebInbox, newConnectionId, optimizeImageToJpeg, optimizeImageToPng, pickWebChannel, readCredsJsonRaw, readWebAuthExistsBestEffort, readWebAuthExistsForDecision, readWebAuthSnapshot, readWebAuthSnapshotBestEffort, readWebAuthState, readWebSelfId, readWebSelfIdentity, readWebSelfIdentityForDecision, resetWebInboundDedupe, resolveDefaultWebAuthDir, resolveWebAccountId, resolveWebCredsBackupPath, resolveWebCredsPath, restoreCredsFromBackupIfNeeded, sendMessageWhatsApp, sendPollWhatsApp, sendReactionWhatsApp, sendTypingWhatsApp, setWhatsAppRuntime, startWebLoginWithQr, stripHeartbeatToken, waitForCredsSaveQueue, waitForCredsSaveQueueWithTimeout, waitForWaConnection, waitForWebLogin, webAuthExists, whatsAppActionRuntime, writeCredsJsonAtomically };
16
+ export { DEFAULT_WEB_MEDIA_BYTES, HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, LocalMediaAccessError, SILENT_REPLY_TOKEN, WA_WEB_AUTH_DIR, WHATSAPP_AUTH_UNSTABLE_CODE, WhatsAppAuthUnstableError, createWaSocket, createWhatsAppLoginTool, extractContactContext, extractLocationData, extractText, formatError, formatWhatsAppWebAuthStatusState, getActiveWebListener, getDefaultLocalRoots, getStatusCode, getWebAuthAgeMs, handleWhatsAppAction, hasWebCredsSync, loadWebMedia, loadWebMediaRaw, logWebSelfId, loginWeb, logoutWeb, monitorWebChannel, monitorWebInbox, newConnectionId, optimizeImageToJpeg, optimizeImageToPng, pickWebChannel, readCredsJsonRaw, readWebAuthExistsBestEffort, readWebAuthExistsForDecision, readWebAuthSnapshot, readWebAuthSnapshotBestEffort, readWebAuthState, readWebSelfId, readWebSelfIdentity, readWebSelfIdentityForDecision, resetWebInboundDedupe, resolveDefaultWebAuthDir, resolveWebAccountId, resolveWebCredsBackupPath, resolveWebCredsPath, restoreCredsFromBackupIfNeeded, sendMessageWhatsApp, sendPollWhatsApp, sendReactionWhatsApp, sendTypingWhatsApp, setWhatsAppRuntime, startWebLoginWithQr, stripHeartbeatToken, waitForCredsSaveQueue, waitForCredsSaveQueueWithTimeout, waitForWaConnection, waitForWebLogin, webAuthExists, whatsAppActionRuntime, writeCredsJsonAtomically };
@@ -1,2 +1,2 @@
1
- import { r as setWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
1
+ import { a as setWhatsAppRuntime } from "./runtime-BLlToOi6.js";
2
2
  export { setWhatsAppRuntime };
@@ -1,28 +1,27 @@
1
- import { a as resolveWhatsAppAccount, c as resolveMergedWhatsAppAccountConfig, s as resolveWhatsAppMediaMaxBytes } from "./accounts-ejK8sXPU.js";
1
+ import { a as resolveWhatsAppAccount, c as resolveMergedWhatsAppAccountConfig, s as resolveWhatsAppMediaMaxBytes } from "./accounts-CSqLvCY5.js";
2
2
  import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
3
- import { n as isWhatsAppNewsletterJid } from "./normalize-target-DSZnHkKF.js";
4
- import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-9mEeAvu1.js";
5
- import "./normalize-C-Z16y7Q.js";
6
- import { i as markdownToWhatsApp, s as toWhatsappJid } from "./targets-runtime-Bsh0HR9y.js";
7
- import { a as sanitizeAssistantVisibleTextWithProfile, i as sanitizeAssistantVisibleText, o as stripToolCallXmlTags } from "./text-runtime-BTGkMN0o.js";
3
+ import { n as isWhatsAppNewsletterJid } from "./normalize-target-CugRyONv.js";
4
+ import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-DG0tuYuw.js";
5
+ import "./normalize-C7Hkc_vE.js";
6
+ import { a as markdownToWhatsAppChunks, c as toWhatsappJid } from "./targets-runtime-TMk0lGuy.js";
7
+ import { a as stripToolCallXmlTags, i as sanitizeAssistantVisibleTextWithProfile, r as sanitizeAssistantVisibleText } from "./text-runtime-CaKLhowd.js";
8
8
  import path from "node:path";
9
9
  import { normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
10
- import { writeExternalFileWithinRoot } from "openclaw/plugin-sdk/security-runtime";
11
10
  import { resolveReactionLevel } from "openclaw/plugin-sdk/status-helpers";
12
11
  import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
13
12
  import { generateSecureUuid } from "openclaw/plugin-sdk/core";
14
13
  import { PlatformMessageNotDispatchedError } from "openclaw/plugin-sdk/error-runtime";
15
14
  import { redactIdentifier } from "openclaw/plugin-sdk/logging-core";
16
- import { convertMarkdownTables, resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
15
+ import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
16
+ import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
17
17
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
18
18
  import { normalizePollInput } from "openclaw/plugin-sdk/poll-runtime";
19
+ import { resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
19
20
  import { createSubsystemLogger, getChildLogger as getChildLogger$1 } from "openclaw/plugin-sdk/runtime-env";
20
- import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
21
+ import { extensionForMime, mediaKindFromMime, normalizeMimeType } from "openclaw/plugin-sdk/media-mime";
21
22
  import { sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
22
- import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, runFfmpeg } from "openclaw/plugin-sdk/media-runtime";
23
+ import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, transcodeAudioBufferToOpus } from "openclaw/plugin-sdk/media-runtime";
23
24
  import { resolveOutboundMediaUrls } from "openclaw/plugin-sdk/reply-payload";
24
- import { resolvePreferredOpenClawTmpDir, withTempWorkspace } from "openclaw/plugin-sdk/temp-path";
25
- import { loadWebMedia } from "openclaw/plugin-sdk/web-media";
26
25
  //#region extensions/whatsapp/src/reaction-level.ts
27
26
  /** Resolve the effective reaction level and its implications for WhatsApp. */
28
27
  function resolveWhatsAppReactionLevel(params) {
@@ -95,11 +94,8 @@ function normalizeWhatsAppOutboundPayload(payload, options) {
95
94
  }
96
95
  function inferWhatsAppMediaKind(media) {
97
96
  if (media.kind === "image" || media.kind === "audio" || media.kind === "video" || media.kind === "document") return media.kind;
98
- const contentType = normalizeContentType(media.contentType);
99
- if (contentType.startsWith("image/")) return "image";
100
- if (contentType.startsWith("audio/")) return "audio";
101
- if (contentType.startsWith("video/")) return "video";
102
- return "document";
97
+ const inferredKind = mediaKindFromMime(normalizeMimeType(media.contentType));
98
+ return !inferredKind || inferredKind === "sticker" || inferredKind === "unknown" ? "document" : inferredKind;
103
99
  }
104
100
  function normalizeWhatsAppLoadedMedia(media, mediaUrl) {
105
101
  const kind = inferWhatsAppMediaKind(media);
@@ -135,55 +131,23 @@ async function prepareWhatsAppOutboundMedia(media, mediaUrl) {
135
131
  mimetype: WHATSAPP_VOICE_MIMETYPE
136
132
  };
137
133
  }
138
- function normalizeContentType(value) {
139
- return value?.split(";", 1)[0]?.trim().toLowerCase() ?? "";
140
- }
141
134
  function isWhatsAppNativeVoiceAudio(params) {
142
- const contentType = normalizeContentType(params.contentType);
135
+ const contentType = normalizeMimeType(params.contentType);
143
136
  if (contentType === "audio/ogg" || contentType === "audio/opus") return true;
144
137
  const fileName = params.fileName ?? deriveWhatsAppDocumentFileName(params.mediaUrl) ?? "";
145
138
  const ext = path.extname(fileName).toLowerCase();
146
139
  return ext === ".ogg" || ext === ".opus";
147
140
  }
148
141
  async function transcodeToWhatsAppVoiceOpus(params) {
149
- return await withTempWorkspace({
150
- rootDir: resolvePreferredOpenClawTmpDir(),
151
- prefix: "whatsapp-voice-"
152
- }, async (workspace) => {
153
- const ext = path.extname(params.fileName).toLowerCase();
154
- const inputExt = ext && ext.length <= 12 ? ext : ".audio";
155
- const inputPath = await workspace.write(`input${inputExt}`, params.buffer);
156
- await writeExternalFileWithinRoot({
157
- rootDir: workspace.dir,
158
- path: WHATSAPP_VOICE_FILE_NAME,
159
- write: async (outputPath) => {
160
- await runFfmpeg([
161
- "-hide_banner",
162
- "-loglevel",
163
- "error",
164
- "-y",
165
- "-i",
166
- inputPath,
167
- "-vn",
168
- "-sn",
169
- "-dn",
170
- "-t",
171
- String(MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS),
172
- "-ar",
173
- String(WHATSAPP_VOICE_SAMPLE_RATE_HZ),
174
- "-ac",
175
- "1",
176
- "-c:a",
177
- "libopus",
178
- "-b:a",
179
- WHATSAPP_VOICE_BITRATE,
180
- "-f",
181
- "ogg",
182
- outputPath
183
- ]);
184
- }
185
- });
186
- return await workspace.read(WHATSAPP_VOICE_FILE_NAME);
142
+ return await transcodeAudioBufferToOpus({
143
+ audioBuffer: params.buffer,
144
+ inputFileName: params.fileName,
145
+ tempPrefix: "whatsapp-voice-",
146
+ outputFileName: WHATSAPP_VOICE_FILE_NAME,
147
+ maxDurationSeconds: MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS,
148
+ sampleRateHz: WHATSAPP_VOICE_SAMPLE_RATE_HZ,
149
+ channels: 1,
150
+ bitrate: WHATSAPP_VOICE_BITRATE
187
151
  });
188
152
  }
189
153
  function deriveWhatsAppDocumentFileName(mediaUrl) {
@@ -197,25 +161,6 @@ function deriveWhatsAppDocumentFileName(mediaUrl) {
197
161
  }
198
162
  }
199
163
  //#endregion
200
- //#region extensions/whatsapp/src/outbound-media.runtime.ts
201
- async function loadOutboundMediaFromUrl(mediaUrl, options = {}) {
202
- const readFile = options.mediaAccess?.readFile ?? options.mediaReadFile;
203
- const localRoots = options.mediaAccess?.localRoots?.length && options.mediaAccess.localRoots.length > 0 ? options.mediaAccess.localRoots : options.mediaLocalRoots && options.mediaLocalRoots.length > 0 ? options.mediaLocalRoots : void 0;
204
- const sharedOptions = {
205
- ...options.maxBytes !== void 0 ? { maxBytes: options.maxBytes } : {},
206
- ...options.optimizeImages !== void 0 ? { optimizeImages: options.optimizeImages } : {}
207
- };
208
- return await loadWebMedia(mediaUrl, readFile ? {
209
- ...sharedOptions,
210
- localRoots: "any",
211
- readFile,
212
- hostReadCapability: true
213
- } : {
214
- ...sharedOptions,
215
- ...localRoots ? { localRoots } : {}
216
- });
217
- }
218
- //#endregion
219
164
  //#region extensions/whatsapp/src/send.ts
220
165
  const outboundLog = createSubsystemLogger("gateway/channels/whatsapp").child("outbound");
221
166
  function supportsForcedDocumentDelivery(kind) {
@@ -295,8 +240,14 @@ async function sendMessageWhatsApp(to, body, options) {
295
240
  channel: "whatsapp",
296
241
  accountId: resolvedAccountId ?? options.accountId
297
242
  });
298
- text = convertMarkdownTables(text ?? "", tableMode);
299
- text = markdownToWhatsApp(text);
243
+ const accountIdForFormatting = resolvedAccountId ?? options.accountId;
244
+ const textLimit = Math.min(resolveTextChunkLimit(cfg, "whatsapp", accountIdForFormatting, { fallbackLimit: 4e3 }), 4096);
245
+ const textChunks = markdownToWhatsAppChunks(text, textLimit, tableMode, resolveChunkMode(cfg, "whatsapp", accountIdForFormatting));
246
+ text = textChunks.shift() ?? "";
247
+ if (!text && !hasMedia) return {
248
+ messageId: "",
249
+ toJid: jid
250
+ };
300
251
  const redactedTo = redactIdentifier(to);
301
252
  const logger = getChildLogger$1({
302
253
  module: "web-outbound",
@@ -352,16 +303,19 @@ async function sendMessageWhatsApp(to, body, options) {
352
303
  const result = sendOptions ? await active.sendMessage(to, text, mediaBuffer, mediaType, sendOptions) : await active.sendMessage(to, text, mediaBuffer, mediaType);
353
304
  const messageId = result?.messageId ?? "unknown";
354
305
  const sentRemoteJid = resolveActualSentRemoteJid(result, jid);
355
- if (visibleTextAfterVoice) {
306
+ const trailingTextChunks = [visibleTextAfterVoice, ...textChunks].filter((chunk) => Boolean(chunk));
307
+ if (trailingTextChunks.length > 0) {
356
308
  await options.onDeliveryResult?.({
357
309
  messageId,
358
310
  toJid: sentRemoteJid
359
311
  });
360
- const captionResult = sendOptions ? await active.sendMessage(to, visibleTextAfterVoice, void 0, void 0, sendOptions) : await active.sendMessage(to, visibleTextAfterVoice, void 0, void 0);
361
- await options.onDeliveryResult?.({
362
- messageId: captionResult?.messageId ?? "unknown",
363
- toJid: resolveActualSentRemoteJid(captionResult, jid)
364
- });
312
+ for (const trailingText of trailingTextChunks) {
313
+ const trailingResult = sendOptions ? await active.sendMessage(to, trailingText, void 0, void 0, sendOptions) : await active.sendMessage(to, trailingText, void 0, void 0);
314
+ await options.onDeliveryResult?.({
315
+ messageId: trailingResult?.messageId ?? "unknown",
316
+ toJid: resolveActualSentRemoteJid(trailingResult, jid)
317
+ });
318
+ }
365
319
  }
366
320
  const durationMs = Date.now() - startedAt;
367
321
  outboundLog.info(`Sent message ${messageId} -> ${redactedJid}${hasMedia ? " (media)" : ""} (${durationMs}ms)`);
@@ -1,16 +1,16 @@
1
- import { n as isWhatsAppNewsletterJid } from "./normalize-target-DSZnHkKF.js";
2
- import { l as resolveWhatsAppDocumentFileName } from "./send-SB-4JrVZ.js";
3
- import "./normalize-C-Z16y7Q.js";
4
- import { c as toWhatsappJidWithLid, r as jidToE164, s as toWhatsappJid } from "./targets-runtime-Bsh0HR9y.js";
5
- import "./text-runtime-BTGkMN0o.js";
6
- import { i as buildQuotedMessageOptions } from "./group-session-key-Dh8WZun_.js";
7
- import { c as resolveComparableIdentity } from "./identity-D7L8LCuH.js";
1
+ import { n as isWhatsAppNewsletterJid } from "./normalize-target-CugRyONv.js";
2
+ import { l as resolveWhatsAppDocumentFileName } from "./send-BTXJAyK4.js";
3
+ import "./normalize-C7Hkc_vE.js";
4
+ import { c as toWhatsappJid, l as toWhatsappJidWithLid, r as jidToE164 } from "./targets-runtime-TMk0lGuy.js";
5
+ import "./text-runtime-CaKLhowd.js";
6
+ import { i as buildQuotedMessageOptions } from "./group-session-key-DVMZlO3x.js";
7
+ import { c as resolveComparableIdentity } from "./identity-CPrT5aEU.js";
8
8
  import { normalizeLowercaseStringOrEmpty, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
10
10
  import { createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds } from "openclaw/plugin-sdk/channel-outbound";
11
11
  import { getImageMetadata, resizeToJpeg } from "openclaw/plugin-sdk/media-runtime";
12
- import { DisconnectReason, downloadMediaMessage, extractMessageContent, getContentType, isJidGroup, normalizeMessageContent, normalizeMessageContent as normalizeMessageContent$1 } from "baileys";
13
12
  import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
13
+ import { DisconnectReason, downloadMediaMessage, extractMessageContent, getContentType, isJidGroup, normalizeMessageContent, normalizeMessageContent as normalizeMessageContent$1 } from "baileys";
14
14
  import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
15
15
  //#region extensions/whatsapp/src/vcard.ts
16
16
  const ALLOWED_VCARD_KEYS = /* @__PURE__ */ new Set([
@@ -73,6 +73,20 @@ function normalizeVcardPhone(value) {
73
73
  return trimmed;
74
74
  }
75
75
  //#endregion
76
+ //#region extensions/whatsapp/src/inbound/media-mimetype.ts
77
+ /**
78
+ * Resolve the MIME type for an inbound media message.
79
+ * Falls back to WhatsApp's standard formats when Baileys omits the MIME.
80
+ */
81
+ function resolveInboundMediaMimetype(message) {
82
+ const explicit = message.imageMessage?.mimetype ?? message.videoMessage?.mimetype ?? message.documentMessage?.mimetype ?? message.audioMessage?.mimetype ?? message.stickerMessage?.mimetype ?? void 0;
83
+ if (explicit) return explicit;
84
+ if (message.audioMessage) return "audio/ogg; codecs=opus";
85
+ if (message.imageMessage) return "image/jpeg";
86
+ if (message.videoMessage) return "video/mp4";
87
+ if (message.stickerMessage) return "image/webp";
88
+ }
89
+ //#endregion
76
90
  //#region extensions/whatsapp/src/inbound/extract.ts
77
91
  function getFutureProofInnerMessage(message) {
78
92
  const contentType = getContentType(message);
@@ -170,14 +184,14 @@ function extractExternalAdReplyContext(rawMessage) {
170
184
  body
171
185
  } : void 0;
172
186
  }
173
- function extractMediaPlaceholder(rawMessage) {
187
+ function extractMediaKind(rawMessage) {
174
188
  const message = unwrapMessage(rawMessage);
175
189
  if (!message) return;
176
- if (message.imageMessage) return "<media:image>";
177
- if (message.videoMessage) return message.videoMessage.gifPlayback === true ? "<media:gif>" : "<media:video>";
178
- if (message.audioMessage) return "<media:audio>";
179
- if (message.documentMessage) return "<media:document>";
180
- if (message.stickerMessage) return "<media:sticker>";
190
+ if (message.imageMessage) return "image";
191
+ if (message.videoMessage) return "video";
192
+ if (message.audioMessage) return "audio";
193
+ if (message.documentMessage) return "document";
194
+ if (message.stickerMessage) return "sticker";
181
195
  }
182
196
  function extractContactPlaceholder(rawMessage) {
183
197
  const contactContext = extractContactContext(rawMessage);
@@ -275,9 +289,13 @@ function describeReplyContext(rawMessage) {
275
289
  if (!quoted) return null;
276
290
  const location = extractLocationData(quoted);
277
291
  const locationText = location ? formatLocationText(location) : void 0;
278
- let body = [extractText(quoted), locationText].filter(Boolean).join("\n").trim();
279
- if (!body) body = extractMediaPlaceholder(quoted);
280
- if (!body) {
292
+ const body = [extractText(quoted), locationText].filter(Boolean).join("\n").trim();
293
+ const mediaKind = extractMediaKind(quoted);
294
+ const media = mediaKind ? {
295
+ kind: mediaKind,
296
+ contentType: resolveInboundMediaMimetype(quoted)
297
+ } : void 0;
298
+ if (!body && !media) {
281
299
  const quotedType = quoted ? getContentType(quoted) : void 0;
282
300
  logVerbose(`Quoted message missing extractable body${quotedType ? ` (type ${quotedType})` : ""}`);
283
301
  return null;
@@ -289,7 +307,8 @@ function describeReplyContext(rawMessage) {
289
307
  });
290
308
  return {
291
309
  id: contextInfo?.stanzaId || void 0,
292
- body,
310
+ body: body ?? "",
311
+ media,
293
312
  sender
294
313
  };
295
314
  }
@@ -307,26 +326,12 @@ function hasInteractiveResponseContent(message) {
307
326
  function hasInboundUserContent(rawMessage) {
308
327
  if (!rawMessage) return false;
309
328
  if (extractText(rawMessage)) return true;
310
- if (extractMediaPlaceholder(rawMessage)) return true;
329
+ if (extractMediaKind(rawMessage)) return true;
311
330
  if (extractLocationData(rawMessage)) return true;
312
331
  for (const candidate of buildMessageChain(rawMessage)) if (hasInteractiveResponseContent(candidate)) return true;
313
332
  return false;
314
333
  }
315
334
  //#endregion
316
- //#region extensions/whatsapp/src/inbound/media-mimetype.ts
317
- /**
318
- * Resolve the MIME type for an inbound media message.
319
- * Falls back to WhatsApp's standard formats when Baileys omits the MIME.
320
- */
321
- function resolveInboundMediaMimetype(message) {
322
- const explicit = message.imageMessage?.mimetype ?? message.videoMessage?.mimetype ?? message.documentMessage?.mimetype ?? message.audioMessage?.mimetype ?? message.stickerMessage?.mimetype ?? void 0;
323
- if (explicit) return explicit;
324
- if (message.audioMessage) return "audio/ogg; codecs=opus";
325
- if (message.imageMessage) return "image/jpeg";
326
- if (message.videoMessage) return "video/mp4";
327
- if (message.stickerMessage) return "image/webp";
328
- }
329
- //#endregion
330
335
  //#region extensions/whatsapp/src/image-preview.ts
331
336
  const WHATSAPP_IMAGE_THUMBNAIL_SIDE = 32;
332
337
  const WHATSAPP_IMAGE_THUMBNAIL_QUALITY = 50;
@@ -673,7 +678,8 @@ function createWebSendApi(params) {
673
678
  remoteJid: sendOptions?.quotedMessageKey?.remoteJid,
674
679
  fromMe: sendOptions?.quotedMessageKey?.fromMe,
675
680
  participant: sendOptions?.quotedMessageKey?.participant,
676
- messageText: sendOptions?.quotedMessageKey?.messageText
681
+ messageText: sendOptions?.quotedMessageKey?.messageText,
682
+ media: sendOptions?.quotedMessageKey?.media
677
683
  });
678
684
  const results = [normalizeWhatsAppSendResult(quotedOpts ? await params.sock.sendMessage(jid, payload, quotedOpts) : await params.sock.sendMessage(jid, payload), mediaBuffer ? "media" : "text")];
679
685
  if (shouldSendAudioText) {
@@ -735,4 +741,4 @@ function createWebSendApi(params) {
735
741
  };
736
742
  }
737
743
  //#endregion
738
- export { extractLocationData as _, mayContainWhatsAppOutboundMention as a, extractText as b, DisconnectReason as c, normalizeMessageContent$1 as d, resolveInboundMediaMimetype as f, extractExternalAdReplyContext as g, extractContextInfo as h, addWhatsAppOutboundMentionsToContent as i, downloadMediaMessage as l, extractContactContext as m, listWhatsAppSendResultMessageIds as n, resolveWhatsAppOutboundMentions as o, describeReplyContext as p, normalizeWhatsAppSendResult as r, addWhatsAppImagePreviewFields as s, createWebSendApi as t, isJidGroup as u, extractMediaPlaceholder as v, hasInboundUserContent as x, extractMentionedJids as y };
744
+ export { extractMediaKind as _, mayContainWhatsAppOutboundMention as a, hasInboundUserContent as b, DisconnectReason as c, normalizeMessageContent$1 as d, describeReplyContext as f, extractLocationData as g, extractExternalAdReplyContext as h, addWhatsAppOutboundMentionsToContent as i, downloadMediaMessage as l, extractContextInfo as m, listWhatsAppSendResultMessageIds as n, resolveWhatsAppOutboundMentions as o, extractContactContext as p, normalizeWhatsAppSendResult as r, addWhatsAppImagePreviewFields as s, createWebSendApi as t, isJidGroup as u, extractMentionedJids as v, resolveInboundMediaMimetype as x, extractText as y };
@@ -1,8 +1,8 @@
1
- import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-ejK8sXPU.js";
1
+ import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-CSqLvCY5.js";
2
2
  import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
3
3
  import { r as hasWebCredsSync } from "./creds-files-B1kSWtBg.js";
4
- import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-DSZnHkKF.js";
5
- import { t as whatsappSetupAdapter } from "./setup-core-BbIgEl2M.js";
4
+ import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-CugRyONv.js";
5
+ import { r as whatsappSetupAdapter } from "./shared-UcAwtJaq.js";
6
6
  import { DEFAULT_ACCOUNT_ID, createSetupTranslator, splitSetupEntries } from "openclaw/plugin-sdk/setup";
7
7
  import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
8
8
  //#region extensions/whatsapp/src/setup-finalize.ts
@@ -295,7 +295,7 @@ async function finalizeWhatsAppSetup(params) {
295
295
  };
296
296
  let loginWeb;
297
297
  try {
298
- ({loginWeb} = await import("./login-ifOXCBjo.js").then((n) => n.n));
298
+ ({loginWeb} = await import("./login-CvY2Dhch.js").then((n) => n.n));
299
299
  } catch (error) {
300
300
  await reportLoginFailure(error);
301
301
  }
@@ -1,2 +1,2 @@
1
- import { t as whatsappSetupPlugin } from "./channel.setup-BMWE9LmN.js";
1
+ import { t as whatsappSetupPlugin } from "./channel.setup-C_1u6HN6.js";
2
2
  export { whatsappSetupPlugin };
@@ -1,6 +1,6 @@
1
- import { o as resolveWhatsAppAuthDir } from "./accounts-ejK8sXPU.js";
1
+ import { o as resolveWhatsAppAuthDir } from "./accounts-CSqLvCY5.js";
2
2
  import { t as listAccountIds } from "./account-ids-CB5SOWjc.js";
3
- import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-BQi9pZqQ.js";
3
+ import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-DcEpIOmE.js";
4
4
  import { DEFAULT_ACCOUNT_ID, createSetupTranslator, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
5
5
  //#region extensions/whatsapp/src/setup-surface.ts
6
6
  const t = createSetupTranslator();
@@ -36,7 +36,7 @@ const whatsappSetupWizard = {
36
36
  },
37
37
  resolveShouldPromptAccountIds: ({ shouldPromptAccountIds }) => shouldPromptAccountIds,
38
38
  credentials: [],
39
- finalize: async (params) => await (await import("./setup-finalize-Cc-4iWGj.js")).finalizeWhatsAppSetup(params),
39
+ finalize: async (params) => await (await import("./setup-finalize-C-m-vCl9.js")).finalizeWhatsAppSetup(params),
40
40
  disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
41
41
  onAccountRecorded: (accountId, options) => {
42
42
  options?.onAccountId?.(channel, accountId);