@openclaw/whatsapp 2026.5.14-beta.1 → 2026.5.14-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/{access-control-BEpPB-Jx.js → access-control-Di_o41dj.js} +1 -1
- package/dist/api.js +8 -8
- package/dist/{auth-store-_ScMvp7r.js → auth-store-DpwdTmoO.js} +1 -1
- package/dist/{channel-yIjmVwof.js → channel-By9xwZ6O.js} +5 -6
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-Dc5rfgsF.js → channel.runtime-DfdgaaVG.js} +5 -5
- package/dist/{channel.setup-KnsEGgS2.js → channel.setup-D6lbUvfP.js} +3 -4
- package/dist/{connection-controller-CT8NA6Zf.js → connection-controller-DVOzuzJk.js} +2 -2
- package/dist/constants.js +1 -1
- package/dist/contract-api.js +3 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/legacy-state-migrations-api.js +1 -1
- package/dist/light-runtime-api.js +2 -2
- package/dist/{login-B_pa3YAU.js → login-Du1MplXB.js} +3 -3
- package/dist/{login-qr-C33im-qS.js → login-qr-Bfsxe1bh.js} +3 -3
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-DTi0QRV4.js → monitor-Cd30Pnkz.js} +59 -11
- package/dist/outbound-payload-test-api.js +1 -1
- package/dist/runtime-api.js +7 -7
- package/dist/{session-ZZQKkOTz.js → session-lrTa-USS.js} +2 -2
- package/dist/{shared-B2VGBfCy.js → setup-core-CraEyjEG.js} +48 -3
- package/dist/{setup-finalize-C1S1U-hY.js → setup-finalize-DTWoYzBv.js} +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BbwSSEsy.js → setup-surface-BW2z_2Oc.js} +2 -2
- package/dist/test-api.js +2 -2
- package/package.json +5 -5
- package/dist/setup-core-DZKvpzbH.js +0 -46
- /package/dist/{active-listener-DTbKS-j-.js → active-listener-D2NHQ5Og.js} +0 -0
- /package/dist/{audio-preflight.runtime-MmkB-pgX.js → audio-preflight.runtime-CIFjeaEN.js} +0 -0
- /package/dist/{channel-react-action-C1wufQtL.js → channel-react-action-DakXTHIg.js} +0 -0
- /package/dist/{constants-DLGCIbfl.js → constants-yKXGCGU9.js} +0 -0
- /package/dist/{directory-config-CE74HYlw.js → directory-config-ClsMAYen.js} +0 -0
- /package/dist/{outbound-adapter-Bs0e4qVd.js → outbound-adapter-B8fD5esZ.js} +0 -0
- /package/dist/{reply-resolver.runtime-rIVWohXr.js → reply-resolver.runtime-CROyXXQh.js} +0 -0
- /package/dist/{runtime-group-policy-Gp1lQ0at.js → runtime-group-policy-BH_U23qp.js} +0 -0
- /package/dist/{send-api-DD93aPIQ.js → send-api-DYiQpIng.js} +0 -0
- /package/dist/{session.runtime-CZQ0ycCg.js → session.runtime-BxyATGX0.js} +0 -0
- /package/dist/{state-migrations-Bm0S67yH.js → state-migrations-CtdIArlK.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount } from "./accounts-B4oR6Dhx.js";
|
|
2
2
|
import { l as isSelfChatMode, n as normalizeE164 } from "./text-runtime-CMxQczvs.js";
|
|
3
3
|
import { a as getSelfIdentity, o as getSenderIdentity } from "./identity-BNDkpR8N.js";
|
|
4
|
-
import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-
|
|
4
|
+
import { t as resolveWhatsAppRuntimeGroupPolicy } from "./runtime-group-policy-BH_U23qp.js";
|
|
5
5
|
import { defaultRuntime } from "openclaw/plugin-sdk/runtime-env";
|
|
6
6
|
import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
|
|
7
7
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
package/dist/api.js
CHANGED
|
@@ -5,17 +5,17 @@ import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-BK
|
|
|
5
5
|
import "./reaction-level-2m9sWGCw.js";
|
|
6
6
|
import { c as assertWebChannel, d as markdownToWhatsApp, f as resolveJidToE164, l as isSelfChatMode, m as toWhatsappJidWithLid, n as normalizeE164, p as toWhatsappJid, r as resolveUserPath, u as jidToE164 } from "./text-runtime-CMxQczvs.js";
|
|
7
7
|
import "./send-DBfXQDd4.js";
|
|
8
|
-
import { t as whatsappPlugin } from "./channel-
|
|
8
|
+
import { t as whatsappPlugin } from "./channel-By9xwZ6O.js";
|
|
9
9
|
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS } from "./outbound-base-BgtywpNm.js";
|
|
10
10
|
import { t as whatsappCommandPolicy } from "./command-policy-O8sRnqUV.js";
|
|
11
|
-
import { a as
|
|
11
|
+
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint } from "./setup-core-CraEyjEG.js";
|
|
12
12
|
import "./config-schema-Dmo66Ubb.js";
|
|
13
|
-
import { t as whatsappSetupPlugin } from "./channel.setup-
|
|
14
|
-
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-
|
|
15
|
-
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-
|
|
16
|
-
import { t as __testing } from "./access-control-
|
|
17
|
-
import { p as extractText, t as createWebSendApi } from "./send-api-
|
|
18
|
-
import { r as waitForWaConnection, t as createWaSocket } from "./session-
|
|
13
|
+
import { t as whatsappSetupPlugin } from "./channel.setup-D6lbUvfP.js";
|
|
14
|
+
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-yKXGCGU9.js";
|
|
15
|
+
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-ClsMAYen.js";
|
|
16
|
+
import { t as __testing } from "./access-control-Di_o41dj.js";
|
|
17
|
+
import { p as extractText, t as createWebSendApi } from "./send-api-DYiQpIng.js";
|
|
18
|
+
import { r as waitForWaConnection, t as createWaSocket } from "./session-lrTa-USS.js";
|
|
19
19
|
import "openclaw/plugin-sdk/channel-actions";
|
|
20
20
|
import "openclaw/plugin-sdk/account-resolution";
|
|
21
21
|
import "openclaw/plugin-sdk/core";
|
|
@@ -14,7 +14,7 @@ const CREDS_FILE_MODE = 384;
|
|
|
14
14
|
const CREDS_SAVE_FLUSH_TIMEOUT_MS = 15e3;
|
|
15
15
|
const credsSaveQueues = /* @__PURE__ */ new Map();
|
|
16
16
|
async function stringifyCreds(creds) {
|
|
17
|
-
const { BufferJSON } = await import("./session.runtime-
|
|
17
|
+
const { BufferJSON } = await import("./session.runtime-BxyATGX0.js").then((n) => n.a);
|
|
18
18
|
return JSON.stringify(creds, BufferJSON.replacer);
|
|
19
19
|
}
|
|
20
20
|
async function writeCredsJsonAtomically(authDir, creds) {
|
|
@@ -10,10 +10,9 @@ import { t as createWhatsAppLoginTool } from "./agent-tools-login-DpRxLNRB.js";
|
|
|
10
10
|
import { t as createWhatsAppOutboundBase } from "./outbound-base-BgtywpNm.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
|
|
14
|
-
import { d as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-Bm0S67yH.js";
|
|
13
|
+
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-CraEyjEG.js";
|
|
14
|
+
import { d as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DpwdTmoO.js";
|
|
15
|
+
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-CtdIArlK.js";
|
|
17
16
|
import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
|
|
18
17
|
import { asString, collectIssuesForEnabledAccounts, createAsyncComputedAccountStatusAdapter, createDefaultChannelRuntimeState, isRecord } from "openclaw/plugin-sdk/status-helpers";
|
|
19
18
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
@@ -322,8 +321,8 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
322
321
|
}
|
|
323
322
|
//#endregion
|
|
324
323
|
//#region extensions/whatsapp/src/channel.ts
|
|
325
|
-
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-
|
|
326
|
-
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-
|
|
324
|
+
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-ClsMAYen.js").then((n) => n.t));
|
|
325
|
+
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-DakXTHIg.js"));
|
|
327
326
|
function parseWhatsAppExplicitTarget(raw) {
|
|
328
327
|
const normalized = normalizeWhatsAppTarget(raw);
|
|
329
328
|
if (!normalized) return null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappPlugin } from "./channel-
|
|
1
|
+
import { t as whatsappPlugin } from "./channel-By9xwZ6O.js";
|
|
2
2
|
export { whatsappPlugin };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { startWebLoginWithQr as startWebLoginWithQr$1, waitForWebLogin as waitForWebLogin$1 } from "./login-qr-runtime.js";
|
|
2
|
-
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-
|
|
3
|
-
import { t as getActiveWebListener$1 } from "./active-listener-
|
|
4
|
-
import { t as monitorWebChannel$1 } from "./monitor-
|
|
5
|
-
import { t as loginWeb$1 } from "./login-
|
|
6
|
-
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-
|
|
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-DpwdTmoO.js";
|
|
3
|
+
import { t as getActiveWebListener$1 } from "./active-listener-D2NHQ5Og.js";
|
|
4
|
+
import { t as monitorWebChannel$1 } from "./monitor-Cd30Pnkz.js";
|
|
5
|
+
import { t as loginWeb$1 } from "./login-Du1MplXB.js";
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-BW2z_2Oc.js";
|
|
7
7
|
//#region extensions/whatsapp/src/channel.runtime.ts
|
|
8
8
|
function getActiveWebListener(...args) {
|
|
9
9
|
return getActiveWebListener$1(...args);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { m as readWebAuthState } from "./auth-store-
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-Bm0S67yH.js";
|
|
1
|
+
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, s as resolveWhatsAppGroupIntroHint, t as whatsappSetupAdapter } from "./setup-core-CraEyjEG.js";
|
|
2
|
+
import { m as readWebAuthState } from "./auth-store-DpwdTmoO.js";
|
|
3
|
+
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-CtdIArlK.js";
|
|
5
4
|
//#region extensions/whatsapp/src/channel.setup.ts
|
|
6
5
|
const whatsappSetupPlugin = {
|
|
7
6
|
...createWhatsAppPluginBase({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as registerWhatsAppConnectionController, r as unregisterWhatsAppConnectionController } from "./connection-controller-registry-D_iIGz5m.js";
|
|
2
2
|
import { n as getStatusCode, t as formatError } from "./session-errors-CSuKZPub.js";
|
|
3
|
-
import { s as logoutWeb } from "./auth-store-
|
|
4
|
-
import { r as waitForWaConnection, t as createWaSocket } from "./session-
|
|
3
|
+
import { s as logoutWeb } from "./auth-store-DpwdTmoO.js";
|
|
4
|
+
import { r as waitForWaConnection, t as createWaSocket } from "./session-lrTa-USS.js";
|
|
5
5
|
import { computeBackoff, info, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
6
6
|
import { clamp } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
7
7
|
import { DisconnectReason } from "baileys";
|
package/dist/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-
|
|
1
|
+
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-yKXGCGU9.js";
|
|
2
2
|
export { DEFAULT_WEB_MEDIA_BYTES };
|
package/dist/contract-api.js
CHANGED
|
@@ -3,9 +3,9 @@ import { t as whatsappCommandPolicy$1 } from "./command-policy-O8sRnqUV.js";
|
|
|
3
3
|
import { t as resolveLegacyGroupSessionKey$1 } from "./group-session-contract-DdqigLJl.js";
|
|
4
4
|
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-CvfWex9e.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-
|
|
7
|
-
import { t as resolveWhatsAppRuntimeGroupPolicy$1 } from "./runtime-group-policy-
|
|
8
|
-
import { t as __testing } from "./access-control-
|
|
6
|
+
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-ClsMAYen.js";
|
|
7
|
+
import { t as resolveWhatsAppRuntimeGroupPolicy$1 } from "./runtime-group-policy-BH_U23qp.js";
|
|
8
|
+
import { t as __testing } from "./access-control-Di_o41dj.js";
|
|
9
9
|
//#region extensions/whatsapp/contract-api.ts
|
|
10
10
|
const canonicalizeLegacySessionKey = canonicalizeLegacySessionKey$1;
|
|
11
11
|
const isLegacyGroupSessionKey = isLegacyGroupSessionKey$1;
|
|
@@ -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-ClsMAYen.js";
|
|
2
2
|
export { listWhatsAppDirectoryGroupsFromConfig, listWhatsAppDirectoryPeersFromConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-
|
|
1
|
+
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-CtdIArlK.js";
|
|
2
2
|
export { detectWhatsAppLegacyStateMigrations };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as getStatusCode, t as formatError } from "./session-errors-CSuKZPub.js";
|
|
2
2
|
import { t as createWhatsAppLoginTool } from "./agent-tools-login-DpRxLNRB.js";
|
|
3
|
-
import { a as getWebAuthAgeMs, b as webAuthExists, c as pickWebChannel, h as readWebSelfId, o as logWebSelfId, s as logoutWeb, t as WA_WEB_AUTH_DIR } from "./auth-store-
|
|
4
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
3
|
+
import { a as getWebAuthAgeMs, b as webAuthExists, c as pickWebChannel, h as readWebSelfId, o as logWebSelfId, s as logoutWeb, t as WA_WEB_AUTH_DIR } from "./auth-store-DpwdTmoO.js";
|
|
4
|
+
import { t as getActiveWebListener } from "./active-listener-D2NHQ5Og.js";
|
|
5
5
|
export { WA_WEB_AUTH_DIR, createWhatsAppLoginTool, formatError, getActiveWebListener, getStatusCode, getWebAuthAgeMs, logWebSelfId, logoutWeb, pickWebChannel, readWebSelfId, webAuthExists };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
2
|
import { a as resolveWhatsAppAccount } from "./accounts-B4oR6Dhx.js";
|
|
3
|
-
import { y as restoreCredsFromBackupIfNeeded } from "./auth-store-
|
|
4
|
-
import { a as renderQrTerminal, i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-
|
|
5
|
-
import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-
|
|
3
|
+
import { y as restoreCredsFromBackupIfNeeded } from "./auth-store-DpwdTmoO.js";
|
|
4
|
+
import { a as renderQrTerminal, i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-lrTa-USS.js";
|
|
5
|
+
import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-DVOzuzJk.js";
|
|
6
6
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
7
7
|
import { logInfo } from "openclaw/plugin-sdk/logging-core";
|
|
8
8
|
import { danger, defaultRuntime, success } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount } from "./accounts-B4oR6Dhx.js";
|
|
2
|
-
import { d as readWebAuthExistsForDecision, h as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-
|
|
3
|
-
import { i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-
|
|
4
|
-
import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-
|
|
2
|
+
import { d as readWebAuthExistsForDecision, h as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DpwdTmoO.js";
|
|
3
|
+
import { i as resolveWhatsAppSocketTiming, t as createWaSocket } from "./session-lrTa-USS.js";
|
|
4
|
+
import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-DVOzuzJk.js";
|
|
5
5
|
import { logInfo } from "openclaw/plugin-sdk/logging-core";
|
|
6
6
|
import { danger, defaultRuntime, info, success } from "openclaw/plugin-sdk/runtime-env";
|
|
7
7
|
import { renderQrPngDataUrl } from "openclaw/plugin-sdk/media-runtime";
|
package/dist/login-qr-runtime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region extensions/whatsapp/login-qr-runtime.ts
|
|
2
2
|
let loginQrModulePromise = null;
|
|
3
3
|
function loadLoginQrModule() {
|
|
4
|
-
loginQrModulePromise ??= import("./login-qr-
|
|
4
|
+
loginQrModulePromise ??= import("./login-qr-Bfsxe1bh.js");
|
|
5
5
|
return loginQrModulePromise;
|
|
6
6
|
}
|
|
7
7
|
async function startWebLoginWithQr(...args) {
|
|
@@ -6,12 +6,12 @@ import { d as markdownToWhatsApp, f as resolveJidToE164, l as isSelfChatMode, n
|
|
|
6
6
|
import { i as prepareWhatsAppOutboundMedia, o as sendWhatsAppOutboundWithRetry, r as normalizeWhatsAppPayloadTextPreservingIndentation, t as normalizeWhatsAppOutboundPayload } from "./outbound-media-contract-zq9aNgT8.js";
|
|
7
7
|
import { r as sendReactionWhatsApp } from "./send-DBfXQDd4.js";
|
|
8
8
|
import { n as cacheInboundMessageMeta, r as lookupInboundMessageMeta, t as buildQuotedMessageOptions } from "./quoted-message-BQsRXnac.js";
|
|
9
|
-
import { _ as readWebSelfIdentityForDecision, a as getWebAuthAgeMs, h as readWebSelfId, r as WhatsAppAuthUnstableError, s as logoutWeb } from "./auth-store-
|
|
9
|
+
import { _ as readWebSelfIdentityForDecision, a as getWebAuthAgeMs, h as readWebSelfId, r as WhatsAppAuthUnstableError, s as logoutWeb } from "./auth-store-DpwdTmoO.js";
|
|
10
10
|
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-BNDkpR8N.js";
|
|
11
|
-
import { i as resolveWhatsAppInboundPolicy, n as checkInboundAccessControl, r as resolveWhatsAppCommandAuthorized } from "./access-control-
|
|
12
|
-
import { a as mayContainWhatsAppOutboundMention, c as extractContactContext, d as extractMediaPlaceholder, f as extractMentionedJids, i as addWhatsAppOutboundMentionsToContent, l as extractContextInfo, m as hasInboundUserContent, n as listWhatsAppSendResultMessageIds, o as resolveWhatsAppOutboundMentions, p as extractText, r as normalizeWhatsAppSendResult, s as describeReplyContext, t as createWebSendApi, u as extractLocationData } from "./send-api-
|
|
13
|
-
import { i as resolveWhatsAppSocketTiming, r as waitForWaConnection, t as createWaSocket } from "./session-
|
|
14
|
-
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-
|
|
11
|
+
import { i as resolveWhatsAppInboundPolicy, n as checkInboundAccessControl, r as resolveWhatsAppCommandAuthorized } from "./access-control-Di_o41dj.js";
|
|
12
|
+
import { a as mayContainWhatsAppOutboundMention, c as extractContactContext, d as extractMediaPlaceholder, f as extractMentionedJids, i as addWhatsAppOutboundMentionsToContent, l as extractContextInfo, m as hasInboundUserContent, n as listWhatsAppSendResultMessageIds, o as resolveWhatsAppOutboundMentions, p as extractText, r as normalizeWhatsAppSendResult, s as describeReplyContext, t as createWebSendApi, u as extractLocationData } from "./send-api-DYiQpIng.js";
|
|
13
|
+
import { i as resolveWhatsAppSocketTiming, r as waitForWaConnection, t as createWaSocket } from "./session-lrTa-USS.js";
|
|
14
|
+
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-DVOzuzJk.js";
|
|
15
15
|
import { resolveAccountEntry } from "openclaw/plugin-sdk/account-core";
|
|
16
16
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
17
17
|
import { DEFAULT_TIMING, createAckReactionHandle, createStatusReactionController, logAckFailure, removeAckReactionHandleAfterReply, shouldAckReactionForWhatsApp } from "openclaw/plugin-sdk/channel-feedback";
|
|
@@ -33,7 +33,7 @@ import { formatLocationText, resolveInboundSessionEnvelopeContext } from "opencl
|
|
|
33
33
|
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
34
34
|
import { dispatchReplyWithBufferedBlockDispatcher, finalizeInboundContext, resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime";
|
|
35
35
|
import { createInboundDebouncer, resolveInboundDebounceMs } from "openclaw/plugin-sdk/channel-inbound-debounce";
|
|
36
|
-
import { hasControlCommand, hasControlCommand as hasControlCommand$1, shouldComputeCommandAuthorized } from "openclaw/plugin-sdk/command-detection";
|
|
36
|
+
import { hasControlCommand, hasControlCommand as hasControlCommand$1, isControlCommandMessage, shouldComputeCommandAuthorized } from "openclaw/plugin-sdk/command-detection";
|
|
37
37
|
import { drainPendingDeliveries } from "openclaw/plugin-sdk/delivery-queue-runtime";
|
|
38
38
|
import { DEFAULT_GROUP_HISTORY_LIMIT, buildHistoryContextFromEntries, recordPendingHistoryEntryIfEnabled } from "openclaw/plugin-sdk/reply-history";
|
|
39
39
|
import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
@@ -1780,6 +1780,8 @@ function buildWhatsAppInboundContext(params) {
|
|
|
1780
1780
|
SenderId: params.sender.id ?? params.sender.e164,
|
|
1781
1781
|
SenderE164: params.sender.e164,
|
|
1782
1782
|
CommandAuthorized: params.commandAuthorized,
|
|
1783
|
+
CommandTurn: params.commandTurn,
|
|
1784
|
+
CommandSource: params.commandSource ?? (params.commandTurn?.source === "native" || params.commandTurn?.source === "text" ? params.commandTurn.source : void 0),
|
|
1783
1785
|
ReplyThreading: params.replyThreading,
|
|
1784
1786
|
WasMentioned: params.msg.wasMentioned,
|
|
1785
1787
|
GroupSystemPrompt: params.groupSystemPrompt,
|
|
@@ -1791,6 +1793,33 @@ function buildWhatsAppInboundContext(params) {
|
|
|
1791
1793
|
OriginatingTo: params.msg.from
|
|
1792
1794
|
});
|
|
1793
1795
|
}
|
|
1796
|
+
function normalizeCommandTurnFromContext(value) {
|
|
1797
|
+
if (!value || typeof value !== "object") return;
|
|
1798
|
+
const record = value;
|
|
1799
|
+
const kind = record.kind;
|
|
1800
|
+
const source = record.source;
|
|
1801
|
+
if (kind === "native" && source === "native" && typeof record.authorized === "boolean") return {
|
|
1802
|
+
kind: "native",
|
|
1803
|
+
source: "native",
|
|
1804
|
+
authorized: record.authorized,
|
|
1805
|
+
commandName: typeof record.commandName === "string" ? record.commandName : void 0,
|
|
1806
|
+
body: typeof record.body === "string" ? record.body : void 0
|
|
1807
|
+
};
|
|
1808
|
+
if (kind === "text-slash" && source === "text" && typeof record.authorized === "boolean") return {
|
|
1809
|
+
kind: "text-slash",
|
|
1810
|
+
source: "text",
|
|
1811
|
+
authorized: record.authorized,
|
|
1812
|
+
commandName: typeof record.commandName === "string" ? record.commandName : void 0,
|
|
1813
|
+
body: typeof record.body === "string" ? record.body : void 0
|
|
1814
|
+
};
|
|
1815
|
+
if (kind === "normal" && source === "message") return {
|
|
1816
|
+
kind: "normal",
|
|
1817
|
+
source: "message",
|
|
1818
|
+
authorized: false,
|
|
1819
|
+
commandName: typeof record.commandName === "string" ? record.commandName : void 0,
|
|
1820
|
+
body: typeof record.body === "string" ? record.body : void 0
|
|
1821
|
+
};
|
|
1822
|
+
}
|
|
1794
1823
|
function resolveWhatsAppDmRouteTarget(params) {
|
|
1795
1824
|
if (params.msg.chatType === "group") return;
|
|
1796
1825
|
if (params.senderE164) return params.normalizeE164(params.senderE164) ?? void 0;
|
|
@@ -1835,11 +1864,16 @@ async function dispatchWhatsAppBufferedReply(params) {
|
|
|
1835
1864
|
});
|
|
1836
1865
|
const mediaLocalRoots = getAgentScopedMediaLocalRoots(params.cfg, params.route.agentId);
|
|
1837
1866
|
const sourceReplyChatType = typeof params.context.ChatType === "string" ? params.context.ChatType : params.msg.chatType;
|
|
1867
|
+
const sourceReplyCommandSource = params.context.CommandSource === "native" || params.context.CommandSource === "text" ? params.context.CommandSource : void 0;
|
|
1868
|
+
const sourceReplyCommandTurn = normalizeCommandTurnFromContext(params.context.CommandTurn);
|
|
1869
|
+
const sourceReplyCommandAuthorized = typeof params.context.CommandAuthorized === "boolean" ? params.context.CommandAuthorized : void 0;
|
|
1838
1870
|
const sourceReplyDeliveryMode = sourceReplyChatType === "group" || sourceReplyChatType === "channel" ? resolveChannelMessageSourceReplyDeliveryMode({
|
|
1839
1871
|
cfg: params.cfg,
|
|
1840
1872
|
ctx: {
|
|
1841
1873
|
ChatType: sourceReplyChatType,
|
|
1842
|
-
|
|
1874
|
+
CommandTurn: sourceReplyCommandTurn,
|
|
1875
|
+
CommandSource: sourceReplyCommandSource,
|
|
1876
|
+
CommandAuthorized: sourceReplyCommandAuthorized
|
|
1843
1877
|
}
|
|
1844
1878
|
}) : void 0;
|
|
1845
1879
|
const disableBlockStreaming = sourceReplyDeliveryMode === "message_tool_only" ? true : resolveWhatsAppDisableBlockStreaming(params.cfg);
|
|
@@ -2202,7 +2236,7 @@ async function processMessage(params) {
|
|
|
2202
2236
|
let audioTranscript = params.preflightAudioTranscript ?? void 0;
|
|
2203
2237
|
const hasAudioBody = params.msg.mediaType?.startsWith("audio/") === true && params.msg.body === "<media:audio>";
|
|
2204
2238
|
if (params.preflightAudioTranscript === void 0 && hasAudioBody && params.msg.mediaPath) try {
|
|
2205
|
-
const { transcribeFirstAudio } = await import("./audio-preflight.runtime-
|
|
2239
|
+
const { transcribeFirstAudio } = await import("./audio-preflight.runtime-CIFjeaEN.js");
|
|
2206
2240
|
audioTranscript = await transcribeFirstAudio({
|
|
2207
2241
|
ctx: {
|
|
2208
2242
|
MediaPaths: [params.msg.mediaPath],
|
|
@@ -2320,11 +2354,24 @@ async function processMessage(params) {
|
|
|
2320
2354
|
senderE164: sender.e164 ?? void 0,
|
|
2321
2355
|
normalizeE164
|
|
2322
2356
|
});
|
|
2323
|
-
const
|
|
2357
|
+
const shouldCheckCommandAuth = shouldComputeCommandAuthorized(params.msg.body, params.cfg);
|
|
2358
|
+
const isTextCommand = isControlCommandMessage(params.msg.body, params.cfg);
|
|
2359
|
+
const commandAuthorized = shouldCheckCommandAuth ? await resolveWhatsAppCommandAuthorized({
|
|
2324
2360
|
cfg: params.cfg,
|
|
2325
2361
|
msg: params.msg,
|
|
2326
2362
|
policy: inboundPolicy
|
|
2327
2363
|
}) : void 0;
|
|
2364
|
+
const commandTurn = isTextCommand ? {
|
|
2365
|
+
kind: "text-slash",
|
|
2366
|
+
source: "text",
|
|
2367
|
+
authorized: Boolean(commandAuthorized),
|
|
2368
|
+
body: params.msg.body
|
|
2369
|
+
} : {
|
|
2370
|
+
kind: "normal",
|
|
2371
|
+
source: "message",
|
|
2372
|
+
authorized: false,
|
|
2373
|
+
body: params.msg.body
|
|
2374
|
+
};
|
|
2328
2375
|
const { onModelSelected, ...replyPipeline } = createChannelMessageReplyPipeline({
|
|
2329
2376
|
cfg: params.cfg,
|
|
2330
2377
|
agentId: params.route.agentId,
|
|
@@ -2350,6 +2397,7 @@ async function processMessage(params) {
|
|
|
2350
2397
|
combinedBody,
|
|
2351
2398
|
commandBody: params.msg.body,
|
|
2352
2399
|
commandAuthorized,
|
|
2400
|
+
commandTurn,
|
|
2353
2401
|
conversationId,
|
|
2354
2402
|
groupHistory: visibleGroupHistory,
|
|
2355
2403
|
groupMemberRoster: params.groupMemberNames.get(params.groupHistoryKey),
|
|
@@ -2555,7 +2603,7 @@ function createWebOnMessageHandler(params) {
|
|
|
2555
2603
|
ackAlreadySent = ackReaction !== null;
|
|
2556
2604
|
}
|
|
2557
2605
|
try {
|
|
2558
|
-
const { transcribeFirstAudio } = await import("./audio-preflight.runtime-
|
|
2606
|
+
const { transcribeFirstAudio } = await import("./audio-preflight.runtime-CIFjeaEN.js");
|
|
2559
2607
|
preflightAudioTranscript = await transcribeFirstAudio({
|
|
2560
2608
|
ctx: {
|
|
2561
2609
|
MediaPaths: [msg.mediaPath],
|
|
@@ -2680,7 +2728,7 @@ function isNonRetryableWebCloseStatus(statusCode) {
|
|
|
2680
2728
|
}
|
|
2681
2729
|
let replyResolverRuntimePromise = null;
|
|
2682
2730
|
function loadReplyResolverRuntime() {
|
|
2683
|
-
replyResolverRuntimePromise ??= import("./reply-resolver.runtime-
|
|
2731
|
+
replyResolverRuntimePromise ??= import("./reply-resolver.runtime-CROyXXQh.js");
|
|
2684
2732
|
return replyResolverRuntimePromise;
|
|
2685
2733
|
}
|
|
2686
2734
|
function resolveWebMonitorConfigSnapshot(params) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappOutbound } from "./outbound-adapter-
|
|
1
|
+
import { t as whatsappOutbound } from "./outbound-adapter-B8fD5esZ.js";
|
|
2
2
|
export { whatsappOutbound };
|
package/dist/runtime-api.js
CHANGED
|
@@ -5,12 +5,12 @@ import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsA
|
|
|
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";
|
|
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-
|
|
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-DpwdTmoO.js";
|
|
9
|
+
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-yKXGCGU9.js";
|
|
10
|
+
import { c as extractContactContext, d as extractMediaPlaceholder, p as extractText, u as extractLocationData } from "./send-api-DYiQpIng.js";
|
|
11
|
+
import { n as newConnectionId, r as waitForWaConnection, t as createWaSocket } from "./session-lrTa-USS.js";
|
|
12
|
+
import { n as resolveWebAccountId, t as getActiveWebListener } from "./active-listener-D2NHQ5Og.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-Cd30Pnkz.js";
|
|
14
|
+
import { t as loginWeb } from "./login-Du1MplXB.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,7 +1,7 @@
|
|
|
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-DpwdTmoO.js";
|
|
4
|
+
import { i as makeWASocket, n as fetchLatestBaileysVersion, o as useMultiFileAuthState, r as makeCacheableSignalKeyStore, t as DisconnectReason } from "./session.runtime-BxyATGX0.js";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import { VERSION, formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
7
7
|
import { danger, getChildLogger, success, toPinoLikeLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -15,6 +15,7 @@ import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
|
15
15
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
16
16
|
import { createDelegatedSetupWizardProxy } from "openclaw/plugin-sdk/setup-runtime";
|
|
17
17
|
import { readChannelAllowFromStore } from "openclaw/plugin-sdk/channel-pairing";
|
|
18
|
+
import { applyAccountNameToChannelSection, migrateBaseNameToDefaultAccount, normalizeAccountId as normalizeAccountId$2 } from "openclaw/plugin-sdk/setup";
|
|
18
19
|
//#region extensions/whatsapp/src/config-accessors.ts
|
|
19
20
|
function formatWhatsAppConfigAllowFromEntries(allowFrom) {
|
|
20
21
|
return normalizeWhatsAppAllowFromEntries(allowFrom);
|
|
@@ -124,10 +125,10 @@ function resolveWhatsAppConfigPath(params) {
|
|
|
124
125
|
return `${resolveWhatsAppGroupScopeBasePath(params)}.${params.field}`;
|
|
125
126
|
}
|
|
126
127
|
async function loadWhatsAppChannelRuntime() {
|
|
127
|
-
return await import("./channel.runtime-
|
|
128
|
+
return await import("./channel.runtime-DfdgaaVG.js");
|
|
128
129
|
}
|
|
129
130
|
async function loadWhatsAppSetupSurface() {
|
|
130
|
-
return await import("./setup-surface-
|
|
131
|
+
return await import("./setup-surface-BW2z_2Oc.js");
|
|
131
132
|
}
|
|
132
133
|
const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
|
|
133
134
|
const whatsappConfigAdapter = createScopedChannelConfigAdapter({
|
|
@@ -304,4 +305,48 @@ function createWhatsAppPluginBase(params) {
|
|
|
304
305
|
};
|
|
305
306
|
}
|
|
306
307
|
//#endregion
|
|
307
|
-
|
|
308
|
+
//#region extensions/whatsapp/src/setup-core.ts
|
|
309
|
+
const channel = "whatsapp";
|
|
310
|
+
const whatsappSetupAdapter = {
|
|
311
|
+
resolveAccountId: ({ accountId }) => normalizeAccountId$2(accountId),
|
|
312
|
+
applyAccountName: ({ cfg, accountId, name }) => applyAccountNameToChannelSection({
|
|
313
|
+
cfg,
|
|
314
|
+
channelKey: channel,
|
|
315
|
+
accountId,
|
|
316
|
+
name,
|
|
317
|
+
alwaysUseAccounts: true
|
|
318
|
+
}),
|
|
319
|
+
applyAccountConfig: ({ cfg, accountId, input }) => {
|
|
320
|
+
const next = migrateBaseNameToDefaultAccount({
|
|
321
|
+
cfg: applyAccountNameToChannelSection({
|
|
322
|
+
cfg,
|
|
323
|
+
channelKey: channel,
|
|
324
|
+
accountId,
|
|
325
|
+
name: input.name,
|
|
326
|
+
alwaysUseAccounts: true
|
|
327
|
+
}),
|
|
328
|
+
channelKey: channel,
|
|
329
|
+
alwaysUseAccounts: true
|
|
330
|
+
});
|
|
331
|
+
const entry = {
|
|
332
|
+
...next.channels?.whatsapp?.accounts?.[accountId],
|
|
333
|
+
...input.authDir ? { authDir: input.authDir } : {},
|
|
334
|
+
enabled: true
|
|
335
|
+
};
|
|
336
|
+
return {
|
|
337
|
+
...next,
|
|
338
|
+
channels: {
|
|
339
|
+
...next.channels,
|
|
340
|
+
whatsapp: {
|
|
341
|
+
...next.channels?.whatsapp,
|
|
342
|
+
accounts: {
|
|
343
|
+
...next.channels?.whatsapp?.accounts,
|
|
344
|
+
[accountId]: entry
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
//#endregion
|
|
352
|
+
export { resolveWhatsAppGroupRequireMention as a, resolveWhatsAppMentionStripRegexes as c, whatsappSetupWizardProxy as i, formatWhatsAppConfigAllowFromEntries as l, createWhatsAppPluginBase as n, resolveWhatsAppGroupToolPolicy as o, loadWhatsAppChannelRuntime as r, resolveWhatsAppGroupIntroHint as s, whatsappSetupAdapter as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-DG18xddX.js";
|
|
2
2
|
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-B4oR6Dhx.js";
|
|
3
3
|
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-ePanEpfY.js";
|
|
4
|
-
import { t as whatsappSetupAdapter } from "./setup-core-
|
|
4
|
+
import { t as whatsappSetupAdapter } from "./setup-core-CraEyjEG.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-Du1MplXB.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-D6lbUvfP.js";
|
|
2
2
|
export { whatsappSetupPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as listAccountIds } from "./account-ids-DG18xddX.js";
|
|
2
2
|
import { o as resolveWhatsAppAuthDir } from "./accounts-B4oR6Dhx.js";
|
|
3
|
-
import { i as formatWhatsAppWebAuthStatusState, m as readWebAuthState } from "./auth-store-
|
|
3
|
+
import { i as formatWhatsAppWebAuthStatusState, m as readWebAuthState } from "./auth-store-DpwdTmoO.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-DTWoYzBv.js")).finalizeWhatsAppSetup(params),
|
|
39
39
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
|
|
40
40
|
onAccountRecorded: (accountId, options) => {
|
|
41
41
|
options?.onAccountId?.(channel, accountId);
|
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-BH_U23qp.js";
|
|
2
|
+
import { t as whatsappOutbound } from "./outbound-adapter-B8fD5esZ.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.14-beta.
|
|
3
|
+
"version": "2026.5.14-beta.2",
|
|
4
4
|
"description": "OpenClaw WhatsApp channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"https-proxy-agent": "9.0.0",
|
|
14
14
|
"jimp": "1.6.1",
|
|
15
15
|
"typebox": "1.1.38",
|
|
16
|
-
"undici": "8.
|
|
16
|
+
"undici": "8.3.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@openclaw/plugin-sdk": "workspace:*",
|
|
20
20
|
"openclaw": "workspace:*"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"openclaw": ">=2026.5.14-beta.
|
|
23
|
+
"openclaw": ">=2026.5.14-beta.2"
|
|
24
24
|
},
|
|
25
25
|
"peerDependenciesMeta": {
|
|
26
26
|
"openclaw": {
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"minHostVersion": ">=2026.4.25"
|
|
64
64
|
},
|
|
65
65
|
"compat": {
|
|
66
|
-
"pluginApi": ">=2026.5.14-beta.
|
|
66
|
+
"pluginApi": ">=2026.5.14-beta.2"
|
|
67
67
|
},
|
|
68
68
|
"build": {
|
|
69
|
-
"openclawVersion": "2026.5.14-beta.
|
|
69
|
+
"openclawVersion": "2026.5.14-beta.2"
|
|
70
70
|
},
|
|
71
71
|
"release": {
|
|
72
72
|
"publishToClawHub": true,
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { applyAccountNameToChannelSection, migrateBaseNameToDefaultAccount, normalizeAccountId } from "openclaw/plugin-sdk/setup";
|
|
2
|
-
//#region extensions/whatsapp/src/setup-core.ts
|
|
3
|
-
const channel = "whatsapp";
|
|
4
|
-
const whatsappSetupAdapter = {
|
|
5
|
-
resolveAccountId: ({ accountId }) => normalizeAccountId(accountId),
|
|
6
|
-
applyAccountName: ({ cfg, accountId, name }) => applyAccountNameToChannelSection({
|
|
7
|
-
cfg,
|
|
8
|
-
channelKey: channel,
|
|
9
|
-
accountId,
|
|
10
|
-
name,
|
|
11
|
-
alwaysUseAccounts: true
|
|
12
|
-
}),
|
|
13
|
-
applyAccountConfig: ({ cfg, accountId, input }) => {
|
|
14
|
-
const next = migrateBaseNameToDefaultAccount({
|
|
15
|
-
cfg: applyAccountNameToChannelSection({
|
|
16
|
-
cfg,
|
|
17
|
-
channelKey: channel,
|
|
18
|
-
accountId,
|
|
19
|
-
name: input.name,
|
|
20
|
-
alwaysUseAccounts: true
|
|
21
|
-
}),
|
|
22
|
-
channelKey: channel,
|
|
23
|
-
alwaysUseAccounts: true
|
|
24
|
-
});
|
|
25
|
-
const entry = {
|
|
26
|
-
...next.channels?.whatsapp?.accounts?.[accountId],
|
|
27
|
-
...input.authDir ? { authDir: input.authDir } : {},
|
|
28
|
-
enabled: true
|
|
29
|
-
};
|
|
30
|
-
return {
|
|
31
|
-
...next,
|
|
32
|
-
channels: {
|
|
33
|
-
...next.channels,
|
|
34
|
-
whatsapp: {
|
|
35
|
-
...next.channels?.whatsapp,
|
|
36
|
-
accounts: {
|
|
37
|
-
...next.channels?.whatsapp?.accounts,
|
|
38
|
-
[accountId]: entry
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
//#endregion
|
|
46
|
-
export { whatsappSetupAdapter as t };
|
|
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
|