@openclaw/whatsapp 2026.7.1-beta.1 → 2026.7.1-beta.2
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-HPX_j5T4.js → action-runtime-hqza0J8B.js} +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/api.js +8 -5
- package/dist/{approval-handler.runtime-CSpqzpr5.js → approval-handler.runtime-9_SV7vhc.js} +1 -1
- package/dist/{channel-BAj2xDFM.js → channel-fcXxWXic.js} +5 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-Dfn3giuP.js → channel-react-action-Dgy9uUMl.js} +3 -10
- package/dist/{channel.runtime-D_0MiKk3.js → channel.runtime-B4ThooGF.js} +2 -2
- package/dist/{channel.setup-3tEq3gHA.js → channel.setup-C_WEdyJR.js} +1 -1
- package/dist/login-qr-runtime.js +2 -5
- package/dist/{monitor-DnsIesIx.js → monitor-BqkJ4MpT.js} +15 -13
- package/dist/runtime-api.js +4 -4
- package/dist/{send-api-45J-BzEp.js → send-api-DndiBJhN.js} +1 -1
- package/dist/{send-BVzLSkaY.js → send-i8Xk5mBQ.js} +3 -5
- package/dist/{setup-core-BLI8hThs.js → setup-core-KjSBbWX4.js} +2 -2
- package/dist/{setup-finalize-BrZsNK4V.js → setup-finalize-WedNP30s.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-DaVQrr0L.js → setup-surface-IOdkbWsQ.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./action-runtime-hqza0J8B.js";
|
|
2
2
|
export { handleWhatsAppAction };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount } from "./accounts-DgViSyJx.js";
|
|
2
2
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
|
|
3
|
-
import { g as resolveWhatsAppReactionLevel, r as sendReactionWhatsApp } from "./send-
|
|
3
|
+
import { g as resolveWhatsAppReactionLevel, r as sendReactionWhatsApp } from "./send-i8Xk5mBQ.js";
|
|
4
4
|
import { ToolAuthorizationError, createActionGate, jsonResult, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
//#region extensions/whatsapp/src/action-runtime-target-auth.ts
|
|
6
6
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./action-runtime-hqza0J8B.js";
|
|
2
2
|
export { handleWhatsAppAction };
|
package/dist/api.js
CHANGED
|
@@ -2,25 +2,28 @@ import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./acc
|
|
|
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-DgViSyJx.js";
|
|
3
3
|
import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, r as isWhatsAppUserTarget, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
|
|
5
|
-
import "./send-
|
|
5
|
+
import "./send-i8Xk5mBQ.js";
|
|
6
6
|
import { n as getStatusCode, t as formatError } from "./session-errors-CbsoQqoy.js";
|
|
7
7
|
import { n as createWhatsAppSocketOperationTimeoutAdapter, t as DEFAULT_WHATSAPP_SOCKET_TIMING } from "./socket-timing-DvMNkIge.js";
|
|
8
8
|
import { c as assertWebChannel, d as markdownToWhatsApp, h as toWhatsappJidWithLid, l as isSelfChatMode, m as toWhatsappJid, n as normalizeE164, p as resolveJidToE164, r as resolveUserPath, u as jidToE164 } from "./text-runtime-C88QkuU9.js";
|
|
9
|
-
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-
|
|
9
|
+
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-fcXxWXic.js";
|
|
10
10
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
|
|
11
|
-
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-
|
|
11
|
+
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-KjSBbWX4.js";
|
|
12
12
|
import "./config-schema-CROZuhT-.js";
|
|
13
|
-
import { t as whatsappSetupPlugin } from "./channel.setup-
|
|
13
|
+
import { t as whatsappSetupPlugin } from "./channel.setup-C_WEdyJR.js";
|
|
14
14
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
|
|
15
15
|
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-Dijefxc3.js";
|
|
16
16
|
import { n as testing } from "./access-control-88UPniDc.js";
|
|
17
|
-
import { _ as extractLocationData, b as extractText, d as normalizeMessageContent, f as resolveInboundMediaMimetype, h as extractContextInfo, p as describeReplyContext, t as createWebSendApi } from "./send-api-
|
|
17
|
+
import { _ as extractLocationData, b as extractText, d as normalizeMessageContent, f as resolveInboundMediaMimetype, h as extractContextInfo, p as describeReplyContext, t as createWebSendApi } from "./send-api-DndiBJhN.js";
|
|
18
18
|
import { r as waitForWaConnection, t as createWaSocket } from "./session-WU4SVP8f.js";
|
|
19
19
|
import "openclaw/plugin-sdk/channel-actions";
|
|
20
20
|
import "openclaw/plugin-sdk/account-resolution";
|
|
21
21
|
import "openclaw/plugin-sdk/core";
|
|
22
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
22
23
|
import "openclaw/plugin-sdk/account-id";
|
|
23
24
|
import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
|
|
25
|
+
createLazyRuntimeModule(() => import("./channel.runtime-B4ThooGF.js"));
|
|
26
|
+
//#endregion
|
|
24
27
|
//#region extensions/whatsapp/src/qa-driver.runtime.ts
|
|
25
28
|
function isRecord(value) {
|
|
26
29
|
return Boolean(value && typeof value === "object");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as normalizeWhatsAppMessagingTarget } from "./normalize-target-bVWjgftN.js";
|
|
2
|
-
import { f as registerWhatsAppApprovalReactionTarget, i as sendTypingWhatsApp, p as unregisterWhatsAppApprovalReactionTarget, t as sendMessageWhatsApp } from "./send-
|
|
2
|
+
import { f as registerWhatsAppApprovalReactionTarget, i as sendTypingWhatsApp, p as unregisterWhatsAppApprovalReactionTarget, t as sendMessageWhatsApp } from "./send-i8Xk5mBQ.js";
|
|
3
3
|
import "./normalize-Bxwqo-bW.js";
|
|
4
4
|
import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
|
|
5
5
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -2,14 +2,14 @@ import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./acc
|
|
|
2
2
|
import { a as resolveWhatsAppAccount } from "./accounts-DgViSyJx.js";
|
|
3
3
|
import { c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as normalizeWhatsAppAllowFromEntry, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CcdugbDf.js";
|
|
5
|
-
import { a as normalizeWhatsAppOutboundPayload, g as resolveWhatsAppReactionLevel, h as whatsappApprovalAuth, i as sendTypingWhatsApp, m as getWhatsAppApprovalApprovers, n as sendPollWhatsApp, o as normalizeWhatsAppPayloadText, s as normalizeWhatsAppPayloadTextPreservingIndentation, t as sendMessageWhatsApp } from "./send-
|
|
5
|
+
import { a as normalizeWhatsAppOutboundPayload, g as resolveWhatsAppReactionLevel, h as whatsappApprovalAuth, i as sendTypingWhatsApp, m as getWhatsAppApprovalApprovers, n as sendPollWhatsApp, o as normalizeWhatsAppPayloadText, s as normalizeWhatsAppPayloadTextPreservingIndentation, t as sendMessageWhatsApp } from "./send-i8Xk5mBQ.js";
|
|
6
6
|
import "./normalize-Bxwqo-bW.js";
|
|
7
7
|
import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
|
|
8
8
|
import { m as toWhatsappJid } from "./text-runtime-C88QkuU9.js";
|
|
9
9
|
import { t as createWhatsAppLoginTool } from "./agent-tools-login-BX7eHgDm.js";
|
|
10
10
|
import { i as lookupInboundMessageMetaForTarget } from "./quoted-message-CpA_ujXK.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-KjSBbWX4.js";
|
|
13
13
|
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-ECx4h57q.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";
|
|
@@ -20,10 +20,10 @@ import { asString, collectIssuesForEnabledAccounts, createAsyncComputedAccountSt
|
|
|
20
20
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
21
21
|
import { buildChannelOutboundSessionRoute } from "openclaw/plugin-sdk/core";
|
|
22
22
|
import { buildApprovalReactionPromptPayloadForRequest } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
23
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
23
24
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
|
24
25
|
import { buildDmGroupAccountAllowlistAdapter } from "openclaw/plugin-sdk/allowlist-config-edit";
|
|
25
26
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
26
|
-
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
27
27
|
import { createChannelApprovalCapability } from "openclaw/plugin-sdk/approval-delivery-runtime";
|
|
28
28
|
import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
29
29
|
import { createChannelApproverDmTargetResolver, createChannelNativeOriginTargetResolver, createNativeApprovalChannelRouteGates, createNativeApprovalForwardingFallbackSuppressor } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
@@ -205,7 +205,7 @@ const whatsappApprovalCapability = createChannelApprovalCapability({
|
|
|
205
205
|
accountId,
|
|
206
206
|
request
|
|
207
207
|
}),
|
|
208
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
208
|
+
load: async () => (await import("./approval-handler.runtime-9_SV7vhc.js")).whatsappApprovalNativeRuntime
|
|
209
209
|
})
|
|
210
210
|
});
|
|
211
211
|
//#endregion
|
|
@@ -601,7 +601,7 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
601
601
|
//#endregion
|
|
602
602
|
//#region extensions/whatsapp/src/channel.ts
|
|
603
603
|
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-Dijefxc3.js").then((n) => n.t));
|
|
604
|
-
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-
|
|
604
|
+
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-Dgy9uUMl.js"));
|
|
605
605
|
function resolveWhatsAppTargetInfo(raw) {
|
|
606
606
|
const normalized = normalizeWhatsAppTarget(raw);
|
|
607
607
|
if (!normalized) return null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappPlugin } from "./channel-
|
|
1
|
+
import { t as whatsappPlugin } from "./channel-fcXxWXic.js";
|
|
2
2
|
export { whatsappPlugin };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-DgViSyJx.js";
|
|
2
2
|
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-bVWjgftN.js";
|
|
3
|
-
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-
|
|
4
|
-
import { t as sendMessageWhatsApp } from "./send-
|
|
3
|
+
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-hqza0J8B.js";
|
|
4
|
+
import { t as sendMessageWhatsApp } from "./send-i8Xk5mBQ.js";
|
|
5
5
|
import "./normalize-Bxwqo-bW.js";
|
|
6
6
|
import { jsonResult, readStringOrNumberParam, readStringParam as readStringParam$1, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
7
|
+
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
7
8
|
//#region extensions/whatsapp/src/channel-react-action.ts
|
|
8
9
|
const WHATSAPP_CHANNEL = "whatsapp";
|
|
9
10
|
function readUploadFileMediaSource(args) {
|
|
@@ -12,14 +13,6 @@ function readUploadFileMediaSource(args) {
|
|
|
12
13
|
function readUploadFileCaptionText(args) {
|
|
13
14
|
return readStringParam$1(args, "message", { allowEmpty: true }) ?? readStringParam$1(args, "content", { allowEmpty: true }) ?? readStringParam$1(args, "caption", { allowEmpty: true }) ?? "";
|
|
14
15
|
}
|
|
15
|
-
function readBooleanParam(args, key) {
|
|
16
|
-
const value = args[key];
|
|
17
|
-
if (typeof value === "boolean") return value;
|
|
18
|
-
if (typeof value !== "string") return;
|
|
19
|
-
const normalized = value.trim().toLowerCase();
|
|
20
|
-
if (normalized === "true") return true;
|
|
21
|
-
if (normalized === "false") return false;
|
|
22
|
-
}
|
|
23
16
|
function hasUploadFileBufferPayload(args) {
|
|
24
17
|
return readStringParam$1(args, "buffer", { trim: false }) !== void 0;
|
|
25
18
|
}
|
|
@@ -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-ECx4h57q.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-BqkJ4MpT.js";
|
|
5
5
|
import { t as loginWeb$1 } from "./login-8lHwLmXj.js";
|
|
6
|
-
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-IOdkbWsQ.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 resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-
|
|
1
|
+
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-KjSBbWX4.js";
|
|
2
2
|
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-D_BmQUR9.js";
|
|
3
3
|
//#region extensions/whatsapp/src/channel.setup.ts
|
|
4
4
|
async function isWhatsAppAuthConfigured(account) {
|
package/dist/login-qr-runtime.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
1
2
|
//#region extensions/whatsapp/login-qr-runtime.ts
|
|
2
|
-
|
|
3
|
-
function loadLoginQrModule() {
|
|
4
|
-
loginQrModulePromise ??= import("./login-qr-BEZZqrTb.js");
|
|
5
|
-
return loginQrModulePromise;
|
|
6
|
-
}
|
|
3
|
+
const loadLoginQrModule = createLazyRuntimeModule(() => import("./login-qr-BEZZqrTb.js"));
|
|
7
4
|
async function startWebLoginWithQr(...args) {
|
|
8
5
|
const { startWebLoginWithQr: startWebLoginWithQrLocal } = await loadLoginQrModule();
|
|
9
6
|
return await startWebLoginWithQrLocal(...args);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-DgViSyJx.js";
|
|
2
|
-
import { a as normalizeWhatsAppOutboundPayload, c as prepareWhatsAppOutboundMedia, d as maybeResolveWhatsAppApprovalReaction, g as resolveWhatsAppReactionLevel, l as sendWhatsAppOutboundWithRetry, r as sendReactionWhatsApp, s as normalizeWhatsAppPayloadTextPreservingIndentation } from "./send-
|
|
2
|
+
import { a as normalizeWhatsAppOutboundPayload, c as prepareWhatsAppOutboundMedia, d as maybeResolveWhatsAppApprovalReaction, g as resolveWhatsAppReactionLevel, l as sendWhatsAppOutboundWithRetry, r as sendReactionWhatsApp, s as normalizeWhatsAppPayloadTextPreservingIndentation } from "./send-i8Xk5mBQ.js";
|
|
3
3
|
import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
|
|
4
4
|
import { n as getStatusCode, r as getRegisteredWhatsAppConnectionController, t as formatError } from "./session-errors-CbsoQqoy.js";
|
|
5
5
|
import { a as resolveWhatsAppSocketTiming, i as resolveWhatsAppSocketOperationTimeoutMs, n as createWhatsAppSocketOperationTimeoutAdapter, o as withWhatsAppSocketOperationTimeout, r as isWhatsAppSocketOperationTimeoutError } from "./socket-timing-DvMNkIge.js";
|
|
@@ -9,7 +9,7 @@ import { g as readWebSelfId, o as getWebAuthAgeMs, r as WhatsAppAuthUnstableErro
|
|
|
9
9
|
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-CmsTmkKR.js";
|
|
10
10
|
import { n as resolveWhatsAppGroupsConfigPath } from "./group-config-path-BGyzT9Lg.js";
|
|
11
11
|
import { c as requireWhatsAppInboundAdmission, i as resolveWhatsAppInboundPolicy, l as resolveWhatsAppGroupConversationId, o as buildDeprecatedFlatWhatsAppInboundAdmission, r as resolveWhatsAppCommandAuthorized, s as requireAdmittedWhatsAppInboundMessage, t as checkInboundAccessControl } from "./access-control-88UPniDc.js";
|
|
12
|
-
import { _ as extractLocationData, a as mayContainWhatsAppOutboundMention, b as extractText, c as DisconnectReason, d as normalizeMessageContent, f as resolveInboundMediaMimetype, g as extractExternalAdReplyContext, h as extractContextInfo, i as addWhatsAppOutboundMentionsToContent, l as downloadMediaMessage, m as extractContactContext, n as listWhatsAppSendResultMessageIds, o as resolveWhatsAppOutboundMentions, p as describeReplyContext, r as normalizeWhatsAppSendResult, s as addWhatsAppImagePreviewFields, t as createWebSendApi, u as isJidGroup, v as extractMediaPlaceholder, x as hasInboundUserContent, y as extractMentionedJids } from "./send-api-
|
|
12
|
+
import { _ as extractLocationData, a as mayContainWhatsAppOutboundMention, b as extractText, c as DisconnectReason, d as normalizeMessageContent, f as resolveInboundMediaMimetype, g as extractExternalAdReplyContext, h as extractContextInfo, i as addWhatsAppOutboundMentionsToContent, l as downloadMediaMessage, m as extractContactContext, n as listWhatsAppSendResultMessageIds, o as resolveWhatsAppOutboundMentions, p as describeReplyContext, r as normalizeWhatsAppSendResult, s as addWhatsAppImagePreviewFields, t as createWebSendApi, u as isJidGroup, v as extractMediaPlaceholder, x as hasInboundUserContent, y as extractMentionedJids } from "./send-api-DndiBJhN.js";
|
|
13
13
|
import { r as waitForWaConnection, t as createWaSocket } from "./session-WU4SVP8f.js";
|
|
14
14
|
import { t as BufferJSON } from "./session.runtime-CyooSQvj.js";
|
|
15
15
|
import { c as computeBackoff, d as resolveReconnectPolicy, f as sleepWithAbort, l as newConnectionId, n as WHATSAPP_WATCHDOG_TIMEOUT_ERROR, r as WhatsAppConnectionController, s as DEFAULT_RECONNECT_POLICY, u as resolveHeartbeatSeconds } from "./connection-controller-u-tfAFhJ.js";
|
|
@@ -22,6 +22,7 @@ import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
|
22
22
|
import { getChildLogger } from "openclaw/plugin-sdk/logging-core";
|
|
23
23
|
import { resolveMarkdownTableMode as resolveMarkdownTableMode$1 } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
24
24
|
import { createSubsystemLogger, defaultRuntime, formatDurationPrecise, getChildLogger as getChildLogger$1, logVerbose, logVerbose as logVerbose$1, registerUnhandledRejectionHandler, shouldLogVerbose, shouldLogVerbose as shouldLogVerbose$1, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
25
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
25
26
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
26
27
|
import { asDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
27
28
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
@@ -1807,7 +1808,7 @@ async function maybeSendAckReaction(params) {
|
|
|
1807
1808
|
isGroup,
|
|
1808
1809
|
directEnabled,
|
|
1809
1810
|
groupMode,
|
|
1810
|
-
wasMentioned: params.msg.wasMentioned === true,
|
|
1811
|
+
wasMentioned: (params.msg.groupMention?.wasMentioned ?? params.msg.wasMentioned) === true,
|
|
1811
1812
|
groupActivated: activation === "always"
|
|
1812
1813
|
});
|
|
1813
1814
|
if (!shouldSendReaction()) return null;
|
|
@@ -2092,7 +2093,10 @@ async function applyGroupGating(params) {
|
|
|
2092
2093
|
}
|
|
2093
2094
|
});
|
|
2094
2095
|
const effectiveWasMentioned = mentionDecision.effectiveWasMentioned || shouldBypassMention;
|
|
2095
|
-
params.msg.
|
|
2096
|
+
params.msg.groupMention = {
|
|
2097
|
+
wasMentioned: effectiveWasMentioned,
|
|
2098
|
+
requireMention
|
|
2099
|
+
};
|
|
2096
2100
|
if (!shouldBypassMention && requireMention && mentionDecision.shouldSkip) {
|
|
2097
2101
|
if (params.deferMissingMention === true) {
|
|
2098
2102
|
params.logVerbose(`Deferring group mention skip until audio preflight completes in ${conversationId}`);
|
|
@@ -2556,6 +2560,7 @@ async function buildWhatsAppInboundContext(params) {
|
|
|
2556
2560
|
const admission = requireWhatsAppInboundAdmission(params.msg);
|
|
2557
2561
|
const conversationId = admission.conversation.id;
|
|
2558
2562
|
const conversationKind = admission.conversation.kind;
|
|
2563
|
+
const wasMentioned = params.msg.groupMention?.wasMentioned ?? params.msg.wasMentioned;
|
|
2559
2564
|
const inboundHistory = conversationKind === "group" ? buildInboundHistoryFromEntries({
|
|
2560
2565
|
entries: (params.groupHistory ?? []).map((entry) => ({
|
|
2561
2566
|
sender: entry.sender,
|
|
@@ -2612,9 +2617,10 @@ async function buildWhatsAppInboundContext(params) {
|
|
|
2612
2617
|
commandBody: params.commandBody ?? params.msg.payload.body
|
|
2613
2618
|
},
|
|
2614
2619
|
access: {
|
|
2615
|
-
...
|
|
2620
|
+
...wasMentioned !== void 0 ? { mentions: {
|
|
2616
2621
|
canDetectMention: conversationKind === "group",
|
|
2617
|
-
wasMentioned
|
|
2622
|
+
wasMentioned,
|
|
2623
|
+
requireMention: params.msg.groupMention?.requireMention
|
|
2618
2624
|
} } : {},
|
|
2619
2625
|
commands: { authorized: params.commandAuthorized }
|
|
2620
2626
|
},
|
|
@@ -2885,7 +2891,7 @@ async function dispatchWhatsAppBufferedReply(params) {
|
|
|
2885
2891
|
}
|
|
2886
2892
|
},
|
|
2887
2893
|
replyOptions: {
|
|
2888
|
-
suppressTyping: sourceRepliesAreToolOnly && conversationKind === "group" && !params.msg.wasMentioned,
|
|
2894
|
+
suppressTyping: sourceRepliesAreToolOnly && conversationKind === "group" && !(params.msg.groupMention?.wasMentioned ?? params.msg.wasMentioned),
|
|
2889
2895
|
disableBlockStreaming,
|
|
2890
2896
|
...sourceReplyDeliveryMode ? { sourceReplyDeliveryMode } : {},
|
|
2891
2897
|
onModelSelected: params.onModelSelected,
|
|
@@ -3035,7 +3041,7 @@ async function createWhatsAppStatusReactionController(params) {
|
|
|
3035
3041
|
isGroup,
|
|
3036
3042
|
directEnabled,
|
|
3037
3043
|
groupMode,
|
|
3038
|
-
wasMentioned: params.msg.wasMentioned === true,
|
|
3044
|
+
wasMentioned: (params.msg.groupMention?.wasMentioned ?? params.msg.wasMentioned) === true,
|
|
3039
3045
|
groupActivated: activation === "always"
|
|
3040
3046
|
})) return null;
|
|
3041
3047
|
const sender = getSenderIdentity(params.msg);
|
|
@@ -3703,11 +3709,7 @@ function createWebOnMessageHandler(params) {
|
|
|
3703
3709
|
function isNonRetryableWebCloseStatus(statusCode) {
|
|
3704
3710
|
return statusCode === 440;
|
|
3705
3711
|
}
|
|
3706
|
-
|
|
3707
|
-
function loadReplyResolverRuntime() {
|
|
3708
|
-
replyResolverRuntimePromise ??= import("./reply-resolver.runtime-Ded8D58Y.js");
|
|
3709
|
-
return replyResolverRuntimePromise;
|
|
3710
|
-
}
|
|
3712
|
+
const loadReplyResolverRuntime = createLazyRuntimeModule(() => import("./reply-resolver.runtime-Ded8D58Y.js"));
|
|
3711
3713
|
function resolveWebMonitorConfigSnapshot(params) {
|
|
3712
3714
|
const account = resolveWhatsAppAccount({
|
|
3713
3715
|
cfg: params.cfg,
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { o as resolveWebCredsBackupPath, r as hasWebCredsSync, s as resolveWebCredsPath } from "./creds-files-B1kSWtBg.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-hqza0J8B.js";
|
|
3
|
+
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-i8Xk5mBQ.js";
|
|
4
4
|
import { r as setWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
|
|
5
5
|
import { n as getStatusCode, t as formatError } from "./session-errors-CbsoQqoy.js";
|
|
6
6
|
import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
|
|
7
7
|
import { t as createWhatsAppLoginTool } from "./agent-tools-login-BX7eHgDm.js";
|
|
8
8
|
import { C as waitForCredsSaveQueue, T 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, 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, w as waitForCredsSaveQueueWithTimeout, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./auth-store-ECx4h57q.js";
|
|
9
9
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
|
|
10
|
-
import { _ as extractLocationData, b as extractText, m as extractContactContext, v as extractMediaPlaceholder } from "./send-api-
|
|
10
|
+
import { _ as extractLocationData, b as extractText, m as extractContactContext, v as extractMediaPlaceholder } from "./send-api-DndiBJhN.js";
|
|
11
11
|
import { n as newConnectionId, r as waitForWaConnection, t as createWaSocket } from "./session-WU4SVP8f.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-BqkJ4MpT.js";
|
|
14
14
|
import { t as loginWeb } from "./login-8lHwLmXj.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,5 +1,5 @@
|
|
|
1
1
|
import { n as isWhatsAppNewsletterJid } from "./normalize-target-bVWjgftN.js";
|
|
2
|
-
import { u as resolveWhatsAppDocumentFileName } from "./send-
|
|
2
|
+
import { u as resolveWhatsAppDocumentFileName } from "./send-i8Xk5mBQ.js";
|
|
3
3
|
import "./normalize-Bxwqo-bW.js";
|
|
4
4
|
import { h as toWhatsappJidWithLid, m as toWhatsappJid, u as jidToE164 } from "./text-runtime-C88QkuU9.js";
|
|
5
5
|
import { t as buildQuotedMessageOptions } from "./quoted-message-CpA_ujXK.js";
|
|
@@ -20,6 +20,7 @@ import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"
|
|
|
20
20
|
import { normalizePollInput } from "openclaw/plugin-sdk/poll-runtime";
|
|
21
21
|
import { createSubsystemLogger, getChildLogger as getChildLogger$1 } from "openclaw/plugin-sdk/runtime-env";
|
|
22
22
|
import { createApprovalReactionTargetStore, listApprovalReactionBindings, resolveApprovalReactionTarget } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
23
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
23
24
|
import { createResolvedApproverActionAuthAdapter, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
24
25
|
import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
|
|
25
26
|
import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, runFfmpeg } from "openclaw/plugin-sdk/media-runtime";
|
|
@@ -82,7 +83,7 @@ const whatsappApprovalAuth = { authorizeActorAction({ cfg, accountId, senderId,
|
|
|
82
83
|
const PERSISTENT_NAMESPACE = "whatsapp.approval-reactions";
|
|
83
84
|
const PERSISTENT_MAX_ENTRIES = 1e3;
|
|
84
85
|
const DEFAULT_REACTION_TARGET_TTL_MS = 1440 * 60 * 1e3;
|
|
85
|
-
|
|
86
|
+
const resolverRuntimeLoader = createLazyRuntimeModule(() => import("./approval-resolver-e1hAVRRy.js"));
|
|
86
87
|
const whatsappApprovalReactionTargets = createApprovalReactionTargetStore({
|
|
87
88
|
namespace: PERSISTENT_NAMESPACE,
|
|
88
89
|
maxEntries: PERSISTENT_MAX_ENTRIES,
|
|
@@ -91,10 +92,7 @@ const whatsappApprovalReactionTargets = createApprovalReactionTargetStore({
|
|
|
91
92
|
logPersistentError: reportPersistentApprovalReactionError,
|
|
92
93
|
readPersistedTarget
|
|
93
94
|
});
|
|
94
|
-
|
|
95
|
-
resolverRuntimePromise ??= import("./approval-resolver-e1hAVRRy.js");
|
|
96
|
-
return resolverRuntimePromise;
|
|
97
|
-
}
|
|
95
|
+
const loadApprovalResolver = resolverRuntimeLoader;
|
|
98
96
|
function buildReactionTargetKey(params) {
|
|
99
97
|
const accountId = params.accountId.trim();
|
|
100
98
|
const remoteJid = params.remoteJid.trim();
|
|
@@ -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-B4ThooGF.js");
|
|
103
103
|
}
|
|
104
104
|
async function loadWhatsAppSetupSurface() {
|
|
105
|
-
return await import("./setup-surface-
|
|
105
|
+
return await import("./setup-surface-IOdkbWsQ.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-DgViSyJx.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-KjSBbWX4.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-C_WEdyJR.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-WedNP30s.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.7.1-beta.
|
|
3
|
+
"version": "2026.7.1-beta.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/whatsapp",
|
|
9
|
-
"version": "2026.7.1-beta.
|
|
9
|
+
"version": "2026.7.1-beta.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"audio-decode": "2.2.3",
|
|
12
12
|
"baileys": "7.0.0-rc13",
|
|
13
13
|
"typebox": "1.1.39"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.7.1-beta.
|
|
16
|
+
"openclaw": ">=2026.7.1-beta.2"
|
|
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.7.1-beta.
|
|
3
|
+
"version": "2026.7.1-beta.2",
|
|
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.39"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.7.1-beta.
|
|
16
|
+
"openclaw": ">=2026.7.1-beta.2"
|
|
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.7.1-beta.
|
|
59
|
+
"pluginApi": ">=2026.7.1-beta.2"
|
|
60
60
|
},
|
|
61
61
|
"build": {
|
|
62
|
-
"openclawVersion": "2026.7.1-beta.
|
|
62
|
+
"openclawVersion": "2026.7.1-beta.2"
|
|
63
63
|
},
|
|
64
64
|
"release": {
|
|
65
65
|
"publishToClawHub": true,
|