@openclaw/whatsapp 2026.5.7 → 2026.5.10-beta.1
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-CTj7P7WP.js → access-control-CdP8S3rJ.js} +66 -111
- package/dist/{action-runtime-BqYZmBX_.js → action-runtime-CMhO8liB.js} +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/api.js +120 -12
- package/dist/{auth-store-BNZmNP-s.js → auth-store-CjEimXKX.js} +19 -41
- package/dist/{channel-CTr3YjO8.js → channel-BxntAClG.js} +39 -12
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-BuSTzmDX.js → channel-react-action-DJvzhIPw.js} +1 -1
- package/dist/{channel.runtime-C3i9Svfj.js → channel.runtime-CNdPCK3G.js} +5 -5
- package/dist/{channel.setup-BYtkDwHe.js → channel.setup-BqlcEVzR.js} +4 -4
- package/dist/{connection-controller-BCIuChXD.js → connection-controller-DX2phM7V.js} +6 -197
- package/dist/constants.js +1 -1
- package/dist/contract-api.js +7 -7
- package/dist/{directory-config-BNCbgnmy.js → directory-config-o-muXLgk.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{identity-DhaC0MoD.js → identity-KxdJfH7p.js} +1 -1
- package/dist/legacy-session-surface-api.js +1 -1
- package/dist/legacy-state-migrations-api.js +1 -1
- package/dist/light-runtime-api.js +3 -3
- package/dist/{login-DSUTCcJ7.js → login-DV99D0IN.js} +4 -3
- package/dist/{login-qr-dfs8tfGo.js → login-qr-cKndAXTv.js} +3 -2
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-C5_C_RGJ.js → monitor-mfy3Mmq-.js} +111 -687
- package/dist/{outbound-adapter-CbR17Ehj.js → outbound-adapter-B9ZW8sht.js} +3 -3
- package/dist/{outbound-base-BmzhutvF.js → outbound-base-MVpg2zU2.js} +8 -3
- package/dist/{outbound-media-contract-BPdOq7Hb.js → outbound-media-contract-BzWwBppP.js} +37 -41
- package/dist/outbound-payload-test-api.js +1 -1
- package/dist/{quoted-message-BXs55Teh.js → quoted-message-DQ6hAr34.js} +1 -1
- package/dist/runtime-api.js +11 -10
- package/dist/security-contract-api.js +1 -1
- package/dist/send-api-DsbCqDre.js +697 -0
- package/dist/{send-CxctcFGT.js → send-u88yh8Hw.js} +2 -3
- package/dist/session-DeIU_vjJ.js +198 -0
- package/dist/{session.runtime-C1eSE_KK.js → session.runtime-B9VlYnWQ.js} +1 -1
- package/dist/{setup-surface-CF3l3gEZ.js → setup-finalize-D3YuMUBs.js} +5 -52
- package/dist/setup-plugin-api.js +1 -1
- package/dist/setup-surface-CHjYlKJc.js +45 -0
- package/dist/{shared-CTSTwprn.js → shared-CgYT3IzU.js} +7 -7
- package/dist/{state-migrations-DnCdvoYD.js → state-migrations-CtdIArlK.js} +2 -1
- package/dist/test-api.js +2 -2
- package/dist/{text-runtime-DFFwk5z6.js → text-runtime-DBKC9uEi.js} +27 -2
- package/package.json +6 -6
- package/dist/rolldown-runtime-RkAeH_Qm.js +0 -27
- /package/dist/{active-listener-N7GFKsuN.js → active-listener-D2NHQ5Og.js} +0 -0
- /package/dist/{agent-tools-login-DpRxLNRB.js → agent-tools-login-DYKYW5Nh.js} +0 -0
- /package/dist/{audio-preflight.runtime-Bcdsl_ri.js → audio-preflight.runtime-CIFjeaEN.js} +0 -0
- /package/dist/{command-policy-O8sRnqUV.js → command-policy-BgZRZ31o.js} +0 -0
- /package/dist/{config-schema-Dmo66Ubb.js → config-schema-cSC7M4YA.js} +0 -0
- /package/dist/{constants-DLGCIbfl.js → constants-yKXGCGU9.js} +0 -0
- /package/dist/{doctor-A9tXm9Om.js → doctor-BrgepDUP.js} +0 -0
- /package/dist/{group-session-contract-B8QBn0I2.js → group-session-contract-DL-SLclv.js} +0 -0
- /package/dist/{reply-resolver.runtime-BRCgoO4C.js → reply-resolver.runtime-CROyXXQh.js} +0 -0
- /package/dist/{runtime-6fZ67abR.js → runtime-DdodQB8G.js} +0 -0
- /package/dist/{runtime-group-policy-Gp1lQ0at.js → runtime-group-policy-BH_U23qp.js} +0 -0
- /package/dist/{security-contract-DqH8JDX6.js → security-contract-BzlZFreO.js} +0 -0
- /package/dist/{session-contract-B0efQf9P.js → session-contract-BNUscPf4.js} +0 -0
- /package/dist/{setup-core-DZKvpzbH.js → setup-core-DnhO0PjG.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-CQ3Y1i0g.js";
|
|
2
|
-
import { n as normalizeWhatsAppPayloadText } from "./outbound-media-contract-
|
|
3
|
-
import { t as createWhatsAppOutboundBase } from "./outbound-base-
|
|
2
|
+
import { n as normalizeWhatsAppPayloadText } from "./outbound-media-contract-BzWwBppP.js";
|
|
3
|
+
import { t as createWhatsAppOutboundBase } from "./outbound-base-MVpg2zU2.js";
|
|
4
4
|
import { shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
5
5
|
import { chunkText } from "openclaw/plugin-sdk/reply-chunking";
|
|
6
6
|
//#region extensions/whatsapp/src/outbound-adapter.ts
|
|
7
7
|
let whatsAppSendModulePromise;
|
|
8
8
|
function loadWhatsAppSendModule() {
|
|
9
|
-
whatsAppSendModulePromise ??= import("./send-
|
|
9
|
+
whatsAppSendModulePromise ??= import("./send-u88yh8Hw.js").then((n) => n.a);
|
|
10
10
|
return whatsAppSendModulePromise;
|
|
11
11
|
}
|
|
12
12
|
function normalizeOutboundText(text) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as toWhatsappJid } from "./text-runtime-
|
|
2
|
-
import { n as normalizeWhatsAppPayloadText, t as normalizeWhatsAppOutboundPayload } from "./outbound-media-contract-
|
|
3
|
-
import { i as lookupInboundMessageMetaForTarget } from "./quoted-message-
|
|
1
|
+
import { s as toWhatsappJid } from "./text-runtime-DBKC9uEi.js";
|
|
2
|
+
import { n as normalizeWhatsAppPayloadText, t as normalizeWhatsAppOutboundPayload } from "./outbound-media-contract-BzWwBppP.js";
|
|
3
|
+
import { i as lookupInboundMessageMetaForTarget } from "./quoted-message-DQ6hAr34.js";
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID, listCombinedAccountIds, normalizeOptionalAccountId, resolveListedDefaultAccountId } from "openclaw/plugin-sdk/account-core";
|
|
5
5
|
import { createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
6
6
|
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
|
|
@@ -41,6 +41,11 @@ function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhat
|
|
|
41
41
|
chunkerMode: "text",
|
|
42
42
|
textChunkLimit: 4e3,
|
|
43
43
|
sanitizeText: ({ text }) => normalizeText(text),
|
|
44
|
+
deliveryCapabilities: { durableFinal: {
|
|
45
|
+
text: true,
|
|
46
|
+
replyTo: true,
|
|
47
|
+
messageSendingHooks: true
|
|
48
|
+
} },
|
|
44
49
|
pollMaxOptions: 12,
|
|
45
50
|
resolveTarget,
|
|
46
51
|
...createAttachedChannelResultAdapter({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { t as text_runtime_exports } from "./text-runtime-DBKC9uEi.js";
|
|
1
2
|
import { t as formatError } from "./session-errors-CSuKZPub.js";
|
|
2
|
-
import { t as text_runtime_exports } from "./text-runtime-DFFwk5z6.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import fs from "node:fs/promises";
|
|
5
4
|
import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, runFfmpeg } from "openclaw/plugin-sdk/media-runtime";
|
|
6
5
|
import { sanitizeForPlainText } from "openclaw/plugin-sdk/outbound-runtime";
|
|
7
|
-
import {
|
|
6
|
+
import { writeExternalFileWithinRoot } from "openclaw/plugin-sdk/security-runtime";
|
|
7
|
+
import { resolvePreferredOpenClawTmpDir, withTempWorkspace } from "openclaw/plugin-sdk/temp-path";
|
|
8
8
|
//#region extensions/whatsapp/src/outbound-media-contract.ts
|
|
9
9
|
const WHATSAPP_VOICE_FILE_NAME = "voice.ogg";
|
|
10
10
|
const WHATSAPP_VOICE_SAMPLE_RATE_HZ = 48e3;
|
|
@@ -82,47 +82,43 @@ function isWhatsAppNativeVoiceAudio(params) {
|
|
|
82
82
|
return ext === ".ogg" || ext === ".opus";
|
|
83
83
|
}
|
|
84
84
|
async function transcodeToWhatsAppVoiceOpus(params) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
});
|
|
90
|
-
const tempDir = await fs.mkdtemp(path.join(tempRoot, "whatsapp-voice-"));
|
|
91
|
-
try {
|
|
85
|
+
return await withTempWorkspace({
|
|
86
|
+
rootDir: resolvePreferredOpenClawTmpDir(),
|
|
87
|
+
prefix: "whatsapp-voice-"
|
|
88
|
+
}, async (workspace) => {
|
|
92
89
|
const ext = path.extname(params.fileName).toLowerCase();
|
|
93
90
|
const inputExt = ext && ext.length <= 12 ? ext : ".audio";
|
|
94
|
-
const inputPath =
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
recursive: true,
|
|
123
|
-
force: true
|
|
91
|
+
const inputPath = await workspace.write(`input${inputExt}`, params.buffer);
|
|
92
|
+
await writeExternalFileWithinRoot({
|
|
93
|
+
rootDir: workspace.dir,
|
|
94
|
+
path: WHATSAPP_VOICE_FILE_NAME,
|
|
95
|
+
write: async (outputPath) => {
|
|
96
|
+
await runFfmpeg([
|
|
97
|
+
"-hide_banner",
|
|
98
|
+
"-loglevel",
|
|
99
|
+
"error",
|
|
100
|
+
"-y",
|
|
101
|
+
"-i",
|
|
102
|
+
inputPath,
|
|
103
|
+
"-vn",
|
|
104
|
+
"-sn",
|
|
105
|
+
"-dn",
|
|
106
|
+
"-t",
|
|
107
|
+
String(MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS),
|
|
108
|
+
"-ar",
|
|
109
|
+
String(WHATSAPP_VOICE_SAMPLE_RATE_HZ),
|
|
110
|
+
"-ac",
|
|
111
|
+
"1",
|
|
112
|
+
"-c:a",
|
|
113
|
+
"libopus",
|
|
114
|
+
"-b:a",
|
|
115
|
+
WHATSAPP_VOICE_BITRATE,
|
|
116
|
+
outputPath
|
|
117
|
+
]);
|
|
118
|
+
}
|
|
124
119
|
});
|
|
125
|
-
|
|
120
|
+
return await workspace.read(WHATSAPP_VOICE_FILE_NAME);
|
|
121
|
+
});
|
|
126
122
|
}
|
|
127
123
|
function deriveWhatsAppDocumentFileName(mediaUrl) {
|
|
128
124
|
if (!mediaUrl) return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappOutbound } from "./outbound-adapter-
|
|
1
|
+
import { t as whatsappOutbound } from "./outbound-adapter-B9ZW8sht.js";
|
|
2
2
|
export { whatsappOutbound };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { n as resolveWebCredsBackupPath, r as resolveWebCredsPath, t as hasWebCredsSync } from "./creds-files-_2V8jzQa.js";
|
|
2
|
-
import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-
|
|
2
|
+
import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./action-runtime-CMhO8liB.js";
|
|
3
3
|
import { n as getStatusCode, t as formatError } from "./session-errors-CSuKZPub.js";
|
|
4
|
-
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
4
|
+
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-u88yh8Hw.js";
|
|
5
5
|
import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
|
|
6
|
-
import { t as createWhatsAppLoginTool } from "./agent-tools-login-
|
|
7
|
-
import { n as setWhatsAppRuntime } from "./runtime-
|
|
8
|
-
import { C as waitForCredsSaveQueueWithTimeout, S as waitForCredsSaveQueue, _ as readWebSelfIdentityForDecision, a as getWebAuthAgeMs, b as webAuthExists, c as pickWebChannel, d as readWebAuthExistsForDecision, f as readWebAuthSnapshot, g as readWebSelfIdentity, h as readWebSelfId, i as formatWhatsAppWebAuthStatusState, l as readCredsJsonRaw, m as readWebAuthState, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as logWebSelfId, p as readWebAuthSnapshotBestEffort, r as WhatsAppAuthUnstableError, s as logoutWeb, t as WA_WEB_AUTH_DIR, u as readWebAuthExistsBestEffort, v as resolveDefaultWebAuthDir, w as writeCredsJsonAtomically, y as restoreCredsFromBackupIfNeeded } from "./auth-store-
|
|
9
|
-
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
6
|
+
import { t as createWhatsAppLoginTool } from "./agent-tools-login-DYKYW5Nh.js";
|
|
7
|
+
import { n as setWhatsAppRuntime } from "./runtime-DdodQB8G.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-CjEimXKX.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-DsbCqDre.js";
|
|
11
|
+
import { n as newConnectionId, r as waitForWaConnection, t as createWaSocket } from "./session-DeIU_vjJ.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-mfy3Mmq-.js";
|
|
14
|
+
import { t as loginWeb } from "./login-DV99D0IN.js";
|
|
14
15
|
import { HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, SILENT_REPLY_TOKEN, stripHeartbeatToken } from "openclaw/plugin-sdk/reply-runtime";
|
|
15
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,2 +1,2 @@
|
|
|
1
|
-
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-
|
|
1
|
+
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-BzlZFreO.js";
|
|
2
2
|
export { collectUnsupportedSecretRefConfigCandidates, unsupportedSecretRefSurfacePatterns };
|