@openclaw/whatsapp 2026.5.28-beta.3 → 2026.5.28-beta.4
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/api.js +3 -3
- package/dist/{channel-CeSu_mqS.js → channel-CLOhkP85.js} +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-S9MB6sub.js → channel.runtime-CcGhK_F2.js} +2 -2
- package/dist/{channel.setup-BNqtW-u1.js → channel.setup-COV8culQ.js} +1 -1
- package/dist/{monitor-CzL4sZSN.js → monitor-D4R-fcMW.js} +11 -4
- package/dist/runtime-api.js +1 -1
- package/dist/{setup-core-C2os03mR.js → setup-core-DAgAB2WU.js} +2 -2
- package/dist/{setup-finalize-IDTrWXtX.js → setup-finalize-CDPy4WyU.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BOhQVZqy.js → setup-surface-Bt5mdv4D.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -4,11 +4,11 @@ import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i
|
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
|
|
5
5
|
import "./send-C4LG-Cl6.js";
|
|
6
6
|
import { c as assertWebChannel, d as markdownToWhatsApp, f as resolveJidToE164, l as isSelfChatMode, m as toWhatsappJidWithLid, n as normalizeE164, p as toWhatsappJid, r as resolveUserPath, u as jidToE164 } from "./text-runtime-Dk37KYHj.js";
|
|
7
|
-
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-
|
|
7
|
+
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-CLOhkP85.js";
|
|
8
8
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
|
|
9
|
-
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-
|
|
9
|
+
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-DAgAB2WU.js";
|
|
10
10
|
import "./config-schema-CsNDlDpL.js";
|
|
11
|
-
import { t as whatsappSetupPlugin } from "./channel.setup-
|
|
11
|
+
import { t as whatsappSetupPlugin } from "./channel.setup-COV8culQ.js";
|
|
12
12
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
|
|
13
13
|
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-Dijefxc3.js";
|
|
14
14
|
import { n as testing } from "./access-control-Z0fYaWrx.js";
|
|
@@ -9,7 +9,7 @@ import { p as toWhatsappJid } from "./text-runtime-Dk37KYHj.js";
|
|
|
9
9
|
import { t as createWhatsAppLoginTool } from "./agent-tools-login-BX7eHgDm.js";
|
|
10
10
|
import { i as lookupInboundMessageMetaForTarget } from "./quoted-message-CveINB35.js";
|
|
11
11
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
|
|
12
|
-
import { a as resolveWhatsAppGroupRequireMention, c as resolveWhatsAppMentionStripRegexes, i as whatsappSetupWizardProxy, l as formatWhatsAppConfigAllowFromEntries, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, r as loadWhatsAppChannelRuntime, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-
|
|
12
|
+
import { a as resolveWhatsAppGroupRequireMention, c as resolveWhatsAppMentionStripRegexes, i as whatsappSetupWizardProxy, l as formatWhatsAppConfigAllowFromEntries, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, r as loadWhatsAppChannelRuntime, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-DAgAB2WU.js";
|
|
13
13
|
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-BrKb0mwT.js";
|
|
14
14
|
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.js";
|
|
15
15
|
import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappPlugin } from "./channel-
|
|
1
|
+
import { t as whatsappPlugin } from "./channel-CLOhkP85.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
2
|
import { c as logoutWeb$1, d as readWebAuthExistsBestEffort$1, f as readWebAuthExistsForDecision$1, g as readWebSelfId$1, h as readWebAuthState$1, m as readWebAuthSnapshotBestEffort$1, o as getWebAuthAgeMs$1, p as readWebAuthSnapshot$1, s as logWebSelfId$1, x as webAuthExists$1 } from "./auth-store-BrKb0mwT.js";
|
|
3
3
|
import { t as getActiveWebListener$1 } from "./active-listener-CFwkn3ho.js";
|
|
4
|
-
import { t as monitorWebChannel$1 } from "./monitor-
|
|
4
|
+
import { t as monitorWebChannel$1 } from "./monitor-D4R-fcMW.js";
|
|
5
5
|
import { t as loginWeb$1 } from "./login-1yyBrXTL.js";
|
|
6
|
-
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-Bt5mdv4D.js";
|
|
7
7
|
//#region extensions/whatsapp/src/channel.runtime.ts
|
|
8
8
|
function getActiveWebListener(...args) {
|
|
9
9
|
return getActiveWebListener$1(...args);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./accounts-BMGM1RtF.js";
|
|
2
|
-
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-
|
|
2
|
+
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-DAgAB2WU.js";
|
|
3
3
|
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.js";
|
|
4
4
|
//#region extensions/whatsapp/src/channel.setup.ts
|
|
5
5
|
async function isWhatsAppAuthConfigured(account) {
|
|
@@ -41,6 +41,7 @@ import { hasControlCommand, isControlCommandMessage, isControlCommandMessage as
|
|
|
41
41
|
import { drainPendingDeliveries } from "openclaw/plugin-sdk/delivery-queue-runtime";
|
|
42
42
|
import { DEFAULT_GROUP_HISTORY_LIMIT, buildHistoryContextFromEntries, buildInboundHistoryFromEntries, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
43
43
|
import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
44
|
+
import { parseStrictFiniteNumber } from "openclaw/plugin-sdk/number-runtime";
|
|
44
45
|
import { createClaimableDedupe } from "openclaw/plugin-sdk/persistent-dedupe";
|
|
45
46
|
import { saveMediaStream } from "openclaw/plugin-sdk/media-store";
|
|
46
47
|
import { getRuntimeConfig as getRuntimeConfig$1, getRuntimeConfigSourceSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
@@ -262,6 +263,12 @@ const LOGGED_OUT_STATUS = DisconnectReason$1?.loggedOut ?? 401;
|
|
|
262
263
|
const RECONNECT_IN_PROGRESS_ERROR = "no active socket - reconnection in progress";
|
|
263
264
|
const GROUP_META_TTL_MS = 300 * 1e3;
|
|
264
265
|
const INBOUND_CLOSE_DRAIN_TIMEOUT_MS = 5e3;
|
|
266
|
+
function parseWhatsAppTimestampSeconds(value) {
|
|
267
|
+
if (value == null) return;
|
|
268
|
+
if (typeof value === "string") return parseStrictFiniteNumber(value);
|
|
269
|
+
const parsed = Number(value);
|
|
270
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
271
|
+
}
|
|
265
272
|
function rememberGroupMetadataCacheEntry(cache, jid, entry) {
|
|
266
273
|
if (cache.has(jid)) cache.delete(jid);
|
|
267
274
|
cache.set(jid, entry);
|
|
@@ -554,7 +561,8 @@ async function attachWebInboxToSocket(options) {
|
|
|
554
561
|
groupSubject = meta.subject;
|
|
555
562
|
groupParticipants = meta.participants;
|
|
556
563
|
}
|
|
557
|
-
const
|
|
564
|
+
const messageTimestampSeconds = parseWhatsAppTimestampSeconds(msg.messageTimestamp);
|
|
565
|
+
const messageTimestampMs = messageTimestampSeconds !== void 0 ? messageTimestampSeconds * 1e3 : void 0;
|
|
558
566
|
const access = await checkInboundAccessControl({
|
|
559
567
|
cfg: options.loadConfig?.() ?? options.cfg,
|
|
560
568
|
accountId: options.accountId,
|
|
@@ -634,9 +642,8 @@ async function attachWebInboxToSocket(options) {
|
|
|
634
642
|
const shouldSkipStaleAppend = (msg, upsertType) => {
|
|
635
643
|
if (upsertType !== "append") return false;
|
|
636
644
|
const APPEND_RECENT_GRACE_MS = 6e4;
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
return (Number.isFinite(msgTsNum) ? msgTsNum * 1e3 : 0) < connectedAtMs - APPEND_RECENT_GRACE_MS;
|
|
645
|
+
const msgTsSeconds = parseWhatsAppTimestampSeconds(msg.messageTimestamp);
|
|
646
|
+
return (msgTsSeconds !== void 0 ? msgTsSeconds * 1e3 : 0) < connectedAtMs - APPEND_RECENT_GRACE_MS;
|
|
640
647
|
};
|
|
641
648
|
const processDurableInboundMessage = async (msg, upsertType, receiveOrder, stored) => {
|
|
642
649
|
const inbound = await normalizeInboundMessage(msg);
|
package/dist/runtime-api.js
CHANGED
|
@@ -10,7 +10,7 @@ import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
|
|
|
10
10
|
import { d as extractLocationData, f as extractMediaPlaceholder, l as extractContactContext, m as extractText } from "./send-api-C66vkRl9.js";
|
|
11
11
|
import { n as newConnectionId, r as waitForWaConnection, t as createWaSocket } from "./session-D8UW2Vbn.js";
|
|
12
12
|
import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-CFwkn3ho.js";
|
|
13
|
-
import { a as loadWebMediaRaw, c as monitorWebInbox, i as loadWebMedia, l as resetWebInboundDedupe, n as LocalMediaAccessError, o as optimizeImageToJpeg, r as getDefaultLocalRoots, s as optimizeImageToPng, t as monitorWebChannel } from "./monitor-
|
|
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-D4R-fcMW.js";
|
|
14
14
|
import { t as loginWeb } from "./login-1yyBrXTL.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 };
|
|
@@ -99,10 +99,10 @@ async function applyWhatsAppSecurityConfigFixes(params) {
|
|
|
99
99
|
//#region extensions/whatsapp/src/shared.ts
|
|
100
100
|
const WHATSAPP_CHANNEL = "whatsapp";
|
|
101
101
|
async function loadWhatsAppChannelRuntime() {
|
|
102
|
-
return await import("./channel.runtime-
|
|
102
|
+
return await import("./channel.runtime-CcGhK_F2.js");
|
|
103
103
|
}
|
|
104
104
|
async function loadWhatsAppSetupSurface() {
|
|
105
|
-
return await import("./setup-surface-
|
|
105
|
+
return await import("./setup-surface-Bt5mdv4D.js");
|
|
106
106
|
}
|
|
107
107
|
const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
|
|
108
108
|
const whatsappConfigAdapter = createScopedChannelConfigAdapter({
|
|
@@ -2,7 +2,7 @@ import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js"
|
|
|
2
2
|
import { r as hasWebCredsSync } from "./creds-files-B1kSWtBg.js";
|
|
3
3
|
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-BMGM1RtF.js";
|
|
4
4
|
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-bVWjgftN.js";
|
|
5
|
-
import { t as whatsappSetupAdapter } from "./setup-core-
|
|
5
|
+
import { t as whatsappSetupAdapter } from "./setup-core-DAgAB2WU.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
7
7
|
import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
8
8
|
//#region extensions/whatsapp/src/setup-finalize.ts
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { t as whatsappSetupPlugin } from "./channel.setup-COV8culQ.js";
|
|
2
2
|
export { whatsappSetupPlugin };
|
|
@@ -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-CDPy4WyU.js")).finalizeWhatsAppSetup(params),
|
|
40
40
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
|
|
41
41
|
onAccountRecorded: (accountId, options) => {
|
|
42
42
|
options?.onAccountId?.(channel, accountId);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/whatsapp",
|
|
3
|
-
"version": "2026.5.28-beta.
|
|
3
|
+
"version": "2026.5.28-beta.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/whatsapp",
|
|
9
|
-
"version": "2026.5.28-beta.
|
|
9
|
+
"version": "2026.5.28-beta.4",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"audio-decode": "2.2.3",
|
|
12
12
|
"baileys": "7.0.0-rc13",
|
|
13
13
|
"typebox": "1.1.38"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.5.28-beta.
|
|
16
|
+
"openclaw": ">=2026.5.28-beta.4"
|
|
17
17
|
},
|
|
18
18
|
"peerDependenciesMeta": {
|
|
19
19
|
"openclaw": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/whatsapp",
|
|
3
|
-
"version": "2026.5.28-beta.
|
|
3
|
+
"version": "2026.5.28-beta.4",
|
|
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.1.38"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.5.28-beta.
|
|
16
|
+
"openclaw": ">=2026.5.28-beta.4"
|
|
17
17
|
},
|
|
18
18
|
"peerDependenciesMeta": {
|
|
19
19
|
"openclaw": {
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"minHostVersion": ">=2026.4.25"
|
|
57
57
|
},
|
|
58
58
|
"compat": {
|
|
59
|
-
"pluginApi": ">=2026.5.28-beta.
|
|
59
|
+
"pluginApi": ">=2026.5.28-beta.4"
|
|
60
60
|
},
|
|
61
61
|
"build": {
|
|
62
|
-
"openclawVersion": "2026.5.28-beta.
|
|
62
|
+
"openclawVersion": "2026.5.28-beta.4"
|
|
63
63
|
},
|
|
64
64
|
"release": {
|
|
65
65
|
"publishToClawHub": true,
|