@openclaw/whatsapp 2026.8.2 → 2026.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/{accounts-CeKQbu_s.js → accounts-CiKHiuEe.js} +1 -1
  2. package/dist/{action-runtime-Bw0loEdy.js → action-runtime-CRZLhN3f.js} +2 -2
  3. package/dist/action-runtime-api.js +1 -1
  4. package/dist/action-runtime.runtime.js +1 -1
  5. package/dist/agent-tools-api.js +1 -1
  6. package/dist/api.js +7 -7
  7. package/dist/{approval-handler.runtime-DeyPb57-.js → approval-handler.runtime-C2cpkbpY.js} +8 -4
  8. package/dist/{approval-reactions-DGDA6hQ7.js → approval-reactions-DrZe-NmN.js} +2 -2
  9. package/dist/auth-presence.js +1 -1
  10. package/dist/{auth-store-DTj1H9pv.js → auth-store-ZWaclAbd.js} +3 -3
  11. package/dist/{channel-DxMmDjqK.js → channel-DebjeuFC.js} +51 -61
  12. package/dist/channel-plugin-api.js +1 -1
  13. package/dist/{channel-react-action-BUp7Wbfr.js → channel-react-action-CHeJSG9F.js} +3 -3
  14. package/dist/{channel.runtime-BwSnyXRX.js → channel.runtime-B90_wffD.js} +4 -4
  15. package/dist/{channel.setup-aOFLSQyw.js → channel.setup-D1-jE0aE.js} +1 -1
  16. package/dist/{connection-controller-BvkxsbWi.js → connection-controller-DNp6U1NN.js} +2 -2
  17. package/dist/{creds-files-W6B3EMZ8.js → creds-files-Drg3usj1.js} +1 -1
  18. package/dist/{directory-config-LgxYJLWY.js → directory-config-CoWFw1zn.js} +3 -3
  19. package/dist/directory-contract-api.js +1 -1
  20. package/dist/doctor-BPb-SjdE.js +65 -0
  21. package/dist/doctor-contract-api.js +21 -3
  22. package/dist/{group-session-key-KUguLmSZ.js → group-session-key-BmVDSPr1.js} +8 -9
  23. package/dist/light-runtime-api.js +1 -1
  24. package/dist/{login-Bk_jiXKD.js → login-6j2iP9nR.js} +4 -4
  25. package/dist/{login-qr-B3m61NqA.js → login-qr-DRFgI6k1.js} +4 -4
  26. package/dist/login-qr-runtime.js +1 -1
  27. package/dist/{monitor-CTsyo-HE.js → monitor-DyPdOPRx.js} +11 -14
  28. package/dist/{question-reactions-B9D6MHXZ.js → question-reactions-bbe0Qnjn.js} +1 -1
  29. package/dist/runtime-api.js +8 -8
  30. package/dist/{send-DiPjiygK.js → send-BDDGPxav.js} +1 -1
  31. package/dist/{send-api-kFcuhSiY.js → send-api-C_Zn4Ij-.js} +9 -11
  32. package/dist/{setup-finalize-CqH5wTK5.js → setup-finalize-C5QtbrWV.js} +4 -4
  33. package/dist/setup-plugin-api.js +1 -1
  34. package/dist/{setup-surface-Dm3T6S8t.js → setup-surface-WsAzq337.js} +3 -3
  35. package/dist/{shared-DDjonGys.js → shared-BzKxoeKY.js} +5 -5
  36. package/dist/{socket-close-CpkkJZCU.js → socket-close-B3X9uerq.js} +2 -2
  37. package/package.json +6 -5
  38. package/dist/doctor-CwzVXKoE.js +0 -10
@@ -1,5 +1,5 @@
1
1
  import { n as listConfiguredAccountIds, r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
2
- import { n as hasWebCredsRegularFileSync, r as hasWebCredsSync } from "./creds-files-W6B3EMZ8.js";
2
+ import { n as hasWebCredsRegularFileSync, r as hasWebCredsSync } from "./creds-files-Drg3usj1.js";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId, resolveAccountEntry, resolveMergedAccountConfig, resolveUserPath } from "openclaw/plugin-sdk/account-core";
@@ -1,6 +1,6 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-CeKQbu_s.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
2
2
  import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-1GqbT1uX.js";
3
- import { r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-DiPjiygK.js";
3
+ import { r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-BDDGPxav.js";
4
4
  import { ToolAuthorizationError, createActionGate, jsonResult, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
5
5
  //#region extensions/whatsapp/src/action-runtime-target-auth.ts
6
6
  function resolveAuthorizedWhatsAppOutboundTarget(params) {
@@ -1,2 +1,2 @@
1
- import { t as handleWhatsAppAction } from "./action-runtime-Bw0loEdy.js";
1
+ import { t as handleWhatsAppAction } from "./action-runtime-CRZLhN3f.js";
2
2
  export { handleWhatsAppAction };
@@ -1,2 +1,2 @@
1
- import { t as handleWhatsAppAction } from "./action-runtime-Bw0loEdy.js";
1
+ import { t as handleWhatsAppAction } from "./action-runtime-CRZLhN3f.js";
2
2
  export { handleWhatsAppAction };
@@ -1,4 +1,4 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-CeKQbu_s.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
2
2
  import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-DG0tuYuw.js";
3
3
  import { s as resolveJidToE164 } from "./targets-runtime-RBjx3pg_.js";
4
4
  import { n as registerWhatsAppLoginTool } from "./agent-tools-login-B-2qZPzc.js";
package/dist/api.js CHANGED
@@ -1,18 +1,18 @@
1
- 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-CeKQbu_s.js";
1
+ 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-CiKHiuEe.js";
2
2
  import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.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-CugRyONv.js";
4
4
  import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-1GqbT1uX.js";
5
5
  import { c as toWhatsappJid, i as markdownToWhatsApp, l as toWhatsappJidWithLid, n as isSelfChatMode, r as jidToE164, s as resolveJidToE164, t as assertWebChannel } from "./targets-runtime-RBjx3pg_.js";
6
6
  import { n as resolveUserPath, t as normalizeE164 } from "./text-runtime-DyfmcATV.js";
7
- import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-DxMmDjqK.js";
8
- import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy } from "./shared-DDjonGys.js";
7
+ import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-DebjeuFC.js";
8
+ import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy } from "./shared-BzKxoeKY.js";
9
9
  import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
10
- import { t as whatsappSetupPlugin } from "./channel.setup-aOFLSQyw.js";
10
+ import { t as whatsappSetupPlugin } from "./channel.setup-D1-jE0aE.js";
11
11
  import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-C7m81BNe.js";
12
- import { a as waitForWaConnection, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter } from "./socket-close-CpkkJZCU.js";
12
+ import { a as waitForWaConnection, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter } from "./socket-close-B3X9uerq.js";
13
13
  import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
14
- import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-LgxYJLWY.js";
15
- import { _ as resolveInboundMediaMimetype, c as extractContextInfo, m as findMessageSection, o as describeReplyContext, p as extractText, t as createWebSendApi, u as extractLocationData } from "./send-api-kFcuhSiY.js";
14
+ import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-CoWFw1zn.js";
15
+ import { _ as resolveInboundMediaMimetype, c as extractContextInfo, m as findMessageSection, o as describeReplyContext, p as extractText, t as createWebSendApi, u as extractLocationData } from "./send-api-C_Zn4Ij-.js";
16
16
  import { asBoolean, isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
17
17
  import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
18
18
  //#region extensions/whatsapp/src/qa-driver.runtime.ts
@@ -1,10 +1,10 @@
1
- import "./accounts-CeKQbu_s.js";
1
+ import "./accounts-CiKHiuEe.js";
2
2
  import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
3
3
  import { s as normalizeWhatsAppMessagingTarget } from "./normalize-target-CugRyONv.js";
4
- import { i as sendTypingWhatsApp, t as sendMessageWhatsApp } from "./send-DiPjiygK.js";
4
+ import { i as sendTypingWhatsApp, t as sendMessageWhatsApp } from "./send-BDDGPxav.js";
5
5
  import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.js";
6
6
  import "./normalize-C7Hkc_vE.js";
7
- import { i as unregisterWhatsAppApprovalReactionTarget, r as registerWhatsAppApprovalReactionTarget } from "./approval-reactions-DGDA6hQ7.js";
7
+ import { i as unregisterWhatsAppApprovalReactionTarget, r as registerWhatsAppApprovalReactionTarget } from "./approval-reactions-DrZe-NmN.js";
8
8
  import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
9
9
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
10
10
  import { buildApprovalReactionPendingContent } from "openclaw/plugin-sdk/approval-reaction-runtime";
@@ -16,7 +16,11 @@ function buildPendingPayload(params) {
16
16
  return buildApprovalReactionPendingContent(params);
17
17
  }
18
18
  const whatsappApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
19
- eventKinds: ["exec", "plugin"],
19
+ eventKinds: [
20
+ "exec",
21
+ "plugin",
22
+ "system-agent"
23
+ ],
20
24
  availability: {
21
25
  isConfigured: ({ context }) => Boolean(context),
22
26
  shouldHandle: ({ context }) => Boolean(context)
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { a as resolveWhatsAppAccount } from "./accounts-CeKQbu_s.js";
2
+ import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
3
3
  import { n as getOptionalWhatsAppRuntime } from "./runtime-BLlToOi6.js";
4
- import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth } from "./group-session-key-KUguLmSZ.js";
4
+ import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth } from "./group-session-key-BmVDSPr1.js";
5
5
  import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
6
6
  import { createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
7
7
  import { approvalReactionDecisionSetsMatch, buildApprovalReactionDeliveredBindingMarker, createApprovalReactionTargetStore, listApprovalReactionBindings, readApprovalReactionDecisionList, readApprovalReactionDeliveredBinding, readApprovalReactionPresentationBinding, resolveTypedApprovalReactionTarget } from "openclaw/plugin-sdk/approval-reaction-runtime";
@@ -1,4 +1,4 @@
1
- import { r as hasWebCredsSync } from "./creds-files-W6B3EMZ8.js";
1
+ import { r as hasWebCredsSync } from "./creds-files-Drg3usj1.js";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
  import { resolveOAuthDir } from "openclaw/plugin-sdk/state-paths";
@@ -1,17 +1,17 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { a as readWebCredsJsonRaw, c as resolveWebCredsPath, i as isWhatsAppBaileysAuthFileName, l as statWebCredsFileSync, o as readWebCredsJsonRawSync, r as hasWebCredsSync, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-W6B3EMZ8.js";
2
+ import { a as readWebCredsJsonRaw, c as resolveWebCredsPath, i as isWhatsAppBaileysAuthFileName, l as statWebCredsFileSync, o as readWebCredsJsonRawSync, r as hasWebCredsSync, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-Drg3usj1.js";
3
3
  import { r as jidToE164 } from "./targets-runtime-RBjx3pg_.js";
4
4
  import { n as resolveUserPath, t as normalizeE164 } from "./text-runtime-DyfmcATV.js";
5
5
  import path from "node:path";
6
6
  import { resolveOAuthDir as resolveOAuthDir$1 } from "openclaw/plugin-sdk/state-paths";
7
- import { replaceFileAtomic } from "openclaw/plugin-sdk/security-runtime";
7
+ import { isPathStrictlyInside } from "openclaw/plugin-sdk/file-access-runtime";
8
8
  import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
9
9
  import { defaultRuntime, getChildLogger, info, success } from "openclaw/plugin-sdk/runtime-env";
10
10
  import fs from "node:fs/promises";
11
- import { isPathStrictlyInside } from "openclaw/plugin-sdk/file-access-runtime";
12
11
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/routing";
13
12
  import { enqueueKeyedTask } from "openclaw/plugin-sdk/keyed-async-queue";
14
13
  import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
14
+ import { replaceFileAtomic } from "openclaw/plugin-sdk/security-runtime";
15
15
  //#region extensions/whatsapp/src/creds-persistence.ts
16
16
  const CREDS_FILE_MODE = 384;
17
17
  const CREDS_SAVE_FLUSH_TIMEOUT_MS = 15e3;
@@ -1,16 +1,16 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-CeKQbu_s.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
2
2
  import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.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-CugRyONv.js";
4
4
  import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-1GqbT1uX.js";
5
- import { c as normalizeWhatsAppPayloadTextPreservingIndentation, i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppOutboundPayload, s as normalizeWhatsAppPayloadText, t as sendMessageWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-DiPjiygK.js";
5
+ import { c as normalizeWhatsAppPayloadTextPreservingIndentation, i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppOutboundPayload, s as normalizeWhatsAppPayloadText, t as sendMessageWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-BDDGPxav.js";
6
6
  import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.js";
7
7
  import "./normalize-C7Hkc_vE.js";
8
8
  import { c as toWhatsappJid } from "./targets-runtime-RBjx3pg_.js";
9
9
  import "./text-runtime-DyfmcATV.js";
10
- import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth, s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-KUguLmSZ.js";
11
- import { a as resolveWhatsAppGroupRequireMention, c as loadWhatsAppChannelRuntime, i as whatsappSetupContract, l as readWhatsAppAccountLinkState, n as whatsappSetupWizardProxy, o as resolveWhatsAppGroupToolPolicy, s as formatWhatsAppConfigAllowFromEntries, t as createWhatsAppPluginBase } from "./shared-DDjonGys.js";
10
+ import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth, s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-BmVDSPr1.js";
11
+ import { a as resolveWhatsAppGroupRequireMention, c as loadWhatsAppChannelRuntime, i as whatsappSetupContract, l as readWhatsAppAccountLinkState, n as whatsappSetupWizardProxy, o as resolveWhatsAppGroupToolPolicy, s as formatWhatsAppConfigAllowFromEntries, t as createWhatsAppPluginBase } from "./shared-BzKxoeKY.js";
12
12
  import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
13
- import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DTj1H9pv.js";
13
+ import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-ZWaclAbd.js";
14
14
  import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
15
15
  import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-core";
16
16
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -66,7 +66,11 @@ const whatsappApproval = createApproverRestrictedNativeApprovalCapabilityFromFor
66
66
  }, "plugin") }
67
67
  },
68
68
  createNativeRuntime: (routing) => createLazyChannelApprovalNativeRuntimeAdapter({
69
- eventKinds: ["exec", "plugin"],
69
+ eventKinds: [
70
+ "exec",
71
+ "plugin",
72
+ "system-agent"
73
+ ],
70
74
  isConfigured: ({ cfg, accountId, context }) => Boolean(context) && routing.canAnyApprovalPotentiallyRouteToChannel({
71
75
  cfg,
72
76
  accountId,
@@ -78,7 +82,7 @@ const whatsappApproval = createApproverRestrictedNativeApprovalCapabilityFromFor
78
82
  approvalKind,
79
83
  request
80
84
  }),
81
- load: async () => (await import("./approval-handler.runtime-DeyPb57-.js")).whatsappApprovalNativeRuntime
85
+ load: async () => (await import("./approval-handler.runtime-C2cpkbpY.js")).whatsappApprovalNativeRuntime
82
86
  })
83
87
  });
84
88
  function buildWhatsAppPendingPayload(params, approvalKind) {
@@ -164,6 +168,32 @@ function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, sho
164
168
  media: cachedMeta?.media
165
169
  };
166
170
  };
171
+ const dispatchMessage = async (params, text, mediaOptions, mediaDeliveryOptions) => {
172
+ const lookupAccountId = resolveQuoteLookupAccountId(params.cfg, params.accountId);
173
+ const quotedMessageKey = resolveQuotedMessageKey({
174
+ accountId: lookupAccountId,
175
+ to: params.to,
176
+ replyToId: params.replyToId
177
+ });
178
+ const send = quotedMessageKey ? sendMessageWhatsApp : resolveOutboundSendDep(params.deps, "whatsapp", { legacyKeys: WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS }) ?? sendMessageWhatsApp;
179
+ const onDeliveryResult = params.onDeliveryResult;
180
+ return await send(params.to, text ?? normalizeText(params.text), {
181
+ verbose: false,
182
+ cfg: params.cfg,
183
+ ...mediaOptions,
184
+ accountId: params.accountId ?? void 0,
185
+ gifPlayback: params.gifPlayback,
186
+ ...mediaDeliveryOptions,
187
+ replyToIdSource: params.replyToIdSource,
188
+ replyToMode: params.replyToMode,
189
+ formatting: params.formatting,
190
+ onPlatformSendDispatch: params.onPlatformSendDispatch,
191
+ ...quotedMessageKey ? { quotedMessageKey } : {},
192
+ ...onDeliveryResult ? { onDeliveryResult: async (result) => {
193
+ await onDeliveryResult(attachChannelToResult("whatsapp", result));
194
+ } } : {}
195
+ });
196
+ };
167
197
  const outbound = {
168
198
  deliveryMode: "gateway",
169
199
  textChunkLimit: 4e3,
@@ -177,58 +207,18 @@ function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, sho
177
207
  resolveTarget,
178
208
  ...createAttachedChannelResultAdapter({
179
209
  channel: "whatsapp",
180
- sendText: async ({ cfg, to, text, accountId, deps, gifPlayback, replyToId, replyToIdSource, replyToMode, formatting, onPlatformSendDispatch, onDeliveryResult }) => {
181
- const normalizedText = normalizeText(text);
210
+ sendText: async (params) => {
211
+ const normalizedText = normalizeText(params.text);
182
212
  if (skipEmptyText && !normalizedText) return { messageId: "" };
183
- const lookupAccountId = resolveQuoteLookupAccountId(cfg, accountId);
184
- const quotedMessageKey = resolveQuotedMessageKey({
185
- accountId: lookupAccountId,
186
- to,
187
- replyToId
188
- });
189
- return await (quotedMessageKey ? sendMessageWhatsApp : resolveOutboundSendDep(deps, "whatsapp", { legacyKeys: WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS }) ?? sendMessageWhatsApp)(to, normalizedText, {
190
- verbose: false,
191
- cfg,
192
- accountId: accountId ?? void 0,
193
- gifPlayback,
194
- replyToIdSource,
195
- replyToMode,
196
- formatting,
197
- onPlatformSendDispatch,
198
- ...quotedMessageKey ? { quotedMessageKey } : {},
199
- ...onDeliveryResult ? { onDeliveryResult: async (result) => {
200
- await onDeliveryResult(attachChannelToResult("whatsapp", result));
201
- } } : {}
202
- });
203
- },
204
- sendMedia: async ({ cfg, to, text, mediaUrl, mediaAccess, mediaLocalRoots, mediaReadFile, audioAsVoice, accountId, deps, gifPlayback, forceDocument, replyToId, replyToIdSource, replyToMode, formatting, onPlatformSendDispatch, onDeliveryResult }) => {
205
- const lookupAccountId = resolveQuoteLookupAccountId(cfg, accountId);
206
- const quotedMessageKey = resolveQuotedMessageKey({
207
- accountId: lookupAccountId,
208
- to,
209
- replyToId
210
- });
211
- return await (quotedMessageKey ? sendMessageWhatsApp : resolveOutboundSendDep(deps, "whatsapp", { legacyKeys: WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS }) ?? sendMessageWhatsApp)(to, normalizeText(text), {
212
- verbose: false,
213
- cfg,
214
- mediaUrl,
215
- mediaAccess,
216
- mediaLocalRoots,
217
- mediaReadFile,
218
- ...audioAsVoice === void 0 ? {} : { audioAsVoice },
219
- accountId: accountId ?? void 0,
220
- gifPlayback,
221
- forceDocument,
222
- replyToIdSource,
223
- replyToMode,
224
- formatting,
225
- onPlatformSendDispatch,
226
- ...quotedMessageKey ? { quotedMessageKey } : {},
227
- ...onDeliveryResult ? { onDeliveryResult: async (result) => {
228
- await onDeliveryResult(attachChannelToResult("whatsapp", result));
229
- } } : {}
230
- });
213
+ return await dispatchMessage(params, normalizedText);
231
214
  },
215
+ sendMedia: async (params) => await dispatchMessage(params, void 0, {
216
+ mediaUrl: params.mediaUrl,
217
+ mediaAccess: params.mediaAccess,
218
+ mediaLocalRoots: params.mediaLocalRoots,
219
+ mediaReadFile: params.mediaReadFile,
220
+ ...params.audioAsVoice === void 0 ? {} : { audioAsVoice: params.audioAsVoice }
221
+ }, { forceDocument: params.forceDocument }),
232
222
  sendPoll: async ({ cfg, to, poll, accountId }) => await sendPollWhatsApp(to, poll, {
233
223
  verbose: shouldLogVerbose(),
234
224
  accountId: accountId ?? void 0,
@@ -264,8 +254,8 @@ function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, sho
264
254
  }
265
255
  //#endregion
266
256
  //#region extensions/whatsapp/src/channel-outbound.ts
267
- const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-DGDA6hQ7.js").then((n) => n.t));
268
- const loadWhatsAppQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-B9D6MHXZ.js").then((n) => n.n));
257
+ const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-DrZe-NmN.js").then((n) => n.t));
258
+ const loadWhatsAppQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-bbe0Qnjn.js").then((n) => n.n));
269
259
  function normalizeWhatsAppChannelPayloadText(text) {
270
260
  return normalizeWhatsAppPayloadTextPreservingIndentation(text);
271
261
  }
@@ -528,8 +518,8 @@ function collectWhatsAppStatusIssues(accounts) {
528
518
  }
529
519
  //#endregion
530
520
  //#region extensions/whatsapp/src/channel.ts
531
- const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-LgxYJLWY.js").then((n) => n.t));
532
- const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-BUp7Wbfr.js"));
521
+ const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-CoWFw1zn.js").then((n) => n.t));
522
+ const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-CHeJSG9F.js"));
533
523
  function resolveWhatsAppTargetInfo(raw) {
534
524
  const normalized = normalizeWhatsAppTarget(raw);
535
525
  if (!normalized) return null;
@@ -1,2 +1,2 @@
1
- import { t as whatsappPlugin } from "./channel-DxMmDjqK.js";
1
+ import { t as whatsappPlugin } from "./channel-DebjeuFC.js";
2
2
  export { whatsappPlugin };
@@ -1,7 +1,7 @@
1
- import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-CeKQbu_s.js";
1
+ import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-CiKHiuEe.js";
2
2
  import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-CugRyONv.js";
3
- import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-Bw0loEdy.js";
4
- import { a as sendWhatsAppUploadFile } from "./send-DiPjiygK.js";
3
+ import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-CRZLhN3f.js";
4
+ import { a as sendWhatsAppUploadFile } from "./send-BDDGPxav.js";
5
5
  import "./normalize-C7Hkc_vE.js";
6
6
  import { jsonResult, readStringOrNumberParam, readStringParam as readStringParam$1, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
7
7
  import { canonicalizeBase64, estimateBase64DecodedBytes } from "openclaw/plugin-sdk/media-runtime";
@@ -1,9 +1,9 @@
1
1
  import { startWebLoginWithQr as startWebLoginWithQr$1, waitForWebLogin as waitForWebLogin$1 } from "./login-qr-runtime.js";
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-DTj1H9pv.js";
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-ZWaclAbd.js";
3
3
  import { t as getActiveWebListener$1 } from "./active-listener-BEjWsCNM.js";
4
- import { t as monitorWebChannel$1 } from "./monitor-CTsyo-HE.js";
5
- import { t as loginWeb$1 } from "./login-Bk_jiXKD.js";
6
- import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-Dm3T6S8t.js";
4
+ import { t as monitorWebChannel$1 } from "./monitor-DyPdOPRx.js";
5
+ import { t as loginWeb$1 } from "./login-6j2iP9nR.js";
6
+ import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-WsAzq337.js";
7
7
  //#region extensions/whatsapp/src/channel.runtime.ts
8
8
  function getActiveWebListener(...args) {
9
9
  return getActiveWebListener$1(...args);
@@ -1,4 +1,4 @@
1
- import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupContract, l as readWhatsAppAccountLinkState, n as whatsappSetupWizardProxy, o as resolveWhatsAppGroupToolPolicy, t as createWhatsAppPluginBase } from "./shared-DDjonGys.js";
1
+ import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupContract, l as readWhatsAppAccountLinkState, n as whatsappSetupWizardProxy, o as resolveWhatsAppGroupToolPolicy, t as createWhatsAppPluginBase } from "./shared-BzKxoeKY.js";
2
2
  //#region extensions/whatsapp/src/channel.setup.ts
3
3
  const whatsappSetupPlugin = { ...createWhatsAppPluginBase({
4
4
  groups: {
@@ -1,7 +1,7 @@
1
1
  import { r as getWhatsAppChannelRuntime } from "./runtime-BLlToOi6.js";
2
2
  import { n as WHATSAPP_CONNECTION_OWNER_PENDING_CAPABILITY, t as WHATSAPP_CONNECTION_CONTROLLER_CAPABILITY } from "./connection-controller-runtime-context-DG0tuYuw.js";
3
- import { M as waitForCredsSaveQueueWithTimeout, c as logoutWeb, f as readWebAuthExistsForDecision, k as resolveComparableIdentity, r as WhatsAppAuthUnstableError } from "./auth-store-DTj1H9pv.js";
4
- import { a as waitForWaConnection, m as acquireWhatsAppGatewayConnectionOwner, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, t as closeWhatsAppSocketAndWait } from "./socket-close-CpkkJZCU.js";
3
+ import { M as waitForCredsSaveQueueWithTimeout, c as logoutWeb, f as readWebAuthExistsForDecision, k as resolveComparableIdentity, r as WhatsAppAuthUnstableError } from "./auth-store-ZWaclAbd.js";
4
+ import { a as waitForWaConnection, m as acquireWhatsAppGatewayConnectionOwner, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, t as closeWhatsAppSocketAndWait } from "./socket-close-B3X9uerq.js";
5
5
  import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
6
6
  import { computeBackoff, info, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
7
7
  import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
@@ -1,5 +1,5 @@
1
1
  import path from "node:path";
2
- import { assertNoSymlinkParents, assertNoSymlinkParentsSync, readRegularFile, readRegularFileSync, statRegularFile, statRegularFileSync } from "openclaw/plugin-sdk/security-runtime";
2
+ import { assertNoSymlinkParents, assertNoSymlinkParentsSync, readRegularFile, readRegularFileSync, statRegularFile, statRegularFileSync } from "openclaw/plugin-sdk/file-access-runtime";
3
3
  //#region extensions/whatsapp/src/creds-files.ts
4
4
  const BAILEYS_SIGNAL_AUTH_CATEGORIES = {
5
5
  "app-state-sync-key": true,
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { c as resolveMergedWhatsAppAccountConfig, o as resolveWhatsAppAuthDir } from "./accounts-CeKQbu_s.js";
2
+ import { c as resolveMergedWhatsAppAccountConfig, o as resolveWhatsAppAuthDir } from "./accounts-CiKHiuEe.js";
3
3
  import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-CugRyONv.js";
4
4
  import { i as hasPendingWhatsAppConnectionOwner, r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-DG0tuYuw.js";
5
5
  import "./normalize-C7Hkc_vE.js";
6
- import { M as waitForCredsSaveQueueWithTimeout, f as readWebAuthExistsForDecision } from "./auth-store-DTj1H9pv.js";
6
+ import { M as waitForCredsSaveQueueWithTimeout, f as readWebAuthExistsForDecision } from "./auth-store-ZWaclAbd.js";
7
7
  import { n as resolveWebAccountId } from "./active-listener-BEjWsCNM.js";
8
- import { a as waitForWaConnection, h as acquireWhatsAppStandaloneConnectionOwner, n as createWaDirectorySocket, p as WhatsAppConnectionOwnerBusyError, t as closeWhatsAppSocketAndWait } from "./socket-close-CpkkJZCU.js";
8
+ import { a as waitForWaConnection, h as acquireWhatsAppStandaloneConnectionOwner, n as createWaDirectorySocket, p as WhatsAppConnectionOwnerBusyError, t as closeWhatsAppSocketAndWait } from "./socket-close-B3X9uerq.js";
9
9
  import { listResolvedDirectoryGroupEntriesFromMapKeys, listResolvedDirectoryUserEntriesFromAllowFrom } from "openclaw/plugin-sdk/directory-config-runtime";
10
10
  //#region extensions/whatsapp/src/directory-config.ts
11
11
  var directory_config_exports = /* @__PURE__ */ __exportAll({
@@ -1,4 +1,4 @@
1
- import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-LgxYJLWY.js";
1
+ import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-CoWFw1zn.js";
2
2
  //#region extensions/whatsapp/directory-contract-api.ts
3
3
  const whatsappDirectoryContractPlugin = {
4
4
  id: "whatsapp",
@@ -0,0 +1,65 @@
1
+ import { asObjectRecord, collectChannelAccountScopes } from "openclaw/plugin-sdk/runtime-doctor-migrations";
2
+ //#region extensions/whatsapp/src/doctor.ts
3
+ function resolveLegacyAckScope(ack) {
4
+ const direct = ack.direct !== false;
5
+ const group = ack.group ?? "mentions";
6
+ if (direct) return group === "always" ? "all" : group === "never" ? "direct" : void 0;
7
+ return group === "always" ? "group-all" : group === "mentions" ? "group-mentions" : group === "never" ? "off" : void 0;
8
+ }
9
+ function resolveDefaultAgentEmoji(cfg) {
10
+ const entries = asObjectRecord(asObjectRecord(cfg.agents)?.entries);
11
+ const agents = entries ? Object.values(entries).flatMap((value) => {
12
+ const entry = asObjectRecord(value);
13
+ return entry ? [entry] : [];
14
+ }) : [];
15
+ const agent = agents.find((entry) => entry.default === true) ?? agents[0];
16
+ const emoji = asObjectRecord(agent?.identity)?.emoji;
17
+ return typeof emoji === "string" ? emoji : void 0;
18
+ }
19
+ function normalizeCompatibilityConfig({ cfg }) {
20
+ const changes = [];
21
+ const sources = [];
22
+ for (const scope of collectChannelAccountScopes({
23
+ cfg,
24
+ channelId: "whatsapp"
25
+ })) {
26
+ const ack = asObjectRecord(scope.account.ackReaction);
27
+ if (!ack) continue;
28
+ sources.push({
29
+ path: `${scope.prefix}.ackReaction`,
30
+ account: scope.account,
31
+ ...typeof ack.emoji === "string" ? { emoji: ack.emoji } : {},
32
+ scope: resolveLegacyAckScope(ack),
33
+ unrepresentableScope: ack.direct !== false && (ack.group ?? "mentions") === "mentions"
34
+ });
35
+ }
36
+ if (sources.length === 0) return {
37
+ config: cfg,
38
+ changes
39
+ };
40
+ const messages = cfg.messages ??= {};
41
+ const identityEmoji = resolveDefaultAgentEmoji(cfg) ?? "👀";
42
+ for (const source of sources) {
43
+ messages.ackReaction ??= source.emoji ?? identityEmoji;
44
+ messages.ackReactionScope ??= source.scope;
45
+ delete source.account.ackReaction;
46
+ changes.push(`Moved translatable ${source.path} settings to messages ack settings.`);
47
+ }
48
+ const finalEmoji = messages.ackReaction.trim();
49
+ const finalScope = messages.ackReactionScope ?? "group-mentions";
50
+ const comparableFinalScope = finalScope === "none" ? "off" : finalScope;
51
+ for (const source of sources) {
52
+ const sourceEmoji = source.emoji?.trim();
53
+ if (source.emoji === void 0) changes.push(`${source.path} used a route-dependent agent identity acknowledgement emoji before migration; the final messages.ackReaction is ${JSON.stringify(finalEmoji)}. Review messages.ackReaction.`);
54
+ else if (sourceEmoji !== finalEmoji) changes.push(`${source.path} requested acknowledgement emoji ${JSON.stringify(sourceEmoji)}, but the final messages.ackReaction is ${JSON.stringify(finalEmoji)}. Review messages.ackReaction.`);
55
+ if (source.unrepresentableScope) changes.push(`${source.path} migration cannot preserve both direct-message and mentioned-group acknowledgements; the final messages.ackReactionScope is ${JSON.stringify(finalScope)}. Review messages.ackReactionScope.`);
56
+ else if (source.scope && source.scope !== comparableFinalScope) changes.push(`${source.path} requested acknowledgement scope ${JSON.stringify(source.scope)}, but the final messages.ackReactionScope is ${JSON.stringify(finalScope)}. Review messages.ackReactionScope.`);
57
+ }
58
+ return {
59
+ config: cfg,
60
+ changes
61
+ };
62
+ }
63
+ const whatsappDoctor = { normalizeCompatibilityConfig };
64
+ //#endregion
65
+ export { whatsappDoctor as n, normalizeCompatibilityConfig as t };
@@ -1,8 +1,8 @@
1
- import { i as isWhatsAppBaileysAuthFileName } from "./creds-files-W6B3EMZ8.js";
2
- import { t as normalizeCompatibilityConfig$1 } from "./doctor-CwzVXKoE.js";
1
+ import { i as isWhatsAppBaileysAuthFileName } from "./creds-files-Drg3usj1.js";
2
+ import { t as normalizeCompatibilityConfig$1 } from "./doctor-BPb-SjdE.js";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
- import { fileExists } from "openclaw/plugin-sdk/security-runtime";
5
+ import { fileExists } from "openclaw/plugin-sdk/file-access-runtime";
6
6
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
7
7
  import { asObjectRecord, defineChannelAliasMigration, definePluginDoctorMigrationFromPlans, hasLegacyAccountStreamingAliases, stripRetiredChannelKeys } from "openclaw/plugin-sdk/runtime-doctor-migrations";
8
8
  //#region extensions/whatsapp/src/state-migrations.ts
@@ -38,8 +38,26 @@ const streamingAliasMigration = defineChannelAliasMigration({
38
38
  accountStreamingInheritsDefaultAccount: true
39
39
  });
40
40
  const hasExposeErrorText = (value) => Object.hasOwn(asObjectRecord(value) ?? {}, "exposeErrorText");
41
+ const hasAckReaction = (value) => Boolean(asObjectRecord(asObjectRecord(value)?.ackReaction));
41
42
  const legacyConfigRules = [
42
43
  ...streamingAliasMigration.legacyConfigRules,
44
+ {
45
+ path: [
46
+ "channels",
47
+ "whatsapp",
48
+ "ackReaction"
49
+ ],
50
+ message: "channels.whatsapp.ackReaction moved to global message acknowledgement settings. Run \"openclaw doctor --fix\"."
51
+ },
52
+ {
53
+ path: [
54
+ "channels",
55
+ "whatsapp",
56
+ "accounts"
57
+ ],
58
+ message: "channels.whatsapp.accounts.<id>.ackReaction moved to global message acknowledgement settings. Run \"openclaw doctor --fix\".",
59
+ match: (value) => hasLegacyAccountStreamingAliases(value, hasAckReaction)
60
+ },
43
61
  {
44
62
  path: [
45
63
  "channels",
@@ -1,4 +1,4 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-CeKQbu_s.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
2
2
  import { c as normalizeWhatsAppTarget } from "./normalize-target-CugRyONv.js";
3
3
  import "./normalize-C7Hkc_vE.js";
4
4
  import { r as jidToE164 } from "./targets-runtime-RBjx3pg_.js";
@@ -140,17 +140,16 @@ function resolveQuotedRemoteJid(params) {
140
140
  function buildQuotedMessageOptions(params) {
141
141
  const id = params.messageId?.trim();
142
142
  const quotedRemoteJid = params.remoteJid?.trim();
143
- if (!id || !quotedRemoteJid) return;
144
- const remoteJid = resolveQuotedRemoteJid({
145
- destinationJid: params.destinationJid,
146
- lookupTargetJid: params.lookupTargetJid,
147
- quotedRemoteJid,
148
- requestedJid: params.requestedJid
149
- });
150
143
  const previewText = [params.messageText, formatMediaPlaceholderText(params.media ? [params.media] : [])].filter(Boolean).join("\n");
144
+ if (!id || !quotedRemoteJid || !previewText) return;
151
145
  return { quoted: {
152
146
  key: {
153
- remoteJid,
147
+ remoteJid: resolveQuotedRemoteJid({
148
+ destinationJid: params.destinationJid,
149
+ lookupTargetJid: params.lookupTargetJid,
150
+ quotedRemoteJid,
151
+ requestedJid: params.requestedJid
152
+ }),
154
153
  id,
155
154
  fromMe: params.fromMe ?? false,
156
155
  participant: params.participant
@@ -1,5 +1,5 @@
1
1
  import { t as createWhatsAppLoginTool } from "./agent-tools-login-B-2qZPzc.js";
2
- import { c as logoutWeb, g as readWebSelfId, l as pickWebChannel, o as getWebAuthAgeMs, s as logWebSelfId, t as WA_WEB_AUTH_DIR, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./auth-store-DTj1H9pv.js";
2
+ import { c as logoutWeb, g as readWebSelfId, l as pickWebChannel, o as getWebAuthAgeMs, s as logWebSelfId, t as WA_WEB_AUTH_DIR, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./auth-store-ZWaclAbd.js";
3
3
  import { t as getActiveWebListener } from "./active-listener-BEjWsCNM.js";
4
4
  import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
5
5
  export { WA_WEB_AUTH_DIR, createWhatsAppLoginTool, formatError, getActiveWebListener, getStatusCode, getWebAuthAgeMs, logWebSelfId, logoutWeb, pickWebChannel, readWebSelfId, resolveDefaultWebAuthDir, webAuthExists };
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { a as resolveWhatsAppAccount } from "./accounts-CeKQbu_s.js";
3
- import { b as restoreCredsFromBackupIfNeeded } from "./auth-store-DTj1H9pv.js";
4
- import { f as renderQrTerminal, r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-CpkkJZCU.js";
5
- import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-BvkxsbWi.js";
2
+ import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
3
+ import { b as restoreCredsFromBackupIfNeeded } from "./auth-store-ZWaclAbd.js";
4
+ import { f as renderQrTerminal, r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-B3X9uerq.js";
5
+ import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-DNp6U1NN.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,9 +1,9 @@
1
- import { a as resolveWhatsAppAccount } from "./accounts-CeKQbu_s.js";
2
- import { c as logoutWeb, f as readWebAuthExistsForDecision, g as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DTj1H9pv.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
2
+ import { c as logoutWeb, f as readWebAuthExistsForDecision, g as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-ZWaclAbd.js";
3
3
  import { t as getActiveWebListener } from "./active-listener-BEjWsCNM.js";
4
- import { r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-CpkkJZCU.js";
4
+ import { r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-B3X9uerq.js";
5
5
  import { t as formatError } from "./session-errors-JuazczrA.js";
6
- import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-BvkxsbWi.js";
6
+ import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-DNp6U1NN.js";
7
7
  import { logInfo } from "openclaw/plugin-sdk/logging-core";
8
8
  import { danger, defaultRuntime, info, success } from "openclaw/plugin-sdk/runtime-env";
9
9
  import { renderQrPngDataUrl } from "openclaw/plugin-sdk/media-runtime";
@@ -1,6 +1,6 @@
1
1
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
2
2
  //#region extensions/whatsapp/login-qr-runtime.ts
3
- const loadLoginQrModule = createLazyRuntimeModule(() => import("./login-qr-B3m61NqA.js"));
3
+ const loadLoginQrModule = createLazyRuntimeModule(() => import("./login-qr-DRFgI6k1.js"));
4
4
  async function startWebLoginWithQr(...args) {
5
5
  const { startWebLoginWithQr: startWebLoginWithQrLocal } = await loadLoginQrModule();
6
6
  return await startWebLoginWithQrLocal(...args);
@@ -1,22 +1,21 @@
1
- import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-CeKQbu_s.js";
2
- import { c as normalizeWhatsAppPayloadTextPreservingIndentation, d as listWhatsAppSendResultMessageIds, f as mergeWhatsAppAcceptedSendError, g as withWhatsAppLogicalDeliveryActivity, h as rememberWhatsAppPartialSend, l as prepareWhatsAppOutboundMedia, m as rememberWhatsAppAcceptedSend, o as normalizeWhatsAppOutboundPayload, p as normalizeWhatsAppSendResult, r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-DiPjiygK.js";
1
+ import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-CiKHiuEe.js";
2
+ import { c as normalizeWhatsAppPayloadTextPreservingIndentation, d as listWhatsAppSendResultMessageIds, f as mergeWhatsAppAcceptedSendError, g as withWhatsAppLogicalDeliveryActivity, h as rememberWhatsAppPartialSend, l as prepareWhatsAppOutboundMedia, m as rememberWhatsAppAcceptedSend, o as normalizeWhatsAppOutboundPayload, p as normalizeWhatsAppSendResult, r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-BDDGPxav.js";
3
3
  import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.js";
4
4
  import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-DG0tuYuw.js";
5
5
  import { a as markdownToWhatsAppChunks, c as toWhatsappJid, l as toWhatsappJidWithLid, n as isSelfChatMode, o as resolveEquivalentWhatsAppDirectChatJids, r as jidToE164, s as resolveJidToE164 } from "./targets-runtime-RBjx3pg_.js";
6
6
  import { t as normalizeE164 } from "./text-runtime-DyfmcATV.js";
7
- import { a as cacheInboundMessageMeta, i as buildQuotedMessageOptions, n as resolveWhatsAppGroupSessionRoute, o as lookupInboundMessageMeta, r as resolveWhatsAppLegacyGroupSessionKey } from "./group-session-key-KUguLmSZ.js";
8
- import { C as getMentionIdentities, D as getSenderIdentity, E as getSelfIdentity, O as identitiesOverlap, S as getComparableIdentityValues, T as getReplyContext, g as readWebSelfId, k as resolveComparableIdentity, o as getWebAuthAgeMs, r as WhatsAppAuthUnstableError, v as readWebSelfIdentityForDecision, w as getPrimaryIdentityId } from "./auth-store-DTj1H9pv.js";
7
+ import { a as cacheInboundMessageMeta, i as buildQuotedMessageOptions, n as resolveWhatsAppGroupSessionRoute, o as lookupInboundMessageMeta, r as resolveWhatsAppLegacyGroupSessionKey } from "./group-session-key-BmVDSPr1.js";
8
+ import { C as getMentionIdentities, D as getSenderIdentity, E as getSelfIdentity, O as identitiesOverlap, S as getComparableIdentityValues, T as getReplyContext, g as readWebSelfId, k as resolveComparableIdentity, o as getWebAuthAgeMs, r as WhatsAppAuthUnstableError, v as readWebSelfIdentityForDecision, w as getPrimaryIdentityId } from "./auth-store-ZWaclAbd.js";
9
9
  import { n as resolveWhatsAppGroupsConfigPath } from "./group-config-path-BGyzT9Lg.js";
10
- import { a as waitForWaConnection, c as isWhatsAppSocketOperationTimeoutError, d as withWhatsAppSocketOperationTimeout, l as resolveWhatsAppSocketOperationTimeoutMs, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter, u as resolveWhatsAppSocketTiming } from "./socket-close-CpkkJZCU.js";
10
+ import { a as waitForWaConnection, c as isWhatsAppSocketOperationTimeoutError, d as withWhatsAppSocketOperationTimeout, l as resolveWhatsAppSocketOperationTimeoutMs, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter, u as resolveWhatsAppSocketTiming } from "./socket-close-B3X9uerq.js";
11
11
  import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
12
12
  import { t as BufferJSON } from "./session.runtime-Nsqaehbd.js";
13
- import { _ as resolveInboundMediaMimetype, a as addWhatsAppImagePreviewFields, c as extractContextInfo, d as extractMediaKind, f as extractMentionedJids, g as projectWhatsAppInboundMessage, h as hasInboundUserContent, i as resolveWhatsAppOutboundMentions, l as extractExternalAdReplyContext, n as addWhatsAppOutboundMentionsToContent, o as describeReplyContext, p as extractText, r as mayContainWhatsAppOutboundMention, s as extractContactContext, t as createWebSendApi, u as extractLocationData } from "./send-api-kFcuhSiY.js";
13
+ import { _ as resolveInboundMediaMimetype, a as addWhatsAppImagePreviewFields, c as extractContextInfo, d as extractMediaKind, f as extractMentionedJids, g as projectWhatsAppInboundMessage, h as hasInboundUserContent, i as resolveWhatsAppOutboundMentions, l as extractExternalAdReplyContext, n as addWhatsAppOutboundMentionsToContent, o as describeReplyContext, p as extractText, r as mayContainWhatsAppOutboundMention, s as extractContactContext, t as createWebSendApi, u as extractLocationData } from "./send-api-C_Zn4Ij-.js";
14
14
  import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-DeSRFXEV.js";
15
- import { c as computeBackoff, d as resolveReconnectPolicy, f as sleepWithAbort, l as newConnectionId, n as WHATSAPP_WATCHDOG_TIMEOUT_ERROR, r as WhatsAppConnectionController, s as DEFAULT_RECONNECT_POLICY, u as resolveHeartbeatSeconds } from "./connection-controller-BvkxsbWi.js";
16
- import { n as maybeResolveWhatsAppApprovalReaction } from "./approval-reactions-DGDA6hQ7.js";
17
- import { t as maybeResolveWhatsAppQuestionReaction } from "./question-reactions-B9D6MHXZ.js";
15
+ import { c as computeBackoff, d as resolveReconnectPolicy, f as sleepWithAbort, l as newConnectionId, n as WHATSAPP_WATCHDOG_TIMEOUT_ERROR, r as WhatsAppConnectionController, s as DEFAULT_RECONNECT_POLICY, u as resolveHeartbeatSeconds } from "./connection-controller-DNp6U1NN.js";
16
+ import { n as maybeResolveWhatsAppApprovalReaction } from "./approval-reactions-DrZe-NmN.js";
17
+ import { t as maybeResolveWhatsAppQuestionReaction } from "./question-reactions-bbe0Qnjn.js";
18
18
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
19
- import { filterSupplementalContextItems, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
20
19
  import { createAckReactionHandle, createStatusReactionController, logAckFailure, removeAckReactionHandleAfterReply, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
21
20
  import { bindIngressLifecycleToReplyOptions, createChannelIngressMonitor, createChannelMessageReplyPipeline, createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
22
21
  import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
@@ -35,6 +34,7 @@ import { DisconnectReason, downloadMediaMessage, isHostedLidUser, isHostedPnUser
35
34
  import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
36
35
  import { DEFAULT_ACCOUNT_ID, DEFAULT_MAIN_KEY, buildAgentMainSessionKey, buildAgentSessionKey, buildGroupHistoryKey, deriveLastRoutePolicy, normalizeAccountId, normalizeAgentId, resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
37
36
  import { asDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
37
+ import { filterSupplementalContextItems, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
38
38
  import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
39
39
  import { createHash } from "node:crypto";
40
40
  import { resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
@@ -760,10 +760,7 @@ async function downloadInboundMedia(msg, sock, maxBytes = 52428800, normalizedMe
760
760
  logger: sock.logger
761
761
  });
762
762
  return {
763
- saved: await saveMediaStream(stream, mimetype, "inbound", maxBytes, fileName).catch((err) => {
764
- if (err instanceof Error && /Media exceeds/i.test(err.message)) throw new Error(`Media exceeds ${Math.round(maxBytes / 1048576)}MB limit`);
765
- throw err;
766
- }),
763
+ saved: await saveMediaStream(stream, mimetype, "inbound", maxBytes, fileName),
767
764
  mimetype,
768
765
  fileName
769
766
  };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { a as resolveWhatsAppAccount } from "./accounts-CeKQbu_s.js";
2
+ import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
3
3
  import { createQuestionReactionTargetStore, questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
4
4
  //#region extensions/whatsapp/src/question-reactions.ts
5
5
  var question_reactions_exports = /* @__PURE__ */ __exportAll({
@@ -1,16 +1,16 @@
1
- import { c as resolveWebCredsPath, r as hasWebCredsSync, s as resolveWebCredsBackupPath } from "./creds-files-W6B3EMZ8.js";
2
- import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-Bw0loEdy.js";
3
- import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-DiPjiygK.js";
1
+ import { c as resolveWebCredsPath, r as hasWebCredsSync, s as resolveWebCredsBackupPath } from "./creds-files-Drg3usj1.js";
2
+ import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-CRZLhN3f.js";
3
+ import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-BDDGPxav.js";
4
4
  import { a as setWhatsAppRuntime } from "./runtime-BLlToOi6.js";
5
5
  import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
6
6
  import { t as createWhatsAppLoginTool } from "./agent-tools-login-B-2qZPzc.js";
7
- import { M as waitForCredsSaveQueueWithTimeout, N 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, j as waitForCredsSaveQueue, 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, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./auth-store-DTj1H9pv.js";
7
+ import { M as waitForCredsSaveQueueWithTimeout, N 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, j as waitForCredsSaveQueue, 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, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./auth-store-ZWaclAbd.js";
8
8
  import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-C7m81BNe.js";
9
9
  import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-BEjWsCNM.js";
10
- import { a as waitForWaConnection, i as newConnectionId, r as createWaSocket } from "./socket-close-CpkkJZCU.js";
10
+ import { a as waitForWaConnection, i as newConnectionId, r as createWaSocket } from "./socket-close-B3X9uerq.js";
11
11
  import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
12
- import { p as extractText, s as extractContactContext, u as extractLocationData } from "./send-api-kFcuhSiY.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-CTsyo-HE.js";
14
- import { t as loginWeb } from "./login-Bk_jiXKD.js";
12
+ import { p as extractText, s as extractContactContext, u as extractLocationData } from "./send-api-C_Zn4Ij-.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-DyPdOPRx.js";
14
+ import { t as loginWeb } from "./login-6j2iP9nR.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, 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,4 +1,4 @@
1
- import { a as resolveWhatsAppAccount, c as resolveMergedWhatsAppAccountConfig, s as resolveWhatsAppMediaMaxBytes } from "./accounts-CeKQbu_s.js";
1
+ import { a as resolveWhatsAppAccount, c as resolveMergedWhatsAppAccountConfig, s as resolveWhatsAppMediaMaxBytes } from "./accounts-CiKHiuEe.js";
2
2
  import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
3
3
  import { n as isWhatsAppNewsletterJid } from "./normalize-target-CugRyONv.js";
4
4
  import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-DG0tuYuw.js";
@@ -1,10 +1,10 @@
1
1
  import { n as isWhatsAppNewsletterJid } from "./normalize-target-CugRyONv.js";
2
- import { _ as resolveWhatsAppDocumentFileName, f as mergeWhatsAppAcceptedSendError, m as rememberWhatsAppAcceptedSend, p as normalizeWhatsAppSendResult, u as combineWhatsAppSendResults } from "./send-DiPjiygK.js";
2
+ import { _ as resolveWhatsAppDocumentFileName, f as mergeWhatsAppAcceptedSendError, m as rememberWhatsAppAcceptedSend, p as normalizeWhatsAppSendResult, u as combineWhatsAppSendResults } from "./send-BDDGPxav.js";
3
3
  import "./normalize-C7Hkc_vE.js";
4
4
  import { c as toWhatsappJid, l as toWhatsappJidWithLid, r as jidToE164 } from "./targets-runtime-RBjx3pg_.js";
5
5
  import "./text-runtime-DyfmcATV.js";
6
- import { i as buildQuotedMessageOptions } from "./group-session-key-KUguLmSZ.js";
7
- import { k as resolveComparableIdentity } from "./auth-store-DTj1H9pv.js";
6
+ import { i as buildQuotedMessageOptions } from "./group-session-key-BmVDSPr1.js";
7
+ import { k as resolveComparableIdentity } from "./auth-store-ZWaclAbd.js";
8
8
  import { isRecord, normalizeLowercaseStringOrEmpty, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
10
10
  import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
@@ -375,27 +375,25 @@ function hasInboundUserContent(source) {
375
375
  const WHATSAPP_IMAGE_THUMBNAIL_SIDE = 32;
376
376
  const WHATSAPP_IMAGE_THUMBNAIL_QUALITY = 50;
377
377
  async function addWhatsAppImagePreviewFields(content) {
378
+ if (!("image" in content) || !Buffer.isBuffer(content.image)) return content;
378
379
  const image = content.image;
379
- if (!Buffer.isBuffer(image)) return content;
380
- const current = content;
381
- const hasDimensions = typeof current.width === "number" && typeof current.height === "number";
382
- const hasThumbnail = typeof current.jpegThumbnail === "string";
380
+ const hasDimensions = typeof content.width === "number" && typeof content.height === "number";
381
+ const hasThumbnail = typeof content.jpegThumbnail === "string";
383
382
  if (hasDimensions && hasThumbnail) return content;
384
383
  const metadata = hasDimensions ? null : await getImageMetadata(image).catch(() => null);
385
- if (!hasDimensions && !metadata) return content;
386
- const thumbnail = hasThumbnail ? null : await resizeToJpeg({
384
+ const jpegThumbnail = hasThumbnail ? content.jpegThumbnail : await resizeToJpeg({
387
385
  buffer: image,
388
386
  maxSide: WHATSAPP_IMAGE_THUMBNAIL_SIDE,
389
387
  quality: WHATSAPP_IMAGE_THUMBNAIL_QUALITY,
390
388
  withoutEnlargement: true
391
- }).catch(() => null);
389
+ }).then((thumbnail) => thumbnail.toString("base64")).catch(() => "");
392
390
  return {
393
391
  ...content,
394
392
  ...metadata ? {
395
393
  width: metadata.width,
396
394
  height: metadata.height
397
395
  } : {},
398
- ...thumbnail ? { jpegThumbnail: thumbnail.toString("base64") } : {}
396
+ jpegThumbnail
399
397
  };
400
398
  }
401
399
  //#endregion
@@ -1,8 +1,8 @@
1
- import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-CeKQbu_s.js";
1
+ import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-CiKHiuEe.js";
2
2
  import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
3
- import { r as hasWebCredsSync } from "./creds-files-W6B3EMZ8.js";
3
+ import { r as hasWebCredsSync } from "./creds-files-Drg3usj1.js";
4
4
  import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-CugRyONv.js";
5
- import { r as whatsappSetupAdapter } from "./shared-DDjonGys.js";
5
+ import { r as whatsappSetupAdapter } from "./shared-BzKxoeKY.js";
6
6
  import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
7
7
  import { DEFAULT_ACCOUNT_ID, createSetupTranslator, splitSetupEntries } from "openclaw/plugin-sdk/setup";
8
8
  //#region extensions/whatsapp/src/setup-finalize.ts
@@ -296,7 +296,7 @@ async function finalizeWhatsAppSetup(params) {
296
296
  };
297
297
  let loginWeb;
298
298
  try {
299
- ({loginWeb} = await import("./login-Bk_jiXKD.js").then((n) => n.n));
299
+ ({loginWeb} = await import("./login-6j2iP9nR.js").then((n) => n.n));
300
300
  } catch (error) {
301
301
  await reportLoginFailure(error);
302
302
  }
@@ -1,2 +1,2 @@
1
- import { t as whatsappSetupPlugin } from "./channel.setup-aOFLSQyw.js";
1
+ import { t as whatsappSetupPlugin } from "./channel.setup-D1-jE0aE.js";
2
2
  export { whatsappSetupPlugin };
@@ -1,6 +1,6 @@
1
- import { o as resolveWhatsAppAuthDir } from "./accounts-CeKQbu_s.js";
1
+ import { o as resolveWhatsAppAuthDir } from "./accounts-CiKHiuEe.js";
2
2
  import { t as listAccountIds } from "./account-ids-CB5SOWjc.js";
3
- import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-DTj1H9pv.js";
3
+ import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-ZWaclAbd.js";
4
4
  import { DEFAULT_ACCOUNT_ID, createSetupTranslator, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
5
5
  //#region extensions/whatsapp/src/setup-surface.ts
6
6
  const t = createSetupTranslator();
@@ -36,7 +36,7 @@ const whatsappSetupWizard = {
36
36
  },
37
37
  resolveShouldPromptAccountIds: ({ shouldPromptAccountIds }) => shouldPromptAccountIds,
38
38
  credentials: [],
39
- finalize: async (params) => await (await import("./setup-finalize-CqH5wTK5.js")).finalizeWhatsAppSetup(params),
39
+ finalize: async (params) => await (await import("./setup-finalize-C5QtbrWV.js")).finalizeWhatsAppSetup(params),
40
40
  disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
41
41
  onAccountRecorded: (accountId, options) => {
42
42
  options?.onAccountId?.(channel, accountId);
@@ -1,8 +1,8 @@
1
- import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-CeKQbu_s.js";
1
+ import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-CiKHiuEe.js";
2
2
  import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
3
3
  import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-CugRyONv.js";
4
4
  import { t as WhatsAppChannelConfigSchema } from "./config-schema-BYA6e_Ii.js";
5
- import { n as whatsappDoctor } from "./doctor-CwzVXKoE.js";
5
+ import { n as whatsappDoctor } from "./doctor-BPb-SjdE.js";
6
6
  import { t as resolveWhatsAppConfigPath } from "./group-config-path-BGyzT9Lg.js";
7
7
  import { t as resolveLegacyGroupSessionKey } from "./group-session-contract-DDnZSsJ1.js";
8
8
  import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-nAzD945y.js";
@@ -20,14 +20,14 @@ import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createSco
20
20
  import { createDelegatedSetupWizardProxy } from "openclaw/plugin-sdk/setup-runtime";
21
21
  import { readChannelAllowFromStore } from "openclaw/plugin-sdk/channel-pairing";
22
22
  //#region extensions/whatsapp/src/channel-runtime-loader.ts
23
- const loadWhatsAppAuthStore = createLazyRuntimeModule(() => import("./auth-store-DTj1H9pv.js").then((n) => n.i));
23
+ const loadWhatsAppAuthStore = createLazyRuntimeModule(() => import("./auth-store-ZWaclAbd.js").then((n) => n.i));
24
24
  async function readWhatsAppAccountLinkState(authDir) {
25
25
  const state = await (await loadWhatsAppAuthStore()).readWebAuthState(authDir);
26
26
  return state === "unstable" ? "unknown" : state;
27
27
  }
28
28
  const loadWhatsAppChannelRuntime = createLazyRuntimeModule(async () => {
29
29
  await loadWhatsAppAuthStore();
30
- return await import("./channel.runtime-BwSnyXRX.js");
30
+ return await import("./channel.runtime-B90_wffD.js");
31
31
  });
32
32
  //#endregion
33
33
  //#region extensions/whatsapp/src/config-accessors.ts
@@ -116,7 +116,7 @@ async function applyWhatsAppSecurityConfigFixes(params) {
116
116
  //#region extensions/whatsapp/src/shared.ts
117
117
  const WHATSAPP_CHANNEL = "whatsapp";
118
118
  async function loadWhatsAppSetupSurface() {
119
- return await import("./setup-surface-Dm3T6S8t.js");
119
+ return await import("./setup-surface-WsAzq337.js");
120
120
  }
121
121
  const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
122
122
  const whatsappConfigAdapter = createScopedChannelConfigAdapter({
@@ -1,5 +1,5 @@
1
- import { c as resolveWebCredsPath, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-W6B3EMZ8.js";
2
- import { A as enqueueCredsSave, M as waitForCredsSaveQueueWithTimeout, N as writeCredsJsonAtomically, P as writeWebCredsRawAtomically, b as restoreCredsFromBackupIfNeeded, u as readCredsJsonRaw, y as resolveDefaultWebAuthDir } from "./auth-store-DTj1H9pv.js";
1
+ import { c as resolveWebCredsPath, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-Drg3usj1.js";
2
+ import { A as enqueueCredsSave, M as waitForCredsSaveQueueWithTimeout, N as writeCredsJsonAtomically, P as writeWebCredsRawAtomically, b as restoreCredsFromBackupIfNeeded, u as readCredsJsonRaw, y as resolveDefaultWebAuthDir } from "./auth-store-ZWaclAbd.js";
3
3
  import { n as getStatusCode } from "./session-errors-JuazczrA.js";
4
4
  import { a as makeWASocket, i as makeCacheableSignalKeyStore, n as createBaileysSignalRepository, r as fetchLatestBaileysVersion, s as useMultiFileAuthState } from "./session.runtime-Nsqaehbd.js";
5
5
  import { VERSION, formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/whatsapp",
3
- "version": "2026.8.2",
3
+ "version": "2026.9.1",
4
4
  "description": "OpenClaw WhatsApp channel plugin for WhatsApp Web chats.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "typebox": "1.3.17"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.8.2"
16
+ "openclaw": ">=2026.9.1"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -61,14 +61,15 @@
61
61
  "install": {
62
62
  "clawhubSpec": "clawhub:@openclaw/whatsapp",
63
63
  "npmSpec": "@openclaw/whatsapp",
64
- "defaultChoice": "clawhub",
64
+ "defaultChoice": "npm",
65
65
  "minHostVersion": ">=2026.4.25"
66
66
  },
67
67
  "compat": {
68
- "pluginApi": ">=2026.8.2"
68
+ "pluginApi": ">=2026.9.1"
69
69
  },
70
70
  "build": {
71
- "openclawVersion": "2026.8.2"
71
+ "bundledDist": false,
72
+ "openclawVersion": "2026.9.1"
72
73
  },
73
74
  "release": {
74
75
  "publishToClawHub": true,
@@ -1,10 +0,0 @@
1
- //#region extensions/whatsapp/src/doctor.ts
2
- function normalizeCompatibilityConfig({ cfg }) {
3
- return {
4
- config: cfg,
5
- changes: []
6
- };
7
- }
8
- const whatsappDoctor = { normalizeCompatibilityConfig };
9
- //#endregion
10
- export { whatsappDoctor as n, normalizeCompatibilityConfig as t };