@openclaw/whatsapp 2026.7.2-beta.7 → 2026.8.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/{accounts-CSqLvCY5.js → accounts-BX2fZUyR.js} +1 -1
- package/dist/{action-runtime-BzfDFPbH.js → action-runtime-B4e3XFOY.js} +2 -2
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/{agent-tools-login-DE9MU98T.js → agent-tools-login-BjRpD-JQ.js} +5 -4
- package/dist/api.js +69 -127
- package/dist/{approval-handler.runtime-DrA59QSA.js → approval-handler.runtime-fgGZhALv.js} +4 -4
- package/dist/{approval-reactions-Cu66aYdq.js → approval-reactions-CmtJCxe_.js} +25 -73
- package/dist/auth-presence.js +1 -1
- package/dist/{auth-store-DcEpIOmE.js → auth-store-B_DQIdzp.js} +79 -12
- package/dist/call-tool-api.js +1 -1
- package/dist/{channel-Dg62olhy.js → channel-DJVQHz_V.js} +56 -160
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-J_YtyMGX.js → channel-react-action-d6OacTNj.js} +3 -3
- package/dist/{channel.runtime-BP0xNmLi.js → channel.runtime-RxuNGZ7w.js} +4 -4
- package/dist/channel.setup-Cmvd967u.js +14 -0
- package/dist/{connection-controller-BOB2MVKY.js → connection-controller-CUyZgGpf.js} +2 -3
- package/dist/contract-api.js +2 -3
- package/dist/{creds-files-B1kSWtBg.js → creds-files-W6B3EMZ8.js} +17 -1
- package/dist/{directory-config-DalGrfGN.js → directory-config-Pc4f07wB.js} +3 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +37 -2
- package/dist/{group-session-key-DVMZlO3x.js → group-session-key-DmFc_Cqi.js} +23 -4
- package/dist/light-runtime-api.js +2 -2
- package/dist/{login-CvY2Dhch.js → login-D6_rfxTZ.js} +4 -4
- package/dist/{login-qr-Bncpb6js.js → login-qr-B0VyVSqQ.js} +4 -4
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-CfkaUSL2.js → monitor-BCe5Mm-1.js} +574 -163
- package/dist/{question-reactions-CRsnyoMK.js → question-reactions-D3eAeB0i.js} +29 -78
- package/dist/runtime-api.js +9 -9
- package/dist/runtime-group-policy-DeSRFXEV.js +11 -0
- package/dist/{send-api-7wk6eQyW.js → send-api-DimZST3E.js} +86 -107
- package/dist/{send-D37ddk22.js → send-prK8F7Vj.js} +277 -16
- package/dist/setup-entry.js +1 -8
- package/dist/{setup-finalize-BZucx24W.js → setup-finalize-D3n71Uyx.js} +4 -4
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BkVcd769.js → setup-surface-BCZszf3l.js} +3 -3
- package/dist/{shared-CAxd15bp.js → shared-Dp9M3ZPX.js} +5 -6
- package/dist/{socket-close-DridEuzz.js → socket-close-09FojDO2.js} +4 -10
- package/openclaw.plugin.json +4 -0
- package/package.json +4 -5
- package/skills/wacli/SKILL.md +8 -1
- package/dist/access-control-pZcxTmd5.js +0 -363
- package/dist/approval-resolver-DoeBBt22.js +0 -16
- package/dist/channel.setup-pMwNVkCA.js +0 -19
- package/dist/identity-CPrT5aEU.js +0 -76
- package/dist/legacy-state-migrations-api.js +0 -2
- package/dist/state-migrations-CAMTrs2U.js +0 -33
|
@@ -1,5 +1,33 @@
|
|
|
1
|
+
import { i as isWhatsAppBaileysAuthFileName } from "./creds-files-W6B3EMZ8.js";
|
|
1
2
|
import { t as normalizeCompatibilityConfig$1 } from "./doctor-CwzVXKoE.js";
|
|
2
|
-
import
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileExists } from "openclaw/plugin-sdk/security-runtime";
|
|
6
|
+
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
7
|
+
import { asObjectRecord, defineChannelAliasMigration, definePluginDoctorMigrationFromPlans, hasLegacyAccountStreamingAliases, stripRetiredChannelKeys } from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
8
|
+
//#region extensions/whatsapp/src/state-migrations.ts
|
|
9
|
+
function detectWhatsAppLegacyStateMigrations(params) {
|
|
10
|
+
const targetDir = path.join(params.oauthDir, "whatsapp", DEFAULT_ACCOUNT_ID);
|
|
11
|
+
return (() => {
|
|
12
|
+
try {
|
|
13
|
+
return fs.readdirSync(params.oauthDir, { withFileTypes: true });
|
|
14
|
+
} catch {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
})().flatMap((entry) => {
|
|
18
|
+
if (!entry.isFile() || !isWhatsAppBaileysAuthFileName(entry.name)) return [];
|
|
19
|
+
const sourcePath = path.join(params.oauthDir, entry.name);
|
|
20
|
+
const targetPath = path.join(targetDir, entry.name);
|
|
21
|
+
if (fileExists(targetPath)) return [];
|
|
22
|
+
return [{
|
|
23
|
+
kind: "move",
|
|
24
|
+
label: `WhatsApp auth ${entry.name}`,
|
|
25
|
+
sourcePath,
|
|
26
|
+
targetPath
|
|
27
|
+
}];
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
3
31
|
//#region extensions/whatsapp/src/doctor-contract.ts
|
|
4
32
|
const streamingAliasMigration = defineChannelAliasMigration({
|
|
5
33
|
channelId: "whatsapp",
|
|
@@ -48,4 +76,11 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
48
76
|
});
|
|
49
77
|
}
|
|
50
78
|
//#endregion
|
|
51
|
-
|
|
79
|
+
//#region extensions/whatsapp/doctor-contract-api.ts
|
|
80
|
+
const stateMigrations = [definePluginDoctorMigrationFromPlans({
|
|
81
|
+
id: "whatsapp-legacy-state",
|
|
82
|
+
label: "WhatsApp legacy state",
|
|
83
|
+
resolvePlans: detectWhatsAppLegacyStateMigrations
|
|
84
|
+
})];
|
|
85
|
+
//#endregion
|
|
86
|
+
export { legacyConfigRules, normalizeCompatibilityConfig, stateMigrations };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-BX2fZUyR.js";
|
|
2
2
|
import { c as normalizeWhatsAppTarget } from "./normalize-target-CugRyONv.js";
|
|
3
3
|
import "./normalize-C7Hkc_vE.js";
|
|
4
4
|
import { r as jidToE164 } from "./targets-runtime-TMk0lGuy.js";
|
|
5
5
|
import "./text-runtime-CaKLhowd.js";
|
|
6
|
-
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
7
6
|
import { formatMediaPlaceholderText } from "openclaw/plugin-sdk/channel-inbound";
|
|
7
|
+
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
8
|
+
import { isHostedLidUser, isHostedPnUser, isLidUser, isPnUser } from "baileys";
|
|
8
9
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
9
10
|
//#region extensions/whatsapp/src/approval-auth.ts
|
|
10
11
|
function normalizeWhatsAppApproverId(value) {
|
|
@@ -124,10 +125,28 @@ function lookupInboundMessageMetaForTarget(accountId, targetJid, messageId) {
|
|
|
124
125
|
}
|
|
125
126
|
return matched;
|
|
126
127
|
}
|
|
128
|
+
function resolveQuotedRemoteJid(params) {
|
|
129
|
+
const destinationJid = params.destinationJid?.trim();
|
|
130
|
+
const requestedJid = params.requestedJid?.trim();
|
|
131
|
+
const lookupTargetJid = params.lookupTargetJid?.trim();
|
|
132
|
+
if (!destinationJid || !requestedJid) return params.quotedRemoteJid;
|
|
133
|
+
if (params.quotedRemoteJid !== requestedJid && (!lookupTargetJid || lookupTargetJid !== requestedJid)) return params.quotedRemoteJid;
|
|
134
|
+
const destinationIsPn = isPnUser(destinationJid) || isHostedPnUser(destinationJid);
|
|
135
|
+
const destinationIsLid = isLidUser(destinationJid) || isHostedLidUser(destinationJid);
|
|
136
|
+
const quotedIsPn = isPnUser(params.quotedRemoteJid) || isHostedPnUser(params.quotedRemoteJid);
|
|
137
|
+
const quotedIsLid = isLidUser(params.quotedRemoteJid) || isHostedLidUser(params.quotedRemoteJid);
|
|
138
|
+
return destinationIsPn && quotedIsLid || destinationIsLid && quotedIsPn ? destinationJid : params.quotedRemoteJid;
|
|
139
|
+
}
|
|
127
140
|
function buildQuotedMessageOptions(params) {
|
|
128
141
|
const id = params.messageId?.trim();
|
|
129
|
-
const
|
|
130
|
-
if (!id || !
|
|
142
|
+
const quotedRemoteJid = params.remoteJid?.trim();
|
|
143
|
+
if (!id || !quotedRemoteJid) return;
|
|
144
|
+
const remoteJid = resolveQuotedRemoteJid({
|
|
145
|
+
destinationJid: params.destinationJid,
|
|
146
|
+
lookupTargetJid: params.lookupTargetJid,
|
|
147
|
+
quotedRemoteJid,
|
|
148
|
+
requestedJid: params.requestedJid
|
|
149
|
+
});
|
|
131
150
|
const previewText = [params.messageText, formatMediaPlaceholderText(params.media ? [params.media] : [])].filter(Boolean).join("\n");
|
|
132
151
|
return { quoted: {
|
|
133
152
|
key: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createWhatsAppLoginTool } from "./agent-tools-login-
|
|
2
|
-
import { c as logoutWeb, g as readWebSelfId, l as pickWebChannel, o as getWebAuthAgeMs, s as logWebSelfId, t as WA_WEB_AUTH_DIR, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./auth-store-
|
|
1
|
+
import { t as createWhatsAppLoginTool } from "./agent-tools-login-BjRpD-JQ.js";
|
|
2
|
+
import { c as logoutWeb, g as readWebSelfId, l as pickWebChannel, o as getWebAuthAgeMs, s as logWebSelfId, t as WA_WEB_AUTH_DIR, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./auth-store-B_DQIdzp.js";
|
|
3
3
|
import { t as getActiveWebListener } from "./active-listener-BEjWsCNM.js";
|
|
4
4
|
import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
|
|
5
5
|
export { WA_WEB_AUTH_DIR, createWhatsAppLoginTool, formatError, getActiveWebListener, getStatusCode, getWebAuthAgeMs, logWebSelfId, logoutWeb, pickWebChannel, readWebSelfId, resolveDefaultWebAuthDir, webAuthExists };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
3
|
-
import { b as restoreCredsFromBackupIfNeeded } from "./auth-store-
|
|
4
|
-
import { f as renderQrTerminal, r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-
|
|
5
|
-
import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-
|
|
2
|
+
import { a as resolveWhatsAppAccount } from "./accounts-BX2fZUyR.js";
|
|
3
|
+
import { b as restoreCredsFromBackupIfNeeded } from "./auth-store-B_DQIdzp.js";
|
|
4
|
+
import { f as renderQrTerminal, r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-09FojDO2.js";
|
|
5
|
+
import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-CUyZgGpf.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,9 +1,9 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
2
|
-
import { c as logoutWeb, f as readWebAuthExistsForDecision, g as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-BX2fZUyR.js";
|
|
2
|
+
import { c as logoutWeb, f as readWebAuthExistsForDecision, g as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-B_DQIdzp.js";
|
|
3
3
|
import { t as getActiveWebListener } from "./active-listener-BEjWsCNM.js";
|
|
4
|
-
import { r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-
|
|
4
|
+
import { r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-09FojDO2.js";
|
|
5
5
|
import { t as formatError } from "./session-errors-JuazczrA.js";
|
|
6
|
-
import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-
|
|
6
|
+
import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-CUyZgGpf.js";
|
|
7
7
|
import { logInfo } from "openclaw/plugin-sdk/logging-core";
|
|
8
8
|
import { danger, defaultRuntime, info, success } from "openclaw/plugin-sdk/runtime-env";
|
|
9
9
|
import { renderQrPngDataUrl } from "openclaw/plugin-sdk/media-runtime";
|
package/dist/login-qr-runtime.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
2
2
|
//#region extensions/whatsapp/login-qr-runtime.ts
|
|
3
|
-
const loadLoginQrModule = createLazyRuntimeModule(() => import("./login-qr-
|
|
3
|
+
const loadLoginQrModule = createLazyRuntimeModule(() => import("./login-qr-B0VyVSqQ.js"));
|
|
4
4
|
async function startWebLoginWithQr(...args) {
|
|
5
5
|
const { startWebLoginWithQr: startWebLoginWithQrLocal } = await loadLoginQrModule();
|
|
6
6
|
return await startWebLoginWithQrLocal(...args);
|