@openclaw/whatsapp 2026.8.1-beta.2 → 2026.8.1-beta.3
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/action-runtime-api.js +1 -1
- package/dist/{action-runtime-B4e3XFOY.js → action-runtime-pM-ExU0l.js} +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/api.js +6 -6
- package/dist/{approval-handler.runtime-fgGZhALv.js → approval-handler.runtime-CkMMvUjk.js} +2 -2
- package/dist/{approval-reactions-CmtJCxe_.js → approval-reactions-Jyr1JaAK.js} +9 -13
- package/dist/{auth-store-B_DQIdzp.js → auth-store-CtpBqH5S.js} +3 -6
- package/dist/{channel-DJVQHz_V.js → channel-DRMYRfZ8.js} +7 -7
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-d6OacTNj.js → channel-react-action-CstrR0CT.js} +13 -11
- package/dist/{channel.runtime-RxuNGZ7w.js → channel.runtime-X3JC2gaq.js} +4 -4
- package/dist/{channel.setup-Cmvd967u.js → channel.setup-DhBBhbQv.js} +1 -1
- package/dist/{connection-controller-CUyZgGpf.js → connection-controller-CIYuBJrs.js} +2 -2
- package/dist/{directory-config-Pc4f07wB.js → directory-config-P7_3U73Z.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/light-runtime-api.js +1 -1
- package/dist/{login-D6_rfxTZ.js → login-BkpKpndm.js} +3 -3
- package/dist/{login-qr-B0VyVSqQ.js → login-qr-1dpv6jjT.js} +3 -3
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-BCe5Mm-1.js → monitor-IzwQKizW.js} +44 -459
- package/dist/runtime-api.js +7 -7
- package/dist/{send-prK8F7Vj.js → send-CwvTU4RI.js} +22 -8
- package/dist/{send-api-DimZST3E.js → send-api-obOSm2cC.js} +44 -34
- package/dist/{setup-finalize-D3n71Uyx.js → setup-finalize-n4K2I2gJ.js} +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BCZszf3l.js → setup-surface-Cwn3zyxK.js} +2 -2
- package/dist/{shared-Dp9M3ZPX.js → shared-wg42NKFB.js} +11 -5
- package/dist/{socket-close-09FojDO2.js → socket-close-2T0_jZTN.js} +1 -1
- package/package.json +4 -4
package/dist/runtime-api.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
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-
|
|
3
|
-
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
2
|
+
import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-pM-ExU0l.js";
|
|
3
|
+
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-CwvTU4RI.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-BjRpD-JQ.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-
|
|
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-CtpBqH5S.js";
|
|
8
8
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.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-
|
|
10
|
+
import { a as waitForWaConnection, i as newConnectionId, r as createWaSocket } from "./socket-close-2T0_jZTN.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-
|
|
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-
|
|
14
|
-
import { t as loginWeb } from "./login-
|
|
12
|
+
import { p as extractText, s as extractContactContext, u as extractLocationData } from "./send-api-obOSm2cC.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-IzwQKizW.js";
|
|
14
|
+
import { t as loginWeb } from "./login-BkpKpndm.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 };
|
|
@@ -461,6 +461,9 @@ function resolveActualSentRemoteJid(result, fallbackJid) {
|
|
|
461
461
|
return fallbackJid;
|
|
462
462
|
}
|
|
463
463
|
async function sendMessageWhatsApp(to, body, options) {
|
|
464
|
+
return await sendWhatsAppUploadFile(to, body, options);
|
|
465
|
+
}
|
|
466
|
+
async function sendWhatsAppUploadFile(to, body, options) {
|
|
464
467
|
return await withWhatsAppLogicalDeliveryActivity(() => sendMessageWhatsAppInActivityScope(to, body, options));
|
|
465
468
|
}
|
|
466
469
|
async function sendMessageWhatsAppInActivityScope(to, body, options) {
|
|
@@ -514,13 +517,24 @@ async function sendMessageWhatsAppInActivityScope(to, body, options) {
|
|
|
514
517
|
let forceDocumentDelivery = false;
|
|
515
518
|
let media;
|
|
516
519
|
if (mediaPayload) media = await prepareWhatsAppOutboundMedia(mediaPayload, primaryMediaUrl);
|
|
517
|
-
else if (primaryMediaUrl)
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
else if (primaryMediaUrl) {
|
|
521
|
+
const loadedMedia = await loadOutboundMediaFromUrl(primaryMediaUrl, {
|
|
522
|
+
maxBytes: resolveWhatsAppMediaMaxBytes(account),
|
|
523
|
+
optimizeImages: options.forceDocument ? false : void 0,
|
|
524
|
+
mediaAccess: options.mediaAccess,
|
|
525
|
+
mediaLocalRoots: options.mediaLocalRoots,
|
|
526
|
+
mediaReadFile: options.mediaReadFile
|
|
527
|
+
});
|
|
528
|
+
const mediaWithRequestedType = options.contentType ? {
|
|
529
|
+
...loadedMedia,
|
|
530
|
+
contentType: options.contentType,
|
|
531
|
+
kind: void 0
|
|
532
|
+
} : loadedMedia;
|
|
533
|
+
media = await prepareWhatsAppOutboundMedia(options.fileName ? {
|
|
534
|
+
...mediaWithRequestedType,
|
|
535
|
+
fileName: options.fileName
|
|
536
|
+
} : mediaWithRequestedType, primaryMediaUrl);
|
|
537
|
+
}
|
|
524
538
|
if (media) {
|
|
525
539
|
const mediaSendState = buildWhatsAppMediaSendState({
|
|
526
540
|
media,
|
|
@@ -694,4 +708,4 @@ async function sendPollWhatsApp(to, poll, options) {
|
|
|
694
708
|
}
|
|
695
709
|
}
|
|
696
710
|
//#endregion
|
|
697
|
-
export {
|
|
711
|
+
export { resolveWhatsAppDocumentFileName as _, sendWhatsAppUploadFile as a, normalizeWhatsAppPayloadTextPreservingIndentation as c, listWhatsAppSendResultMessageIds as d, mergeWhatsAppAcceptedSendError as f, withWhatsAppLogicalDeliveryActivity as g, rememberWhatsAppPartialSend as h, sendTypingWhatsApp as i, prepareWhatsAppOutboundMedia as l, rememberWhatsAppAcceptedSend as m, sendPollWhatsApp as n, normalizeWhatsAppOutboundPayload as o, normalizeWhatsAppSendResult as p, sendReactionWhatsApp as r, normalizeWhatsAppPayloadText as s, sendMessageWhatsApp as t, combineWhatsAppSendResults as u, resolveWhatsAppReactionLevel as v };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as isWhatsAppNewsletterJid } from "./normalize-target-CugRyONv.js";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as resolveWhatsAppDocumentFileName, f as mergeWhatsAppAcceptedSendError, m as rememberWhatsAppAcceptedSend, p as normalizeWhatsAppSendResult, u as combineWhatsAppSendResults } from "./send-CwvTU4RI.js";
|
|
3
3
|
import "./normalize-C7Hkc_vE.js";
|
|
4
4
|
import { c as toWhatsappJid, l as toWhatsappJidWithLid, r as jidToE164 } from "./targets-runtime-TMk0lGuy.js";
|
|
5
5
|
import "./text-runtime-CaKLhowd.js";
|
|
6
6
|
import { i as buildQuotedMessageOptions } from "./group-session-key-DmFc_Cqi.js";
|
|
7
|
-
import { k as resolveComparableIdentity } from "./auth-store-
|
|
7
|
+
import { k as resolveComparableIdentity } from "./auth-store-CtpBqH5S.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";
|
|
@@ -97,7 +97,7 @@ function getFutureProofInnerMessage(message) {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function projectWhatsAppInboundMessage(message) {
|
|
101
101
|
const chain = [];
|
|
102
102
|
let current = normalizeMessageContent(message);
|
|
103
103
|
while (current && chain.length < 4) {
|
|
@@ -106,8 +106,14 @@ function buildMessageChain(message) {
|
|
|
106
106
|
}
|
|
107
107
|
return chain;
|
|
108
108
|
}
|
|
109
|
+
function isWhatsAppInboundMessageProjection(message) {
|
|
110
|
+
return Array.isArray(message);
|
|
111
|
+
}
|
|
112
|
+
function resolveWhatsAppInboundMessageProjection(message) {
|
|
113
|
+
return isWhatsAppInboundMessageProjection(message) ? message : projectWhatsAppInboundMessage(message);
|
|
114
|
+
}
|
|
109
115
|
function findMessageSection(rawMessage, sectionNames) {
|
|
110
|
-
const chain =
|
|
116
|
+
const chain = projectWhatsAppInboundMessage(rawMessage);
|
|
111
117
|
for (const name of sectionNames) for (const message of chain) {
|
|
112
118
|
const value = message[name];
|
|
113
119
|
if (isRecord(value)) return {
|
|
@@ -117,7 +123,7 @@ function findMessageSection(rawMessage, sectionNames) {
|
|
|
117
123
|
}
|
|
118
124
|
}
|
|
119
125
|
function unwrapMessage(message) {
|
|
120
|
-
return
|
|
126
|
+
return resolveWhatsAppInboundMessageProjection(message).at(-1);
|
|
121
127
|
}
|
|
122
128
|
function extractContextInfoFromMessage(message) {
|
|
123
129
|
const contentType = getContentType(message);
|
|
@@ -142,13 +148,13 @@ function extractContextInfoFromMessage(message) {
|
|
|
142
148
|
}
|
|
143
149
|
}
|
|
144
150
|
function extractContextInfo(message) {
|
|
145
|
-
for (const candidate of
|
|
151
|
+
for (const candidate of resolveWhatsAppInboundMessageProjection(message)) {
|
|
146
152
|
const contextInfo = extractContextInfoFromMessage(candidate);
|
|
147
153
|
if (contextInfo) return contextInfo;
|
|
148
154
|
}
|
|
149
155
|
}
|
|
150
|
-
function extractMentionedJids(
|
|
151
|
-
const mentionedJids = extractContextInfo(
|
|
156
|
+
function extractMentionedJids(message) {
|
|
157
|
+
const mentionedJids = extractContextInfo(message)?.mentionedJid?.filter(Boolean);
|
|
152
158
|
if (!mentionedJids?.length) return;
|
|
153
159
|
return uniqueStrings(mentionedJids);
|
|
154
160
|
}
|
|
@@ -163,8 +169,9 @@ function extractNativeFlowResponseText(response) {
|
|
|
163
169
|
return;
|
|
164
170
|
}
|
|
165
171
|
}
|
|
166
|
-
function extractText(
|
|
167
|
-
const
|
|
172
|
+
function extractText(source) {
|
|
173
|
+
const projection = resolveWhatsAppInboundMessageProjection(source);
|
|
174
|
+
const message = unwrapMessage(projection);
|
|
168
175
|
if (!message) return;
|
|
169
176
|
const extracted = extractMessageContent(message);
|
|
170
177
|
const candidates = [message, extracted && extracted !== message ? extracted : void 0];
|
|
@@ -192,11 +199,11 @@ function extractText(rawMessage) {
|
|
|
192
199
|
if (pollText) return pollText;
|
|
193
200
|
}
|
|
194
201
|
}
|
|
195
|
-
const contactPlaceholder = extractContactPlaceholder(
|
|
202
|
+
const contactPlaceholder = extractContactPlaceholder(projection) ?? (extracted && extracted !== message ? extractContactPlaceholder(extracted) : void 0);
|
|
196
203
|
if (contactPlaceholder) return contactPlaceholder;
|
|
197
204
|
}
|
|
198
|
-
function extractExternalAdReplyContext(
|
|
199
|
-
const message = unwrapMessage(
|
|
205
|
+
function extractExternalAdReplyContext(source) {
|
|
206
|
+
const message = unwrapMessage(source);
|
|
200
207
|
const adReply = message?.imageMessage?.contextInfo?.externalAdReply ?? message?.videoMessage?.contextInfo?.externalAdReply;
|
|
201
208
|
if (!adReply) return;
|
|
202
209
|
const title = adReply.title?.trim() || void 0;
|
|
@@ -208,8 +215,8 @@ function extractExternalAdReplyContext(rawMessage) {
|
|
|
208
215
|
body
|
|
209
216
|
} : void 0;
|
|
210
217
|
}
|
|
211
|
-
function extractMediaKind(
|
|
212
|
-
const message = unwrapMessage(
|
|
218
|
+
function extractMediaKind(source) {
|
|
219
|
+
const message = unwrapMessage(source);
|
|
213
220
|
if (!message) return;
|
|
214
221
|
if (message.imageMessage) return "image";
|
|
215
222
|
if (message.videoMessage || message.ptvMessage) return "video";
|
|
@@ -217,15 +224,15 @@ function extractMediaKind(rawMessage) {
|
|
|
217
224
|
if (message.documentMessage) return "document";
|
|
218
225
|
if (message.stickerMessage) return "sticker";
|
|
219
226
|
}
|
|
220
|
-
function extractContactPlaceholder(
|
|
221
|
-
const contactContext = extractContactContext(
|
|
227
|
+
function extractContactPlaceholder(source) {
|
|
228
|
+
const contactContext = extractContactContext(source);
|
|
222
229
|
if (!contactContext) return;
|
|
223
230
|
if (contactContext.kind === "contact") return "<contact>";
|
|
224
231
|
const suffix = contactContext.total === 1 ? "contact" : "contacts";
|
|
225
232
|
return `<contacts: ${contactContext.total} ${suffix}>`;
|
|
226
233
|
}
|
|
227
|
-
function extractContactContext(
|
|
228
|
-
const message = unwrapMessage(
|
|
234
|
+
function extractContactContext(source) {
|
|
235
|
+
const message = unwrapMessage(source);
|
|
229
236
|
if (!message) return;
|
|
230
237
|
const contact = message.contactMessage ?? void 0;
|
|
231
238
|
if (contact) {
|
|
@@ -261,8 +268,8 @@ function describeContact(input) {
|
|
|
261
268
|
phones: parsed.phones
|
|
262
269
|
};
|
|
263
270
|
}
|
|
264
|
-
function extractLocationData(
|
|
265
|
-
const message = unwrapMessage(
|
|
271
|
+
function extractLocationData(source) {
|
|
272
|
+
const message = unwrapMessage(source);
|
|
266
273
|
if (!message) return null;
|
|
267
274
|
const live = message.liveLocationMessage ?? void 0;
|
|
268
275
|
if (live) {
|
|
@@ -305,10 +312,11 @@ function extractLocationData(rawMessage) {
|
|
|
305
312
|
}
|
|
306
313
|
return null;
|
|
307
314
|
}
|
|
308
|
-
function describeReplyContext(
|
|
309
|
-
const
|
|
315
|
+
function describeReplyContext(source) {
|
|
316
|
+
const projection = resolveWhatsAppInboundMessageProjection(source);
|
|
317
|
+
const message = unwrapMessage(projection);
|
|
310
318
|
if (!message) return null;
|
|
311
|
-
const contextInfo = extractContextInfo(message);
|
|
319
|
+
const contextInfo = extractContextInfo(projection.length === 1 && projection[0] === message ? projection : projectWhatsAppInboundMessage(message));
|
|
312
320
|
const quoted = normalizeMessageContent(contextInfo?.quotedMessage);
|
|
313
321
|
if (!quoted && !contextInfo?.stanzaId) return null;
|
|
314
322
|
const senderJid = contextInfo?.participant ?? void 0;
|
|
@@ -321,10 +329,11 @@ function describeReplyContext(rawMessage) {
|
|
|
321
329
|
body: "[quoted message unavailable]",
|
|
322
330
|
sender
|
|
323
331
|
};
|
|
324
|
-
const
|
|
332
|
+
const quotedProjection = projectWhatsAppInboundMessage(quoted);
|
|
333
|
+
const location = extractLocationData(quotedProjection);
|
|
325
334
|
const locationText = location ? formatLocationText(location) : void 0;
|
|
326
|
-
const body = [extractText(
|
|
327
|
-
const mediaKind = extractMediaKind(
|
|
335
|
+
const body = [extractText(quotedProjection), locationText].filter(Boolean).join("\n").trim();
|
|
336
|
+
const mediaKind = extractMediaKind(quotedProjection);
|
|
328
337
|
const media = mediaKind ? {
|
|
329
338
|
kind: mediaKind,
|
|
330
339
|
contentType: resolveInboundMediaMimetype(quoted)
|
|
@@ -352,12 +361,13 @@ function hasInteractiveResponseContent(message) {
|
|
|
352
361
|
* `messages.upsert` stream as real messages but should not trigger pairing
|
|
353
362
|
* access-control side effects.
|
|
354
363
|
*/
|
|
355
|
-
function hasInboundUserContent(
|
|
356
|
-
|
|
357
|
-
if (
|
|
358
|
-
if (
|
|
359
|
-
if (
|
|
360
|
-
|
|
364
|
+
function hasInboundUserContent(source) {
|
|
365
|
+
const projection = resolveWhatsAppInboundMessageProjection(source);
|
|
366
|
+
if (projection.length === 0) return false;
|
|
367
|
+
if (extractText(projection)) return true;
|
|
368
|
+
if (extractMediaKind(projection)) return true;
|
|
369
|
+
if (extractLocationData(projection)) return true;
|
|
370
|
+
for (const candidate of projection) if (hasInteractiveResponseContent(candidate)) return true;
|
|
361
371
|
return false;
|
|
362
372
|
}
|
|
363
373
|
//#endregion
|
|
@@ -725,4 +735,4 @@ function createWebSendApi(params) {
|
|
|
725
735
|
};
|
|
726
736
|
}
|
|
727
737
|
//#endregion
|
|
728
|
-
export { addWhatsAppImagePreviewFields as a, extractContextInfo as c, extractMediaKind as d, extractMentionedJids as f,
|
|
738
|
+
export { resolveInboundMediaMimetype as _, addWhatsAppImagePreviewFields as a, extractContextInfo as c, extractMediaKind as d, extractMentionedJids as f, projectWhatsAppInboundMessage as g, hasInboundUserContent as h, resolveWhatsAppOutboundMentions as i, extractExternalAdReplyContext as l, findMessageSection as m, addWhatsAppOutboundMentionsToContent as n, describeReplyContext as o, extractText as p, mayContainWhatsAppOutboundMention as r, extractContactContext as s, createWebSendApi as t, extractLocationData as u };
|
|
@@ -2,7 +2,7 @@ import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./acco
|
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
|
|
3
3
|
import { r as hasWebCredsSync } from "./creds-files-W6B3EMZ8.js";
|
|
4
4
|
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-CugRyONv.js";
|
|
5
|
-
import { r as whatsappSetupAdapter } from "./shared-
|
|
5
|
+
import { r as whatsappSetupAdapter } from "./shared-wg42NKFB.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
|
|
@@ -295,7 +295,7 @@ async function finalizeWhatsAppSetup(params) {
|
|
|
295
295
|
};
|
|
296
296
|
let loginWeb;
|
|
297
297
|
try {
|
|
298
|
-
({loginWeb} = await import("./login-
|
|
298
|
+
({loginWeb} = await import("./login-BkpKpndm.js").then((n) => n.n));
|
|
299
299
|
} catch (error) {
|
|
300
300
|
await reportLoginFailure(error);
|
|
301
301
|
}
|
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-DhBBhbQv.js";
|
|
2
2
|
export { whatsappSetupPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as resolveWhatsAppAuthDir } from "./accounts-BX2fZUyR.js";
|
|
2
2
|
import { t as listAccountIds } from "./account-ids-CB5SOWjc.js";
|
|
3
|
-
import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-
|
|
3
|
+
import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-CtpBqH5S.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-
|
|
39
|
+
finalize: async (params) => await (await import("./setup-finalize-n4K2I2gJ.js")).finalizeWhatsAppSetup(params),
|
|
40
40
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
|
|
41
41
|
onAccountRecorded: (accountId, options) => {
|
|
42
42
|
options?.onAccountId?.(channel, accountId);
|
|
@@ -12,7 +12,7 @@ import { normalizeE164 } from "openclaw/plugin-sdk/account-resolution";
|
|
|
12
12
|
import { createChannelPluginBase } from "openclaw/plugin-sdk/core";
|
|
13
13
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
14
14
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
15
|
-
import { buildChannelGroupsScopeTree, collectOpenGroupPolicyRouteAllowlistWarnings, createAllowlistProviderGroupPolicyWarningCollector, resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
|
|
15
|
+
import { buildChannelGroupsScopeTree, collectOpenGroupPolicyRouteAllowlistWarnings, createAllowlistProviderGroupPolicyWarningCollector, createConditionalWarningCollector, resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
|
|
16
16
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
17
17
|
import { createPatchedAccountSetupAdapter } from "openclaw/plugin-sdk/setup";
|
|
18
18
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
@@ -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-
|
|
23
|
+
const loadWhatsAppAuthStore = createLazyRuntimeModule(() => import("./auth-store-CtpBqH5S.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-
|
|
30
|
+
return await import("./channel.runtime-X3JC2gaq.js");
|
|
31
31
|
});
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region extensions/whatsapp/src/config-accessors.ts
|
|
@@ -115,7 +115,7 @@ async function applyWhatsAppSecurityConfigFixes(params) {
|
|
|
115
115
|
//#region extensions/whatsapp/src/shared.ts
|
|
116
116
|
const WHATSAPP_CHANNEL = "whatsapp";
|
|
117
117
|
async function loadWhatsAppSetupSurface() {
|
|
118
|
-
return await import("./setup-surface-
|
|
118
|
+
return await import("./setup-surface-Cwn3zyxK.js");
|
|
119
119
|
}
|
|
120
120
|
const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
|
|
121
121
|
const whatsappConfigAdapter = createScopedChannelConfigAdapter({
|
|
@@ -209,6 +209,12 @@ function createWhatsAppPluginBase(params) {
|
|
|
209
209
|
}
|
|
210
210
|
})
|
|
211
211
|
});
|
|
212
|
+
const collectWhatsAppOpenGroupFindings = createConditionalWarningCollector.findings({
|
|
213
|
+
collectWarnings: collectWhatsAppSecurityWarnings,
|
|
214
|
+
checkId: "channels.whatsapp.groups.open",
|
|
215
|
+
severity: "critical",
|
|
216
|
+
title: "WhatsApp security warning"
|
|
217
|
+
});
|
|
212
218
|
const base = createChannelPluginBase({
|
|
213
219
|
id: WHATSAPP_CHANNEL,
|
|
214
220
|
meta: {
|
|
@@ -270,7 +276,7 @@ function createWhatsAppPluginBase(params) {
|
|
|
270
276
|
security: {
|
|
271
277
|
applyConfigFixes: applyWhatsAppSecurityConfigFixes,
|
|
272
278
|
resolveDmPolicy: whatsappResolveDmPolicy,
|
|
273
|
-
collectWarnings:
|
|
279
|
+
collectWarnings: collectWhatsAppOpenGroupFindings
|
|
274
280
|
},
|
|
275
281
|
doctor: whatsappDoctor,
|
|
276
282
|
setupContract: params.setupContract,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
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-CtpBqH5S.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.1-beta.
|
|
3
|
+
"version": "2026.8.1-beta.3",
|
|
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.6"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.8.1-beta.
|
|
16
|
+
"openclaw": ">=2026.8.1-beta.3"
|
|
17
17
|
},
|
|
18
18
|
"peerDependenciesMeta": {
|
|
19
19
|
"openclaw": {
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"minHostVersion": ">=2026.4.25"
|
|
66
66
|
},
|
|
67
67
|
"compat": {
|
|
68
|
-
"pluginApi": ">=2026.8.1-beta.
|
|
68
|
+
"pluginApi": ">=2026.8.1-beta.3"
|
|
69
69
|
},
|
|
70
70
|
"build": {
|
|
71
|
-
"openclawVersion": "2026.8.1-beta.
|
|
71
|
+
"openclawVersion": "2026.8.1-beta.3"
|
|
72
72
|
},
|
|
73
73
|
"release": {
|
|
74
74
|
"publishToClawHub": true,
|