@openclaw/whatsapp 2026.5.26 → 2026.5.27

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 (36) hide show
  1. package/dist/{access-control-otOXu5WK.js → access-control-tKMSybhe.js} +1 -1
  2. package/dist/{account-config-Bxl16soz.js → account-config-6PTOSfaI.js} +1 -1
  3. package/dist/{accounts-B3diVrr6.js → accounts-BMGM1RtF.js} +1 -1
  4. package/dist/{action-runtime-DcAQibC1.js → action-runtime-ClWX76J7.js} +3 -3
  5. package/dist/action-runtime-api.js +1 -1
  6. package/dist/action-runtime.runtime.js +1 -1
  7. package/dist/api.js +10 -10
  8. package/dist/{approval-handler.runtime-D0hxugEn.js → approval-handler.runtime-CnM8rqpB.js} +1 -1
  9. package/dist/{channel-BfG9HEZG.js → channel-DeRnX7Dx.js} +10 -10
  10. package/dist/channel-plugin-api.js +1 -1
  11. package/dist/{channel-react-action-VgsrmO3-.js → channel-react-action-Bo_hIjzN.js} +3 -3
  12. package/dist/{channel.runtime-0kQxYUcI.js → channel.runtime-C08TFa-d.js} +3 -3
  13. package/dist/{channel.setup-1zhfYJ9v.js → channel.setup-CtTHpu8o.js} +2 -2
  14. package/dist/contract-api.js +2 -2
  15. package/dist/{directory-config-CfLFAK54.js → directory-config-Dijefxc3.js} +1 -1
  16. package/dist/directory-contract-api.js +1 -1
  17. package/dist/{login-CympQtg8.js → login-1rs_uPW-.js} +1 -1
  18. package/dist/{login-qr-RCP3gu1G.js → login-qr-CdhkC9Ij.js} +1 -1
  19. package/dist/login-qr-runtime.js +1 -1
  20. package/dist/{monitor-Cxk7UHkH.js → monitor-BdKlBuaK.js} +89 -66
  21. package/dist/{outbound-adapter-BiLBIo1h.js → outbound-adapter-CcNeZvD_.js} +3 -3
  22. package/dist/{outbound-base-DwCUu3ab.js → outbound-base-MHdfVWvv.js} +2 -2
  23. package/dist/{outbound-media-contract-CA2OGvjJ.js → outbound-media-contract-B3Y-9slb.js} +3 -2
  24. package/dist/outbound-payload-test-api.js +1 -1
  25. package/dist/{reaction-level-BqMOEBeq.js → reaction-level-BF3d5IgO.js} +1 -1
  26. package/dist/runtime-api.js +5 -5
  27. package/dist/{send-BuORvrFd.js → send-D0iPQBMX.js} +2 -2
  28. package/dist/{send-api-C3EWzdzp.js → send-api-3hUuzYv1.js} +2 -2
  29. package/dist/{setup-core-mK3yptun.js → setup-core-cgB2JDjU.js} +3 -3
  30. package/dist/{setup-finalize-CkiVDt0B.js → setup-finalize-CCZdGnko.js} +3 -3
  31. package/dist/setup-plugin-api.js +1 -1
  32. package/dist/{setup-surface-sCDFlWd2.js → setup-surface-BouY1WI8.js} +2 -2
  33. package/dist/test-api.js +1 -1
  34. package/npm-shrinkwrap.json +3 -3
  35. package/openclaw.plugin.json +2 -0
  36. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-B3diVrr6.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-BMGM1RtF.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 { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-DeSRFXEV.js";
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_ACCOUNT_ID, mergeAccountConfig, resolveAccountEntry, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-core";
2
- import { resolveChannelStreamingBlockEnabled, resolveChannelStreamingChunkMode } from "openclaw/plugin-sdk/channel-streaming";
2
+ import { resolveChannelStreamingBlockEnabled, resolveChannelStreamingChunkMode } from "openclaw/plugin-sdk/channel-outbound";
3
3
  //#region extensions/whatsapp/src/account-config.ts
4
4
  function resolveWhatsAppDefaultAccountSharedConfig(cfg) {
5
5
  const defaultAccount = resolveAccountEntry(cfg.channels?.whatsapp?.accounts, DEFAULT_ACCOUNT_ID);
@@ -1,4 +1,4 @@
1
- import { t as resolveMergedWhatsAppAccountConfig } from "./account-config-Bxl16soz.js";
1
+ import { t as resolveMergedWhatsAppAccountConfig } from "./account-config-6PTOSfaI.js";
2
2
  import { n as listConfiguredAccountIds, r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
3
3
  import { n as hasWebCredsRegularFileSync, r as hasWebCredsSync } from "./creds-files-B1kSWtBg.js";
4
4
  import fs from "node:fs";
@@ -1,7 +1,7 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-B3diVrr6.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-BMGM1RtF.js";
2
2
  import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
3
- import { t as resolveWhatsAppReactionLevel } from "./reaction-level-BqMOEBeq.js";
4
- import { r as sendReactionWhatsApp } from "./send-BuORvrFd.js";
3
+ import { t as resolveWhatsAppReactionLevel } from "./reaction-level-BF3d5IgO.js";
4
+ import { r as sendReactionWhatsApp } from "./send-D0iPQBMX.js";
5
5
  import { ToolAuthorizationError, createActionGate, jsonResult, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
6
6
  //#region extensions/whatsapp/src/action-runtime-target-auth.ts
7
7
  function resolveAuthorizedWhatsAppOutboundTarget(params) {
@@ -1,2 +1,2 @@
1
- import { t as handleWhatsAppAction } from "./action-runtime-DcAQibC1.js";
1
+ import { t as handleWhatsAppAction } from "./action-runtime-ClWX76J7.js";
2
2
  export { handleWhatsAppAction };
@@ -1,2 +1,2 @@
1
- import { t as handleWhatsAppAction } from "./action-runtime-DcAQibC1.js";
1
+ import { t as handleWhatsAppAction } from "./action-runtime-ClWX76J7.js";
2
2
  export { handleWhatsAppAction };
package/dist/api.js CHANGED
@@ -1,20 +1,20 @@
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-B3diVrr6.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";
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 "./reaction-level-BqMOEBeq.js";
6
- import "./send-BuORvrFd.js";
5
+ import "./reaction-level-BF3d5IgO.js";
6
+ import "./send-D0iPQBMX.js";
7
7
  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";
8
- import { t as whatsappPlugin } from "./channel-BfG9HEZG.js";
9
- import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS } from "./outbound-base-DwCUu3ab.js";
8
+ import { t as whatsappPlugin } from "./channel-DeRnX7Dx.js";
9
+ import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS } from "./outbound-base-MHdfVWvv.js";
10
10
  import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
11
- import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-mK3yptun.js";
11
+ import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-cgB2JDjU.js";
12
12
  import "./config-schema-CsNDlDpL.js";
13
- import { t as whatsappSetupPlugin } from "./channel.setup-1zhfYJ9v.js";
13
+ import { t as whatsappSetupPlugin } from "./channel.setup-CtTHpu8o.js";
14
14
  import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
15
- import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-CfLFAK54.js";
16
- import { n as testing } from "./access-control-otOXu5WK.js";
17
- import { m as extractText, t as createWebSendApi } from "./send-api-C3EWzdzp.js";
15
+ import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-Dijefxc3.js";
16
+ import { n as testing } from "./access-control-tKMSybhe.js";
17
+ import { m as extractText, t as createWebSendApi } from "./send-api-3hUuzYv1.js";
18
18
  import { r as waitForWaConnection, t as createWaSocket } from "./session-CDgpDc0l.js";
19
19
  import "openclaw/plugin-sdk/channel-actions";
20
20
  import "openclaw/plugin-sdk/account-resolution";
@@ -1,6 +1,6 @@
1
1
  import { s as normalizeWhatsAppMessagingTarget } from "./normalize-target-bVWjgftN.js";
2
2
  import "./normalize-Bxwqo-bW.js";
3
- import { c as unregisterWhatsAppApprovalReactionTarget, i as sendTypingWhatsApp, s as registerWhatsAppApprovalReactionTarget, t as sendMessageWhatsApp } from "./send-BuORvrFd.js";
3
+ import { c as unregisterWhatsAppApprovalReactionTarget, i as sendTypingWhatsApp, s as registerWhatsAppApprovalReactionTarget, t as sendMessageWhatsApp } from "./send-D0iPQBMX.js";
4
4
  import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
@@ -1,20 +1,21 @@
1
1
  import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
2
- import { a as resolveWhatsAppAccount } from "./accounts-B3diVrr6.js";
2
+ import { a as resolveWhatsAppAccount } from "./accounts-BMGM1RtF.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 { t as resolveWhatsAppReactionLevel } from "./reaction-level-BqMOEBeq.js";
5
+ import { t as resolveWhatsAppReactionLevel } from "./reaction-level-BF3d5IgO.js";
6
6
  import "./normalize-Bxwqo-bW.js";
7
- import { i as sendTypingWhatsApp, l as getWhatsAppApprovalApprovers, n as sendPollWhatsApp, t as sendMessageWhatsApp, u as whatsappApprovalAuth } from "./send-BuORvrFd.js";
7
+ import { i as sendTypingWhatsApp, l as getWhatsAppApprovalApprovers, n as sendPollWhatsApp, t as sendMessageWhatsApp, u as whatsappApprovalAuth } from "./send-D0iPQBMX.js";
8
8
  import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
9
- import { r as normalizeWhatsAppPayloadTextPreservingIndentation } from "./outbound-media-contract-CA2OGvjJ.js";
9
+ import { r as normalizeWhatsAppPayloadTextPreservingIndentation } from "./outbound-media-contract-B3Y-9slb.js";
10
10
  import { t as createWhatsAppLoginTool } from "./agent-tools-login-BDzvb3ee.js";
11
- import { t as createWhatsAppOutboundBase } from "./outbound-base-DwCUu3ab.js";
11
+ import { t as createWhatsAppOutboundBase } from "./outbound-base-MHdfVWvv.js";
12
12
  import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
13
- 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-mK3yptun.js";
13
+ 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-cgB2JDjU.js";
14
14
  import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-BrKb0mwT.js";
15
15
  import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.js";
16
16
  import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
17
17
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
18
+ import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-outbound";
18
19
  import { asString, collectIssuesForEnabledAccounts, createAsyncComputedAccountStatusAdapter, createDefaultChannelRuntimeState, isRecord as isRecord$1 } from "openclaw/plugin-sdk/status-helpers";
19
20
  import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
20
21
  import { buildChannelOutboundSessionRoute } from "openclaw/plugin-sdk/core";
@@ -28,7 +29,6 @@ import { createChannelApprovalCapability, splitChannelApprovalCapability } from
28
29
  import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
29
30
  import { createChannelApproverDmTargetResolver, createChannelNativeOriginTargetResolver, createNativeApprovalForwardingFallbackSuppressor, doesApprovalRequestMatchChannelAccount, nativeApprovalTargetsMatch, resolveApprovalRequestSessionTarget } from "openclaw/plugin-sdk/approval-native-runtime";
30
31
  import { normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/routing";
31
- import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-message";
32
32
  import { chunkText } from "openclaw/plugin-sdk/reply-chunking";
33
33
  //#region extensions/whatsapp/src/approval-native.ts
34
34
  const DEFAULT_APPROVAL_FORWARDING_MODE = "session";
@@ -328,7 +328,7 @@ const whatsappApprovalCapability = createChannelApprovalCapability({
328
328
  accountId,
329
329
  request
330
330
  }),
331
- load: async () => (await import("./approval-handler.runtime-D0hxugEn.js")).whatsappApprovalNativeRuntime
331
+ load: async () => (await import("./approval-handler.runtime-CnM8rqpB.js")).whatsappApprovalNativeRuntime
332
332
  })
333
333
  });
334
334
  splitChannelApprovalCapability(whatsappApprovalCapability);
@@ -609,8 +609,8 @@ function collectWhatsAppStatusIssues(accounts) {
609
609
  }
610
610
  //#endregion
611
611
  //#region extensions/whatsapp/src/channel.ts
612
- const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-CfLFAK54.js").then((n) => n.t));
613
- const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-VgsrmO3-.js"));
612
+ const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-Dijefxc3.js").then((n) => n.t));
613
+ const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-Bo_hIjzN.js"));
614
614
  function resolveWhatsAppTargetInfo(raw) {
615
615
  const normalized = normalizeWhatsAppTarget(raw);
616
616
  if (!normalized) return null;
@@ -1,2 +1,2 @@
1
- import { t as whatsappPlugin } from "./channel-BfG9HEZG.js";
1
+ import { t as whatsappPlugin } from "./channel-DeRnX7Dx.js";
2
2
  export { whatsappPlugin };
@@ -1,8 +1,8 @@
1
- import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-B3diVrr6.js";
1
+ import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-BMGM1RtF.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-DcAQibC1.js";
3
+ import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-ClWX76J7.js";
4
4
  import "./normalize-Bxwqo-bW.js";
5
- import { t as sendMessageWhatsApp } from "./send-BuORvrFd.js";
5
+ import { t as sendMessageWhatsApp } from "./send-D0iPQBMX.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
8
8
  const WHATSAPP_CHANNEL = "whatsapp";
@@ -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-BrKb0mwT.js";
3
3
  import { t as getActiveWebListener$1 } from "./active-listener-B4SDebQ6.js";
4
- import { t as monitorWebChannel$1 } from "./monitor-Cxk7UHkH.js";
5
- import { t as loginWeb$1 } from "./login-CympQtg8.js";
6
- import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-sCDFlWd2.js";
4
+ import { t as monitorWebChannel$1 } from "./monitor-BdKlBuaK.js";
5
+ import { t as loginWeb$1 } from "./login-1rs_uPW-.js";
6
+ import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-BouY1WI8.js";
7
7
  //#region extensions/whatsapp/src/channel.runtime.ts
8
8
  function getActiveWebListener(...args) {
9
9
  return getActiveWebListener$1(...args);
@@ -1,5 +1,5 @@
1
- import "./accounts-B3diVrr6.js";
2
- import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-mK3yptun.js";
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-cgB2JDjU.js";
3
3
  import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.js";
4
4
  //#region extensions/whatsapp/src/channel.setup.ts
5
5
  async function isWhatsAppAuthConfigured(account) {
@@ -3,9 +3,9 @@ import { t as whatsappCommandPolicy$1 } from "./command-policy-BIOSHySD.js";
3
3
  import { t as resolveLegacyGroupSessionKey$1 } from "./group-session-contract-DDnZSsJ1.js";
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
- import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-CfLFAK54.js";
6
+ import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-Dijefxc3.js";
7
7
  import { t as resolveWhatsAppRuntimeGroupPolicy$1 } from "./runtime-group-policy-DeSRFXEV.js";
8
- import { n as testing } from "./access-control-otOXu5WK.js";
8
+ import { n as testing } from "./access-control-tKMSybhe.js";
9
9
  //#region extensions/whatsapp/contract-api.ts
10
10
  const canonicalizeLegacySessionKey = canonicalizeLegacySessionKey$1;
11
11
  const isLegacyGroupSessionKey = isLegacyGroupSessionKey$1;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { t as resolveMergedWhatsAppAccountConfig } from "./account-config-Bxl16soz.js";
2
+ import { t as resolveMergedWhatsAppAccountConfig } from "./account-config-6PTOSfaI.js";
3
3
  import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
4
4
  import "./normalize-Bxwqo-bW.js";
5
5
  import { listResolvedDirectoryGroupEntriesFromMapKeys, listResolvedDirectoryUserEntriesFromAllowFrom } from "openclaw/plugin-sdk/directory-config-runtime";
@@ -1,2 +1,2 @@
1
- import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-CfLFAK54.js";
1
+ import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-Dijefxc3.js";
2
2
  export { listWhatsAppDirectoryGroupsFromConfig, listWhatsAppDirectoryPeersFromConfig };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { a as resolveWhatsAppAccount } from "./accounts-B3diVrr6.js";
2
+ import { a as resolveWhatsAppAccount } from "./accounts-BMGM1RtF.js";
3
3
  import { b as restoreCredsFromBackupIfNeeded } from "./auth-store-BrKb0mwT.js";
4
4
  import { a as renderQrTerminal, i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-CDgpDc0l.js";
5
5
  import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-ja6z4F_k.js";
@@ -1,4 +1,4 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-B3diVrr6.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-BMGM1RtF.js";
2
2
  import { f as readWebAuthExistsForDecision, g as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-BrKb0mwT.js";
3
3
  import { i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-CDgpDc0l.js";
4
4
  import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-ja6z4F_k.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-RCP3gu1G.js");
4
+ loginQrModulePromise ??= import("./login-qr-CdhkC9Ij.js");
5
5
  return loginQrModulePromise;
6
6
  }
7
7
  async function startWebLoginWithQr(...args) {
@@ -1,23 +1,24 @@
1
- import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-B3diVrr6.js";
1
+ import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-BMGM1RtF.js";
2
2
  import { t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
3
- import { t as resolveWhatsAppReactionLevel } from "./reaction-level-BqMOEBeq.js";
4
- import { o as maybeResolveWhatsAppApprovalReaction, r as sendReactionWhatsApp } from "./send-BuORvrFd.js";
3
+ import { t as resolveWhatsAppReactionLevel } from "./reaction-level-BF3d5IgO.js";
4
+ import { o as maybeResolveWhatsAppApprovalReaction, r as sendReactionWhatsApp } from "./send-D0iPQBMX.js";
5
5
  import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
6
- import { i as prepareWhatsAppOutboundMedia, o as sendWhatsAppOutboundWithRetry, r as normalizeWhatsAppPayloadTextPreservingIndentation, t as normalizeWhatsAppOutboundPayload } from "./outbound-media-contract-CA2OGvjJ.js";
6
+ import { i as prepareWhatsAppOutboundMedia, o as sendWhatsAppOutboundWithRetry, r as normalizeWhatsAppPayloadTextPreservingIndentation, t as normalizeWhatsAppOutboundPayload } from "./outbound-media-contract-B3Y-9slb.js";
7
7
  import { n as getStatusCode, t as formatError } from "./session-errors-BAj9D2La.js";
8
8
  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";
9
9
  import { n as cacheInboundMessageMeta, r as lookupInboundMessageMeta, t as buildQuotedMessageOptions } from "./quoted-message-CveINB35.js";
10
10
  import { c as logoutWeb, g as readWebSelfId, o as getWebAuthAgeMs, r as WhatsAppAuthUnstableError, v as readWebSelfIdentityForDecision } from "./auth-store-BrKb0mwT.js";
11
11
  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";
12
12
  import { n as resolveWhatsAppGroupsConfigPath } from "./group-config-path-BGyzT9Lg.js";
13
- import { i as resolveWhatsAppInboundPolicy, r as resolveWhatsAppCommandAuthorized, t as checkInboundAccessControl } from "./access-control-otOXu5WK.js";
14
- 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-C3EWzdzp.js";
13
+ import { i as resolveWhatsAppInboundPolicy, r as resolveWhatsAppCommandAuthorized, t as checkInboundAccessControl } from "./access-control-tKMSybhe.js";
14
+ 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-3hUuzYv1.js";
15
15
  import { i as resolveWhatsAppSocketTiming, r as waitForWaConnection, t as createWaSocket } from "./session-CDgpDc0l.js";
16
16
  import { t as BufferJSON } from "./session.runtime-LZFdq3yb.js";
17
17
  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-ja6z4F_k.js";
18
18
  import { resolveAccountEntry } from "openclaw/plugin-sdk/account-core";
19
19
  import { normalizeLowercaseStringOrEmpty, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
20
- import { evaluateSupplementalContextVisibility, filterSupplementalContextItems, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
20
+ import { createChannelMessageReplyPipeline, createDurableInboundReceiveJournal, createMessageReceiptFromOutboundResults, deliverInboundReplyWithMessageSendContext, resolveChannelMessageSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-outbound";
21
+ import { filterSupplementalContextItems, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
21
22
  import { DEFAULT_TIMING, createAckReactionHandle, createStatusReactionController, logAckFailure, removeAckReactionHandleAfterReply, shouldAckReactionForWhatsApp } from "openclaw/plugin-sdk/channel-feedback";
22
23
  import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
23
24
  import { getChildLogger } from "openclaw/plugin-sdk/logging-core";
@@ -26,13 +27,12 @@ import { createSubsystemLogger, defaultRuntime, formatDurationPrecise, getChildL
26
27
  import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
27
28
  import { LocalMediaAccessError, getDefaultLocalRoots, loadWebMedia as loadWebMedia$1, loadWebMediaRaw, optimizeImageToJpeg, optimizeImageToPng } from "openclaw/plugin-sdk/web-media";
28
29
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, DEFAULT_MAIN_KEY, buildAgentMainSessionKey, buildAgentSessionKey, buildGroupHistoryKey, deriveLastRoutePolicy, normalizeAccountId as normalizeAccountId$1, normalizeAgentId, resolveAgentRoute, resolveInboundLastRouteSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
29
- import { createChannelMessageReplyPipeline, createDurableInboundReceiveJournal, createMessageReceiptFromOutboundResults, deliverInboundReplyWithMessageSendContext, resolveChannelMessageSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-message";
30
30
  import { chunkMarkdownTextWithMode } from "openclaw/plugin-sdk/reply-chunking";
31
31
  import { isReasoningReplyPayload, resolveSendableOutboundReplyParts, sendMediaWithLeadingCaption } from "openclaw/plugin-sdk/reply-payload";
32
32
  import { recordInboundSession } from "openclaw/plugin-sdk/conversation-runtime";
33
33
  import { loadSessionStore, resolveStorePath, updateLastRoute, updateSessionStore } from "openclaw/plugin-sdk/session-store-runtime";
34
34
  import { DisconnectReason as DisconnectReason$1, downloadMediaMessage, isJidGroup, normalizeMessageContent as normalizeMessageContent$1 } from "baileys";
35
- import { formatLocationText, resolveInboundSessionEnvelopeContext } from "openclaw/plugin-sdk/channel-inbound";
35
+ import { buildChannelInboundEventContext, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundEnvelope as formatInboundEnvelope$1, formatLocationText, hasVisibleInboundReplyDispatch, resolveInboundSessionEnvelopeContext, runChannelInboundEvent, toInboundMediaFacts, toLocationContext } from "openclaw/plugin-sdk/channel-inbound";
36
36
  import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
37
37
  import { createHash } from "node:crypto";
38
38
  import { dispatchReplyWithBufferedBlockDispatcher, finalizeInboundContext, resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime";
@@ -52,11 +52,8 @@ import { createConnectedChannelStatusPatch, createTransportActivityStatusPatch }
52
52
  import { resolveAgentIdentity, resolveIdentityNamePrefix as resolveIdentityNamePrefix$1 } from "openclaw/plugin-sdk/agent-runtime";
53
53
  import { normalizeGroupActivation, parseActivationCommand } from "openclaw/plugin-sdk/group-activation";
54
54
  import { createInternalHookEvent, deriveInboundMessageHookContext, fireAndForgetBoundedHook, toInternalMessageReceivedContext, toPluginMessageContext, toPluginMessageReceivedEvent, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
55
- import { hasVisibleInboundReplyDispatch, runInboundReplyTurn } from "openclaw/plugin-sdk/inbound-reply-dispatch";
56
55
  import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
57
56
  import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
58
- import { formatInboundEnvelope, formatInboundEnvelope as formatInboundEnvelope$1 } from "openclaw/plugin-sdk/channel-envelope";
59
- import { toLocationContext } from "openclaw/plugin-sdk/channel-location";
60
57
  //#region extensions/whatsapp/src/inbound/dedupe.ts
61
58
  const RECENT_WEB_MESSAGE_TTL_MS = 20 * 6e4;
62
59
  const RECENT_WEB_MESSAGE_MAX = 5e3;
@@ -1888,14 +1885,16 @@ function resolveVisibleWhatsAppGroupHistory(params) {
1888
1885
  function resolveVisibleWhatsAppReplyContext(params) {
1889
1886
  const replyTo = getReplyContext(params.msg, params.authDir);
1890
1887
  if (!replyTo) return null;
1891
- return evaluateSupplementalContextVisibility({
1892
- mode: params.mode,
1893
- kind: "quote",
1894
- senderAllowed: params.msg.chatType !== "group" || params.groupPolicy !== "allowlist" ? true : isWhatsAppSupplementalSenderAllowed({
1895
- allowFrom: params.groupAllowFrom,
1896
- sender: replyTo.sender
1897
- })
1898
- }).include ? replyTo : null;
1888
+ const senderAllowed = params.msg.chatType !== "group" || params.groupPolicy !== "allowlist" ? true : isWhatsAppSupplementalSenderAllowed({
1889
+ allowFrom: params.groupAllowFrom,
1890
+ sender: replyTo.sender
1891
+ });
1892
+ return filterChannelInboundQuoteContext(params.mode, {
1893
+ id: replyTo.id,
1894
+ body: replyTo.body,
1895
+ sender: replyTo.sender?.label ?? void 0,
1896
+ senderAllowed
1897
+ }) ? replyTo : null;
1899
1898
  }
1900
1899
  //#endregion
1901
1900
  //#region extensions/whatsapp/src/auto-reply/monitor/inbound-dispatch.ts
@@ -2008,7 +2007,7 @@ function resolveWhatsAppResponsePrefix(params) {
2008
2007
  const configuredResponsePrefix = params.cfg.messages?.responsePrefix;
2009
2008
  return params.pipelineResponsePrefix ?? (configuredResponsePrefix === void 0 && params.isSelfChat ? resolveIdentityNamePrefix$1(params.cfg, params.agentId) : void 0);
2010
2009
  }
2011
- function buildWhatsAppInboundContext(params) {
2010
+ async function buildWhatsAppInboundContext(params) {
2012
2011
  const inboundHistory = params.msg.chatType === "group" ? buildInboundHistoryFromEntries({
2013
2012
  entries: (params.groupHistory ?? []).map((entry) => ({
2014
2013
  sender: entry.sender,
@@ -2018,49 +2017,73 @@ function buildWhatsAppInboundContext(params) {
2018
2017
  })),
2019
2018
  limit: params.groupHistory?.length ?? 1
2020
2019
  }) : void 0;
2021
- return finalizeInboundContext({
2022
- Body: params.combinedBody,
2023
- BodyForAgent: params.bodyForAgent ?? params.msg.body,
2024
- InboundHistory: inboundHistory,
2025
- RawBody: params.rawBody ?? params.msg.body,
2026
- CommandBody: params.commandBody ?? params.msg.body,
2027
- Transcript: params.transcript,
2028
- From: params.msg.from,
2029
- To: params.msg.to,
2030
- SessionKey: params.route.sessionKey,
2031
- AccountId: params.route.accountId,
2032
- MessageSid: params.msg.id,
2033
- ReplyToId: params.visibleReplyTo?.id,
2034
- ReplyToBody: params.visibleReplyTo?.body,
2035
- ReplyToSender: params.visibleReplyTo?.sender?.label,
2036
- MediaPath: params.msg.mediaPath,
2037
- MediaUrl: params.msg.mediaUrl,
2038
- MediaType: params.msg.mediaType,
2039
- MediaTranscribedIndexes: params.mediaTranscribedIndexes,
2040
- ChatType: params.msg.chatType,
2041
- Timestamp: params.msg.timestamp,
2042
- ConversationLabel: params.msg.chatType === "group" ? params.conversationId : params.msg.from,
2043
- GroupSubject: params.msg.groupSubject,
2044
- GroupMembers: formatGroupMembers({
2045
- participants: params.msg.groupParticipants,
2046
- roster: params.groupMemberRoster,
2047
- fallbackE164: params.sender.e164
2048
- }),
2049
- SenderName: params.sender.name,
2050
- SenderId: params.sender.id ?? params.sender.e164,
2051
- SenderE164: params.sender.e164,
2052
- CommandAuthorized: params.commandAuthorized,
2053
- CommandTurn: params.commandTurn,
2054
- CommandSource: params.commandSource ?? (params.commandTurn?.source === "native" || params.commandTurn?.source === "text" ? params.commandTurn.source : void 0),
2055
- ReplyThreading: params.replyThreading,
2056
- WasMentioned: params.msg.wasMentioned,
2057
- GroupSystemPrompt: params.groupSystemPrompt,
2058
- UntrustedStructuredContext: params.msg.untrustedStructuredContext,
2059
- ...params.msg.location ? toLocationContext(params.msg.location) : {},
2060
- Provider: "whatsapp",
2061
- Surface: "whatsapp",
2062
- OriginatingChannel: "whatsapp",
2063
- OriginatingTo: params.msg.from
2020
+ const media = toInboundMediaFacts(params.msg.mediaPath || params.msg.mediaUrl ? [{
2021
+ path: params.msg.mediaPath,
2022
+ url: params.msg.mediaUrl ?? params.msg.mediaPath,
2023
+ contentType: params.msg.mediaType
2024
+ }] : void 0, { transcribed: (_entry, index) => params.mediaTranscribedIndexes?.includes(index) === true });
2025
+ return buildChannelInboundEventContext({
2026
+ channel: "whatsapp",
2027
+ finalize: finalizeInboundContext,
2028
+ supplemental: {
2029
+ quote: params.visibleReplyTo ? {
2030
+ id: params.visibleReplyTo.id,
2031
+ body: params.visibleReplyTo.body,
2032
+ sender: params.visibleReplyTo.sender?.label ?? void 0
2033
+ } : void 0,
2034
+ groupSystemPrompt: params.groupSystemPrompt,
2035
+ untrustedContext: params.msg.untrustedStructuredContext
2036
+ },
2037
+ media,
2038
+ messageId: params.msg.id,
2039
+ timestamp: params.msg.timestamp,
2040
+ from: params.msg.from,
2041
+ sender: {
2042
+ id: params.sender.id ?? params.sender.e164,
2043
+ name: params.sender.name
2044
+ },
2045
+ conversation: {
2046
+ kind: params.msg.chatType,
2047
+ id: params.conversationId,
2048
+ label: params.msg.chatType === "group" ? params.conversationId : params.msg.from
2049
+ },
2050
+ route: {
2051
+ agentId: params.route.agentId,
2052
+ accountId: params.route.accountId,
2053
+ routeSessionKey: params.route.sessionKey
2054
+ },
2055
+ reply: {
2056
+ to: params.msg.to,
2057
+ originatingTo: params.msg.from
2058
+ },
2059
+ message: {
2060
+ body: params.combinedBody,
2061
+ bodyForAgent: params.bodyForAgent ?? params.msg.body,
2062
+ inboundHistory,
2063
+ rawBody: params.rawBody ?? params.msg.body,
2064
+ commandBody: params.commandBody ?? params.msg.body
2065
+ },
2066
+ access: {
2067
+ ...params.msg.wasMentioned !== void 0 ? { mentions: {
2068
+ canDetectMention: params.msg.chatType === "group",
2069
+ wasMentioned: params.msg.wasMentioned
2070
+ } } : {},
2071
+ commands: { authorized: params.commandAuthorized }
2072
+ },
2073
+ commandTurn: params.commandTurn,
2074
+ extra: {
2075
+ Transcript: params.transcript,
2076
+ GroupSubject: params.msg.groupSubject,
2077
+ GroupMembers: formatGroupMembers({
2078
+ participants: params.msg.groupParticipants,
2079
+ roster: params.groupMemberRoster,
2080
+ fallbackE164: params.sender.e164
2081
+ }),
2082
+ SenderE164: params.sender.e164,
2083
+ CommandSource: params.commandSource ?? (params.commandTurn?.source === "native" || params.commandTurn?.source === "text" ? params.commandTurn.source : void 0),
2084
+ ReplyThreading: params.replyThreading,
2085
+ ...params.msg.location ? toLocationContext(params.msg.location) : {}
2086
+ }
2064
2087
  });
2065
2088
  }
2066
2089
  function normalizeCommandTurnFromContext(value) {
@@ -2685,7 +2708,7 @@ async function processMessage(params) {
2685
2708
  accountConfig: account,
2686
2709
  peerId: dmRouteTarget ?? params.msg.from
2687
2710
  });
2688
- const ctxPayload = buildWhatsAppInboundContext({
2711
+ const ctxPayload = await buildWhatsAppInboundContext({
2689
2712
  bodyForAgent: msgForAgent.body,
2690
2713
  combinedBody,
2691
2714
  commandBody: params.msg.body,
@@ -2728,7 +2751,7 @@ async function processMessage(params) {
2728
2751
  updateLastRoute: updateLastRouteInBackground,
2729
2752
  warn: params.replyLogger.warn.bind(params.replyLogger)
2730
2753
  });
2731
- const turnResult = await runInboundReplyTurn({
2754
+ const turnResult = await runChannelInboundEvent({
2732
2755
  channel: "whatsapp",
2733
2756
  accountId: params.route.accountId,
2734
2757
  raw: params.msg,
@@ -1,13 +1,13 @@
1
1
  import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
2
- import { n as normalizeWhatsAppPayloadText } from "./outbound-media-contract-CA2OGvjJ.js";
3
- import { t as createWhatsAppOutboundBase } from "./outbound-base-DwCUu3ab.js";
2
+ import { n as normalizeWhatsAppPayloadText } from "./outbound-media-contract-B3Y-9slb.js";
3
+ import { t as createWhatsAppOutboundBase } from "./outbound-base-MHdfVWvv.js";
4
4
  import { shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
5
5
  import { chunkText } from "openclaw/plugin-sdk/reply-chunking";
6
6
  import "openclaw/plugin-sdk/channel-send-result";
7
7
  //#region extensions/whatsapp/src/outbound-adapter.ts
8
8
  let whatsAppSendModulePromise;
9
9
  function loadWhatsAppSendModule() {
10
- whatsAppSendModulePromise ??= import("./send-BuORvrFd.js").then((n) => n.a);
10
+ whatsAppSendModulePromise ??= import("./send-D0iPQBMX.js").then((n) => n.a);
11
11
  return whatsAppSendModulePromise;
12
12
  }
13
13
  function normalizeOutboundText(text) {
@@ -1,9 +1,9 @@
1
- import { n as normalizeWhatsAppPayloadText, t as normalizeWhatsAppOutboundPayload } from "./outbound-media-contract-CA2OGvjJ.js";
1
+ import { n as normalizeWhatsAppPayloadText, t as normalizeWhatsAppOutboundPayload } from "./outbound-media-contract-B3Y-9slb.js";
2
2
  import { p as toWhatsappJid } from "./text-runtime-Dk37KYHj.js";
3
3
  import { i as lookupInboundMessageMetaForTarget } from "./quoted-message-CveINB35.js";
4
4
  import { DEFAULT_ACCOUNT_ID, listCombinedAccountIds, normalizeOptionalAccountId, resolveListedDefaultAccountId } from "openclaw/plugin-sdk/account-core";
5
+ import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
5
6
  import { createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
6
- import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
7
7
  import { sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
8
8
  //#region extensions/whatsapp/src/outbound-send-deps.ts
9
9
  const WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS = ["sendWhatsApp"];
@@ -2,10 +2,10 @@ import { t as formatError } from "./session-errors-BAj9D2La.js";
2
2
  import { a as sanitizeAssistantVisibleTextWithProfile, i as sanitizeAssistantVisibleText, o as sleep, s as stripToolCallXmlTags } from "./text-runtime-Dk37KYHj.js";
3
3
  import path from "node:path";
4
4
  import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
5
+ import { sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
5
6
  import { writeExternalFileWithinRoot } from "openclaw/plugin-sdk/security-runtime";
6
7
  import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
7
8
  import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, runFfmpeg } from "openclaw/plugin-sdk/media-runtime";
8
- import { sanitizeForPlainText } from "openclaw/plugin-sdk/outbound-runtime";
9
9
  import { resolvePreferredOpenClawTmpDir, withTempWorkspace } from "openclaw/plugin-sdk/temp-path";
10
10
  //#region extensions/whatsapp/src/document-filename.ts
11
11
  const WHATSAPP_DEFAULT_DOCUMENT_FILE_NAME = "file";
@@ -14,7 +14,8 @@ function resolveWhatsAppDefaultDocumentFileName(mimetype) {
14
14
  return extension ? `${WHATSAPP_DEFAULT_DOCUMENT_FILE_NAME}${extension}` : WHATSAPP_DEFAULT_DOCUMENT_FILE_NAME;
15
15
  }
16
16
  function resolveWhatsAppDocumentFileName(params) {
17
- return params.fileName?.trim() || resolveWhatsAppDefaultDocumentFileName(params.mimetype);
17
+ const fallbackName = resolveWhatsAppDefaultDocumentFileName(params.mimetype);
18
+ return params.fileName?.replace(/[\x00-\x1f\x7f]/g, "").trim() || fallbackName;
18
19
  }
19
20
  //#endregion
20
21
  //#region extensions/whatsapp/src/outbound-media-contract.ts
@@ -1,2 +1,2 @@
1
- import { t as whatsappOutbound } from "./outbound-adapter-BiLBIo1h.js";
1
+ import { t as whatsappOutbound } from "./outbound-adapter-CcNeZvD_.js";
2
2
  export { whatsappOutbound };
@@ -1,4 +1,4 @@
1
- import { t as resolveMergedWhatsAppAccountConfig } from "./account-config-Bxl16soz.js";
1
+ import { t as resolveMergedWhatsAppAccountConfig } from "./account-config-6PTOSfaI.js";
2
2
  import { resolveReactionLevel } from "openclaw/plugin-sdk/status-helpers";
3
3
  //#region extensions/whatsapp/src/reaction-level.ts
4
4
  /** Resolve the effective reaction level and its implications for WhatsApp. */
@@ -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-DcAQibC1.js";
3
- import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-BuORvrFd.js";
2
+ import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-ClWX76J7.js";
3
+ import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-D0iPQBMX.js";
4
4
  import { r as setWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
5
5
  import { n as getStatusCode, t as formatError } from "./session-errors-BAj9D2La.js";
6
6
  import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
7
7
  import { t as createWhatsAppLoginTool } from "./agent-tools-login-BDzvb3ee.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-BrKb0mwT.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-C3EWzdzp.js";
10
+ import { d as extractLocationData, f as extractMediaPlaceholder, l as extractContactContext, m as extractText } from "./send-api-3hUuzYv1.js";
11
11
  import { n as newConnectionId, r as waitForWaConnection, t as createWaSocket } from "./session-CDgpDc0l.js";
12
12
  import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-B4SDebQ6.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-Cxk7UHkH.js";
14
- import { t as loginWeb } from "./login-CympQtg8.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-BdKlBuaK.js";
14
+ import { t as loginWeb } from "./login-1rs_uPW-.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,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
3
- import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-B3diVrr6.js";
3
+ import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-BMGM1RtF.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";
7
7
  import { t as getRegisteredWhatsAppConnectionController } from "./connection-controller-registry-TSX_udJp.js";
8
- import { a as resolveWhatsAppOutboundMediaUrls, i as prepareWhatsAppOutboundMedia, n as normalizeWhatsAppPayloadText, s as resolveWhatsAppDocumentFileName } from "./outbound-media-contract-CA2OGvjJ.js";
8
+ import { a as resolveWhatsAppOutboundMediaUrls, i as prepareWhatsAppOutboundMedia, n as normalizeWhatsAppPayloadText, s as resolveWhatsAppDocumentFileName } from "./outbound-media-contract-B3Y-9slb.js";
9
9
  import { d as markdownToWhatsApp, p as toWhatsappJid } from "./text-runtime-Dk37KYHj.js";
10
10
  import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
11
11
  import { generateSecureUuid } from "openclaw/plugin-sdk/core";
@@ -1,13 +1,13 @@
1
1
  import { n as isWhatsAppNewsletterJid } from "./normalize-target-bVWjgftN.js";
2
2
  import "./normalize-Bxwqo-bW.js";
3
- import { s as resolveWhatsAppDocumentFileName } from "./outbound-media-contract-CA2OGvjJ.js";
3
+ import { s as resolveWhatsAppDocumentFileName } from "./outbound-media-contract-B3Y-9slb.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";
6
6
  import { c as resolveComparableIdentity } from "./identity-xoLLdqEv.js";
7
7
  import { normalizeLowercaseStringOrEmpty, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
8
+ import { createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds } from "openclaw/plugin-sdk/channel-outbound";
8
9
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
9
10
  import { getImageMetadata, resizeToJpeg } from "openclaw/plugin-sdk/media-runtime";
10
- import { createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds } from "openclaw/plugin-sdk/channel-message";
11
11
  import { extractMessageContent, getContentType, normalizeMessageContent } from "baileys";
12
12
  import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
13
13
  import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
@@ -1,5 +1,5 @@
1
1
  import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
2
- import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-B3diVrr6.js";
2
+ import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-BMGM1RtF.js";
3
3
  import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-bVWjgftN.js";
4
4
  import { t as WhatsAppChannelConfigSchema } from "./config-schema-CsNDlDpL.js";
5
5
  import { n as whatsappDoctor } from "./doctor-By3SB4lm.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-0kQxYUcI.js");
102
+ return await import("./channel.runtime-C08TFa-d.js");
103
103
  }
104
104
  async function loadWhatsAppSetupSurface() {
105
- return await import("./setup-surface-sCDFlWd2.js");
105
+ return await import("./setup-surface-BouY1WI8.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-B3diVrr6.js";
3
+ import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-BMGM1RtF.js";
4
4
  import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-bVWjgftN.js";
5
- import { t as whatsappSetupAdapter } from "./setup-core-mK3yptun.js";
5
+ import { t as whatsappSetupAdapter } from "./setup-core-cgB2JDjU.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-CympQtg8.js").then((n) => n.n);
283
+ const { loginWeb } = await import("./login-1rs_uPW-.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-1zhfYJ9v.js";
1
+ import { t as whatsappSetupPlugin } from "./channel.setup-CtTHpu8o.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-B3diVrr6.js";
2
+ import { o as resolveWhatsAppAuthDir } from "./accounts-BMGM1RtF.js";
3
3
  import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-BrKb0mwT.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-CkiVDt0B.js")).finalizeWhatsAppSetup(params),
39
+ finalize: async (params) => await (await import("./setup-finalize-CCZdGnko.js")).finalizeWhatsAppSetup(params),
40
40
  disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
41
41
  onAccountRecorded: (accountId, options) => {
42
42
  options?.onAccountId?.(channel, accountId);
package/dist/test-api.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-DeSRFXEV.js";
2
- import { t as whatsappOutbound } from "./outbound-adapter-BiLBIo1h.js";
2
+ import { t as whatsappOutbound } from "./outbound-adapter-CcNeZvD_.js";
3
3
  export { resolveWhatsAppRuntimeGroupPolicy, whatsappOutbound };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/whatsapp",
3
- "version": "2026.5.26",
3
+ "version": "2026.5.27",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/whatsapp",
9
- "version": "2026.5.26",
9
+ "version": "2026.5.27",
10
10
  "dependencies": {
11
11
  "audio-decode": "2.2.3",
12
12
  "baileys": "7.0.0-rc13",
@@ -14,7 +14,7 @@
14
14
  "typebox": "1.1.38"
15
15
  },
16
16
  "peerDependencies": {
17
- "openclaw": ">=2026.5.26"
17
+ "openclaw": ">=2026.5.27"
18
18
  },
19
19
  "peerDependenciesMeta": {
20
20
  "openclaw": {
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "id": "whatsapp",
3
+ "name": "WhatsApp",
4
+ "description": "OpenClaw WhatsApp channel plugin for WhatsApp Web chats.",
3
5
  "activation": {
4
6
  "onStartup": false
5
7
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openclaw/whatsapp",
3
- "version": "2026.5.26",
4
- "description": "OpenClaw WhatsApp channel plugin",
3
+ "version": "2026.5.27",
4
+ "description": "OpenClaw WhatsApp channel plugin for WhatsApp Web chats.",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/openclaw/openclaw"
@@ -14,7 +14,7 @@
14
14
  "typebox": "1.1.38"
15
15
  },
16
16
  "peerDependencies": {
17
- "openclaw": ">=2026.5.26"
17
+ "openclaw": ">=2026.5.27"
18
18
  },
19
19
  "peerDependenciesMeta": {
20
20
  "openclaw": {
@@ -57,10 +57,10 @@
57
57
  "minHostVersion": ">=2026.4.25"
58
58
  },
59
59
  "compat": {
60
- "pluginApi": ">=2026.5.26"
60
+ "pluginApi": ">=2026.5.27"
61
61
  },
62
62
  "build": {
63
- "openclawVersion": "2026.5.26"
63
+ "openclawVersion": "2026.5.27"
64
64
  },
65
65
  "release": {
66
66
  "publishToClawHub": true,