@openclaw/whatsapp 2026.5.4-beta.2 → 2026.5.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/action-runtime-api.js +1 -1
- package/dist/{action-runtime-DTGNgG-i.js → action-runtime-bsQE9CuK.js} +2 -2
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/api.js +7 -7
- package/dist/{channel-CEMwkdeB.js → channel-B17Hy8-W.js} +11 -8
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-Df20qAy9.js → channel-react-action-B9eSz9-t.js} +3 -3
- package/dist/{channel.runtime-DPHrTcfF.js → channel.runtime-CXhHvkmj.js} +2 -2
- package/dist/{channel.setup-CrM3owT7.js → channel.setup-BeGeYs_M.js} +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/{directory-config-DVs4ffXu.js → directory-config-BNCbgnmy.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{monitor-B8SkX8eu.js → monitor-Ce7y4e_6.js} +3 -3
- package/dist/normalize-Y3eBdM8a.js +2 -0
- package/dist/{normalize-target-BPVHNsM5.js → normalize-target-nXxC_hxG.js} +13 -2
- package/dist/{outbound-adapter-BssVnZdz.js → outbound-adapter-CxwUJNMD.js} +2 -2
- package/dist/outbound-payload-test-api.js +1 -1
- package/dist/{resolve-outbound-target-CN-Wo6IY.js → resolve-outbound-target-CQ3Y1i0g.js} +1 -1
- package/dist/runtime-api.js +3 -3
- package/dist/{send-CIyLFxdZ.js → send-1CzaHJGH.js} +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-g3sr5OiF.js → setup-surface-D3xANmE7.js} +8 -7
- package/dist/{shared-CXP9PF_T.js → shared-zLVJEVKz.js} +3 -3
- package/dist/targets.js +1 -1
- package/dist/test-api.js +1 -1
- package/package.json +4 -4
- package/dist/normalize-CWYiGkXw.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./action-runtime-bsQE9CuK.js";
|
|
2
2
|
export { handleWhatsAppAction };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount } from "./accounts-BDqgpFEB.js";
|
|
2
|
-
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-
|
|
2
|
+
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CQ3Y1i0g.js";
|
|
3
3
|
import { t as resolveWhatsAppReactionLevel } from "./reaction-level-CRVEVAfi.js";
|
|
4
|
-
import { r as sendReactionWhatsApp } from "./send-
|
|
4
|
+
import { r as sendReactionWhatsApp } from "./send-1CzaHJGH.js";
|
|
5
5
|
import { ToolAuthorizationError, createActionGate, jsonResult, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
6
6
|
//#region extensions/whatsapp/src/action-runtime-target-auth.ts
|
|
7
7
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./action-runtime-bsQE9CuK.js";
|
|
2
2
|
export { handleWhatsAppAction };
|
package/dist/api.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-DG18xddX.js";
|
|
2
2
|
import { a as resolveWhatsAppAccount, i as listWhatsAppAuthDirs, n as hasAnyWhatsAppAuth, o as resolveWhatsAppAuthDir, r as listEnabledWhatsAppAccounts, s as resolveWhatsAppMediaMaxBytes, t as DEFAULT_WHATSAPP_MEDIA_MAX_MB } from "./accounts-BDqgpFEB.js";
|
|
3
|
-
import { a as normalizeWhatsAppAllowFromEntries,
|
|
4
|
-
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-
|
|
3
|
+
import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, r as isWhatsAppUserTarget, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-nXxC_hxG.js";
|
|
4
|
+
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CQ3Y1i0g.js";
|
|
5
5
|
import "./reaction-level-CRVEVAfi.js";
|
|
6
6
|
import { a as markdownToWhatsApp, i as jidToE164, n as assertWebChannel, o as resolveJidToE164, r as isSelfChatMode, s as toWhatsappJid, t as text_runtime_exports } from "./text-runtime-C1zNiZeO.js";
|
|
7
|
-
import "./send-
|
|
8
|
-
import { t as whatsappPlugin } from "./channel-
|
|
7
|
+
import "./send-1CzaHJGH.js";
|
|
8
|
+
import { t as whatsappPlugin } from "./channel-B17Hy8-W.js";
|
|
9
9
|
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS } from "./outbound-base-Bq1UYEK5.js";
|
|
10
10
|
import { t as whatsappCommandPolicy } from "./command-policy-O8sRnqUV.js";
|
|
11
|
-
import { a as resolveWhatsAppGroupToolPolicy, i as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupIntroHint } from "./shared-
|
|
11
|
+
import { a as resolveWhatsAppGroupToolPolicy, i as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupIntroHint } from "./shared-zLVJEVKz.js";
|
|
12
12
|
import "./config-schema-Dmo66Ubb.js";
|
|
13
|
-
import { t as whatsappSetupPlugin } from "./channel.setup-
|
|
13
|
+
import { t as whatsappSetupPlugin } from "./channel.setup-BeGeYs_M.js";
|
|
14
14
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-DLGCIbfl.js";
|
|
15
|
-
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-
|
|
15
|
+
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-BNCbgnmy.js";
|
|
16
16
|
import { t as __testing } from "./access-control-BQ3tCkH8.js";
|
|
17
17
|
import "openclaw/plugin-sdk/channel-actions";
|
|
18
18
|
import "openclaw/plugin-sdk/account-resolution";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as listAccountIds } from "./account-ids-DG18xddX.js";
|
|
2
2
|
import { a as resolveWhatsAppAccount } from "./accounts-BDqgpFEB.js";
|
|
3
|
-
import { i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as
|
|
4
|
-
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-
|
|
3
|
+
import { c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as normalizeWhatsAppAllowFromEntry, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-nXxC_hxG.js";
|
|
4
|
+
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CQ3Y1i0g.js";
|
|
5
5
|
import { t as resolveWhatsAppReactionLevel } from "./reaction-level-CRVEVAfi.js";
|
|
6
|
-
import "./normalize-
|
|
6
|
+
import "./normalize-Y3eBdM8a.js";
|
|
7
7
|
import { r as normalizeWhatsAppPayloadTextPreservingIndentation } from "./outbound-media-contract-CGss_QHy.js";
|
|
8
|
-
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
8
|
+
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./send-1CzaHJGH.js";
|
|
9
9
|
import { t as createWhatsAppLoginTool } from "./agent-tools-login-DpRxLNRB.js";
|
|
10
10
|
import { t as createWhatsAppOutboundBase } from "./outbound-base-Bq1UYEK5.js";
|
|
11
11
|
import { t as getWhatsAppRuntime } from "./runtime-6fZ67abR.js";
|
|
12
12
|
import { t as whatsappCommandPolicy } from "./command-policy-O8sRnqUV.js";
|
|
13
|
-
import { a as resolveWhatsAppGroupToolPolicy, c as formatWhatsAppConfigAllowFromEntries, i as resolveWhatsAppGroupRequireMention, n as loadWhatsAppChannelRuntime, o as resolveWhatsAppGroupIntroHint, r as whatsappSetupWizardProxy, s as resolveWhatsAppMentionStripRegexes, t as createWhatsAppPluginBase } from "./shared-
|
|
13
|
+
import { a as resolveWhatsAppGroupToolPolicy, c as formatWhatsAppConfigAllowFromEntries, i as resolveWhatsAppGroupRequireMention, n as loadWhatsAppChannelRuntime, o as resolveWhatsAppGroupIntroHint, r as whatsappSetupWizardProxy, s as resolveWhatsAppMentionStripRegexes, t as createWhatsAppPluginBase } from "./shared-zLVJEVKz.js";
|
|
14
14
|
import { d as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-BjCb50Ry.js";
|
|
15
15
|
import { t as whatsappSetupAdapter } from "./setup-core-DZKvpzbH.js";
|
|
16
16
|
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-DnCdvoYD.js";
|
|
@@ -296,8 +296,8 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
296
296
|
}
|
|
297
297
|
//#endregion
|
|
298
298
|
//#region extensions/whatsapp/src/channel.ts
|
|
299
|
-
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-
|
|
300
|
-
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-
|
|
299
|
+
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-BNCbgnmy.js").then((n) => n.t));
|
|
300
|
+
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-B9eSz9-t.js"));
|
|
301
301
|
function parseWhatsAppExplicitTarget(raw) {
|
|
302
302
|
const normalized = normalizeWhatsAppTarget(raw);
|
|
303
303
|
if (!normalized) return null;
|
|
@@ -307,7 +307,10 @@ function parseWhatsAppExplicitTarget(raw) {
|
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
const whatsappPlugin = createChatChannelPlugin({
|
|
310
|
-
pairing: {
|
|
310
|
+
pairing: {
|
|
311
|
+
idLabel: "whatsappSenderId",
|
|
312
|
+
normalizeAllowEntry: (entry) => normalizeWhatsAppAllowFromEntry(entry) ?? ""
|
|
313
|
+
},
|
|
311
314
|
outbound: whatsappChannelOutbound,
|
|
312
315
|
threading: { scopedAccountReplyToMode: {
|
|
313
316
|
resolveAccount: (cfg, accountId) => resolveWhatsAppAccount({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappPlugin } from "./channel-
|
|
1
|
+
import { t as whatsappPlugin } from "./channel-B17Hy8-W.js";
|
|
2
2
|
export { whatsappPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as handleWhatsAppAction } from "./action-runtime-
|
|
3
|
-
import "./normalize-
|
|
1
|
+
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-nXxC_hxG.js";
|
|
2
|
+
import { t as handleWhatsAppAction } from "./action-runtime-bsQE9CuK.js";
|
|
3
|
+
import "./normalize-Y3eBdM8a.js";
|
|
4
4
|
import { readStringOrNumberParam, readStringParam as readStringParam$1, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
//#region extensions/whatsapp/src/channel-react-action.ts
|
|
6
6
|
const WHATSAPP_CHANNEL = "whatsapp";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { startWebLoginWithQr as startWebLoginWithQr$1, waitForWebLogin as waitForWebLogin$1 } from "./login-qr-runtime.js";
|
|
2
2
|
import { a as getWebAuthAgeMs$1, b as webAuthExists$1, d as readWebAuthExistsForDecision$1, f as readWebAuthSnapshot$1, h as readWebSelfId$1, m as readWebAuthState$1, o as logWebSelfId$1, p as readWebAuthSnapshotBestEffort$1, s as logoutWeb$1, u as readWebAuthExistsBestEffort$1 } from "./auth-store-BjCb50Ry.js";
|
|
3
3
|
import { t as getActiveWebListener$1 } from "./active-listener-N7GFKsuN.js";
|
|
4
|
-
import { t as monitorWebChannel$1 } from "./monitor-
|
|
4
|
+
import { t as monitorWebChannel$1 } from "./monitor-Ce7y4e_6.js";
|
|
5
5
|
import { t as loginWeb$1 } from "./login-ytUQ-aQa.js";
|
|
6
|
-
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-D3xANmE7.js";
|
|
7
7
|
//#region extensions/whatsapp/src/channel.runtime.ts
|
|
8
8
|
function getActiveWebListener(...args) {
|
|
9
9
|
return getActiveWebListener$1(...args);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveWhatsAppGroupToolPolicy, i as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupIntroHint, r as whatsappSetupWizardProxy, t as createWhatsAppPluginBase } from "./shared-
|
|
1
|
+
import { a as resolveWhatsAppGroupToolPolicy, i as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupIntroHint, r as whatsappSetupWizardProxy, t as createWhatsAppPluginBase } from "./shared-zLVJEVKz.js";
|
|
2
2
|
import { m as readWebAuthState } from "./auth-store-BjCb50Ry.js";
|
|
3
3
|
import { t as whatsappSetupAdapter } from "./setup-core-DZKvpzbH.js";
|
|
4
4
|
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-DnCdvoYD.js";
|
package/dist/contract-api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as normalizeWhatsAppTarget$1, t as isWhatsAppGroupJid$1 } from "./normalize-target-nXxC_hxG.js";
|
|
2
2
|
import { t as whatsappCommandPolicy$1 } from "./command-policy-O8sRnqUV.js";
|
|
3
3
|
import { t as resolveLegacyGroupSessionKey$1 } from "./group-session-contract-B8QBn0I2.js";
|
|
4
4
|
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-DqH8JDX6.js";
|
|
5
5
|
import { r as isLegacyGroupSessionKey$1, t as canonicalizeLegacySessionKey$1 } from "./session-contract-B0efQf9P.js";
|
|
6
|
-
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-
|
|
6
|
+
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-BNCbgnmy.js";
|
|
7
7
|
import { t as resolveWhatsAppRuntimeGroupPolicy$1 } from "./runtime-group-policy-Gp1lQ0at.js";
|
|
8
8
|
import { t as __testing } from "./access-control-BQ3tCkH8.js";
|
|
9
9
|
//#region extensions/whatsapp/contract-api.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-RkAeH_Qm.js";
|
|
2
2
|
import { t as resolveMergedWhatsAppAccountConfig } from "./account-config-CNQ33oav.js";
|
|
3
|
-
import {
|
|
4
|
-
import "./normalize-
|
|
3
|
+
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-nXxC_hxG.js";
|
|
4
|
+
import "./normalize-Y3eBdM8a.js";
|
|
5
5
|
import { listResolvedDirectoryGroupEntriesFromMapKeys, listResolvedDirectoryUserEntriesFromAllowFrom } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
6
6
|
//#region extensions/whatsapp/src/directory-config.ts
|
|
7
7
|
var directory_config_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-BNCbgnmy.js";
|
|
2
2
|
export { listWhatsAppDirectoryGroupsFromConfig, listWhatsAppDirectoryPeersFromConfig };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-BDqgpFEB.js";
|
|
2
|
-
import { n as isWhatsAppNewsletterJid, t as isWhatsAppGroupJid$1 } from "./normalize-target-
|
|
2
|
+
import { n as isWhatsAppNewsletterJid, t as isWhatsAppGroupJid$1 } from "./normalize-target-nXxC_hxG.js";
|
|
3
3
|
import { t as resolveWhatsAppReactionLevel } from "./reaction-level-CRVEVAfi.js";
|
|
4
|
-
import "./normalize-
|
|
4
|
+
import "./normalize-Y3eBdM8a.js";
|
|
5
5
|
import { n as getStatusCode, t as formatError } from "./session-errors-CSuKZPub.js";
|
|
6
6
|
import { a as markdownToWhatsApp, i as jidToE164, o as resolveJidToE164, r as isSelfChatMode, s as toWhatsappJid, t as text_runtime_exports } from "./text-runtime-C1zNiZeO.js";
|
|
7
7
|
import { i as prepareWhatsAppOutboundMedia, o as sendWhatsAppOutboundWithRetry, r as normalizeWhatsAppPayloadTextPreservingIndentation, t as normalizeWhatsAppOutboundPayload } from "./outbound-media-contract-CGss_QHy.js";
|
|
8
|
-
import { r as sendReactionWhatsApp } from "./send-
|
|
8
|
+
import { r as sendReactionWhatsApp } from "./send-1CzaHJGH.js";
|
|
9
9
|
import { n as cacheInboundMessageMeta, r as lookupInboundMessageMeta, t as buildQuotedMessageOptions } from "./quoted-message-TENQzyxV.js";
|
|
10
10
|
import { _ as readWebSelfIdentityForDecision, a as getWebAuthAgeMs, h as readWebSelfId, r as WhatsAppAuthUnstableError, s as logoutWeb } from "./auth-store-BjCb50Ry.js";
|
|
11
11
|
import { a as getSelfIdentity, c as resolveComparableIdentity, i as getReplyContext, n as getMentionIdentities, o as getSenderIdentity, r as getPrimaryIdentityId, s as identitiesOverlap, t as getComparableIdentityValues } from "./identity-QHAlV7Fu.js";
|
|
@@ -63,7 +63,18 @@ function normalizeWhatsAppMessagingTarget(raw) {
|
|
|
63
63
|
return normalizeWhatsAppTarget(trimmed) ?? void 0;
|
|
64
64
|
}
|
|
65
65
|
function normalizeWhatsAppAllowFromEntries(allowFrom) {
|
|
66
|
-
|
|
66
|
+
const seen = /* @__PURE__ */ new Set();
|
|
67
|
+
return allowFrom.map((entry) => String(entry).trim()).filter((entry) => Boolean(entry)).map(normalizeWhatsAppAllowFromEntry).filter((entry) => Boolean(entry)).filter((entry) => {
|
|
68
|
+
if (seen.has(entry)) return false;
|
|
69
|
+
seen.add(entry);
|
|
70
|
+
return true;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function normalizeWhatsAppAllowFromEntry(entry) {
|
|
74
|
+
if (entry === "*") return entry;
|
|
75
|
+
const normalized = normalizeWhatsAppTarget(entry);
|
|
76
|
+
if (!normalized) return null;
|
|
77
|
+
return normalized.startsWith("+") ? normalized.slice(1) : normalized;
|
|
67
78
|
}
|
|
68
79
|
function looksLikeWhatsAppTargetId(raw) {
|
|
69
80
|
const trimmed = raw.trim();
|
|
@@ -71,4 +82,4 @@ function looksLikeWhatsAppTargetId(raw) {
|
|
|
71
82
|
return /^whatsapp:/i.test(trimmed) || isWhatsAppGroupJid(trimmed) || isWhatsAppNewsletterJid(trimmed) || isWhatsAppUserTarget(trimmed) || normalizeWhatsAppTarget(trimmed) !== null;
|
|
72
83
|
}
|
|
73
84
|
//#endregion
|
|
74
|
-
export { normalizeWhatsAppAllowFromEntries as a, looksLikeWhatsAppTargetId as i, isWhatsAppNewsletterJid as n,
|
|
85
|
+
export { normalizeWhatsAppAllowFromEntries as a, normalizeWhatsAppTarget as c, looksLikeWhatsAppTargetId as i, isWhatsAppNewsletterJid as n, normalizeWhatsAppAllowFromEntry as o, isWhatsAppUserTarget as r, normalizeWhatsAppMessagingTarget as s, isWhatsAppGroupJid as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-
|
|
1
|
+
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CQ3Y1i0g.js";
|
|
2
2
|
import { n as normalizeWhatsAppPayloadText } from "./outbound-media-contract-CGss_QHy.js";
|
|
3
3
|
import { t as createWhatsAppOutboundBase } from "./outbound-base-Bq1UYEK5.js";
|
|
4
4
|
import { shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -6,7 +6,7 @@ import { chunkText } from "openclaw/plugin-sdk/reply-chunking";
|
|
|
6
6
|
//#region extensions/whatsapp/src/outbound-adapter.ts
|
|
7
7
|
let whatsAppSendModulePromise;
|
|
8
8
|
function loadWhatsAppSendModule() {
|
|
9
|
-
whatsAppSendModulePromise ??= import("./send-
|
|
9
|
+
whatsAppSendModulePromise ??= import("./send-1CzaHJGH.js").then((n) => n.a);
|
|
10
10
|
return whatsAppSendModulePromise;
|
|
11
11
|
}
|
|
12
12
|
function normalizeOutboundText(text) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappOutbound } from "./outbound-adapter-
|
|
1
|
+
import { t as whatsappOutbound } from "./outbound-adapter-CxwUJNMD.js";
|
|
2
2
|
export { whatsappOutbound };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as normalizeWhatsAppTarget, n as isWhatsAppNewsletterJid, t as isWhatsAppGroupJid } from "./normalize-target-nXxC_hxG.js";
|
|
2
2
|
import { missingTargetError } from "openclaw/plugin-sdk/channel-feedback";
|
|
3
3
|
//#region extensions/whatsapp/src/resolve-outbound-target.ts
|
|
4
4
|
function whatsappAllowFromPolicyError(target) {
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-bsQE9CuK.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-1CzaHJGH.js";
|
|
5
5
|
import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
|
|
6
6
|
import { t as createWhatsAppLoginTool } from "./agent-tools-login-DpRxLNRB.js";
|
|
7
7
|
import { n as setWhatsAppRuntime } from "./runtime-6fZ67abR.js";
|
|
@@ -9,7 +9,7 @@ import { C as waitForCredsSaveQueueWithTimeout, S as waitForCredsSaveQueue, _ as
|
|
|
9
9
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-DLGCIbfl.js";
|
|
10
10
|
import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-N7GFKsuN.js";
|
|
11
11
|
import { c as waitForWaConnection, o as createWaSocket, s as newConnectionId } from "./connection-controller-BSdlKQ56.js";
|
|
12
|
-
import { a as loadWebMediaRaw, c as monitorWebInbox, d as extractMediaPlaceholder, f as extractText, i as loadWebMedia, l as extractContactContext, n as LocalMediaAccessError, o as optimizeImageToJpeg, p as resetWebInboundDedupe, r as getDefaultLocalRoots, s as optimizeImageToPng, t as monitorWebChannel, u as extractLocationData } from "./monitor-
|
|
12
|
+
import { a as loadWebMediaRaw, c as monitorWebInbox, d as extractMediaPlaceholder, f as extractText, i as loadWebMedia, l as extractContactContext, n as LocalMediaAccessError, o as optimizeImageToJpeg, p as resetWebInboundDedupe, r as getDefaultLocalRoots, s as optimizeImageToPng, t as monitorWebChannel, u as extractLocationData } from "./monitor-Ce7y4e_6.js";
|
|
13
13
|
import { t as loginWeb } from "./login-ytUQ-aQa.js";
|
|
14
14
|
import { HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, SILENT_REPLY_TOKEN, stripHeartbeatToken } from "openclaw/plugin-sdk/reply-runtime";
|
|
15
15
|
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,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-RkAeH_Qm.js";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-DG18xddX.js";
|
|
3
3
|
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-BDqgpFEB.js";
|
|
4
|
-
import { n as isWhatsAppNewsletterJid } from "./normalize-target-
|
|
4
|
+
import { n as isWhatsAppNewsletterJid } from "./normalize-target-nXxC_hxG.js";
|
|
5
5
|
import { t as getRegisteredWhatsAppConnectionController } from "./connection-controller-registry-D_iIGz5m.js";
|
|
6
|
-
import "./normalize-
|
|
6
|
+
import "./normalize-Y3eBdM8a.js";
|
|
7
7
|
import { a as markdownToWhatsApp, s as toWhatsappJid } from "./text-runtime-C1zNiZeO.js";
|
|
8
8
|
import { a as resolveWhatsAppOutboundMediaUrls, i as prepareWhatsAppOutboundMedia, n as normalizeWhatsAppPayloadText } from "./outbound-media-contract-CGss_QHy.js";
|
|
9
9
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
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-BeGeYs_M.js";
|
|
2
2
|
export { whatsappSetupPlugin };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-DG18xddX.js";
|
|
2
2
|
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-BDqgpFEB.js";
|
|
3
|
+
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-nXxC_hxG.js";
|
|
3
4
|
import { i as formatWhatsAppWebAuthStatusState, m as readWebAuthState } from "./auth-store-BjCb50Ry.js";
|
|
4
5
|
import { t as whatsappSetupAdapter } from "./setup-core-DZKvpzbH.js";
|
|
5
6
|
import path from "node:path";
|
|
6
|
-
import { DEFAULT_ACCOUNT_ID,
|
|
7
|
+
import { DEFAULT_ACCOUNT_ID, pathExists, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
7
8
|
import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
8
9
|
//#region extensions/whatsapp/src/setup-finalize.ts
|
|
9
10
|
function trimPromptText(value) {
|
|
@@ -93,20 +94,20 @@ async function detectWhatsAppLinked(cfg, accountId) {
|
|
|
93
94
|
async function promptWhatsAppOwnerAllowFrom(params) {
|
|
94
95
|
const { prompter, existingAllowFrom } = params;
|
|
95
96
|
await prompter.note("We need the sender/owner number so OpenClaw can allowlist you.", "WhatsApp number");
|
|
96
|
-
const normalized =
|
|
97
|
+
const normalized = normalizeWhatsAppAllowFromEntry(trimPromptText(await prompter.text({
|
|
97
98
|
message: "Your personal WhatsApp number (the phone you will message from)",
|
|
98
99
|
placeholder: "+15555550123",
|
|
99
100
|
initialValue: existingAllowFrom[0],
|
|
100
101
|
validate: (value) => {
|
|
101
102
|
const raw = trimPromptText(value);
|
|
102
103
|
if (!raw) return "Required";
|
|
103
|
-
if (!
|
|
104
|
+
if (!normalizeWhatsAppAllowFromEntry(raw)) return `Invalid number: ${raw}`;
|
|
104
105
|
}
|
|
105
106
|
})));
|
|
106
107
|
if (!normalized) throw new Error("Invalid WhatsApp owner number (expected E.164 after validation).");
|
|
107
108
|
return {
|
|
108
109
|
normalized,
|
|
109
|
-
allowFrom:
|
|
110
|
+
allowFrom: normalizeWhatsAppAllowFromEntries([...existingAllowFrom.filter((item) => item !== "*"), normalized])
|
|
110
111
|
};
|
|
111
112
|
}
|
|
112
113
|
async function applyWhatsAppOwnerAllowlist(params) {
|
|
@@ -129,14 +130,14 @@ function parseWhatsAppAllowFromEntries(raw) {
|
|
|
129
130
|
entries.push("*");
|
|
130
131
|
continue;
|
|
131
132
|
}
|
|
132
|
-
const normalized =
|
|
133
|
+
const normalized = normalizeWhatsAppAllowFromEntry(part);
|
|
133
134
|
if (!normalized) return {
|
|
134
135
|
entries: [],
|
|
135
136
|
invalidEntry: part
|
|
136
137
|
};
|
|
137
138
|
entries.push(normalized);
|
|
138
139
|
}
|
|
139
|
-
return { entries:
|
|
140
|
+
return { entries: normalizeWhatsAppAllowFromEntries(entries) };
|
|
140
141
|
}
|
|
141
142
|
async function promptWhatsAppDmAccess(params) {
|
|
142
143
|
const accountId = params.accountId.trim() || DEFAULT_ACCOUNT_ID;
|
|
@@ -209,7 +210,7 @@ async function promptWhatsAppDmAccess(params) {
|
|
|
209
210
|
let next = setWhatsAppSelfChatMode(params.cfg, accountId, false);
|
|
210
211
|
next = setWhatsAppDmPolicy(next, accountId, policy);
|
|
211
212
|
if (policy === "open") {
|
|
212
|
-
const allowFrom =
|
|
213
|
+
const allowFrom = normalizeWhatsAppAllowFromEntries(["*", ...existingAllowFrom]);
|
|
213
214
|
next = setWhatsAppAllowFrom(next, accountId, allowFrom.length > 0 ? allowFrom : ["*"]);
|
|
214
215
|
return next;
|
|
215
216
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-DG18xddX.js";
|
|
2
2
|
import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-BDqgpFEB.js";
|
|
3
|
-
import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-
|
|
3
|
+
import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-nXxC_hxG.js";
|
|
4
4
|
import { t as WhatsAppChannelConfigSchema } from "./config-schema-Dmo66Ubb.js";
|
|
5
5
|
import { n as whatsappDoctor } from "./doctor-A9tXm9Om.js";
|
|
6
6
|
import { t as resolveLegacyGroupSessionKey } from "./group-session-contract-B8QBn0I2.js";
|
|
@@ -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-CXhHvkmj.js");
|
|
128
128
|
}
|
|
129
129
|
async function loadWhatsAppSetupSurface() {
|
|
130
|
-
return await import("./setup-surface-
|
|
130
|
+
return await import("./setup-surface-D3xANmE7.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 {
|
|
1
|
+
import { c as normalizeWhatsAppTarget, r as isWhatsAppUserTarget, t as isWhatsAppGroupJid } from "./normalize-target-nXxC_hxG.js";
|
|
2
2
|
export { isWhatsAppGroupJid, isWhatsAppUserTarget, normalizeWhatsAppTarget };
|
package/dist/test-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-Gp1lQ0at.js";
|
|
2
|
-
import { t as whatsappOutbound } from "./outbound-adapter-
|
|
2
|
+
import { t as whatsappOutbound } from "./outbound-adapter-CxwUJNMD.js";
|
|
3
3
|
export { resolveWhatsAppRuntimeGroupPolicy, whatsappOutbound };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/whatsapp",
|
|
3
|
-
"version": "2026.5.4
|
|
3
|
+
"version": "2026.5.4",
|
|
4
4
|
"description": "OpenClaw WhatsApp channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"openclaw": "workspace:*"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"openclaw": ">=2026.5.4
|
|
22
|
+
"openclaw": ">=2026.5.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.4
|
|
64
|
+
"pluginApi": ">=2026.5.4"
|
|
65
65
|
},
|
|
66
66
|
"build": {
|
|
67
|
-
"openclawVersion": "2026.5.4
|
|
67
|
+
"openclawVersion": "2026.5.4"
|
|
68
68
|
},
|
|
69
69
|
"release": {
|
|
70
70
|
"publishToClawHub": true,
|