@openclaw/whatsapp 2026.10.5 → 2026.10.7
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.
- package/dist/.setup/{channel-DjBm_r3f.mjs → channel-D-6ZIq4y.mjs} +1 -1
- package/dist/.setup/{channel.runtime-EBjI_3fz.mjs → channel.runtime-B6_rU38G.mjs} +2 -2
- package/dist/.setup/{channel.setup-B9HtOvuH.mjs → channel.setup-DPwmOf7N.mjs} +1 -1
- package/dist/.setup/{monitor-DoUaWcPF.mjs → monitor-DVzumwCI.mjs} +11 -4
- package/dist/.setup/{setup-finalize-Cd5JX7fD.mjs → setup-finalize-iBHhDu1n.mjs} +1 -1
- package/dist/.setup/setup-plugin-api-CcvTFSGj.mjs +2 -0
- package/dist/.setup/{setup-surface-Bx1YGjai.mjs → setup-surface-DQSBET5t.mjs} +1 -1
- package/dist/.setup/{shared-C-Sc9ylU.mjs → shared-hKs0keEG.mjs} +2 -2
- package/dist/api.js +3 -3
- package/dist/channel-plugin-api.js +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/package.json +4 -4
- package/dist/.setup/setup-plugin-api-cq01XJ-u.mjs +0 -2
|
@@ -6,7 +6,7 @@ import { i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppO
|
|
|
6
6
|
import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.mjs";
|
|
7
7
|
import { c as toWhatsappJid } from "./targets-runtime-D5ryyPxh.mjs";
|
|
8
8
|
import { c as whatsappApprovalAuth, o as lookupInboundMessageMetaForTarget, s as getWhatsAppApprovalApprovers, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-BbTPosdy.mjs";
|
|
9
|
-
import { a as loadWhatsAppChannelRuntime, t as createWhatsAppPluginBase } from "./shared-
|
|
9
|
+
import { a as loadWhatsAppChannelRuntime, t as createWhatsAppPluginBase } from "./shared-hKs0keEG.mjs";
|
|
10
10
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.mjs";
|
|
11
11
|
import { d as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DOBi5BPe.mjs";
|
|
12
12
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { startWebLoginWithQr, waitForWebLogin } from "../login-qr-runtime.js";
|
|
2
2
|
import { b as webAuthExists, c as logoutWeb, d as readWebAuthExistsForDecision, f as readWebAuthSnapshot, h as readWebSelfId, m as readWebAuthState, o as getWebAuthAgeMs, p as readWebAuthSnapshotBestEffort, s as logWebSelfId, u as readWebAuthExistsBestEffort } from "./auth-store-DOBi5BPe.mjs";
|
|
3
3
|
import { t as getActiveWebListener } from "./active-listener-CDjoX9QR.mjs";
|
|
4
|
-
import { t as monitorWebChannel } from "./monitor-
|
|
4
|
+
import { t as monitorWebChannel } from "./monitor-DVzumwCI.mjs";
|
|
5
5
|
import { t as loginWeb } from "./login-DUx5JYuW.mjs";
|
|
6
|
-
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-DQSBET5t.mjs";
|
|
7
7
|
//#region extensions/whatsapp/src/channel.runtime.ts
|
|
8
8
|
const whatsappSetupWizard = { ...whatsappSetupWizard$1 };
|
|
9
9
|
//#endregion
|
|
@@ -28,7 +28,7 @@ import { buildChannelInboundEventContext, createChannelPartialDeliveryError, fil
|
|
|
28
28
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
29
29
|
import { isReasoningReplyPayload, resolveSendableOutboundReplyParts, resolveTextChunksWithFallback, sendMediaWithLeadingCaption } from "openclaw/plugin-sdk/reply-payload";
|
|
30
30
|
import { normalizeE164, normalizeE164 as normalizeE164$1, normalizeE164 as normalizeE164$2, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
31
|
-
import { DisconnectReason, WAMessageStubType, downloadMediaMessage, isHostedLidUser, isHostedPnUser, isJidGroup, isJidGroup as isJidGroup$1, jidDecode, jidEncode, jidNormalizedUser, normalizeMessageContent as normalizeMessageContent$1 } from "baileys";
|
|
31
|
+
import { DisconnectReason, WAMessageStubType, downloadMediaMessage, generateMessageIDV2, isHostedLidUser, isHostedPnUser, isJidGroup, isJidGroup as isJidGroup$1, jidDecode, jidEncode, jidNormalizedUser, normalizeMessageContent as normalizeMessageContent$1 } from "baileys";
|
|
32
32
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
33
33
|
import { DEFAULT_MAIN_KEY, buildAgentMainSessionKey, buildAgentSessionKey, buildGroupHistoryKey, deriveLastRoutePolicy, resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
34
34
|
import { asDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolvePromptHistoryLimit } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -723,13 +723,16 @@ function createWhatsAppInboundMessageDebouncer(options) {
|
|
|
723
723
|
}
|
|
724
724
|
//#endregion
|
|
725
725
|
//#region extensions/whatsapp/src/inbound/media.ts
|
|
726
|
+
const NON_MEDIA_URL_HOSTS = /* @__PURE__ */ new Set(["a.whatsapp.net", "web.whatsapp.net"]);
|
|
726
727
|
async function downloadInboundMedia(msg, sock, maxBytes = 52428800, normalizedMessage) {
|
|
727
728
|
const message = normalizedMessage ?? normalizeMessageContent$1(msg.message);
|
|
728
729
|
if (!message) return;
|
|
729
730
|
const mimetype = resolveInboundMediaMimetype(message);
|
|
730
731
|
const fileName = message.documentMessage?.fileName ?? void 0;
|
|
731
|
-
|
|
732
|
-
|
|
732
|
+
const media = message.imageMessage ?? message.videoMessage ?? message.ptvMessage ?? message.documentMessage ?? message.audioMessage ?? message.stickerMessage;
|
|
733
|
+
if (!media) return;
|
|
734
|
+
const urlHost = media.url ? URL.parse(media.url)?.hostname : void 0;
|
|
735
|
+
const stream = await downloadMediaMessage(msg, "stream", urlHost && NON_MEDIA_URL_HOSTS.has(urlHost) ? { host: sock.getMediaHost() } : {}, {
|
|
733
736
|
reuploadRequest: sock.updateMediaMessage,
|
|
734
737
|
logger: sock.logger
|
|
735
738
|
});
|
|
@@ -1634,12 +1637,16 @@ async function createWhatsAppAttachedSocketSession(options) {
|
|
|
1634
1637
|
await assertCanSendToJid(jid, currentSock, { rememberReady: true });
|
|
1635
1638
|
};
|
|
1636
1639
|
const sendTrackedMessage = async (jid, content, sendOptions) => {
|
|
1640
|
+
const trackedOptions = {
|
|
1641
|
+
...sendOptions,
|
|
1642
|
+
messageId: sendOptions?.messageId || generateMessageIDV2(getCurrentSock()?.user?.id)
|
|
1643
|
+
};
|
|
1637
1644
|
let lastError = /* @__PURE__ */ new Error(RECONNECT_IN_PROGRESS_ERROR);
|
|
1638
1645
|
for (let attempt = 1;; attempt += 1) {
|
|
1639
1646
|
const currentSock = getCurrentSock();
|
|
1640
1647
|
if (currentSock) try {
|
|
1641
1648
|
await assertCanSendToJid(jid, currentSock, { useVerifiedReady: true });
|
|
1642
|
-
const result = await currentSocketOperations(currentSock).sendMessage(jid, content,
|
|
1649
|
+
const result = await currentSocketOperations(currentSock).sendMessage(jid, content, trackedOptions);
|
|
1643
1650
|
rememberOutboundMessage(jid, result);
|
|
1644
1651
|
return result;
|
|
1645
1652
|
} catch (error) {
|
|
@@ -2,7 +2,7 @@ import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./acco
|
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.mjs";
|
|
3
3
|
import { n as hasWebCredsSync } from "./creds-files-B8WcOAmE.mjs";
|
|
4
4
|
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-D67Kc3g6.mjs";
|
|
5
|
-
import { n as whatsappSetupAdapter } from "./shared-
|
|
5
|
+
import { n as whatsappSetupAdapter } from "./shared-hKs0keEG.mjs";
|
|
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
|
|
@@ -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-
|
|
39
|
+
finalize: async (params) => await (await import("./setup-finalize-iBHhDu1n.mjs")).finalizeWhatsAppSetup(params),
|
|
40
40
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
|
|
41
41
|
onAccountRecorded: (accountId, options) => {
|
|
42
42
|
options?.onAccountId?.(channel, accountId);
|
|
@@ -27,7 +27,7 @@ async function readWhatsAppAccountLinkState(authDir) {
|
|
|
27
27
|
}
|
|
28
28
|
const loadWhatsAppChannelRuntime = createLazyRuntimeModule(async () => {
|
|
29
29
|
await loadWhatsAppAuthStore();
|
|
30
|
-
return await import("./channel.runtime-
|
|
30
|
+
return await import("./channel.runtime-B6_rU38G.mjs");
|
|
31
31
|
});
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region extensions/whatsapp/src/group-policy.ts
|
|
@@ -132,7 +132,7 @@ const whatsappResolveDmPolicy = createScopedDmSecurityResolver({
|
|
|
132
132
|
});
|
|
133
133
|
const whatsappSetupWizardProxy = createDelegatedSetupWizardProxy({
|
|
134
134
|
channel: WHATSAPP_CHANNEL,
|
|
135
|
-
loadWizard: async () => (await import("./setup-surface-
|
|
135
|
+
loadWizard: async () => (await import("./setup-surface-DQSBET5t.mjs")).whatsappSetupWizard,
|
|
136
136
|
status: {
|
|
137
137
|
configuredLabel: "linked",
|
|
138
138
|
unconfiguredLabel: "not linked",
|
package/dist/api.js
CHANGED
|
@@ -3,10 +3,10 @@ import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./.se
|
|
|
3
3
|
import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, r as isWhatsAppUserTarget, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./.setup/normalize-target-D67Kc3g6.mjs";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./.setup/resolve-outbound-target-qikGL4r0.mjs";
|
|
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 "./.setup/targets-runtime-D5ryyPxh.mjs";
|
|
6
|
-
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./.setup/channel-
|
|
7
|
-
import { i as resolveWhatsAppGroupToolPolicy, r as resolveWhatsAppGroupRequireMention } from "./.setup/shared-
|
|
6
|
+
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./.setup/channel-D-6ZIq4y.mjs";
|
|
7
|
+
import { i as resolveWhatsAppGroupToolPolicy, r as resolveWhatsAppGroupRequireMention } from "./.setup/shared-hKs0keEG.mjs";
|
|
8
8
|
import { t as whatsappCommandPolicy } from "./.setup/command-policy-BIOSHySD.mjs";
|
|
9
|
-
import { t as whatsappSetupPlugin } from "./.setup/channel.setup-
|
|
9
|
+
import { t as whatsappSetupPlugin } from "./.setup/channel.setup-DPwmOf7N.mjs";
|
|
10
10
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./.setup/constants-C7m81BNe.mjs";
|
|
11
11
|
import { d as DEFAULT_WHATSAPP_SOCKET_TIMING, f as createWhatsAppSocketOperationTimeoutAdapter, i as waitForWaConnection, r as createWaSocket } from "./.setup/socket-close-C9OU9mVN.mjs";
|
|
12
12
|
import { n as getStatusCode, t as formatError } from "./.setup/session-errors-B8UcAnZN.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as whatsappPlugin } from "./.setup/channel-
|
|
1
|
+
export { t as whatsappPlugin } from "./.setup/channel-D-6ZIq4y.mjs";
|
package/dist/runtime-api.js
CHANGED
|
@@ -10,7 +10,7 @@ import { n as resolveWebAccountId, t as getActiveWebListener } from "./.setup/ac
|
|
|
10
10
|
import { i as waitForWaConnection, r as createWaSocket, s as newConnectionId } from "./.setup/socket-close-C9OU9mVN.mjs";
|
|
11
11
|
import { n as getStatusCode, t as formatError } from "./.setup/session-errors-B8UcAnZN.mjs";
|
|
12
12
|
import { p as extractText, s as extractContactContext, u as extractLocationData } from "./.setup/send-api-COzRvqXx.mjs";
|
|
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 "./.setup/monitor-
|
|
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 "./.setup/monitor-DVzumwCI.mjs";
|
|
14
14
|
import { t as loginWeb } from "./.setup/login-DUx5JYuW.mjs";
|
|
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, readWebCredsJsonRawSync as 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 };
|
package/dist/setup-entry.js
CHANGED
|
@@ -5,7 +5,7 @@ var setup_entry_default = defineBundledChannelSetupEntry({
|
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
features: { legacySessionSurfaces: true },
|
|
7
7
|
plugin: {
|
|
8
|
-
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-
|
|
8
|
+
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-CcvTFSGj.mjs", import.meta.url).href),
|
|
9
9
|
exportName: "whatsappSetupPlugin"
|
|
10
10
|
},
|
|
11
11
|
legacySessionSurface: {
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as whatsappSetupPlugin } from "./.setup/channel.setup-
|
|
1
|
+
export { t as whatsappSetupPlugin } from "./.setup/channel.setup-DPwmOf7N.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/whatsapp",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.7",
|
|
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.34"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.10.
|
|
16
|
+
"openclaw": ">=2026.10.7"
|
|
17
17
|
},
|
|
18
18
|
"peerDependenciesMeta": {
|
|
19
19
|
"openclaw": {
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"minHostVersion": ">=2026.4.25"
|
|
66
66
|
},
|
|
67
67
|
"compat": {
|
|
68
|
-
"pluginApi": ">=2026.10.
|
|
68
|
+
"pluginApi": ">=2026.10.7"
|
|
69
69
|
},
|
|
70
70
|
"build": {
|
|
71
71
|
"bundledDist": false,
|
|
72
|
-
"openclawVersion": "2026.10.
|
|
72
|
+
"openclawVersion": "2026.10.7"
|
|
73
73
|
},
|
|
74
74
|
"release": {
|
|
75
75
|
"publishToClawHub": true,
|