@openclaw/whatsapp 2026.5.30-beta.1 → 2026.5.31-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 (153) hide show
  1. package/dist/{access-control-Z0fYaWrx.js → access-control-C53zKYSN.js} +1 -1
  2. package/dist/{accounts-BMGM1RtF.js → accounts-DgViSyJx.js} +1 -0
  3. package/dist/{action-runtime-BbUDQ78g.js → action-runtime-Cyp5GNIT.js} +2 -2
  4. package/dist/action-runtime-api.js +1 -1
  5. package/dist/action-runtime.runtime.js +1 -1
  6. package/dist/api.js +8 -8
  7. package/dist/{approval-handler.runtime-BIZgAkfR.js → approval-handler.runtime-BVmOu6x1.js} +1 -2
  8. package/dist/{channel-dHRyqWut.js → channel-DA2BAIo5.js} +5 -5
  9. package/dist/channel-config-api.js +1 -1
  10. package/dist/channel-plugin-api.js +1 -1
  11. package/dist/{channel-react-action-CYx128FS.js → channel-react-action-zvbaCnGe.js} +3 -3
  12. package/dist/{channel.runtime-3WElbRZG.js → channel.runtime-Q1LZDB5s.js} +3 -3
  13. package/dist/{channel.setup-BuSd1d1D.js → channel.setup-DHXOo4h5.js} +1 -2
  14. package/dist/{config-schema-CsNDlDpL.js → config-schema-CROZuhT-.js} +16 -0
  15. package/dist/contract-api.js +1 -1
  16. package/dist/{login-DygDn79y.js → login-2fuBM7Je.js} +1 -1
  17. package/dist/{login-qr-nPxKvdjP.js → login-qr-B1o7GFy8.js} +1 -1
  18. package/dist/login-qr-runtime.js +1 -1
  19. package/dist/{monitor-NKzAEWeJ.js → monitor-BVRq04Dt.js} +17 -9
  20. package/dist/runtime-api.js +5 -5
  21. package/dist/{send-DjMBLgiv.js → send-DSlVXKL_.js} +10 -2
  22. package/dist/{send-api-Cx2qeYqj.js → send-api-Bjn-h80j.js} +3 -2
  23. package/dist/{setup-core-B9CAuPOB.js → setup-core-OvPMaAsx.js} +4 -4
  24. package/dist/{setup-finalize-f95kxYvv.js → setup-finalize-Dk23pfKc.js} +3 -3
  25. package/dist/setup-plugin-api.js +1 -1
  26. package/dist/{setup-surface-_Cid6xIf.js → setup-surface-F-jVrH8u.js} +2 -2
  27. package/node_modules/@audio/decode-aac/LICENSE +9 -0
  28. package/node_modules/@audio/decode-aac/README.md +60 -0
  29. package/node_modules/@audio/decode-aac/decode-aac.d.ts +16 -0
  30. package/node_modules/@audio/decode-aac/decode-aac.js +391 -0
  31. package/node_modules/@audio/decode-aac/package.json +47 -0
  32. package/node_modules/@audio/decode-aac/src/aac.wasm.cjs +0 -0
  33. package/node_modules/@audio/decode-aiff/LICENSE +21 -0
  34. package/node_modules/@audio/decode-aiff/README.md +53 -0
  35. package/node_modules/@audio/decode-aiff/decode-aiff.d.ts +16 -0
  36. package/node_modules/@audio/decode-aiff/decode-aiff.js +583 -0
  37. package/node_modules/@audio/decode-aiff/package.json +42 -0
  38. package/node_modules/@audio/decode-amr/LICENSE +191 -0
  39. package/node_modules/@audio/decode-amr/README.md +65 -0
  40. package/node_modules/@audio/decode-amr/decode-amr.d.ts +16 -0
  41. package/node_modules/@audio/decode-amr/decode-amr.js +159 -0
  42. package/node_modules/@audio/decode-amr/package.json +48 -0
  43. package/node_modules/@audio/decode-amr/src/amr.wasm.cjs +0 -0
  44. package/node_modules/@audio/decode-caf/LICENSE +21 -0
  45. package/node_modules/@audio/decode-caf/README.md +55 -0
  46. package/node_modules/@audio/decode-caf/decode-caf.d.ts +16 -0
  47. package/node_modules/@audio/decode-caf/decode-caf.js +190 -0
  48. package/node_modules/@audio/decode-caf/package.json +43 -0
  49. package/node_modules/{audio-buffer → @audio/decode-flac}/LICENSE +5 -2
  50. package/node_modules/@audio/decode-flac/README.md +23 -0
  51. package/node_modules/@audio/decode-flac/decode-flac.d.ts +16 -0
  52. package/node_modules/@audio/decode-flac/decode-flac.js +2994 -0
  53. package/node_modules/@audio/decode-flac/meta.js +115 -0
  54. package/node_modules/@audio/decode-flac/package.json +49 -0
  55. package/node_modules/@audio/decode-mp3/LICENSE +25 -0
  56. package/node_modules/@audio/decode-mp3/README.md +23 -0
  57. package/node_modules/@audio/decode-mp3/decode-mp3.d.ts +16 -0
  58. package/node_modules/@audio/decode-mp3/decode-mp3.js +868 -0
  59. package/node_modules/@audio/decode-mp3/meta.js +143 -0
  60. package/node_modules/@audio/decode-mp3/package.json +50 -0
  61. package/node_modules/@audio/decode-opus/LICENSE +25 -0
  62. package/node_modules/@audio/decode-opus/README.md +23 -0
  63. package/node_modules/@audio/decode-opus/decode-opus.d.ts +16 -0
  64. package/node_modules/@audio/decode-opus/decode-opus.js +3179 -0
  65. package/node_modules/@audio/decode-opus/package.json +47 -0
  66. package/node_modules/@audio/decode-qoa/LICENSE +25 -0
  67. package/node_modules/@audio/decode-qoa/README.md +21 -0
  68. package/node_modules/@audio/decode-qoa/decode-qoa.d.ts +16 -0
  69. package/node_modules/@audio/decode-qoa/decode-qoa.js +278 -0
  70. package/node_modules/@audio/decode-qoa/package.json +46 -0
  71. package/node_modules/@audio/decode-vorbis/LICENSE +25 -0
  72. package/node_modules/@audio/decode-vorbis/README.md +23 -0
  73. package/node_modules/@audio/decode-vorbis/decode-vorbis.d.ts +16 -0
  74. package/node_modules/@audio/decode-vorbis/decode-vorbis.js +2984 -0
  75. package/node_modules/@audio/decode-vorbis/package.json +47 -0
  76. package/node_modules/@audio/decode-wav/decode-wav.js +104 -0
  77. package/node_modules/@audio/decode-wav/meta.js +114 -0
  78. package/node_modules/@audio/decode-wav/package.json +27 -0
  79. package/node_modules/@audio/decode-webm/LICENSE +21 -0
  80. package/node_modules/@audio/decode-webm/README.md +57 -0
  81. package/node_modules/@audio/decode-webm/decode-webm.d.ts +16 -0
  82. package/node_modules/@audio/decode-webm/decode-webm.js +3964 -0
  83. package/node_modules/@audio/decode-webm/package.json +51 -0
  84. package/node_modules/@audio/decode-wma/LICENSE +12 -0
  85. package/node_modules/@audio/decode-wma/README.md +76 -0
  86. package/node_modules/@audio/decode-wma/decode-wma.d.ts +33 -0
  87. package/node_modules/@audio/decode-wma/decode-wma.js +525 -0
  88. package/node_modules/@audio/decode-wma/package.json +47 -0
  89. package/node_modules/@audio/decode-wma/src/wma.wasm.cjs +0 -0
  90. package/node_modules/audio-decode/.claude/settings.json +204 -0
  91. package/node_modules/audio-decode/.github/workflows/test.js.yml +11 -20
  92. package/node_modules/audio-decode/.gitmodules +9 -0
  93. package/node_modules/audio-decode/audio-decode.d.ts +48 -10
  94. package/node_modules/audio-decode/audio-decode.js +193 -77
  95. package/node_modules/audio-decode/meta.js +11 -0
  96. package/node_modules/audio-decode/package.json +49 -21
  97. package/node_modules/audio-decode/readme.md +129 -29
  98. package/node_modules/audio-decode/stream.d.ts +15 -0
  99. package/node_modules/audio-decode/stream.js +1 -0
  100. package/node_modules/audio-decode/test.html +29 -10
  101. package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +2 -2
  102. package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -1
  103. package/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -1
  104. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +1 -1
  105. package/node_modules/lru-cache/dist/commonjs/index.d.ts +2 -2
  106. package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
  107. package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
  108. package/node_modules/lru-cache/dist/commonjs/index.min.js.map +1 -1
  109. package/node_modules/lru-cache/dist/commonjs/node/index.d.ts +2 -2
  110. package/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -1
  111. package/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -1
  112. package/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +1 -1
  113. package/node_modules/lru-cache/dist/esm/browser/index.d.ts +2 -2
  114. package/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
  115. package/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
  116. package/node_modules/lru-cache/dist/esm/browser/index.min.js.map +1 -1
  117. package/node_modules/lru-cache/dist/esm/index.d.ts +2 -2
  118. package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
  119. package/node_modules/lru-cache/dist/esm/index.js.map +1 -1
  120. package/node_modules/lru-cache/dist/esm/index.min.js.map +1 -1
  121. package/node_modules/lru-cache/dist/esm/node/index.d.ts +2 -2
  122. package/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
  123. package/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
  124. package/node_modules/lru-cache/dist/esm/node/index.min.js.map +1 -1
  125. package/node_modules/lru-cache/package.json +1 -1
  126. package/node_modules/typebox/build/type/script/mapping.d.mts +5 -2
  127. package/node_modules/typebox/build/type/script/mapping.mjs +15 -8
  128. package/node_modules/typebox/build/type/script/parser.d.mts +3 -1
  129. package/node_modules/typebox/build/type/script/parser.mjs +2 -1
  130. package/node_modules/typebox/package.json +29 -29
  131. package/npm-shrinkwrap.json +156 -39
  132. package/openclaw.plugin.json +76 -0
  133. package/package.json +6 -6
  134. package/node_modules/audio-buffer/.eslintrc.json +0 -44
  135. package/node_modules/audio-buffer/.github/workflows/node.js.yml +0 -31
  136. package/node_modules/audio-buffer/.travis.yml +0 -7
  137. package/node_modules/audio-buffer/index.js +0 -76
  138. package/node_modules/audio-buffer/package.json +0 -37
  139. package/node_modules/audio-buffer/readme.md +0 -56
  140. package/node_modules/audio-decode/.eslintrc.json +0 -43
  141. package/node_modules/audio-decode/.travis.yml +0 -13
  142. package/node_modules/audio-decode/tea.yaml +0 -6
  143. package/node_modules/audio-decode/test-case.js +0 -11
  144. package/node_modules/audio-decode/test.js +0 -107
  145. package/node_modules/node-wav/README.md +0 -35
  146. package/node_modules/node-wav/file.wav +0 -0
  147. package/node_modules/node-wav/index.js +0 -291
  148. package/node_modules/node-wav/package.json +0 -29
  149. package/node_modules/node-wav/tests/file1.wav +0 -0
  150. package/node_modules/node-wav/tests/test.js +0 -66
  151. package/node_modules/node-wav/x.js +0 -12
  152. package/node_modules/node-wav/x.json +0 -86702
  153. package/node_modules/node-wav/x.js~ +0 -13
@@ -1,4 +1,4 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-BMGM1RtF.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-DgViSyJx.js";
2
2
  import { l as isSelfChatMode, n as normalizeE164 } from "./text-runtime-Dk37KYHj.js";
3
3
  import { a as getSelfIdentity, o as getSenderIdentity } from "./identity-xoLLdqEv.js";
4
4
  import { defaultRuntime } from "openclaw/plugin-sdk/runtime-env";
@@ -86,6 +86,7 @@ function resolveWhatsAppAccount(params) {
86
86
  allowFrom: merged.allowFrom,
87
87
  groupAllowFrom: merged.groupAllowFrom,
88
88
  groupPolicy: merged.groupPolicy,
89
+ mentionPatterns: merged.mentionPatterns,
89
90
  historyLimit: merged.historyLimit,
90
91
  textChunkLimit: merged.textChunkLimit,
91
92
  chunkMode: merged.chunkMode,
@@ -1,6 +1,6 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-BMGM1RtF.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-DgViSyJx.js";
2
2
  import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
3
- import { g as resolveWhatsAppReactionLevel, r as sendReactionWhatsApp } from "./send-DjMBLgiv.js";
3
+ import { g as resolveWhatsAppReactionLevel, r as sendReactionWhatsApp } from "./send-DSlVXKL_.js";
4
4
  import { ToolAuthorizationError, createActionGate, jsonResult, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
5
5
  //#region extensions/whatsapp/src/action-runtime-target-auth.ts
6
6
  function resolveAuthorizedWhatsAppOutboundTarget(params) {
@@ -1,2 +1,2 @@
1
- import { t as handleWhatsAppAction } from "./action-runtime-BbUDQ78g.js";
1
+ import { t as handleWhatsAppAction } from "./action-runtime-Cyp5GNIT.js";
2
2
  export { handleWhatsAppAction };
@@ -1,2 +1,2 @@
1
- import { t as handleWhatsAppAction } from "./action-runtime-BbUDQ78g.js";
1
+ import { t as handleWhatsAppAction } from "./action-runtime-Cyp5GNIT.js";
2
2
  export { handleWhatsAppAction };
package/dist/api.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
2
- import { a as resolveWhatsAppAccount, i as listWhatsAppAuthDirs, n as hasAnyWhatsAppAuth, o as resolveWhatsAppAuthDir, r as listEnabledWhatsAppAccounts, s as resolveWhatsAppMediaMaxBytes, t as DEFAULT_WHATSAPP_MEDIA_MAX_MB } from "./accounts-BMGM1RtF.js";
2
+ import { a as resolveWhatsAppAccount, i as listWhatsAppAuthDirs, n as hasAnyWhatsAppAuth, o as resolveWhatsAppAuthDir, r as listEnabledWhatsAppAccounts, s as resolveWhatsAppMediaMaxBytes, t as DEFAULT_WHATSAPP_MEDIA_MAX_MB } from "./accounts-DgViSyJx.js";
3
3
  import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, r as isWhatsAppUserTarget, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
4
4
  import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
5
- import "./send-DjMBLgiv.js";
5
+ import "./send-DSlVXKL_.js";
6
6
  import { c as assertWebChannel, d as markdownToWhatsApp, f as resolveJidToE164, l as isSelfChatMode, m as toWhatsappJidWithLid, n as normalizeE164, p as toWhatsappJid, r as resolveUserPath, u as jidToE164 } from "./text-runtime-Dk37KYHj.js";
7
- import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-dHRyqWut.js";
7
+ import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-DA2BAIo5.js";
8
8
  import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
9
- import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-B9CAuPOB.js";
10
- import "./config-schema-CsNDlDpL.js";
11
- import { t as whatsappSetupPlugin } from "./channel.setup-BuSd1d1D.js";
9
+ import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-OvPMaAsx.js";
10
+ import "./config-schema-CROZuhT-.js";
11
+ import { t as whatsappSetupPlugin } from "./channel.setup-DHXOo4h5.js";
12
12
  import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
13
13
  import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-Dijefxc3.js";
14
- import { n as testing } from "./access-control-Z0fYaWrx.js";
15
- import { m as extractText, t as createWebSendApi } from "./send-api-Cx2qeYqj.js";
14
+ import { n as testing } from "./access-control-C53zKYSN.js";
15
+ import { m as extractText, t as createWebSendApi } from "./send-api-Bjn-h80j.js";
16
16
  import { r as waitForWaConnection, t as createWaSocket } from "./session-DyGWNClj.js";
17
17
  import "openclaw/plugin-sdk/channel-actions";
18
18
  import "openclaw/plugin-sdk/account-resolution";
@@ -1,12 +1,11 @@
1
1
  import { s as normalizeWhatsAppMessagingTarget } from "./normalize-target-bVWjgftN.js";
2
- import { f as registerWhatsAppApprovalReactionTarget, i as sendTypingWhatsApp, p as unregisterWhatsAppApprovalReactionTarget, t as sendMessageWhatsApp } from "./send-DjMBLgiv.js";
2
+ import { f as registerWhatsAppApprovalReactionTarget, i as sendTypingWhatsApp, p as unregisterWhatsAppApprovalReactionTarget, t as sendMessageWhatsApp } from "./send-DSlVXKL_.js";
3
3
  import "./normalize-Bxwqo-bW.js";
4
4
  import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
5
5
  import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
6
6
  import { buildApprovalReactionPendingContent } from "openclaw/plugin-sdk/approval-reaction-runtime";
7
7
  import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
8
8
  import { buildChannelApprovalExpiredText, buildChannelApprovalResolvedText, createChannelApprovalNativeRuntimeAdapter, resolvePreparedApprovalAccountId } from "openclaw/plugin-sdk/approval-handler-runtime";
9
- import "openclaw/plugin-sdk/approval-runtime";
10
9
  //#region extensions/whatsapp/src/approval-handler.runtime.ts
11
10
  const log = createSubsystemLogger("whatsapp/approvals");
12
11
  function buildPendingPayload(params) {
@@ -1,15 +1,15 @@
1
1
  import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
2
- import { a as resolveWhatsAppAccount } from "./accounts-BMGM1RtF.js";
2
+ import { a as resolveWhatsAppAccount } from "./accounts-DgViSyJx.js";
3
3
  import { c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as normalizeWhatsAppAllowFromEntry, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
4
4
  import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
5
- import { a as normalizeWhatsAppOutboundPayload, g as resolveWhatsAppReactionLevel, h as whatsappApprovalAuth, i as sendTypingWhatsApp, m as getWhatsAppApprovalApprovers, n as sendPollWhatsApp, o as normalizeWhatsAppPayloadText, s as normalizeWhatsAppPayloadTextPreservingIndentation, t as sendMessageWhatsApp } from "./send-DjMBLgiv.js";
5
+ import { a as normalizeWhatsAppOutboundPayload, g as resolveWhatsAppReactionLevel, h as whatsappApprovalAuth, i as sendTypingWhatsApp, m as getWhatsAppApprovalApprovers, n as sendPollWhatsApp, o as normalizeWhatsAppPayloadText, s as normalizeWhatsAppPayloadTextPreservingIndentation, t as sendMessageWhatsApp } from "./send-DSlVXKL_.js";
6
6
  import "./normalize-Bxwqo-bW.js";
7
7
  import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
8
8
  import { p as toWhatsappJid } from "./text-runtime-Dk37KYHj.js";
9
9
  import { t as createWhatsAppLoginTool } from "./agent-tools-login-BX7eHgDm.js";
10
10
  import { i as lookupInboundMessageMetaForTarget } from "./quoted-message-CveINB35.js";
11
11
  import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
12
- import { a as resolveWhatsAppGroupRequireMention, c as resolveWhatsAppMentionStripRegexes, i as whatsappSetupWizardProxy, l as formatWhatsAppConfigAllowFromEntries, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, r as loadWhatsAppChannelRuntime, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-B9CAuPOB.js";
12
+ import { a as resolveWhatsAppGroupRequireMention, c as resolveWhatsAppMentionStripRegexes, i as whatsappSetupWizardProxy, l as formatWhatsAppConfigAllowFromEntries, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, r as loadWhatsAppChannelRuntime, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-OvPMaAsx.js";
13
13
  import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-CZ22aNcV.js";
14
14
  import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.js";
15
15
  import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
@@ -205,7 +205,7 @@ const whatsappApprovalCapability = createChannelApprovalCapability({
205
205
  accountId,
206
206
  request
207
207
  }),
208
- load: async () => (await import("./approval-handler.runtime-BIZgAkfR.js")).whatsappApprovalNativeRuntime
208
+ load: async () => (await import("./approval-handler.runtime-BVmOu6x1.js")).whatsappApprovalNativeRuntime
209
209
  })
210
210
  });
211
211
  splitChannelApprovalCapability(whatsappApprovalCapability);
@@ -604,7 +604,7 @@ function collectWhatsAppStatusIssues(accounts) {
604
604
  //#endregion
605
605
  //#region extensions/whatsapp/src/channel.ts
606
606
  const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-Dijefxc3.js").then((n) => n.t));
607
- const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-CYx128FS.js"));
607
+ const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-zvbaCnGe.js"));
608
608
  function resolveWhatsAppTargetInfo(raw) {
609
609
  const normalized = normalizeWhatsAppTarget(raw);
610
610
  if (!normalized) return null;
@@ -1,2 +1,2 @@
1
- import { t as WhatsAppChannelConfigSchema } from "./config-schema-CsNDlDpL.js";
1
+ import { t as WhatsAppChannelConfigSchema } from "./config-schema-CROZuhT-.js";
2
2
  export { WhatsAppChannelConfigSchema };
@@ -1,2 +1,2 @@
1
- import { t as whatsappPlugin } from "./channel-dHRyqWut.js";
1
+ import { t as whatsappPlugin } from "./channel-DA2BAIo5.js";
2
2
  export { whatsappPlugin };
@@ -1,7 +1,7 @@
1
- import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-BMGM1RtF.js";
1
+ import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-DgViSyJx.js";
2
2
  import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
3
- import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-BbUDQ78g.js";
4
- import { t as sendMessageWhatsApp } from "./send-DjMBLgiv.js";
3
+ import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-Cyp5GNIT.js";
4
+ import { t as sendMessageWhatsApp } from "./send-DSlVXKL_.js";
5
5
  import "./normalize-Bxwqo-bW.js";
6
6
  import { jsonResult, readStringOrNumberParam, readStringParam as readStringParam$1, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
7
7
  //#region extensions/whatsapp/src/channel-react-action.ts
@@ -1,9 +1,9 @@
1
1
  import { startWebLoginWithQr as startWebLoginWithQr$1, waitForWebLogin as waitForWebLogin$1 } from "./login-qr-runtime.js";
2
2
  import { c as logoutWeb$1, d as readWebAuthExistsBestEffort$1, f as readWebAuthExistsForDecision$1, g as readWebSelfId$1, h as readWebAuthState$1, m as readWebAuthSnapshotBestEffort$1, o as getWebAuthAgeMs$1, p as readWebAuthSnapshot$1, s as logWebSelfId$1, x as webAuthExists$1 } from "./auth-store-CZ22aNcV.js";
3
3
  import { t as getActiveWebListener$1 } from "./active-listener-CFwkn3ho.js";
4
- import { t as monitorWebChannel$1 } from "./monitor-NKzAEWeJ.js";
5
- import { t as loginWeb$1 } from "./login-DygDn79y.js";
6
- import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-_Cid6xIf.js";
4
+ import { t as monitorWebChannel$1 } from "./monitor-BVRq04Dt.js";
5
+ import { t as loginWeb$1 } from "./login-2fuBM7Je.js";
6
+ import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-F-jVrH8u.js";
7
7
  //#region extensions/whatsapp/src/channel.runtime.ts
8
8
  function getActiveWebListener(...args) {
9
9
  return getActiveWebListener$1(...args);
@@ -1,5 +1,4 @@
1
- import "./accounts-BMGM1RtF.js";
2
- import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-B9CAuPOB.js";
1
+ import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-OvPMaAsx.js";
3
2
  import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.js";
4
3
  //#region extensions/whatsapp/src/channel.setup.ts
5
4
  async function isWhatsAppAuthConfigured(account) {
@@ -21,6 +21,22 @@ const WhatsAppChannelConfigSchema = buildChannelConfigSchema(WhatsAppConfigSchem
21
21
  configWrites: {
22
22
  label: "WhatsApp Config Writes",
23
23
  help: "Allow WhatsApp to write config in response to channel events/commands (default: true)."
24
+ },
25
+ mentionPatterns: {
26
+ label: "WhatsApp Mention Pattern Policy",
27
+ help: "Scopes configured groupChat mentionPatterns to selected WhatsApp conversation IDs such as 123@g.us."
28
+ },
29
+ "mentionPatterns.mode": {
30
+ label: "WhatsApp Mention Pattern Mode",
31
+ help: "\"allow\" enables configured regex mention patterns unless denyIn matches; \"deny\" disables them unless allowIn matches."
32
+ },
33
+ "mentionPatterns.allowIn": {
34
+ label: "WhatsApp Mention Pattern Allowlist",
35
+ help: "WhatsApp conversation IDs where configured regex mention patterns are enabled when mode is deny."
36
+ },
37
+ "mentionPatterns.denyIn": {
38
+ label: "WhatsApp Mention Pattern Denylist",
39
+ help: "WhatsApp conversation IDs where configured regex mention patterns are disabled."
24
40
  }
25
41
  } });
26
42
  //#endregion
@@ -4,7 +4,7 @@ import { t as resolveLegacyGroupSessionKey$1 } from "./group-session-contract-DD
4
4
  import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-nAzD945y.js";
5
5
  import { r as isLegacyGroupSessionKey$1, t as canonicalizeLegacySessionKey$1 } from "./session-contract-DMTm6Q_L.js";
6
6
  import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-Dijefxc3.js";
7
- import { a as resolveWhatsAppRuntimeGroupPolicy$1, n as testing } from "./access-control-Z0fYaWrx.js";
7
+ import { a as resolveWhatsAppRuntimeGroupPolicy$1, n as testing } from "./access-control-C53zKYSN.js";
8
8
  //#region extensions/whatsapp/contract-api.ts
9
9
  const canonicalizeLegacySessionKey = canonicalizeLegacySessionKey$1;
10
10
  const isLegacyGroupSessionKey = isLegacyGroupSessionKey$1;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { a as resolveWhatsAppAccount } from "./accounts-BMGM1RtF.js";
2
+ import { a as resolveWhatsAppAccount } from "./accounts-DgViSyJx.js";
3
3
  import { b as restoreCredsFromBackupIfNeeded } from "./auth-store-CZ22aNcV.js";
4
4
  import { a as renderQrTerminal, i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-DyGWNClj.js";
5
5
  import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-Bnm4INld.js";
@@ -1,4 +1,4 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-BMGM1RtF.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-DgViSyJx.js";
2
2
  import { f as readWebAuthExistsForDecision, g as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-CZ22aNcV.js";
3
3
  import { i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-DyGWNClj.js";
4
4
  import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-Bnm4INld.js";
@@ -1,7 +1,7 @@
1
1
  //#region extensions/whatsapp/login-qr-runtime.ts
2
2
  let loginQrModulePromise = null;
3
3
  function loadLoginQrModule() {
4
- loginQrModulePromise ??= import("./login-qr-nPxKvdjP.js");
4
+ loginQrModulePromise ??= import("./login-qr-B1o7GFy8.js");
5
5
  return loginQrModulePromise;
6
6
  }
7
7
  async function startWebLoginWithQr(...args) {
@@ -1,6 +1,6 @@
1
- import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-BMGM1RtF.js";
1
+ import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-DgViSyJx.js";
2
2
  import { t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
3
- import { a as normalizeWhatsAppOutboundPayload, c as prepareWhatsAppOutboundMedia, d as maybeResolveWhatsAppApprovalReaction, g as resolveWhatsAppReactionLevel, l as sendWhatsAppOutboundWithRetry, r as sendReactionWhatsApp, s as normalizeWhatsAppPayloadTextPreservingIndentation } from "./send-DjMBLgiv.js";
3
+ import { a as normalizeWhatsAppOutboundPayload, c as prepareWhatsAppOutboundMedia, d as maybeResolveWhatsAppApprovalReaction, g as resolveWhatsAppReactionLevel, l as sendWhatsAppOutboundWithRetry, r as sendReactionWhatsApp, s as normalizeWhatsAppPayloadTextPreservingIndentation } from "./send-DSlVXKL_.js";
4
4
  import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
5
5
  import { n as getStatusCode, t as formatError } from "./session-errors-CbsoQqoy.js";
6
6
  import { d as markdownToWhatsApp, f as resolveJidToE164, l as isSelfChatMode, n as normalizeE164, t as convertMarkdownTables$1, u as jidToE164 } from "./text-runtime-Dk37KYHj.js";
@@ -8,8 +8,8 @@ import { n as cacheInboundMessageMeta, r as lookupInboundMessageMeta, t as build
8
8
  import { c as logoutWeb, g as readWebSelfId, o as getWebAuthAgeMs, r as WhatsAppAuthUnstableError, v as readWebSelfIdentityForDecision } from "./auth-store-CZ22aNcV.js";
9
9
  import { a as getSelfIdentity, c as resolveComparableIdentity, i as getReplyContext, n as getMentionIdentities, o as getSenderIdentity, r as getPrimaryIdentityId, s as identitiesOverlap, t as getComparableIdentityValues } from "./identity-xoLLdqEv.js";
10
10
  import { n as resolveWhatsAppGroupsConfigPath } from "./group-config-path-BGyzT9Lg.js";
11
- import { i as resolveWhatsAppInboundPolicy, r as resolveWhatsAppCommandAuthorized, t as checkInboundAccessControl } from "./access-control-Z0fYaWrx.js";
12
- import { a as mayContainWhatsAppOutboundMention, c as describeReplyContext, d as extractLocationData, f as extractMediaPlaceholder, h as hasInboundUserContent, i as addWhatsAppOutboundMentionsToContent, l as extractContactContext, m as extractText, n as listWhatsAppSendResultMessageIds, o as resolveWhatsAppOutboundMentions, p as extractMentionedJids, r as normalizeWhatsAppSendResult, s as addWhatsAppImagePreviewFields, t as createWebSendApi, u as extractContextInfo } from "./send-api-Cx2qeYqj.js";
11
+ import { i as resolveWhatsAppInboundPolicy, r as resolveWhatsAppCommandAuthorized, t as checkInboundAccessControl } from "./access-control-C53zKYSN.js";
12
+ import { a as mayContainWhatsAppOutboundMention, c as describeReplyContext, d as extractLocationData, f as extractMediaPlaceholder, h as hasInboundUserContent, i as addWhatsAppOutboundMentionsToContent, l as extractContactContext, m as extractText, n as listWhatsAppSendResultMessageIds, o as resolveWhatsAppOutboundMentions, p as extractMentionedJids, r as normalizeWhatsAppSendResult, s as addWhatsAppImagePreviewFields, t as createWebSendApi, u as extractContextInfo } from "./send-api-Bjn-h80j.js";
13
13
  import { i as resolveWhatsAppSocketTiming, r as waitForWaConnection, t as createWaSocket } from "./session-DyGWNClj.js";
14
14
  import { t as BufferJSON } from "./session.runtime-LZFdq3yb.js";
15
15
  import { c as computeBackoff, d as resolveReconnectPolicy, f as sleepWithAbort, l as newConnectionId, n as WHATSAPP_WATCHDOG_TIMEOUT_ERROR, r as WhatsAppConnectionController, s as DEFAULT_RECONNECT_POLICY, u as resolveHeartbeatSeconds } from "./connection-controller-Bnm4INld.js";
@@ -445,7 +445,7 @@ async function attachWebInboxToSocket(options) {
445
445
  });
446
446
  };
447
447
  const sendTrackedMessage = async (jid, content, sendOptions) => {
448
- let lastErr = new Error(RECONNECT_IN_PROGRESS_ERROR);
448
+ let lastErr = /* @__PURE__ */ new Error(RECONNECT_IN_PROGRESS_ERROR);
449
449
  for (let attempt = 1;; attempt++) {
450
450
  const currentSock = getCurrentSock();
451
451
  if (currentSock) try {
@@ -1015,9 +1015,9 @@ const whatsappOutboundLog = whatsappLog.child("outbound");
1015
1015
  const whatsappHeartbeatLog = whatsappLog.child("heartbeat");
1016
1016
  //#endregion
1017
1017
  //#region extensions/whatsapp/src/auto-reply/mentions.ts
1018
- function buildMentionConfig(cfg, agentId) {
1018
+ function buildMentionConfig(cfg, agentId, options) {
1019
1019
  return {
1020
- mentionRegexes: buildMentionRegexes(cfg, agentId),
1020
+ mentionRegexes: buildMentionRegexes(cfg, agentId, options),
1021
1021
  allowFrom: cfg.channels?.whatsapp?.allowFrom
1022
1022
  };
1023
1023
  }
@@ -1530,7 +1530,11 @@ async function applyGroupGating(params) {
1530
1530
  allowFrom: inboundPolicy.configuredAllowFrom
1531
1531
  };
1532
1532
  const mentionConfig = {
1533
- ...buildMentionConfig(params.cfg, params.agentId),
1533
+ ...buildMentionConfig(params.cfg, params.agentId, {
1534
+ provider: "whatsapp",
1535
+ conversationId: params.conversationId,
1536
+ providerPolicy: params.providerMentionPatterns
1537
+ }),
1534
1538
  allowFrom: inboundPolicy.configuredAllowFrom
1535
1539
  };
1536
1540
  const mentionMsg = params.mentionText !== void 0 ? {
@@ -2184,7 +2188,8 @@ async function dispatchWhatsAppBufferedReply(params) {
2184
2188
  CommandAuthorized: sourceReplyCommandAuthorized
2185
2189
  }
2186
2190
  }) : void 0;
2187
- const disableBlockStreaming = sourceReplyDeliveryMode === "message_tool_only" ? true : resolveWhatsAppDisableBlockStreaming(params.cfg);
2191
+ const sourceRepliesAreToolOnly = sourceReplyDeliveryMode === "message_tool_only";
2192
+ const disableBlockStreaming = sourceRepliesAreToolOnly ? true : resolveWhatsAppDisableBlockStreaming(params.cfg);
2188
2193
  let didSendReply = false;
2189
2194
  let didLogHeartbeatStrip = false;
2190
2195
  const deliverNormalizedPayload = async (normalizedDeliveryPayload, info) => {
@@ -2340,6 +2345,7 @@ async function dispatchWhatsAppBufferedReply(params) {
2340
2345
  }
2341
2346
  },
2342
2347
  replyOptions: {
2348
+ suppressTyping: sourceRepliesAreToolOnly && params.msg.chatType === "group" && !params.msg.wasMentioned,
2343
2349
  disableBlockStreaming,
2344
2350
  ...sourceReplyDeliveryMode ? { sourceReplyDeliveryMode } : {},
2345
2351
  onModelSelected: params.onModelSelected,
@@ -2993,6 +2999,7 @@ function createWebOnMessageHandler(params) {
2993
2999
  agentId: route.agentId,
2994
3000
  sessionKey: route.sessionKey,
2995
3001
  baseMentionConfig,
3002
+ providerMentionPatterns: account.mentionPatterns,
2996
3003
  authDir: account.authDir,
2997
3004
  selfChatMode: account.selfChatMode,
2998
3005
  groupHistories: params.groupHistories,
@@ -3012,6 +3019,7 @@ function createWebOnMessageHandler(params) {
3012
3019
  agentId: route.agentId,
3013
3020
  sessionKey: route.sessionKey,
3014
3021
  baseMentionConfig,
3022
+ providerMentionPatterns: account.mentionPatterns,
3015
3023
  authDir: account.authDir,
3016
3024
  selfChatMode: account.selfChatMode,
3017
3025
  groupHistories: params.groupHistories,
@@ -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-BbUDQ78g.js";
3
- import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-DjMBLgiv.js";
2
+ import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-Cyp5GNIT.js";
3
+ import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-DSlVXKL_.js";
4
4
  import { r as setWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
5
5
  import { n as getStatusCode, t as formatError } from "./session-errors-CbsoQqoy.js";
6
6
  import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
7
7
  import { t as createWhatsAppLoginTool } from "./agent-tools-login-BX7eHgDm.js";
8
8
  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-CZ22aNcV.js";
9
9
  import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
10
- import { d as extractLocationData, f as extractMediaPlaceholder, l as extractContactContext, m as extractText } from "./send-api-Cx2qeYqj.js";
10
+ import { d as extractLocationData, f as extractMediaPlaceholder, l as extractContactContext, m as extractText } from "./send-api-Bjn-h80j.js";
11
11
  import { n as newConnectionId, r as waitForWaConnection, t as createWaSocket } from "./session-DyGWNClj.js";
12
12
  import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-CFwkn3ho.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-NKzAEWeJ.js";
14
- import { t as loginWeb } from "./login-DygDn79y.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-BVRq04Dt.js";
14
+ import { t as loginWeb } from "./login-2fuBM7Je.js";
15
15
  import { HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, SILENT_REPLY_TOKEN, stripHeartbeatToken } from "openclaw/plugin-sdk/reply-runtime";
16
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 };
@@ -1,6 +1,6 @@
1
1
  import { t as resolveMergedWhatsAppAccountConfig } from "./account-config-6PTOSfaI.js";
2
2
  import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
3
- import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-BMGM1RtF.js";
3
+ import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-DgViSyJx.js";
4
4
  import { c as normalizeWhatsAppTarget, n as isWhatsAppNewsletterJid } from "./normalize-target-bVWjgftN.js";
5
5
  import "./normalize-Bxwqo-bW.js";
6
6
  import { t as getOptionalWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
@@ -282,7 +282,15 @@ function resolveWhatsAppDefaultDocumentFileName(mimetype) {
282
282
  }
283
283
  function resolveWhatsAppDocumentFileName(params) {
284
284
  const fallbackName = resolveWhatsAppDefaultDocumentFileName(params.mimetype);
285
- return params.fileName?.replace(/[\x00-\x1f\x7f]/g, "").trim() || fallbackName;
285
+ return stripAsciiControlCharacters(params.fileName ?? "").trim() || fallbackName;
286
+ }
287
+ function stripAsciiControlCharacters(value) {
288
+ let stripped = "";
289
+ for (const char of value) {
290
+ const code = char.charCodeAt(0);
291
+ if (code > 31 && code !== 127) stripped += char;
292
+ }
293
+ return stripped;
286
294
  }
287
295
  //#endregion
288
296
  //#region extensions/whatsapp/src/outbound-media-contract.ts
@@ -1,5 +1,5 @@
1
1
  import { n as isWhatsAppNewsletterJid } from "./normalize-target-bVWjgftN.js";
2
- import { u as resolveWhatsAppDocumentFileName } from "./send-DjMBLgiv.js";
2
+ import { u as resolveWhatsAppDocumentFileName } from "./send-DSlVXKL_.js";
3
3
  import "./normalize-Bxwqo-bW.js";
4
4
  import { m as toWhatsappJidWithLid, p as toWhatsappJid, u as jidToE164 } from "./text-runtime-Dk37KYHj.js";
5
5
  import { t as buildQuotedMessageOptions } from "./quoted-message-CveINB35.js";
@@ -645,7 +645,8 @@ function createWebSendApi(params) {
645
645
  mentionedJids: []
646
646
  };
647
647
  return {
648
- sendMessage: async (to, text, mediaBuffer, mediaType, sendOptions) => {
648
+ sendMessage: async (to, text, mediaBuffer, mediaTypeInput, sendOptions) => {
649
+ let mediaType = mediaTypeInput;
649
650
  const jid = resolveOutboundJid(to);
650
651
  let payload;
651
652
  if (mediaBuffer) mediaType ??= "application/octet-stream";
@@ -1,7 +1,7 @@
1
1
  import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
2
- import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-BMGM1RtF.js";
2
+ import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-DgViSyJx.js";
3
3
  import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-bVWjgftN.js";
4
- import { t as WhatsAppChannelConfigSchema } from "./config-schema-CsNDlDpL.js";
4
+ import { t as WhatsAppChannelConfigSchema } from "./config-schema-CROZuhT-.js";
5
5
  import { n as whatsappDoctor } from "./doctor-By3SB4lm.js";
6
6
  import { t as resolveWhatsAppConfigPath } from "./group-config-path-BGyzT9Lg.js";
7
7
  import { t as resolveLegacyGroupSessionKey } from "./group-session-contract-DDnZSsJ1.js";
@@ -99,10 +99,10 @@ async function applyWhatsAppSecurityConfigFixes(params) {
99
99
  //#region extensions/whatsapp/src/shared.ts
100
100
  const WHATSAPP_CHANNEL = "whatsapp";
101
101
  async function loadWhatsAppChannelRuntime() {
102
- return await import("./channel.runtime-3WElbRZG.js");
102
+ return await import("./channel.runtime-Q1LZDB5s.js");
103
103
  }
104
104
  async function loadWhatsAppSetupSurface() {
105
- return await import("./setup-surface-_Cid6xIf.js");
105
+ return await import("./setup-surface-F-jVrH8u.js");
106
106
  }
107
107
  const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
108
108
  const whatsappConfigAdapter = createScopedChannelConfigAdapter({
@@ -1,8 +1,8 @@
1
1
  import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
2
2
  import { r as hasWebCredsSync } from "./creds-files-B1kSWtBg.js";
3
- import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-BMGM1RtF.js";
3
+ import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-DgViSyJx.js";
4
4
  import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-bVWjgftN.js";
5
- import { t as whatsappSetupAdapter } from "./setup-core-B9CAuPOB.js";
5
+ import { t as whatsappSetupAdapter } from "./setup-core-OvPMaAsx.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
@@ -280,7 +280,7 @@ async function finalizeWhatsAppSetup(params) {
280
280
  message: linked ? t("wizard.whatsapp.relinkPrompt") : t("wizard.whatsapp.linkNowPrompt"),
281
281
  initialValue: !linked
282
282
  })) try {
283
- const { loginWeb } = await import("./login-DygDn79y.js").then((n) => n.n);
283
+ const { loginWeb } = await import("./login-2fuBM7Je.js").then((n) => n.n);
284
284
  await loginWeb(false, void 0, params.runtime, accountId);
285
285
  } catch (error) {
286
286
  params.runtime.error(`WhatsApp login failed: ${String(error)}`);
@@ -1,2 +1,2 @@
1
- import { t as whatsappSetupPlugin } from "./channel.setup-BuSd1d1D.js";
1
+ import { t as whatsappSetupPlugin } from "./channel.setup-DHXOo4h5.js";
2
2
  export { whatsappSetupPlugin };
@@ -1,5 +1,5 @@
1
1
  import { t as listAccountIds } from "./account-ids-CB5SOWjc.js";
2
- import { o as resolveWhatsAppAuthDir } from "./accounts-BMGM1RtF.js";
2
+ import { o as resolveWhatsAppAuthDir } from "./accounts-DgViSyJx.js";
3
3
  import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-CZ22aNcV.js";
4
4
  import { DEFAULT_ACCOUNT_ID, createSetupTranslator, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
5
5
  //#region extensions/whatsapp/src/setup-surface.ts
@@ -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-f95kxYvv.js")).finalizeWhatsAppSetup(params),
39
+ finalize: async (params) => await (await import("./setup-finalize-Dk23pfKc.js")).finalizeWhatsAppSetup(params),
40
40
  disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
41
41
  onAccountRecorded: (accountId, options) => {
42
42
  options?.onAccountId?.(channel, accountId);
@@ -0,0 +1,9 @@
1
+ This work is offered to Krishna (https://github.com/krishnized/license).
2
+
3
+ ---
4
+
5
+ This package is licensed under the GNU General Public License v2.0 (GPL-2.0),
6
+ as required by the included FAAD2 library.
7
+
8
+ FAAD2 Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com
9
+ Full GPL-2.0 text: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
@@ -0,0 +1,60 @@
1
+ # @audio/decode-aac
2
+
3
+ Decode AAC/M4A audio to PCM float samples. FAAD2 compiled to WASM — works in Node.js and browsers, no native dependencies.
4
+
5
+ ## Install
6
+
7
+ ```
8
+ npm i @audio/decode-aac
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```js
14
+ import decode from '@audio/decode-aac'
15
+
16
+ // M4A or raw ADTS — auto-detected
17
+ let { channelData, sampleRate } = await decode(uint8array)
18
+ // channelData: Float32Array[] (one per channel)
19
+ // sampleRate: number
20
+ ```
21
+
22
+ ### Streaming
23
+
24
+ ```js
25
+ import { decoder } from '@audio/decode-aac'
26
+
27
+ let dec = await decoder()
28
+ let { channelData, sampleRate } = dec.decode(chunk)
29
+ dec.free()
30
+ ```
31
+
32
+ ## API
33
+
34
+ ### `decode(src: Uint8Array | ArrayBuffer): Promise<AudioData>`
35
+
36
+ Whole-file decode. Auto-detects M4A (MP4 container) vs raw ADTS.
37
+
38
+ ### `decoder(): Promise<AACDecoder>`
39
+
40
+ Creates a decoder instance for manual control.
41
+
42
+ - **`dec.decode(data)`** — decode chunk, returns `{ channelData, sampleRate }`
43
+ - **`dec.flush()`** — flush remaining (returns empty for AAC)
44
+ - **`dec.free()`** — release WASM memory
45
+
46
+ ### `AudioData`
47
+
48
+ ```ts
49
+ { channelData: Float32Array[], sampleRate: number }
50
+ ```
51
+
52
+ ## Formats
53
+
54
+ - M4A / MP4 with AAC audio
55
+ - Raw ADTS streams (.aac)
56
+ - LC, HE-AAC v1/v2 (SBR, PS)
57
+
58
+ ## License
59
+
60
+ GPL-2.0 (FAAD2) — [krishnized](https://github.com/krishnized/license)
@@ -0,0 +1,16 @@
1
+ interface AudioData {
2
+ channelData: Float32Array[];
3
+ sampleRate: number;
4
+ }
5
+
6
+ interface AACDecoder {
7
+ decode(data: Uint8Array): AudioData;
8
+ flush(): AudioData;
9
+ free(): void;
10
+ }
11
+
12
+ /** Whole-file decode — auto-detects M4A vs ADTS */
13
+ export default function decode(src: ArrayBuffer | Uint8Array): Promise<AudioData>;
14
+
15
+ /** Create streaming decoder instance */
16
+ export function decoder(): Promise<AACDecoder>;