@openclaw/whatsapp 2026.5.12 → 2026.5.14-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/{access-control-BEpPB-Jx.js → access-control-Di_o41dj.js} +1 -1
  2. package/dist/api.js +8 -8
  3. package/dist/{auth-store-_ScMvp7r.js → auth-store-DpwdTmoO.js} +1 -1
  4. package/dist/{channel-DgVXntVm.js → channel-By9xwZ6O.js} +5 -6
  5. package/dist/channel-plugin-api.js +1 -1
  6. package/dist/{channel.runtime-C4Ywu0dZ.js → channel.runtime-DfdgaaVG.js} +5 -5
  7. package/dist/{channel.setup-DKp_w5Ru.js → channel.setup-D6lbUvfP.js} +3 -4
  8. package/dist/{connection-controller-CT8NA6Zf.js → connection-controller-DVOzuzJk.js} +2 -2
  9. package/dist/constants.js +1 -1
  10. package/dist/contract-api.js +3 -3
  11. package/dist/directory-contract-api.js +1 -1
  12. package/dist/legacy-state-migrations-api.js +1 -1
  13. package/dist/light-runtime-api.js +2 -2
  14. package/dist/{login-B_pa3YAU.js → login-Du1MplXB.js} +3 -3
  15. package/dist/{login-qr-C33im-qS.js → login-qr-Bfsxe1bh.js} +3 -3
  16. package/dist/login-qr-runtime.js +1 -1
  17. package/dist/{monitor-CmK0ER1u.js → monitor-Cd30Pnkz.js} +237 -37
  18. package/dist/outbound-payload-test-api.js +1 -1
  19. package/dist/runtime-api.js +7 -7
  20. package/dist/{session-ZZQKkOTz.js → session-lrTa-USS.js} +2 -2
  21. package/dist/{shared-DW9W6SXy.js → setup-core-CraEyjEG.js} +48 -3
  22. package/dist/{setup-finalize-C1S1U-hY.js → setup-finalize-DTWoYzBv.js} +2 -2
  23. package/dist/setup-plugin-api.js +1 -1
  24. package/dist/{setup-surface-BbwSSEsy.js → setup-surface-BW2z_2Oc.js} +2 -2
  25. package/dist/test-api.js +2 -2
  26. package/package.json +5 -5
  27. package/dist/setup-core-DZKvpzbH.js +0 -46
  28. /package/dist/{active-listener-DTbKS-j-.js → active-listener-D2NHQ5Og.js} +0 -0
  29. /package/dist/{audio-preflight.runtime-MmkB-pgX.js → audio-preflight.runtime-CIFjeaEN.js} +0 -0
  30. /package/dist/{channel-react-action-C1wufQtL.js → channel-react-action-DakXTHIg.js} +0 -0
  31. /package/dist/{constants-DLGCIbfl.js → constants-yKXGCGU9.js} +0 -0
  32. /package/dist/{directory-config-CE74HYlw.js → directory-config-ClsMAYen.js} +0 -0
  33. /package/dist/{outbound-adapter-Bs0e4qVd.js → outbound-adapter-B8fD5esZ.js} +0 -0
  34. /package/dist/{reply-resolver.runtime-rIVWohXr.js → reply-resolver.runtime-CROyXXQh.js} +0 -0
  35. /package/dist/{runtime-group-policy-Gp1lQ0at.js → runtime-group-policy-BH_U23qp.js} +0 -0
  36. /package/dist/{send-api-DD93aPIQ.js → send-api-DYiQpIng.js} +0 -0
  37. /package/dist/{session.runtime-CZQ0ycCg.js → session.runtime-BxyATGX0.js} +0 -0
  38. /package/dist/{state-migrations-Bm0S67yH.js → state-migrations-CtdIArlK.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { a as resolveWhatsAppAccount } from "./accounts-B4oR6Dhx.js";
2
2
  import { l as isSelfChatMode, n as normalizeE164 } from "./text-runtime-CMxQczvs.js";
3
3
  import { a as getSelfIdentity, o as getSenderIdentity } from "./identity-BNDkpR8N.js";
4
- import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-Gp1lQ0at.js";
4
+ import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-BH_U23qp.js";
5
5
  import { defaultRuntime } from "openclaw/plugin-sdk/runtime-env";
6
6
  import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
7
7
  import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
package/dist/api.js CHANGED
@@ -5,17 +5,17 @@ import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-BK
5
5
  import "./reaction-level-2m9sWGCw.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-CMxQczvs.js";
7
7
  import "./send-DBfXQDd4.js";
8
- import { t as whatsappPlugin } from "./channel-DgVXntVm.js";
8
+ import { t as whatsappPlugin } from "./channel-By9xwZ6O.js";
9
9
  import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS } from "./outbound-base-BgtywpNm.js";
10
10
  import { t as whatsappCommandPolicy } from "./command-policy-O8sRnqUV.js";
11
- import { a as resolveWhatsAppGroupToolPolicy, i as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupIntroHint } from "./shared-DW9W6SXy.js";
11
+ import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-CraEyjEG.js";
12
12
  import "./config-schema-Dmo66Ubb.js";
13
- import { t as whatsappSetupPlugin } from "./channel.setup-DKp_w5Ru.js";
14
- import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-DLGCIbfl.js";
15
- import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-CE74HYlw.js";
16
- import { t as __testing } from "./access-control-BEpPB-Jx.js";
17
- import { p as extractText, t as createWebSendApi } from "./send-api-DD93aPIQ.js";
18
- import { r as waitForWaConnection, t as createWaSocket } from "./session-ZZQKkOTz.js";
13
+ import { t as whatsappSetupPlugin } from "./channel.setup-D6lbUvfP.js";
14
+ import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-yKXGCGU9.js";
15
+ import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-ClsMAYen.js";
16
+ import { t as __testing } from "./access-control-Di_o41dj.js";
17
+ import { p as extractText, t as createWebSendApi } from "./send-api-DYiQpIng.js";
18
+ import { r as waitForWaConnection, t as createWaSocket } from "./session-lrTa-USS.js";
19
19
  import "openclaw/plugin-sdk/channel-actions";
20
20
  import "openclaw/plugin-sdk/account-resolution";
21
21
  import "openclaw/plugin-sdk/core";
@@ -14,7 +14,7 @@ const CREDS_FILE_MODE = 384;
14
14
  const CREDS_SAVE_FLUSH_TIMEOUT_MS = 15e3;
15
15
  const credsSaveQueues = /* @__PURE__ */ new Map();
16
16
  async function stringifyCreds(creds) {
17
- const { BufferJSON } = await import("./session.runtime-CZQ0ycCg.js").then((n) => n.a);
17
+ const { BufferJSON } = await import("./session.runtime-BxyATGX0.js").then((n) => n.a);
18
18
  return JSON.stringify(creds, BufferJSON.replacer);
19
19
  }
20
20
  async function writeCredsJsonAtomically(authDir, creds) {
@@ -10,10 +10,9 @@ import { t as createWhatsAppLoginTool } from "./agent-tools-login-DpRxLNRB.js";
10
10
  import { t as createWhatsAppOutboundBase } from "./outbound-base-BgtywpNm.js";
11
11
  import { t as getWhatsAppRuntime } from "./runtime-6fZ67abR.js";
12
12
  import { t as whatsappCommandPolicy } from "./command-policy-O8sRnqUV.js";
13
- import { a as resolveWhatsAppGroupToolPolicy, c as formatWhatsAppConfigAllowFromEntries, i as resolveWhatsAppGroupRequireMention, n as loadWhatsAppChannelRuntime, o as resolveWhatsAppGroupIntroHint, r as whatsappSetupWizardProxy, s as resolveWhatsAppMentionStripRegexes, t as createWhatsAppPluginBase } from "./shared-DW9W6SXy.js";
14
- import { d as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-_ScMvp7r.js";
15
- import { t as whatsappSetupAdapter } from "./setup-core-DZKvpzbH.js";
16
- import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-Bm0S67yH.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-CraEyjEG.js";
14
+ import { d as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DpwdTmoO.js";
15
+ import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-CtdIArlK.js";
17
16
  import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
18
17
  import { asString, collectIssuesForEnabledAccounts, createAsyncComputedAccountStatusAdapter, createDefaultChannelRuntimeState, isRecord } from "openclaw/plugin-sdk/status-helpers";
19
18
  import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
@@ -322,8 +321,8 @@ function collectWhatsAppStatusIssues(accounts) {
322
321
  }
323
322
  //#endregion
324
323
  //#region extensions/whatsapp/src/channel.ts
325
- const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-CE74HYlw.js").then((n) => n.t));
326
- const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-C1wufQtL.js"));
324
+ const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-ClsMAYen.js").then((n) => n.t));
325
+ const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-DakXTHIg.js"));
327
326
  function parseWhatsAppExplicitTarget(raw) {
328
327
  const normalized = normalizeWhatsAppTarget(raw);
329
328
  if (!normalized) return null;
@@ -1,2 +1,2 @@
1
- import { t as whatsappPlugin } from "./channel-DgVXntVm.js";
1
+ import { t as whatsappPlugin } from "./channel-By9xwZ6O.js";
2
2
  export { whatsappPlugin };
@@ -1,9 +1,9 @@
1
1
  import { startWebLoginWithQr as startWebLoginWithQr$1, waitForWebLogin as waitForWebLogin$1 } from "./login-qr-runtime.js";
2
- import { a as getWebAuthAgeMs$1, b as webAuthExists$1, d as readWebAuthExistsForDecision$1, f as readWebAuthSnapshot$1, h as readWebSelfId$1, m as readWebAuthState$1, o as logWebSelfId$1, p as readWebAuthSnapshotBestEffort$1, s as logoutWeb$1, u as readWebAuthExistsBestEffort$1 } from "./auth-store-_ScMvp7r.js";
3
- import { t as getActiveWebListener$1 } from "./active-listener-DTbKS-j-.js";
4
- import { t as monitorWebChannel$1 } from "./monitor-CmK0ER1u.js";
5
- import { t as loginWeb$1 } from "./login-B_pa3YAU.js";
6
- import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-BbwSSEsy.js";
2
+ import { a as getWebAuthAgeMs$1, b as webAuthExists$1, d as readWebAuthExistsForDecision$1, f as readWebAuthSnapshot$1, h as readWebSelfId$1, m as readWebAuthState$1, o as logWebSelfId$1, p as readWebAuthSnapshotBestEffort$1, s as logoutWeb$1, u as readWebAuthExistsBestEffort$1 } from "./auth-store-DpwdTmoO.js";
3
+ import { t as getActiveWebListener$1 } from "./active-listener-D2NHQ5Og.js";
4
+ import { t as monitorWebChannel$1 } from "./monitor-Cd30Pnkz.js";
5
+ import { t as loginWeb$1 } from "./login-Du1MplXB.js";
6
+ import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-BW2z_2Oc.js";
7
7
  //#region extensions/whatsapp/src/channel.runtime.ts
8
8
  function getActiveWebListener(...args) {
9
9
  return getActiveWebListener$1(...args);
@@ -1,7 +1,6 @@
1
- import { a as resolveWhatsAppGroupToolPolicy, i as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupIntroHint, r as whatsappSetupWizardProxy, t as createWhatsAppPluginBase } from "./shared-DW9W6SXy.js";
2
- import { m as readWebAuthState } from "./auth-store-_ScMvp7r.js";
3
- import { t as whatsappSetupAdapter } from "./setup-core-DZKvpzbH.js";
4
- import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-Bm0S67yH.js";
1
+ import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-CraEyjEG.js";
2
+ import { m as readWebAuthState } from "./auth-store-DpwdTmoO.js";
3
+ import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-CtdIArlK.js";
5
4
  //#region extensions/whatsapp/src/channel.setup.ts
6
5
  const whatsappSetupPlugin = {
7
6
  ...createWhatsAppPluginBase({
@@ -1,7 +1,7 @@
1
1
  import { n as registerWhatsAppConnectionController, r as unregisterWhatsAppConnectionController } from "./connection-controller-registry-D_iIGz5m.js";
2
2
  import { n as getStatusCode, t as formatError } from "./session-errors-CSuKZPub.js";
3
- import { s as logoutWeb } from "./auth-store-_ScMvp7r.js";
4
- import { r as waitForWaConnection, t as createWaSocket } from "./session-ZZQKkOTz.js";
3
+ import { s as logoutWeb } from "./auth-store-DpwdTmoO.js";
4
+ import { r as waitForWaConnection, t as createWaSocket } from "./session-lrTa-USS.js";
5
5
  import { computeBackoff, info, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
6
6
  import { clamp } from "openclaw/plugin-sdk/text-utility-runtime";
7
7
  import { DisconnectReason } from "baileys";
package/dist/constants.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-DLGCIbfl.js";
1
+ import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-yKXGCGU9.js";
2
2
  export { DEFAULT_WEB_MEDIA_BYTES };
@@ -3,9 +3,9 @@ import { t as whatsappCommandPolicy$1 } from "./command-policy-O8sRnqUV.js";
3
3
  import { t as resolveLegacyGroupSessionKey$1 } from "./group-session-contract-DdqigLJl.js";
4
4
  import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-CvfWex9e.js";
5
5
  import { r as isLegacyGroupSessionKey$1, t as canonicalizeLegacySessionKey$1 } from "./session-contract-B0efQf9P.js";
6
- import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-CE74HYlw.js";
7
- import { t as resolveWhatsAppRuntimeGroupPolicy$1 } from "./runtime-group-policy-Gp1lQ0at.js";
8
- import { t as __testing } from "./access-control-BEpPB-Jx.js";
6
+ import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-ClsMAYen.js";
7
+ import { t as resolveWhatsAppRuntimeGroupPolicy$1 } from "./runtime-group-policy-BH_U23qp.js";
8
+ import { t as __testing } from "./access-control-Di_o41dj.js";
9
9
  //#region extensions/whatsapp/contract-api.ts
10
10
  const canonicalizeLegacySessionKey = canonicalizeLegacySessionKey$1;
11
11
  const isLegacyGroupSessionKey = isLegacyGroupSessionKey$1;
@@ -1,2 +1,2 @@
1
- import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-CE74HYlw.js";
1
+ import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-ClsMAYen.js";
2
2
  export { listWhatsAppDirectoryGroupsFromConfig, listWhatsAppDirectoryPeersFromConfig };
@@ -1,2 +1,2 @@
1
- import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-Bm0S67yH.js";
1
+ import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-CtdIArlK.js";
2
2
  export { detectWhatsAppLegacyStateMigrations };
@@ -1,5 +1,5 @@
1
1
  import { n as getStatusCode, t as formatError } from "./session-errors-CSuKZPub.js";
2
2
  import { t as createWhatsAppLoginTool } from "./agent-tools-login-DpRxLNRB.js";
3
- import { a as getWebAuthAgeMs, b as webAuthExists, c as pickWebChannel, h as readWebSelfId, o as logWebSelfId, s as logoutWeb, t as WA_WEB_AUTH_DIR } from "./auth-store-_ScMvp7r.js";
4
- import { t as getActiveWebListener } from "./active-listener-DTbKS-j-.js";
3
+ import { a as getWebAuthAgeMs, b as webAuthExists, c as pickWebChannel, h as readWebSelfId, o as logWebSelfId, s as logoutWeb, t as WA_WEB_AUTH_DIR } from "./auth-store-DpwdTmoO.js";
4
+ import { t as getActiveWebListener } from "./active-listener-D2NHQ5Og.js";
5
5
  export { WA_WEB_AUTH_DIR, createWhatsAppLoginTool, formatError, getActiveWebListener, getStatusCode, getWebAuthAgeMs, logWebSelfId, logoutWeb, pickWebChannel, readWebSelfId, webAuthExists };
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
2
2
  import { a as resolveWhatsAppAccount } from "./accounts-B4oR6Dhx.js";
3
- import { y as restoreCredsFromBackupIfNeeded } from "./auth-store-_ScMvp7r.js";
4
- import { a as renderQrTerminal, i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-ZZQKkOTz.js";
5
- import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-CT8NA6Zf.js";
3
+ import { y as restoreCredsFromBackupIfNeeded } from "./auth-store-DpwdTmoO.js";
4
+ import { a as renderQrTerminal, i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-lrTa-USS.js";
5
+ import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-DVOzuzJk.js";
6
6
  import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
7
7
  import { logInfo } from "openclaw/plugin-sdk/logging-core";
8
8
  import { danger, defaultRuntime, success } from "openclaw/plugin-sdk/runtime-env";
@@ -1,7 +1,7 @@
1
1
  import { a as resolveWhatsAppAccount } from "./accounts-B4oR6Dhx.js";
2
- import { d as readWebAuthExistsForDecision, h as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-_ScMvp7r.js";
3
- import { i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-ZZQKkOTz.js";
4
- import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-CT8NA6Zf.js";
2
+ import { d as readWebAuthExistsForDecision, h as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DpwdTmoO.js";
3
+ import { i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-lrTa-USS.js";
4
+ import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-DVOzuzJk.js";
5
5
  import { logInfo } from "openclaw/plugin-sdk/logging-core";
6
6
  import { danger, defaultRuntime, info, success } from "openclaw/plugin-sdk/runtime-env";
7
7
  import { renderQrPngDataUrl } from "openclaw/plugin-sdk/media-runtime";
@@ -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-C33im-qS.js");
4
+ loginQrModulePromise ??= import("./login-qr-Bfsxe1bh.js");
5
5
  return loginQrModulePromise;
6
6
  }
7
7
  async function startWebLoginWithQr(...args) {
@@ -6,15 +6,15 @@ import { d as markdownToWhatsApp, f as resolveJidToE164, l as isSelfChatMode, n
6
6
  import { i as prepareWhatsAppOutboundMedia, o as sendWhatsAppOutboundWithRetry, r as normalizeWhatsAppPayloadTextPreservingIndentation, t as normalizeWhatsAppOutboundPayload } from "./outbound-media-contract-zq9aNgT8.js";
7
7
  import { r as sendReactionWhatsApp } from "./send-DBfXQDd4.js";
8
8
  import { n as cacheInboundMessageMeta, r as lookupInboundMessageMeta, t as buildQuotedMessageOptions } from "./quoted-message-BQsRXnac.js";
9
- import { _ as readWebSelfIdentityForDecision, a as getWebAuthAgeMs, h as readWebSelfId, r as WhatsAppAuthUnstableError, s as logoutWeb } from "./auth-store-_ScMvp7r.js";
9
+ import { _ as readWebSelfIdentityForDecision, a as getWebAuthAgeMs, h as readWebSelfId, r as WhatsAppAuthUnstableError, s as logoutWeb } from "./auth-store-DpwdTmoO.js";
10
10
  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-BNDkpR8N.js";
11
- import { i as resolveWhatsAppInboundPolicy, n as checkInboundAccessControl, r as resolveWhatsAppCommandAuthorized } from "./access-control-BEpPB-Jx.js";
12
- import { a as mayContainWhatsAppOutboundMention, c as extractContactContext, d as extractMediaPlaceholder, f as extractMentionedJids, i as addWhatsAppOutboundMentionsToContent, l as extractContextInfo, m as hasInboundUserContent, n as listWhatsAppSendResultMessageIds, o as resolveWhatsAppOutboundMentions, p as extractText, r as normalizeWhatsAppSendResult, s as describeReplyContext, t as createWebSendApi, u as extractLocationData } from "./send-api-DD93aPIQ.js";
13
- import { i as resolveWhatsAppSocketTiming, r as waitForWaConnection, t as createWaSocket } from "./session-ZZQKkOTz.js";
14
- 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-CT8NA6Zf.js";
11
+ import { i as resolveWhatsAppInboundPolicy, n as checkInboundAccessControl, r as resolveWhatsAppCommandAuthorized } from "./access-control-Di_o41dj.js";
12
+ import { a as mayContainWhatsAppOutboundMention, c as extractContactContext, d as extractMediaPlaceholder, f as extractMentionedJids, i as addWhatsAppOutboundMentionsToContent, l as extractContextInfo, m as hasInboundUserContent, n as listWhatsAppSendResultMessageIds, o as resolveWhatsAppOutboundMentions, p as extractText, r as normalizeWhatsAppSendResult, s as describeReplyContext, t as createWebSendApi, u as extractLocationData } from "./send-api-DYiQpIng.js";
13
+ import { i as resolveWhatsAppSocketTiming, r as waitForWaConnection, t as createWaSocket } from "./session-lrTa-USS.js";
14
+ 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-DVOzuzJk.js";
15
15
  import { resolveAccountEntry } from "openclaw/plugin-sdk/account-core";
16
16
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
17
- import { createAckReactionHandle, logAckFailure, removeAckReactionHandleAfterReply, shouldAckReactionForWhatsApp } from "openclaw/plugin-sdk/channel-feedback";
17
+ import { DEFAULT_TIMING, createAckReactionHandle, createStatusReactionController, logAckFailure, removeAckReactionHandleAfterReply, shouldAckReactionForWhatsApp } from "openclaw/plugin-sdk/channel-feedback";
18
18
  import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
19
19
  import { getChildLogger } from "openclaw/plugin-sdk/logging-core";
20
20
  import { resolveMarkdownTableMode as resolveMarkdownTableMode$1 } from "openclaw/plugin-sdk/markdown-table-runtime";
@@ -33,12 +33,12 @@ import { formatLocationText, resolveInboundSessionEnvelopeContext } from "opencl
33
33
  import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
34
34
  import { dispatchReplyWithBufferedBlockDispatcher, finalizeInboundContext, resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime";
35
35
  import { createInboundDebouncer, resolveInboundDebounceMs } from "openclaw/plugin-sdk/channel-inbound-debounce";
36
- import { hasControlCommand, hasControlCommand as hasControlCommand$1, shouldComputeCommandAuthorized } from "openclaw/plugin-sdk/command-detection";
36
+ import { hasControlCommand, hasControlCommand as hasControlCommand$1, isControlCommandMessage, shouldComputeCommandAuthorized } from "openclaw/plugin-sdk/command-detection";
37
37
  import { drainPendingDeliveries } from "openclaw/plugin-sdk/delivery-queue-runtime";
38
38
  import { DEFAULT_GROUP_HISTORY_LIMIT, buildHistoryContextFromEntries, recordPendingHistoryEntryIfEnabled } from "openclaw/plugin-sdk/reply-history";
39
39
  import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
40
40
  import { createClaimableDedupe } from "openclaw/plugin-sdk/persistent-dedupe";
41
- import { saveMediaBuffer } from "openclaw/plugin-sdk/media-store";
41
+ import { saveMediaStream } from "openclaw/plugin-sdk/media-store";
42
42
  import { getRuntimeConfig as getRuntimeConfig$1, getRuntimeConfigSourceSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
43
43
  import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
44
44
  import { buildMentionRegexes, implicitMentionKindWhen, normalizeMentionText, resolveInboundMentionDecision } from "openclaw/plugin-sdk/channel-mention-gating";
@@ -159,6 +159,12 @@ function closeInboundMonitorSocket(sock) {
159
159
  }
160
160
  //#endregion
161
161
  //#region extensions/whatsapp/src/inbound/media.ts
162
+ var WhatsAppInboundMediaLimitExceededError = class extends Error {
163
+ constructor(maxBytes) {
164
+ super(`Media exceeds ${Math.round(maxBytes / (1024 * 1024))}MB limit`);
165
+ this.name = "WhatsAppInboundMediaLimitExceededError";
166
+ }
167
+ };
162
168
  function unwrapMessage(message) {
163
169
  return normalizeMessageContent$1(message);
164
170
  }
@@ -174,7 +180,7 @@ function resolveMediaMimetype(message) {
174
180
  if (message.videoMessage) return "video/mp4";
175
181
  if (message.stickerMessage) return "image/webp";
176
182
  }
177
- async function downloadInboundMedia(msg, sock) {
183
+ async function downloadInboundMedia(msg, sock, maxBytes = 50 * 1024 * 1024) {
178
184
  const message = unwrapMessage(msg.message);
179
185
  if (!message) return;
180
186
  const mimetype = resolveMediaMimetype(message);
@@ -182,19 +188,23 @@ async function downloadInboundMedia(msg, sock) {
182
188
  if (!message.imageMessage && !message.videoMessage && !message.documentMessage && !message.audioMessage && !message.stickerMessage) return;
183
189
  try {
184
190
  return {
185
- buffer: await downloadMediaMessage(msg, "buffer", {}, {
191
+ saved: await saveMediaStream(await downloadMediaMessage(msg, "stream", {}, {
186
192
  reuploadRequest: sock.updateMediaMessage,
187
193
  logger: sock.logger
194
+ }), mimetype, "inbound", maxBytes, fileName).catch((err) => {
195
+ if (err instanceof Error && /Media exceeds/i.test(err.message)) throw new WhatsAppInboundMediaLimitExceededError(maxBytes);
196
+ throw err;
188
197
  }),
189
198
  mimetype,
190
199
  fileName
191
200
  };
192
201
  } catch (err) {
202
+ if (err instanceof WhatsAppInboundMediaLimitExceededError) throw err;
193
203
  logVerbose(`downloadMediaMessage failed: ${String(err)}`);
194
204
  return;
195
205
  }
196
206
  }
197
- async function downloadQuotedInboundMedia(msg, sock) {
207
+ async function downloadQuotedInboundMedia(msg, sock, maxBytes = 50 * 1024 * 1024) {
198
208
  const contextInfo = extractContextInfo(unwrapMessage(msg.message));
199
209
  if (!contextInfo?.quotedMessage) return;
200
210
  const quotedMessage = contextInfo.quotedMessage;
@@ -207,7 +217,7 @@ async function downloadQuotedInboundMedia(msg, sock) {
207
217
  },
208
218
  message: quotedMessage,
209
219
  messageTimestamp: msg.messageTimestamp
210
- }, sock);
220
+ }, sock, maxBytes);
211
221
  }
212
222
  //#endregion
213
223
  //#region extensions/whatsapp/src/inbound/monitor.ts
@@ -557,16 +567,16 @@ async function attachWebInboxToSocket(options) {
557
567
  let mediaPath;
558
568
  let mediaType;
559
569
  let mediaFileName;
570
+ const maxBytes = (typeof options.mediaMaxMb === "number" && options.mediaMaxMb > 0 ? options.mediaMaxMb : 50) * 1024 * 1024;
560
571
  const saveInboundMedia = async (inboundMedia) => {
561
572
  if (!inboundMedia) return;
562
- const maxBytes = (typeof options.mediaMaxMb === "number" && options.mediaMaxMb > 0 ? options.mediaMaxMb : 50) * 1024 * 1024;
563
- mediaPath = (await saveMediaBuffer(inboundMedia.buffer, inboundMedia.mimetype, "inbound", maxBytes, inboundMedia.fileName)).path;
573
+ mediaPath = inboundMedia.saved.path;
564
574
  mediaType = inboundMedia.mimetype;
565
575
  mediaFileName = inboundMedia.fileName;
566
576
  };
567
577
  try {
568
- await saveInboundMedia(await downloadInboundMedia(msg, sock));
569
- if (!mediaPath && replyContext) await saveInboundMedia(await downloadQuotedInboundMedia(msg, sock));
578
+ await saveInboundMedia(await downloadInboundMedia(msg, sock, maxBytes));
579
+ if (!mediaPath && replyContext) await saveInboundMedia(await downloadQuotedInboundMedia(msg, sock, maxBytes));
570
580
  } catch (err) {
571
581
  logWhatsAppVerbose(options.verbose, `Inbound media download failed: ${String(err)}`);
572
582
  }
@@ -1770,6 +1780,8 @@ function buildWhatsAppInboundContext(params) {
1770
1780
  SenderId: params.sender.id ?? params.sender.e164,
1771
1781
  SenderE164: params.sender.e164,
1772
1782
  CommandAuthorized: params.commandAuthorized,
1783
+ CommandTurn: params.commandTurn,
1784
+ CommandSource: params.commandSource ?? (params.commandTurn?.source === "native" || params.commandTurn?.source === "text" ? params.commandTurn.source : void 0),
1773
1785
  ReplyThreading: params.replyThreading,
1774
1786
  WasMentioned: params.msg.wasMentioned,
1775
1787
  GroupSystemPrompt: params.groupSystemPrompt,
@@ -1781,6 +1793,33 @@ function buildWhatsAppInboundContext(params) {
1781
1793
  OriginatingTo: params.msg.from
1782
1794
  });
1783
1795
  }
1796
+ function normalizeCommandTurnFromContext(value) {
1797
+ if (!value || typeof value !== "object") return;
1798
+ const record = value;
1799
+ const kind = record.kind;
1800
+ const source = record.source;
1801
+ if (kind === "native" && source === "native" && typeof record.authorized === "boolean") return {
1802
+ kind: "native",
1803
+ source: "native",
1804
+ authorized: record.authorized,
1805
+ commandName: typeof record.commandName === "string" ? record.commandName : void 0,
1806
+ body: typeof record.body === "string" ? record.body : void 0
1807
+ };
1808
+ if (kind === "text-slash" && source === "text" && typeof record.authorized === "boolean") return {
1809
+ kind: "text-slash",
1810
+ source: "text",
1811
+ authorized: record.authorized,
1812
+ commandName: typeof record.commandName === "string" ? record.commandName : void 0,
1813
+ body: typeof record.body === "string" ? record.body : void 0
1814
+ };
1815
+ if (kind === "normal" && source === "message") return {
1816
+ kind: "normal",
1817
+ source: "message",
1818
+ authorized: false,
1819
+ commandName: typeof record.commandName === "string" ? record.commandName : void 0,
1820
+ body: typeof record.body === "string" ? record.body : void 0
1821
+ };
1822
+ }
1784
1823
  function resolveWhatsAppDmRouteTarget(params) {
1785
1824
  if (params.msg.chatType === "group") return;
1786
1825
  if (params.senderE164) return params.normalizeE164(params.senderE164) ?? void 0;
@@ -1810,6 +1849,12 @@ function updateWhatsAppMainLastRoute(params) {
1810
1849
  if (params.dmRouteTarget && inboundLastRouteSessionKey === params.route.mainSessionKey && params.pinnedMainDmRecipient) logVerbose$1(`Skipping main-session last route update for ${params.dmRouteTarget} (pinned owner ${params.pinnedMainDmRecipient})`);
1811
1850
  }
1812
1851
  async function dispatchWhatsAppBufferedReply(params) {
1852
+ const statusReactionController = params.statusReactionController ?? null;
1853
+ const statusReactionTiming = {
1854
+ ...DEFAULT_TIMING,
1855
+ ...params.cfg.messages?.statusReactions?.timing
1856
+ };
1857
+ const removeAckAfterReply = params.cfg.messages?.removeAckAfterReply ?? false;
1813
1858
  const textLimit = params.maxMediaTextChunkLimit ?? resolveTextChunkLimit(params.cfg, "whatsapp");
1814
1859
  const chunkMode = resolveChunkMode(params.cfg, "whatsapp", params.route.accountId);
1815
1860
  const tableMode = resolveMarkdownTableMode$1({
@@ -1819,11 +1864,16 @@ async function dispatchWhatsAppBufferedReply(params) {
1819
1864
  });
1820
1865
  const mediaLocalRoots = getAgentScopedMediaLocalRoots(params.cfg, params.route.agentId);
1821
1866
  const sourceReplyChatType = typeof params.context.ChatType === "string" ? params.context.ChatType : params.msg.chatType;
1867
+ const sourceReplyCommandSource = params.context.CommandSource === "native" || params.context.CommandSource === "text" ? params.context.CommandSource : void 0;
1868
+ const sourceReplyCommandTurn = normalizeCommandTurnFromContext(params.context.CommandTurn);
1869
+ const sourceReplyCommandAuthorized = typeof params.context.CommandAuthorized === "boolean" ? params.context.CommandAuthorized : void 0;
1822
1870
  const sourceReplyDeliveryMode = sourceReplyChatType === "group" || sourceReplyChatType === "channel" ? resolveChannelMessageSourceReplyDeliveryMode({
1823
1871
  cfg: params.cfg,
1824
1872
  ctx: {
1825
1873
  ChatType: sourceReplyChatType,
1826
- CommandSource: params.context.CommandSource === "native" ? "native" : void 0
1874
+ CommandTurn: sourceReplyCommandTurn,
1875
+ CommandSource: sourceReplyCommandSource,
1876
+ CommandAuthorized: sourceReplyCommandAuthorized
1827
1877
  }
1828
1878
  }) : void 0;
1829
1879
  const disableBlockStreaming = sourceReplyDeliveryMode === "message_tool_only" ? true : resolveWhatsAppDisableBlockStreaming(params.cfg);
@@ -1869,6 +1919,7 @@ async function dispatchWhatsAppBufferedReply(params) {
1869
1919
  const mediaOnlyCoalescer = createWhatsAppMediaOnlyReplyCoalescer({ deliver: async (pending) => {
1870
1920
  await deliverNormalizedPayload(pending.payload, pending.info);
1871
1921
  } });
1922
+ if (statusReactionController) statusReactionController.setThinking();
1872
1923
  const { queuedFinal, counts } = await dispatchReplyWithBufferedBlockDispatcher({
1873
1924
  ctx: params.context,
1874
1925
  cfg: params.cfg,
@@ -1940,6 +1991,15 @@ async function dispatchWhatsAppBufferedReply(params) {
1940
1991
  await deliverNormalizedPayload(normalizedDeliveryPayload, info);
1941
1992
  },
1942
1993
  onReplyStart: params.msg.sendComposing,
1994
+ ...statusReactionController ? {
1995
+ onCompactionStart: async () => {
1996
+ await statusReactionController.setCompacting();
1997
+ },
1998
+ onCompactionEnd: async () => {
1999
+ statusReactionController.cancelPending();
2000
+ await statusReactionController.setThinking();
2001
+ }
2002
+ } : {},
1943
2003
  onError: (err, info) => {
1944
2004
  logWhatsAppReplyDeliveryError({
1945
2005
  err,
@@ -1954,7 +2014,11 @@ async function dispatchWhatsAppBufferedReply(params) {
1954
2014
  replyOptions: {
1955
2015
  disableBlockStreaming,
1956
2016
  ...sourceReplyDeliveryMode ? { sourceReplyDeliveryMode } : {},
1957
- onModelSelected: params.onModelSelected
2017
+ onModelSelected: params.onModelSelected,
2018
+ ...statusReactionController ? { onToolStart: async (payload) => {
2019
+ const toolName = payload.name?.trim();
2020
+ if (toolName) await statusReactionController.setTool(toolName);
2021
+ } } : {}
1958
2022
  }
1959
2023
  });
1960
2024
  logWhatsAppMediaOnlyFlushResult(await mediaOnlyCoalescer.flushAll());
@@ -1962,13 +2026,47 @@ async function dispatchWhatsAppBufferedReply(params) {
1962
2026
  queuedFinal,
1963
2027
  counts
1964
2028
  })) {
2029
+ if (statusReactionController) finalizeWhatsAppStatusReaction({
2030
+ controller: statusReactionController,
2031
+ outcome: "error",
2032
+ hasFinalResponse: false,
2033
+ removeAckAfterReply,
2034
+ timing: statusReactionTiming
2035
+ });
1965
2036
  if (params.shouldClearGroupHistory) params.groupHistories.set(params.groupHistoryKey, []);
1966
2037
  logVerbose$1("Skipping auto-reply: silent token or no text/media returned from resolver");
1967
2038
  return false;
1968
2039
  }
2040
+ if (statusReactionController) finalizeWhatsAppStatusReaction({
2041
+ controller: statusReactionController,
2042
+ outcome: didSendReply ? "done" : "error",
2043
+ hasFinalResponse: didSendReply,
2044
+ removeAckAfterReply,
2045
+ timing: statusReactionTiming
2046
+ });
1969
2047
  if (params.shouldClearGroupHistory) params.groupHistories.set(params.groupHistoryKey, []);
1970
2048
  return didSendReply;
1971
2049
  }
2050
+ async function finalizeWhatsAppStatusReaction(params) {
2051
+ if (params.outcome === "done") {
2052
+ await params.controller.setDone();
2053
+ if (params.removeAckAfterReply) {
2054
+ await new Promise((resolve) => setTimeout(resolve, params.timing.doneHoldMs));
2055
+ await params.controller.clear();
2056
+ } else await params.controller.restoreInitial();
2057
+ return;
2058
+ }
2059
+ await params.controller.setError();
2060
+ if (params.hasFinalResponse) {
2061
+ if (params.removeAckAfterReply) {
2062
+ await new Promise((resolve) => setTimeout(resolve, params.timing.errorHoldMs));
2063
+ await params.controller.clear();
2064
+ } else await params.controller.restoreInitial();
2065
+ return;
2066
+ }
2067
+ if (params.removeAckAfterReply) await new Promise((resolve) => setTimeout(resolve, params.timing.errorHoldMs));
2068
+ await params.controller.restoreInitial();
2069
+ }
1972
2070
  //#endregion
1973
2071
  //#region extensions/whatsapp/src/auto-reply/monitor/message-line.runtime.ts
1974
2072
  function normalizeAgentId$1(agentId) {
@@ -2019,6 +2117,66 @@ function buildInboundLine(params) {
2019
2117
  });
2020
2118
  }
2021
2119
  //#endregion
2120
+ //#region extensions/whatsapp/src/auto-reply/monitor/status-reaction.ts
2121
+ async function createWhatsAppStatusReactionController(params) {
2122
+ if (!params.msg.id) return null;
2123
+ const statusReactionsConfig = params.cfg.messages?.statusReactions;
2124
+ if (statusReactionsConfig?.enabled !== true) return null;
2125
+ if (resolveWhatsAppReactionLevel({
2126
+ cfg: params.cfg,
2127
+ accountId: params.accountId
2128
+ }).level === "off") return null;
2129
+ const ackConfig = params.cfg.channels?.whatsapp?.ackReaction;
2130
+ const ackEmoji = (ackConfig?.emoji ?? "").trim();
2131
+ if (!ackEmoji) return null;
2132
+ const directEnabled = ackConfig?.direct ?? true;
2133
+ const groupMode = ackConfig?.group ?? "mentions";
2134
+ const conversationIdForCheck = params.msg.conversationId ?? params.msg.from;
2135
+ const activation = params.msg.chatType === "group" ? await resolveGroupActivationFor({
2136
+ cfg: params.cfg,
2137
+ accountId: params.accountId,
2138
+ agentId: params.agentId,
2139
+ sessionKey: params.sessionKey,
2140
+ conversationId: conversationIdForCheck
2141
+ }) : null;
2142
+ if (!shouldAckReactionForWhatsApp({
2143
+ emoji: ackEmoji,
2144
+ isDirect: params.msg.chatType === "direct",
2145
+ isGroup: params.msg.chatType === "group",
2146
+ directEnabled,
2147
+ groupMode,
2148
+ wasMentioned: params.msg.wasMentioned === true,
2149
+ groupActivated: activation === "always"
2150
+ })) return null;
2151
+ const sender = getSenderIdentity(params.msg);
2152
+ const reactionOptions = {
2153
+ verbose: params.verbose,
2154
+ fromMe: false,
2155
+ ...sender.jid ? { participant: sender.jid } : {},
2156
+ ...params.accountId ? { accountId: params.accountId } : {},
2157
+ cfg: params.cfg
2158
+ };
2159
+ const chatId = params.msg.chatId;
2160
+ const msgId = params.msg.id;
2161
+ return createStatusReactionController({
2162
+ enabled: true,
2163
+ adapter: {
2164
+ setReaction: async (emoji) => {
2165
+ await sendReactionWhatsApp(chatId, msgId, emoji, reactionOptions);
2166
+ },
2167
+ clearReaction: async () => {
2168
+ await sendReactionWhatsApp(chatId, msgId, "", reactionOptions);
2169
+ }
2170
+ },
2171
+ initialEmoji: ackEmoji,
2172
+ emojis: statusReactionsConfig.emojis,
2173
+ timing: statusReactionsConfig.timing,
2174
+ onError: (err) => {
2175
+ logVerbose(`WhatsApp status-reaction error for chat ${chatId}/${msgId}: ${String(err)}`);
2176
+ }
2177
+ });
2178
+ }
2179
+ //#endregion
2022
2180
  //#region extensions/whatsapp/src/auto-reply/monitor/process-message.ts
2023
2181
  const WHATSAPP_MESSAGE_RECEIVED_HOOK_LIMITS = {
2024
2182
  maxConcurrency: 8,
@@ -2078,7 +2236,7 @@ async function processMessage(params) {
2078
2236
  let audioTranscript = params.preflightAudioTranscript ?? void 0;
2079
2237
  const hasAudioBody = params.msg.mediaType?.startsWith("audio/") === true && params.msg.body === "<media:audio>";
2080
2238
  if (params.preflightAudioTranscript === void 0 && hasAudioBody && params.msg.mediaPath) try {
2081
- const { transcribeFirstAudio } = await import("./audio-preflight.runtime-MmkB-pgX.js");
2239
+ const { transcribeFirstAudio } = await import("./audio-preflight.runtime-CIFjeaEN.js");
2082
2240
  audioTranscript = await transcribeFirstAudio({
2083
2241
  ctx: {
2084
2242
  MediaPaths: [params.msg.mediaPath],
@@ -2147,8 +2305,18 @@ async function processMessage(params) {
2147
2305
  params.echoForget(combinedEchoKey);
2148
2306
  return false;
2149
2307
  }
2308
+ const statusReactionController = params.statusReactionController ?? (params.cfg.messages?.statusReactions?.enabled === true && !params.ackAlreadySent ? await createWhatsAppStatusReactionController({
2309
+ cfg: params.cfg,
2310
+ msg: params.msg,
2311
+ agentId: params.route.agentId,
2312
+ sessionKey: params.route.sessionKey,
2313
+ conversationId,
2314
+ verbose: params.verbose,
2315
+ accountId: account.accountId
2316
+ }) : null);
2317
+ if (statusReactionController && !params.statusReactionController) statusReactionController.setQueued();
2150
2318
  let ackReaction = params.ackReaction ?? null;
2151
- if (!ackReaction && params.ackAlreadySent !== true) ackReaction = await maybeSendAckReaction({
2319
+ if (!statusReactionController && !ackReaction && params.ackAlreadySent !== true) ackReaction = await maybeSendAckReaction({
2152
2320
  cfg: params.cfg,
2153
2321
  msg: params.msg,
2154
2322
  agentId: params.route.agentId,
@@ -2186,11 +2354,24 @@ async function processMessage(params) {
2186
2354
  senderE164: sender.e164 ?? void 0,
2187
2355
  normalizeE164
2188
2356
  });
2189
- const commandAuthorized = shouldComputeCommandAuthorized(params.msg.body, params.cfg) ? await resolveWhatsAppCommandAuthorized({
2357
+ const shouldCheckCommandAuth = shouldComputeCommandAuthorized(params.msg.body, params.cfg);
2358
+ const isTextCommand = isControlCommandMessage(params.msg.body, params.cfg);
2359
+ const commandAuthorized = shouldCheckCommandAuth ? await resolveWhatsAppCommandAuthorized({
2190
2360
  cfg: params.cfg,
2191
2361
  msg: params.msg,
2192
2362
  policy: inboundPolicy
2193
2363
  }) : void 0;
2364
+ const commandTurn = isTextCommand ? {
2365
+ kind: "text-slash",
2366
+ source: "text",
2367
+ authorized: Boolean(commandAuthorized),
2368
+ body: params.msg.body
2369
+ } : {
2370
+ kind: "normal",
2371
+ source: "message",
2372
+ authorized: false,
2373
+ body: params.msg.body
2374
+ };
2194
2375
  const { onModelSelected, ...replyPipeline } = createChannelMessageReplyPipeline({
2195
2376
  cfg: params.cfg,
2196
2377
  agentId: params.route.agentId,
@@ -2216,6 +2397,7 @@ async function processMessage(params) {
2216
2397
  combinedBody,
2217
2398
  commandBody: params.msg.body,
2218
2399
  commandAuthorized,
2400
+ commandTurn,
2219
2401
  conversationId,
2220
2402
  groupHistory: visibleGroupHistory,
2221
2403
  groupMemberRoster: params.groupMemberNames.get(params.groupHistoryKey),
@@ -2305,7 +2487,8 @@ async function processMessage(params) {
2305
2487
  },
2306
2488
  replyResolver: params.replyResolver,
2307
2489
  route: params.route,
2308
- shouldClearGroupHistory
2490
+ shouldClearGroupHistory,
2491
+ statusReactionController
2309
2492
  })
2310
2493
  })
2311
2494
  }
@@ -2352,6 +2535,7 @@ function createWebOnMessageHandler(params) {
2352
2535
  if (opts?.preflightAudioTranscript !== void 0) processParams.preflightAudioTranscript = opts.preflightAudioTranscript;
2353
2536
  if (opts?.ackAlreadySent === true) processParams.ackAlreadySent = true;
2354
2537
  if (opts?.ackReaction !== void 0) processParams.ackReaction = opts.ackReaction;
2538
+ if (opts?.statusReactionController !== void 0) processParams.statusReactionController = opts.statusReactionController;
2355
2539
  return processMessage(processParams);
2356
2540
  };
2357
2541
  return async (msg) => {
@@ -2390,22 +2574,36 @@ function createWebOnMessageHandler(params) {
2390
2574
  const canRunEarlyAudioPreflight = msg.chatType === "group" || msg.accessControlPassed === true;
2391
2575
  let ackAlreadySent = false;
2392
2576
  let ackReaction = null;
2577
+ let statusReactionController = null;
2393
2578
  const runAudioPreflightOnce = async () => {
2394
2579
  if (preflightAudioTranscript !== void 0 || !canRunEarlyAudioPreflight || !hasAudioBody || !msg.mediaPath) return;
2395
- ackReaction = await maybeSendAckReaction({
2396
- cfg,
2397
- msg,
2398
- agentId: route.agentId,
2399
- sessionKey: route.sessionKey,
2400
- conversationId,
2401
- verbose: params.verbose,
2402
- accountId: route.accountId,
2403
- info: params.replyLogger.info.bind(params.replyLogger),
2404
- warn: params.replyLogger.warn.bind(params.replyLogger)
2405
- });
2406
- ackAlreadySent = ackReaction !== null;
2580
+ if (cfg.messages?.statusReactions?.enabled === true) {
2581
+ statusReactionController = await createWhatsAppStatusReactionController({
2582
+ cfg,
2583
+ msg,
2584
+ agentId: route.agentId,
2585
+ sessionKey: route.sessionKey,
2586
+ conversationId,
2587
+ verbose: params.verbose,
2588
+ accountId: route.accountId
2589
+ });
2590
+ if (statusReactionController) await statusReactionController.setQueued();
2591
+ } else {
2592
+ ackReaction = await maybeSendAckReaction({
2593
+ cfg,
2594
+ msg,
2595
+ agentId: route.agentId,
2596
+ sessionKey: route.sessionKey,
2597
+ conversationId,
2598
+ verbose: params.verbose,
2599
+ accountId: route.accountId,
2600
+ info: params.replyLogger.info.bind(params.replyLogger),
2601
+ warn: params.replyLogger.warn.bind(params.replyLogger)
2602
+ });
2603
+ ackAlreadySent = ackReaction !== null;
2604
+ }
2407
2605
  try {
2408
- const { transcribeFirstAudio } = await import("./audio-preflight.runtime-MmkB-pgX.js");
2606
+ const { transcribeFirstAudio } = await import("./audio-preflight.runtime-CIFjeaEN.js");
2409
2607
  preflightAudioTranscript = await transcribeFirstAudio({
2410
2608
  ctx: {
2411
2609
  MediaPaths: [msg.mediaPath],
@@ -2512,12 +2710,14 @@ function createWebOnMessageHandler(params) {
2512
2710
  ...preflightAudioTranscript !== void 0 ? { preflightAudioTranscript } : {},
2513
2711
  ...ackAlreadySent && msg.chatType !== "group" ? { ackAlreadySent: true } : {},
2514
2712
  ...ackReaction && msg.chatType !== "group" ? { ackReaction } : {},
2713
+ ...statusReactionController && msg.chatType !== "group" ? { ackAlreadySent: true } : {},
2515
2714
  processMessage: (m, r, k, opts) => processForRoute(cfg, m, r, k, opts)
2516
2715
  })) return;
2517
2716
  await processForRoute(cfg, msg, route, groupHistoryKey, {
2518
2717
  ...preflightAudioTranscript !== void 0 ? { preflightAudioTranscript } : {},
2519
2718
  ...ackAlreadySent ? { ackAlreadySent: true } : {},
2520
- ...ackReaction ? { ackReaction } : {}
2719
+ ...ackReaction ? { ackReaction } : {},
2720
+ ...statusReactionController ? { statusReactionController } : {}
2521
2721
  });
2522
2722
  };
2523
2723
  }
@@ -2528,7 +2728,7 @@ function isNonRetryableWebCloseStatus(statusCode) {
2528
2728
  }
2529
2729
  let replyResolverRuntimePromise = null;
2530
2730
  function loadReplyResolverRuntime() {
2531
- replyResolverRuntimePromise ??= import("./reply-resolver.runtime-rIVWohXr.js");
2731
+ replyResolverRuntimePromise ??= import("./reply-resolver.runtime-CROyXXQh.js");
2532
2732
  return replyResolverRuntimePromise;
2533
2733
  }
2534
2734
  function resolveWebMonitorConfigSnapshot(params) {
@@ -1,2 +1,2 @@
1
- import { t as whatsappOutbound } from "./outbound-adapter-Bs0e4qVd.js";
1
+ import { t as whatsappOutbound } from "./outbound-adapter-B8fD5esZ.js";
2
2
  export { whatsappOutbound };
@@ -5,12 +5,12 @@ import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsA
5
5
  import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
6
6
  import { t as createWhatsAppLoginTool } from "./agent-tools-login-DpRxLNRB.js";
7
7
  import { n as setWhatsAppRuntime } from "./runtime-6fZ67abR.js";
8
- import { C as waitForCredsSaveQueueWithTimeout, S as waitForCredsSaveQueue, _ as readWebSelfIdentityForDecision, a as getWebAuthAgeMs, b as webAuthExists, c as pickWebChannel, d as readWebAuthExistsForDecision, f as readWebAuthSnapshot, g as readWebSelfIdentity, h as readWebSelfId, i as formatWhatsAppWebAuthStatusState, l as readCredsJsonRaw, m as readWebAuthState, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as logWebSelfId, p as readWebAuthSnapshotBestEffort, r as WhatsAppAuthUnstableError, s as logoutWeb, t as WA_WEB_AUTH_DIR, u as readWebAuthExistsBestEffort, v as resolveDefaultWebAuthDir, w as writeCredsJsonAtomically, y as restoreCredsFromBackupIfNeeded } from "./auth-store-_ScMvp7r.js";
9
- import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-DLGCIbfl.js";
10
- import { c as extractContactContext, d as extractMediaPlaceholder, p as extractText, u as extractLocationData } from "./send-api-DD93aPIQ.js";
11
- import { n as newConnectionId, r as waitForWaConnection, t as createWaSocket } from "./session-ZZQKkOTz.js";
12
- import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-DTbKS-j-.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-CmK0ER1u.js";
14
- import { t as loginWeb } from "./login-B_pa3YAU.js";
8
+ import { C as waitForCredsSaveQueueWithTimeout, S as waitForCredsSaveQueue, _ as readWebSelfIdentityForDecision, a as getWebAuthAgeMs, b as webAuthExists, c as pickWebChannel, d as readWebAuthExistsForDecision, f as readWebAuthSnapshot, g as readWebSelfIdentity, h as readWebSelfId, i as formatWhatsAppWebAuthStatusState, l as readCredsJsonRaw, m as readWebAuthState, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as logWebSelfId, p as readWebAuthSnapshotBestEffort, r as WhatsAppAuthUnstableError, s as logoutWeb, t as WA_WEB_AUTH_DIR, u as readWebAuthExistsBestEffort, v as resolveDefaultWebAuthDir, w as writeCredsJsonAtomically, y as restoreCredsFromBackupIfNeeded } from "./auth-store-DpwdTmoO.js";
9
+ import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-yKXGCGU9.js";
10
+ import { c as extractContactContext, d as extractMediaPlaceholder, p as extractText, u as extractLocationData } from "./send-api-DYiQpIng.js";
11
+ import { n as newConnectionId, r as waitForWaConnection, t as createWaSocket } from "./session-lrTa-USS.js";
12
+ import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-D2NHQ5Og.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-Cd30Pnkz.js";
14
+ import { t as loginWeb } from "./login-Du1MplXB.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,7 +1,7 @@
1
1
  import { n as resolveWebCredsBackupPath, r as resolveWebCredsPath } from "./creds-files-_2V8jzQa.js";
2
2
  import { n as getStatusCode } from "./session-errors-CSuKZPub.js";
3
- import { C as waitForCredsSaveQueueWithTimeout, l as readCredsJsonRaw, v as resolveDefaultWebAuthDir, w as writeCredsJsonAtomically, x as enqueueCredsSave, y as restoreCredsFromBackupIfNeeded } from "./auth-store-_ScMvp7r.js";
4
- import { i as makeWASocket, n as fetchLatestBaileysVersion, o as useMultiFileAuthState, r as makeCacheableSignalKeyStore, t as DisconnectReason } from "./session.runtime-CZQ0ycCg.js";
3
+ import { C as waitForCredsSaveQueueWithTimeout, l as readCredsJsonRaw, v as resolveDefaultWebAuthDir, w as writeCredsJsonAtomically, x as enqueueCredsSave, y as restoreCredsFromBackupIfNeeded } from "./auth-store-DpwdTmoO.js";
4
+ import { i as makeWASocket, n as fetchLatestBaileysVersion, o as useMultiFileAuthState, r as makeCacheableSignalKeyStore, t as DisconnectReason } from "./session.runtime-BxyATGX0.js";
5
5
  import fs from "node:fs";
6
6
  import { VERSION, formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
7
7
  import { danger, getChildLogger, success, toPinoLikeLogger } from "openclaw/plugin-sdk/runtime-env";
@@ -15,6 +15,7 @@ import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
15
15
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
16
16
  import { createDelegatedSetupWizardProxy } from "openclaw/plugin-sdk/setup-runtime";
17
17
  import { readChannelAllowFromStore } from "openclaw/plugin-sdk/channel-pairing";
18
+ import { applyAccountNameToChannelSection, migrateBaseNameToDefaultAccount, normalizeAccountId as normalizeAccountId$2 } from "openclaw/plugin-sdk/setup";
18
19
  //#region extensions/whatsapp/src/config-accessors.ts
19
20
  function formatWhatsAppConfigAllowFromEntries(allowFrom) {
20
21
  return normalizeWhatsAppAllowFromEntries(allowFrom);
@@ -124,10 +125,10 @@ function resolveWhatsAppConfigPath(params) {
124
125
  return `${resolveWhatsAppGroupScopeBasePath(params)}.${params.field}`;
125
126
  }
126
127
  async function loadWhatsAppChannelRuntime() {
127
- return await import("./channel.runtime-C4Ywu0dZ.js");
128
+ return await import("./channel.runtime-DfdgaaVG.js");
128
129
  }
129
130
  async function loadWhatsAppSetupSurface() {
130
- return await import("./setup-surface-BbwSSEsy.js");
131
+ return await import("./setup-surface-BW2z_2Oc.js");
131
132
  }
132
133
  const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
133
134
  const whatsappConfigAdapter = createScopedChannelConfigAdapter({
@@ -304,4 +305,48 @@ function createWhatsAppPluginBase(params) {
304
305
  };
305
306
  }
306
307
  //#endregion
307
- export { resolveWhatsAppGroupToolPolicy as a, formatWhatsAppConfigAllowFromEntries as c, resolveWhatsAppGroupRequireMention as i, loadWhatsAppChannelRuntime as n, resolveWhatsAppGroupIntroHint as o, whatsappSetupWizardProxy as r, resolveWhatsAppMentionStripRegexes as s, createWhatsAppPluginBase as t };
308
+ //#region extensions/whatsapp/src/setup-core.ts
309
+ const channel = "whatsapp";
310
+ const whatsappSetupAdapter = {
311
+ resolveAccountId: ({ accountId }) => normalizeAccountId$2(accountId),
312
+ applyAccountName: ({ cfg, accountId, name }) => applyAccountNameToChannelSection({
313
+ cfg,
314
+ channelKey: channel,
315
+ accountId,
316
+ name,
317
+ alwaysUseAccounts: true
318
+ }),
319
+ applyAccountConfig: ({ cfg, accountId, input }) => {
320
+ const next = migrateBaseNameToDefaultAccount({
321
+ cfg: applyAccountNameToChannelSection({
322
+ cfg,
323
+ channelKey: channel,
324
+ accountId,
325
+ name: input.name,
326
+ alwaysUseAccounts: true
327
+ }),
328
+ channelKey: channel,
329
+ alwaysUseAccounts: true
330
+ });
331
+ const entry = {
332
+ ...next.channels?.whatsapp?.accounts?.[accountId],
333
+ ...input.authDir ? { authDir: input.authDir } : {},
334
+ enabled: true
335
+ };
336
+ return {
337
+ ...next,
338
+ channels: {
339
+ ...next.channels,
340
+ whatsapp: {
341
+ ...next.channels?.whatsapp,
342
+ accounts: {
343
+ ...next.channels?.whatsapp?.accounts,
344
+ [accountId]: entry
345
+ }
346
+ }
347
+ }
348
+ };
349
+ }
350
+ };
351
+ //#endregion
352
+ export { resolveWhatsAppGroupRequireMention as a, resolveWhatsAppMentionStripRegexes as c, whatsappSetupWizardProxy as i, formatWhatsAppConfigAllowFromEntries as l, createWhatsAppPluginBase as n, resolveWhatsAppGroupToolPolicy as o, loadWhatsAppChannelRuntime as r, resolveWhatsAppGroupIntroHint as s, whatsappSetupAdapter as t };
@@ -1,7 +1,7 @@
1
1
  import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-DG18xddX.js";
2
2
  import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-B4oR6Dhx.js";
3
3
  import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-ePanEpfY.js";
4
- import { t as whatsappSetupAdapter } from "./setup-core-DZKvpzbH.js";
4
+ import { t as whatsappSetupAdapter } from "./setup-core-CraEyjEG.js";
5
5
  import path from "node:path";
6
6
  import { DEFAULT_ACCOUNT_ID, pathExists, splitSetupEntries } from "openclaw/plugin-sdk/setup";
7
7
  import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
@@ -279,7 +279,7 @@ async function finalizeWhatsAppSetup(params) {
279
279
  message: linked ? "WhatsApp already linked. Re-link now?" : "Link WhatsApp now (QR)?",
280
280
  initialValue: !linked
281
281
  })) try {
282
- const { loginWeb } = await import("./login-B_pa3YAU.js").then((n) => n.n);
282
+ const { loginWeb } = await import("./login-Du1MplXB.js").then((n) => n.n);
283
283
  await loginWeb(false, void 0, params.runtime, accountId);
284
284
  } catch (error) {
285
285
  params.runtime.error(`WhatsApp login failed: ${String(error)}`);
@@ -1,2 +1,2 @@
1
- import { t as whatsappSetupPlugin } from "./channel.setup-DKp_w5Ru.js";
1
+ import { t as whatsappSetupPlugin } from "./channel.setup-D6lbUvfP.js";
2
2
  export { whatsappSetupPlugin };
@@ -1,6 +1,6 @@
1
1
  import { t as listAccountIds } from "./account-ids-DG18xddX.js";
2
2
  import { o as resolveWhatsAppAuthDir } from "./accounts-B4oR6Dhx.js";
3
- import { i as formatWhatsAppWebAuthStatusState, m as readWebAuthState } from "./auth-store-_ScMvp7r.js";
3
+ import { i as formatWhatsAppWebAuthStatusState, m as readWebAuthState } from "./auth-store-DpwdTmoO.js";
4
4
  import { DEFAULT_ACCOUNT_ID, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
5
5
  //#region extensions/whatsapp/src/setup-surface.ts
6
6
  const channel = "whatsapp";
@@ -35,7 +35,7 @@ const whatsappSetupWizard = {
35
35
  },
36
36
  resolveShouldPromptAccountIds: ({ shouldPromptAccountIds }) => shouldPromptAccountIds,
37
37
  credentials: [],
38
- finalize: async (params) => await (await import("./setup-finalize-C1S1U-hY.js")).finalizeWhatsAppSetup(params),
38
+ finalize: async (params) => await (await import("./setup-finalize-DTWoYzBv.js")).finalizeWhatsAppSetup(params),
39
39
  disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
40
40
  onAccountRecorded: (accountId, options) => {
41
41
  options?.onAccountId?.(channel, accountId);
package/dist/test-api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-Gp1lQ0at.js";
2
- import { t as whatsappOutbound } from "./outbound-adapter-Bs0e4qVd.js";
1
+ import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-BH_U23qp.js";
2
+ import { t as whatsappOutbound } from "./outbound-adapter-B8fD5esZ.js";
3
3
  export { resolveWhatsAppRuntimeGroupPolicy, whatsappOutbound };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/whatsapp",
3
- "version": "2026.5.12",
3
+ "version": "2026.5.14-beta.2",
4
4
  "description": "OpenClaw WhatsApp channel plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,14 +13,14 @@
13
13
  "https-proxy-agent": "9.0.0",
14
14
  "jimp": "1.6.1",
15
15
  "typebox": "1.1.38",
16
- "undici": "8.2.0"
16
+ "undici": "8.3.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@openclaw/plugin-sdk": "workspace:*",
20
20
  "openclaw": "workspace:*"
21
21
  },
22
22
  "peerDependencies": {
23
- "openclaw": ">=2026.5.12"
23
+ "openclaw": ">=2026.5.14-beta.2"
24
24
  },
25
25
  "peerDependenciesMeta": {
26
26
  "openclaw": {
@@ -63,10 +63,10 @@
63
63
  "minHostVersion": ">=2026.4.25"
64
64
  },
65
65
  "compat": {
66
- "pluginApi": ">=2026.5.12"
66
+ "pluginApi": ">=2026.5.14-beta.2"
67
67
  },
68
68
  "build": {
69
- "openclawVersion": "2026.5.12"
69
+ "openclawVersion": "2026.5.14-beta.2"
70
70
  },
71
71
  "release": {
72
72
  "publishToClawHub": true,
@@ -1,46 +0,0 @@
1
- import { applyAccountNameToChannelSection, migrateBaseNameToDefaultAccount, normalizeAccountId } from "openclaw/plugin-sdk/setup";
2
- //#region extensions/whatsapp/src/setup-core.ts
3
- const channel = "whatsapp";
4
- const whatsappSetupAdapter = {
5
- resolveAccountId: ({ accountId }) => normalizeAccountId(accountId),
6
- applyAccountName: ({ cfg, accountId, name }) => applyAccountNameToChannelSection({
7
- cfg,
8
- channelKey: channel,
9
- accountId,
10
- name,
11
- alwaysUseAccounts: true
12
- }),
13
- applyAccountConfig: ({ cfg, accountId, input }) => {
14
- const next = migrateBaseNameToDefaultAccount({
15
- cfg: applyAccountNameToChannelSection({
16
- cfg,
17
- channelKey: channel,
18
- accountId,
19
- name: input.name,
20
- alwaysUseAccounts: true
21
- }),
22
- channelKey: channel,
23
- alwaysUseAccounts: true
24
- });
25
- const entry = {
26
- ...next.channels?.whatsapp?.accounts?.[accountId],
27
- ...input.authDir ? { authDir: input.authDir } : {},
28
- enabled: true
29
- };
30
- return {
31
- ...next,
32
- channels: {
33
- ...next.channels,
34
- whatsapp: {
35
- ...next.channels?.whatsapp,
36
- accounts: {
37
- ...next.channels?.whatsapp?.accounts,
38
- [accountId]: entry
39
- }
40
- }
41
- }
42
- };
43
- }
44
- };
45
- //#endregion
46
- export { whatsappSetupAdapter as t };