@openclaw/whatsapp 2026.5.10-beta.2 → 2026.5.10-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/{access-control-CdP8S3rJ.js → access-control-BEpPB-Jx.js} +6 -6
- package/dist/{accounts-BDqgpFEB.js → accounts-B4oR6Dhx.js} +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/{action-runtime-CMhO8liB.js → action-runtime-lppOTCTN.js} +4 -4
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/api.js +18 -145
- package/dist/{auth-store-CjEimXKX.js → auth-store-_ScMvp7r.js} +10 -10
- package/dist/{channel-BxntAClG.js → channel-D8JseTzy.js} +18 -18
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-DJvzhIPw.js → channel-react-action-C1wufQtL.js} +3 -3
- package/dist/{channel.runtime-CNdPCK3G.js → channel.runtime-BHVFPFlu.js} +5 -5
- package/dist/{channel.setup-BqlcEVzR.js → channel.setup-BuK8IaLl.js} +4 -4
- package/dist/{connection-controller-DX2phM7V.js → connection-controller-Ik54eV0p.js} +7 -6
- package/dist/constants.js +1 -1
- package/dist/contract-api.js +8 -8
- package/dist/{directory-config-o-muXLgk.js → directory-config-CE74HYlw.js} +3 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-session-contract-DL-SLclv.js → group-session-contract-DdqigLJl.js} +1 -1
- package/dist/{identity-KxdJfH7p.js → identity-BNDkpR8N.js} +2 -2
- package/dist/legacy-session-surface-api.js +1 -1
- package/dist/legacy-state-migrations-api.js +1 -1
- package/dist/light-runtime-api.js +3 -3
- package/dist/{login-DV99D0IN.js → login-eiyCwLI5.js} +6 -6
- package/dist/{login-qr-cKndAXTv.js → login-qr-CSEa1_wH.js} +5 -5
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-mfy3Mmq-.js → monitor-BUZiKfTw.js} +139 -72
- package/dist/normalize-f31evwm8.js +2 -0
- package/dist/{normalize-target-nXxC_hxG.js → normalize-target-ePanEpfY.js} +1 -1
- package/dist/{outbound-adapter-B9ZW8sht.js → outbound-adapter-Bs0e4qVd.js} +4 -4
- package/dist/{outbound-base-MVpg2zU2.js → outbound-base-BgtywpNm.js} +3 -3
- package/dist/{outbound-media-contract-BzWwBppP.js → outbound-media-contract-zq9aNgT8.js} +5 -5
- package/dist/outbound-payload-test-api.js +1 -1
- package/dist/{quoted-message-DQ6hAr34.js → quoted-message-BQsRXnac.js} +1 -1
- package/dist/{reaction-level-CRVEVAfi.js → reaction-level-2m9sWGCw.js} +1 -1
- package/dist/{resolve-outbound-target-CQ3Y1i0g.js → resolve-outbound-target-BKcv4ofn.js} +1 -1
- package/dist/rolldown-runtime-CiIaOW0V.js +13 -0
- package/dist/runtime-api.js +11 -11
- package/dist/{security-contract-BzlZFreO.js → security-contract-CvfWex9e.js} +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-u88yh8Hw.js → send-DBfXQDd4.js} +10 -9
- package/dist/{send-api-DsbCqDre.js → send-api-DD93aPIQ.js} +7 -7
- package/dist/{session-DeIU_vjJ.js → session-CVCKPoQN.js} +6 -6
- package/dist/{session.runtime-B9VlYnWQ.js → session.runtime-CZQ0ycCg.js} +2 -2
- package/dist/{setup-finalize-D3YuMUBs.js → setup-finalize-WYnZjedw.js} +4 -4
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-CHjYlKJc.js → setup-surface-DJAu-uxi.js} +3 -3
- package/dist/{shared-CgYT3IzU.js → shared-Ihk-Sj__.js} +9 -9
- package/dist/targets.js +1 -1
- package/dist/test-api.js +2 -2
- package/dist/{text-runtime-DBKC9uEi.js → text-runtime-CMxQczvs.js} +4 -42
- package/package.json +5 -5
- package/dist/normalize-Y3eBdM8a.js +0 -2
- /package/dist/{active-listener-D2NHQ5Og.js → active-listener-DTbKS-j-.js} +0 -0
- /package/dist/{agent-tools-login-DYKYW5Nh.js → agent-tools-login-DpRxLNRB.js} +0 -0
- /package/dist/{audio-preflight.runtime-CIFjeaEN.js → audio-preflight.runtime-MmkB-pgX.js} +0 -0
- /package/dist/{command-policy-BgZRZ31o.js → command-policy-O8sRnqUV.js} +0 -0
- /package/dist/{config-schema-cSC7M4YA.js → config-schema-Dmo66Ubb.js} +0 -0
- /package/dist/{constants-yKXGCGU9.js → constants-DLGCIbfl.js} +0 -0
- /package/dist/{doctor-BrgepDUP.js → doctor-A9tXm9Om.js} +0 -0
- /package/dist/{reply-resolver.runtime-CROyXXQh.js → reply-resolver.runtime-rIVWohXr.js} +0 -0
- /package/dist/{runtime-DdodQB8G.js → runtime-6fZ67abR.js} +0 -0
- /package/dist/{runtime-group-policy-BH_U23qp.js → runtime-group-policy-Gp1lQ0at.js} +0 -0
- /package/dist/{session-contract-BNUscPf4.js → session-contract-B0efQf9P.js} +0 -0
- /package/dist/{setup-core-DnhO0PjG.js → setup-core-DZKvpzbH.js} +0 -0
- /package/dist/{state-migrations-CtdIArlK.js → state-migrations-Bm0S67yH.js} +0 -0
package/dist/runtime-api.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { n as resolveWebCredsBackupPath, r as resolveWebCredsPath, t as hasWebCredsSync } from "./creds-files-_2V8jzQa.js";
|
|
2
|
-
import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-
|
|
2
|
+
import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-lppOTCTN.js";
|
|
3
3
|
import { n as getStatusCode, t as formatError } from "./session-errors-CSuKZPub.js";
|
|
4
|
-
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
4
|
+
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-DBfXQDd4.js";
|
|
5
5
|
import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
|
|
6
|
-
import { t as createWhatsAppLoginTool } from "./agent-tools-login-
|
|
7
|
-
import { n as setWhatsAppRuntime } from "./runtime-
|
|
8
|
-
import { C as waitForCredsSaveQueueWithTimeout, S as waitForCredsSaveQueue, _ as readWebSelfIdentityForDecision, a as getWebAuthAgeMs, b as webAuthExists, c as pickWebChannel, d as readWebAuthExistsForDecision, f as readWebAuthSnapshot, g as readWebSelfIdentity, h as readWebSelfId, i as formatWhatsAppWebAuthStatusState, l as readCredsJsonRaw, m as readWebAuthState, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as logWebSelfId, p as readWebAuthSnapshotBestEffort, r as WhatsAppAuthUnstableError, s as logoutWeb, t as WA_WEB_AUTH_DIR, u as readWebAuthExistsBestEffort, v as resolveDefaultWebAuthDir, w as writeCredsJsonAtomically, y as restoreCredsFromBackupIfNeeded } from "./auth-store-
|
|
9
|
-
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-
|
|
10
|
-
import { c as extractContactContext, d as extractMediaPlaceholder, p as extractText, u as extractLocationData } from "./send-api-
|
|
11
|
-
import { n as newConnectionId, r as waitForWaConnection, t as createWaSocket } from "./session-
|
|
12
|
-
import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-
|
|
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-
|
|
6
|
+
import { t as createWhatsAppLoginTool } from "./agent-tools-login-DpRxLNRB.js";
|
|
7
|
+
import { n as setWhatsAppRuntime } from "./runtime-6fZ67abR.js";
|
|
8
|
+
import { C as waitForCredsSaveQueueWithTimeout, S as waitForCredsSaveQueue, _ as readWebSelfIdentityForDecision, a as getWebAuthAgeMs, b as webAuthExists, c as pickWebChannel, d as readWebAuthExistsForDecision, f as readWebAuthSnapshot, g as readWebSelfIdentity, h as readWebSelfId, i as formatWhatsAppWebAuthStatusState, l as readCredsJsonRaw, m as readWebAuthState, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as logWebSelfId, p as readWebAuthSnapshotBestEffort, r as WhatsAppAuthUnstableError, s as logoutWeb, t as WA_WEB_AUTH_DIR, u as readWebAuthExistsBestEffort, v as resolveDefaultWebAuthDir, w as writeCredsJsonAtomically, y as restoreCredsFromBackupIfNeeded } from "./auth-store-_ScMvp7r.js";
|
|
9
|
+
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-DLGCIbfl.js";
|
|
10
|
+
import { c as extractContactContext, d as extractMediaPlaceholder, p as extractText, u as extractLocationData } from "./send-api-DD93aPIQ.js";
|
|
11
|
+
import { n as newConnectionId, r as waitForWaConnection, t as createWaSocket } from "./session-CVCKPoQN.js";
|
|
12
|
+
import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-DTbKS-j-.js";
|
|
13
|
+
import { a as loadWebMediaRaw, c as monitorWebInbox, i as loadWebMedia, l as resetWebInboundDedupe, n as LocalMediaAccessError, o as optimizeImageToJpeg, r as getDefaultLocalRoots, s as optimizeImageToPng, t as monitorWebChannel } from "./monitor-BUZiKfTw.js";
|
|
14
|
+
import { t as loginWeb } from "./login-eiyCwLI5.js";
|
|
15
15
|
import { HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, SILENT_REPLY_TOKEN, stripHeartbeatToken } from "openclaw/plugin-sdk/reply-runtime";
|
|
16
16
|
export { DEFAULT_WEB_MEDIA_BYTES, HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, LocalMediaAccessError, SILENT_REPLY_TOKEN, WA_WEB_AUTH_DIR, WHATSAPP_AUTH_UNSTABLE_CODE, WhatsAppAuthUnstableError, createWaSocket, createWhatsAppLoginTool, extractContactContext, extractLocationData, extractMediaPlaceholder, extractText, formatError, formatWhatsAppWebAuthStatusState, getActiveWebListener, getDefaultLocalRoots, getStatusCode, getWebAuthAgeMs, handleWhatsAppAction, hasWebCredsSync, loadWebMedia, loadWebMediaRaw, logWebSelfId, loginWeb, logoutWeb, monitorWebChannel, monitorWebInbox, newConnectionId, optimizeImageToJpeg, optimizeImageToPng, pickWebChannel, readCredsJsonRaw, readWebAuthExistsBestEffort, readWebAuthExistsForDecision, readWebAuthSnapshot, readWebAuthSnapshotBestEffort, readWebAuthState, readWebSelfId, readWebSelfIdentity, readWebSelfIdentityForDecision, resetWebInboundDedupe, resolveDefaultWebAuthDir, resolveWebAccountId, resolveWebCredsBackupPath, resolveWebCredsPath, restoreCredsFromBackupIfNeeded, sendMessageWhatsApp, sendPollWhatsApp, sendReactionWhatsApp, sendTypingWhatsApp, setWhatsAppRuntime, startWebLoginWithQr, stripHeartbeatToken, waitForCredsSaveQueue, waitForCredsSaveQueueWithTimeout, waitForWaConnection, waitForWebLogin, webAuthExists, whatsAppActionRuntime, writeCredsJsonAtomically };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isRecord } from "openclaw/plugin-sdk/
|
|
1
|
+
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
2
|
//#region extensions/whatsapp/src/security-contract.ts
|
|
3
3
|
const unsupportedSecretRefSurfacePatterns = ["channels.whatsapp.creds.json", "channels.whatsapp.accounts.*.creds.json"];
|
|
4
4
|
function collectUnsupportedSecretRefConfigCandidates(raw) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-
|
|
1
|
+
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-CvfWex9e.js";
|
|
2
2
|
export { collectUnsupportedSecretRefConfigCandidates, unsupportedSecretRefSurfacePatterns };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-DG18xddX.js";
|
|
3
|
-
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-
|
|
4
|
-
import { n as isWhatsAppNewsletterJid } from "./normalize-target-
|
|
3
|
+
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-B4oR6Dhx.js";
|
|
4
|
+
import { n as isWhatsAppNewsletterJid } from "./normalize-target-ePanEpfY.js";
|
|
5
5
|
import { t as getRegisteredWhatsAppConnectionController } from "./connection-controller-registry-D_iIGz5m.js";
|
|
6
|
-
import "./normalize-
|
|
7
|
-
import {
|
|
6
|
+
import "./normalize-f31evwm8.js";
|
|
7
|
+
import { d as markdownToWhatsApp, p as toWhatsappJid } from "./text-runtime-CMxQczvs.js";
|
|
8
|
+
import { a as resolveWhatsAppOutboundMediaUrls, i as prepareWhatsAppOutboundMedia, n as normalizeWhatsAppPayloadText } from "./outbound-media-contract-zq9aNgT8.js";
|
|
8
9
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
9
10
|
import { generateSecureUuid } from "openclaw/plugin-sdk/core";
|
|
10
11
|
import { redactIdentifier } from "openclaw/plugin-sdk/logging-core";
|
|
11
12
|
import { convertMarkdownTables, resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
12
13
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
13
14
|
import { normalizePollInput } from "openclaw/plugin-sdk/poll-runtime";
|
|
14
|
-
import { createSubsystemLogger, getChildLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
15
|
+
import { createSubsystemLogger, getChildLogger as getChildLogger$1 } from "openclaw/plugin-sdk/runtime-env";
|
|
15
16
|
import { loadWebMedia } from "openclaw/plugin-sdk/web-media";
|
|
16
17
|
//#region extensions/whatsapp/src/outbound-media.runtime.ts
|
|
17
18
|
async function loadOutboundMediaFromUrl(mediaUrl, options = {}) {
|
|
@@ -77,7 +78,7 @@ async function sendMessageWhatsApp(to, body, options) {
|
|
|
77
78
|
text = convertMarkdownTables(text ?? "", tableMode);
|
|
78
79
|
text = markdownToWhatsApp(text);
|
|
79
80
|
const redactedTo = redactIdentifier(to);
|
|
80
|
-
const logger = getChildLogger({
|
|
81
|
+
const logger = getChildLogger$1({
|
|
81
82
|
module: "web-outbound",
|
|
82
83
|
correlationId,
|
|
83
84
|
to: redactedTo
|
|
@@ -156,7 +157,7 @@ async function sendReactionWhatsApp(chatJid, messageId, emoji, options) {
|
|
|
156
157
|
accountId: options.accountId
|
|
157
158
|
});
|
|
158
159
|
const redactedChatJid = redactIdentifier(chatJid);
|
|
159
|
-
const logger = getChildLogger({
|
|
160
|
+
const logger = getChildLogger$1({
|
|
160
161
|
module: "web-outbound",
|
|
161
162
|
correlationId,
|
|
162
163
|
chatJid: redactedChatJid,
|
|
@@ -195,7 +196,7 @@ async function sendPollWhatsApp(to, poll, options) {
|
|
|
195
196
|
accountId: options.accountId
|
|
196
197
|
});
|
|
197
198
|
const redactedTo = redactIdentifier(to);
|
|
198
|
-
const logger = getChildLogger({
|
|
199
|
+
const logger = getChildLogger$1({
|
|
199
200
|
module: "web-outbound",
|
|
200
201
|
correlationId,
|
|
201
202
|
to: redactedTo
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import { t as buildQuotedMessageOptions } from "./quoted-message-
|
|
5
|
-
import { c as resolveComparableIdentity } from "./identity-
|
|
6
|
-
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/
|
|
1
|
+
import { n as isWhatsAppNewsletterJid } from "./normalize-target-ePanEpfY.js";
|
|
2
|
+
import "./normalize-f31evwm8.js";
|
|
3
|
+
import { m as toWhatsappJidWithLid, p as toWhatsappJid, u as jidToE164 } from "./text-runtime-CMxQczvs.js";
|
|
4
|
+
import { t as buildQuotedMessageOptions } from "./quoted-message-BQsRXnac.js";
|
|
5
|
+
import { c as resolveComparableIdentity } from "./identity-BNDkpR8N.js";
|
|
6
|
+
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
8
8
|
import { createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds } from "openclaw/plugin-sdk/channel-message";
|
|
9
|
-
import { extractMessageContent, getContentType, normalizeMessageContent } from "
|
|
9
|
+
import { extractMessageContent, getContentType, normalizeMessageContent } from "baileys";
|
|
10
10
|
import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
|
|
11
11
|
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
12
12
|
//#region extensions/whatsapp/src/vcard.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as resolveWebCredsBackupPath, r as resolveWebCredsPath } from "./creds-files-_2V8jzQa.js";
|
|
2
2
|
import { n as getStatusCode } from "./session-errors-CSuKZPub.js";
|
|
3
|
-
import { C as waitForCredsSaveQueueWithTimeout, l as readCredsJsonRaw, v as resolveDefaultWebAuthDir, w as writeCredsJsonAtomically, x as enqueueCredsSave, y as restoreCredsFromBackupIfNeeded } from "./auth-store-
|
|
4
|
-
import { i as makeWASocket, n as fetchLatestBaileysVersion, o as useMultiFileAuthState, r as makeCacheableSignalKeyStore, t as DisconnectReason } from "./session.runtime-
|
|
3
|
+
import { C as waitForCredsSaveQueueWithTimeout, l as readCredsJsonRaw, v as resolveDefaultWebAuthDir, w as writeCredsJsonAtomically, x as enqueueCredsSave, y as restoreCredsFromBackupIfNeeded } from "./auth-store-_ScMvp7r.js";
|
|
4
|
+
import { i as makeWASocket, n as fetchLatestBaileysVersion, o as useMultiFileAuthState, r as makeCacheableSignalKeyStore, t as DisconnectReason } from "./session.runtime-CZQ0ycCg.js";
|
|
5
5
|
import fs from "node:fs";
|
|
6
|
-
import { ensureDir, resolveUserPath } from "openclaw/plugin-sdk/text-runtime";
|
|
7
6
|
import { VERSION, formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
8
|
-
import { danger, getChildLogger
|
|
7
|
+
import { danger, getChildLogger, success, toPinoLikeLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
9
8
|
import { renderQrTerminal } from "openclaw/plugin-sdk/media-runtime";
|
|
9
|
+
import { ensureDir, resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
12
12
|
import { resolveEnvHttpProxyUrl, shouldUseEnvHttpProxyForUrl } from "openclaw/plugin-sdk/fetch-runtime";
|
|
@@ -65,10 +65,10 @@ async function printTerminalQr(qr) {
|
|
|
65
65
|
* Consumers can opt into QR printing for interactive login flows.
|
|
66
66
|
*/
|
|
67
67
|
async function createWaSocket(printQr, verbose, opts = {}) {
|
|
68
|
-
const logger = toPinoLikeLogger(getChildLogger
|
|
68
|
+
const logger = toPinoLikeLogger(getChildLogger({ module: "baileys" }, { level: verbose ? "info" : "silent" }), verbose ? "info" : "silent");
|
|
69
69
|
const authDir = resolveUserPath(opts.authDir ?? resolveDefaultWebAuthDir());
|
|
70
70
|
await ensureDir(authDir);
|
|
71
|
-
const sessionLogger = getChildLogger
|
|
71
|
+
const sessionLogger = getChildLogger({ module: "web-session" });
|
|
72
72
|
if (await waitForCredsSaveQueueWithTimeout(authDir) === "timed_out") sessionLogger.warn({ authDir }, CREDS_FLUSH_TIMEOUT_MESSAGE);
|
|
73
73
|
else await restoreCredsFromBackupIfNeeded(authDir);
|
|
74
74
|
const { state } = await useMultiFileAuthState(authDir);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BufferJSON, DisconnectReason as DisconnectReason$1, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
+
import { BufferJSON, DisconnectReason as DisconnectReason$1, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "baileys";
|
|
3
3
|
//#region extensions/whatsapp/src/session.runtime.ts
|
|
4
4
|
var session_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
5
5
|
BufferJSON: () => BufferJSON,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-DG18xddX.js";
|
|
2
|
-
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-
|
|
3
|
-
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-
|
|
4
|
-
import { t as whatsappSetupAdapter } from "./setup-core-
|
|
2
|
+
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-B4oR6Dhx.js";
|
|
3
|
+
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-ePanEpfY.js";
|
|
4
|
+
import { t as whatsappSetupAdapter } from "./setup-core-DZKvpzbH.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, pathExists, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
7
7
|
import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
@@ -279,7 +279,7 @@ async function finalizeWhatsAppSetup(params) {
|
|
|
279
279
|
message: linked ? "WhatsApp already linked. Re-link now?" : "Link WhatsApp now (QR)?",
|
|
280
280
|
initialValue: !linked
|
|
281
281
|
})) try {
|
|
282
|
-
const { loginWeb } = await import("./login-
|
|
282
|
+
const { loginWeb } = await import("./login-eiyCwLI5.js").then((n) => n.n);
|
|
283
283
|
await loginWeb(false, void 0, params.runtime, accountId);
|
|
284
284
|
} catch (error) {
|
|
285
285
|
params.runtime.error(`WhatsApp login failed: ${String(error)}`);
|
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-BuK8IaLl.js";
|
|
2
2
|
export { whatsappSetupPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as listAccountIds } from "./account-ids-DG18xddX.js";
|
|
2
|
-
import { o as resolveWhatsAppAuthDir } from "./accounts-
|
|
3
|
-
import { i as formatWhatsAppWebAuthStatusState, m as readWebAuthState } from "./auth-store-
|
|
2
|
+
import { o as resolveWhatsAppAuthDir } from "./accounts-B4oR6Dhx.js";
|
|
3
|
+
import { i as formatWhatsAppWebAuthStatusState, m as readWebAuthState } from "./auth-store-_ScMvp7r.js";
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
5
5
|
//#region extensions/whatsapp/src/setup-surface.ts
|
|
6
6
|
const channel = "whatsapp";
|
|
@@ -35,7 +35,7 @@ const whatsappSetupWizard = {
|
|
|
35
35
|
},
|
|
36
36
|
resolveShouldPromptAccountIds: ({ shouldPromptAccountIds }) => shouldPromptAccountIds,
|
|
37
37
|
credentials: [],
|
|
38
|
-
finalize: async (params) => await (await import("./setup-finalize-
|
|
38
|
+
finalize: async (params) => await (await import("./setup-finalize-WYnZjedw.js")).finalizeWhatsAppSetup(params),
|
|
39
39
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
|
|
40
40
|
onAccountRecorded: (accountId, options) => {
|
|
41
41
|
options?.onAccountId?.(channel, accountId);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-DG18xddX.js";
|
|
2
|
-
import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-
|
|
3
|
-
import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-
|
|
4
|
-
import { t as WhatsAppChannelConfigSchema } from "./config-schema-
|
|
5
|
-
import { n as whatsappDoctor } from "./doctor-
|
|
6
|
-
import { t as resolveLegacyGroupSessionKey } from "./group-session-contract-
|
|
7
|
-
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-
|
|
8
|
-
import { n as deriveLegacySessionChatType, r as isLegacyGroupSessionKey, t as canonicalizeLegacySessionKey } from "./session-contract-
|
|
2
|
+
import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-B4oR6Dhx.js";
|
|
3
|
+
import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-ePanEpfY.js";
|
|
4
|
+
import { t as WhatsAppChannelConfigSchema } from "./config-schema-Dmo66Ubb.js";
|
|
5
|
+
import { n as whatsappDoctor } from "./doctor-A9tXm9Om.js";
|
|
6
|
+
import { t as resolveLegacyGroupSessionKey } from "./group-session-contract-DdqigLJl.js";
|
|
7
|
+
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-CvfWex9e.js";
|
|
8
|
+
import { n as deriveLegacySessionChatType, r as isLegacyGroupSessionKey, t as canonicalizeLegacySessionKey } from "./session-contract-B0efQf9P.js";
|
|
9
9
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-core";
|
|
10
10
|
import { normalizeE164 } from "openclaw/plugin-sdk/account-resolution";
|
|
11
11
|
import { createChannelPluginBase, getChatChannelMeta } from "openclaw/plugin-sdk/core";
|
|
@@ -124,10 +124,10 @@ function resolveWhatsAppConfigPath(params) {
|
|
|
124
124
|
return `${resolveWhatsAppGroupScopeBasePath(params)}.${params.field}`;
|
|
125
125
|
}
|
|
126
126
|
async function loadWhatsAppChannelRuntime() {
|
|
127
|
-
return await import("./channel.runtime-
|
|
127
|
+
return await import("./channel.runtime-BHVFPFlu.js");
|
|
128
128
|
}
|
|
129
129
|
async function loadWhatsAppSetupSurface() {
|
|
130
|
-
return await import("./setup-surface-
|
|
130
|
+
return await import("./setup-surface-DJAu-uxi.js");
|
|
131
131
|
}
|
|
132
132
|
const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
|
|
133
133
|
const whatsappConfigAdapter = createScopedChannelConfigAdapter({
|
package/dist/targets.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as normalizeWhatsAppTarget, r as isWhatsAppUserTarget, t as isWhatsAppGroupJid } from "./normalize-target-
|
|
1
|
+
import { c as normalizeWhatsAppTarget, r as isWhatsAppUserTarget, t as isWhatsAppGroupJid } from "./normalize-target-ePanEpfY.js";
|
|
2
2
|
export { isWhatsAppGroupJid, isWhatsAppUserTarget, normalizeWhatsAppTarget };
|
package/dist/test-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-
|
|
2
|
-
import { t as whatsappOutbound } from "./outbound-adapter-
|
|
1
|
+
import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-Gp1lQ0at.js";
|
|
2
|
+
import { t as whatsappOutbound } from "./outbound-adapter-Bs0e4qVd.js";
|
|
3
3
|
export { resolveWhatsAppRuntimeGroupPolicy, whatsappOutbound };
|
|
@@ -1,34 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { CONFIG_DIR, escapeRegExp, resolveUserPath } from "openclaw/plugin-sdk/text-runtime";
|
|
4
3
|
import { normalizeE164 } from "openclaw/plugin-sdk/account-resolution";
|
|
5
4
|
import { logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __exportAll = (all, no_symbols) => {
|
|
12
|
-
let target = {};
|
|
13
|
-
for (var name in all) __defProp(target, name, {
|
|
14
|
-
get: all[name],
|
|
15
|
-
enumerable: true
|
|
16
|
-
});
|
|
17
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
22
|
-
key = keys[i];
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
24
|
-
get: ((k) => from[k]).bind(null, key),
|
|
25
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return to;
|
|
29
|
-
};
|
|
30
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
31
|
-
//#endregion
|
|
5
|
+
import { convertMarkdownTables, sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile, stripToolCallXmlTags } from "openclaw/plugin-sdk/text-chunking";
|
|
6
|
+
import { CONFIG_DIR, escapeRegExp, normalizeE164 as normalizeE164$1, resolveUserPath as resolveUserPath$1, resolveUserPath as resolveUserPath$2, sleep } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
32
7
|
//#region extensions/whatsapp/src/targets-runtime.ts
|
|
33
8
|
const WHATSAPP_FENCE_PLACEHOLDER = "\0FENCE";
|
|
34
9
|
const WHATSAPP_INLINE_CODE_PLACEHOLDER = "\0CODE";
|
|
@@ -67,7 +42,7 @@ function resolveLidMappingDirs(params) {
|
|
|
67
42
|
const dirs = /* @__PURE__ */ new Set();
|
|
68
43
|
const addDir = (dir) => {
|
|
69
44
|
if (!dir) return;
|
|
70
|
-
dirs.add(resolveUserPath(dir));
|
|
45
|
+
dirs.add(resolveUserPath$1(dir));
|
|
71
46
|
};
|
|
72
47
|
addDir(params.opts?.authDir);
|
|
73
48
|
for (const dir of params.opts?.lidMappingDirs ?? []) addDir(dir);
|
|
@@ -151,17 +126,4 @@ function markdownToWhatsApp(text) {
|
|
|
151
126
|
return result;
|
|
152
127
|
}
|
|
153
128
|
//#endregion
|
|
154
|
-
|
|
155
|
-
var text_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
156
|
-
assertWebChannel: () => assertWebChannel,
|
|
157
|
-
isSelfChatMode: () => isSelfChatMode,
|
|
158
|
-
jidToE164: () => jidToE164,
|
|
159
|
-
markdownToWhatsApp: () => markdownToWhatsApp,
|
|
160
|
-
resolveJidToE164: () => resolveJidToE164,
|
|
161
|
-
toWhatsappJid: () => toWhatsappJid,
|
|
162
|
-
toWhatsappJidWithLid: () => toWhatsappJidWithLid
|
|
163
|
-
});
|
|
164
|
-
import * as import_openclaw_plugin_sdk_text_runtime from "openclaw/plugin-sdk/text-runtime";
|
|
165
|
-
__reExport(text_runtime_exports, import_openclaw_plugin_sdk_text_runtime);
|
|
166
|
-
//#endregion
|
|
167
|
-
export { markdownToWhatsApp as a, toWhatsappJidWithLid as c, jidToE164 as i, __exportAll as l, assertWebChannel as n, resolveJidToE164 as o, isSelfChatMode as r, toWhatsappJid as s, text_runtime_exports as t };
|
|
129
|
+
export { sanitizeAssistantVisibleTextWithProfile as a, assertWebChannel as c, markdownToWhatsApp as d, resolveJidToE164 as f, sanitizeAssistantVisibleText as i, isSelfChatMode as l, toWhatsappJidWithLid as m, normalizeE164$1 as n, sleep as o, toWhatsappJid as p, resolveUserPath$2 as r, stripToolCallXmlTags as s, convertMarkdownTables as t, jidToE164 as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/whatsapp",
|
|
3
|
-
"version": "2026.5.10-beta.
|
|
3
|
+
"version": "2026.5.10-beta.4",
|
|
4
4
|
"description": "OpenClaw WhatsApp channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"
|
|
11
|
+
"baileys": "7.0.0-rc10",
|
|
12
12
|
"https-proxy-agent": "^9.0.0",
|
|
13
13
|
"jimp": "^1.6.1",
|
|
14
14
|
"typebox": "1.1.38",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"openclaw": "workspace:*"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"openclaw": ">=2026.5.10-beta.
|
|
22
|
+
"openclaw": ">=2026.5.10-beta.4"
|
|
23
23
|
},
|
|
24
24
|
"peerDependenciesMeta": {
|
|
25
25
|
"openclaw": {
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"minHostVersion": ">=2026.4.25"
|
|
62
62
|
},
|
|
63
63
|
"compat": {
|
|
64
|
-
"pluginApi": ">=2026.5.10-beta.
|
|
64
|
+
"pluginApi": ">=2026.5.10-beta.4"
|
|
65
65
|
},
|
|
66
66
|
"build": {
|
|
67
|
-
"openclawVersion": "2026.5.10-beta.
|
|
67
|
+
"openclawVersion": "2026.5.10-beta.4"
|
|
68
68
|
},
|
|
69
69
|
"release": {
|
|
70
70
|
"publishToClawHub": true,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|