@openclaw/whatsapp 2026.9.5 → 2026.9.6
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/.setup/{agent-tools-login-B6MAs75N.mjs → agent-tools-login-CL5C1rA2.mjs} +5 -1
- package/dist/.setup/{channel-CSclZYjU.mjs → channel-Bg_fS2iF.mjs} +1 -1
- package/dist/.setup/{channel.runtime-ddGY37w8.mjs → channel.runtime-rurG-kbr.mjs} +2 -2
- package/dist/.setup/{channel.setup-CqUl8COe.mjs → channel.setup-C8P5q8uD.mjs} +1 -1
- package/dist/.setup/{monitor-BblvzLpX.mjs → monitor-By82ehLA.mjs} +23 -13
- package/dist/.setup/{setup-finalize-BYEgU0hb.mjs → setup-finalize-pGqWOiFX.mjs} +1 -1
- package/dist/.setup/setup-plugin-api-2wUapweU.mjs +3 -0
- package/dist/.setup/{setup-surface-Cd3wN5HD.mjs → setup-surface-B9CYwDPZ.mjs} +1 -1
- package/dist/.setup/{shared-C9OEtKgc.mjs → shared-DVgQ8kRG.mjs} +2 -2
- package/dist/agent-tools-api.js +1 -1
- package/dist/api.js +3 -3
- package/dist/channel-plugin-api.js +1 -1
- package/dist/light-runtime-api.js +1 -1
- package/dist/runtime-api.js +2 -2
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/baileys/node_modules/file-type/package.json +3 -2
- package/node_modules/baileys/node_modules/file-type/readme.md +3 -0
- package/node_modules/baileys/node_modules/file-type/source/index.js +28 -1
- package/node_modules/baileys/node_modules/file-type/source/supported.js +2 -0
- package/node_modules/baileys/node_modules/p-timeout/index.js +3 -0
- package/node_modules/baileys/node_modules/p-timeout/package.json +1 -1
- package/package.json +4 -4
- package/dist/.setup/setup-plugin-api-CXfU-7vN.mjs +0 -3
|
@@ -26,6 +26,7 @@ function createWhatsAppLoginTool(context) {
|
|
|
26
26
|
}),
|
|
27
27
|
execute: async (_toolCallId, args, signal) => {
|
|
28
28
|
const beforeCredentialPersistence = async () => {
|
|
29
|
+
context.assertInvocationCurrent?.();
|
|
29
30
|
if (!signal || signal.aborted) throw new Error("WhatsApp login authority is no longer active.");
|
|
30
31
|
};
|
|
31
32
|
const renderQrReply = (params) => {
|
|
@@ -91,7 +92,10 @@ function createWhatsAppLoginTool(context) {
|
|
|
91
92
|
};
|
|
92
93
|
}
|
|
93
94
|
function registerWhatsAppLoginTool(api) {
|
|
94
|
-
api.registerTool(
|
|
95
|
+
api.registerTool({
|
|
96
|
+
contextVersion: 2,
|
|
97
|
+
create: (context) => createWhatsAppLoginTool(context)
|
|
98
|
+
}, { name: "whatsapp_login" });
|
|
95
99
|
}
|
|
96
100
|
//#endregion
|
|
97
101
|
export { registerWhatsAppLoginTool as n, createWhatsAppLoginTool as t };
|
|
@@ -8,7 +8,7 @@ import "./normalize-DdsROMMa.mjs";
|
|
|
8
8
|
import { c as toWhatsappJid } from "./targets-runtime-RBjx3pg_.mjs";
|
|
9
9
|
import "./text-runtime-CHl0iPYe.mjs";
|
|
10
10
|
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth, s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-D22hYMdE.mjs";
|
|
11
|
-
import { a as formatWhatsAppConfigAllowFromEntries, o as loadWhatsAppChannelRuntime, t as createWhatsAppPluginBase } from "./shared-
|
|
11
|
+
import { a as formatWhatsAppConfigAllowFromEntries, o as loadWhatsAppChannelRuntime, t as createWhatsAppPluginBase } from "./shared-DVgQ8kRG.mjs";
|
|
12
12
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.mjs";
|
|
13
13
|
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-Dh8a3cba.mjs";
|
|
14
14
|
import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -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, d as readWebAuthExistsBestEffort, f as readWebAuthExistsForDecision, g as readWebSelfId, h as readWebAuthState, m as readWebAuthSnapshotBestEffort, o as getWebAuthAgeMs, p as readWebAuthSnapshot, s as logWebSelfId, x as webAuthExists } from "./auth-store-Dh8a3cba.mjs";
|
|
3
3
|
import { t as getActiveWebListener } from "./active-listener-CDjoX9QR.mjs";
|
|
4
|
-
import { t as monitorWebChannel } from "./monitor-
|
|
4
|
+
import { t as monitorWebChannel } from "./monitor-By82ehLA.mjs";
|
|
5
5
|
import { t as loginWeb } from "./login-2dmd1TfE.mjs";
|
|
6
|
-
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-B9CYwDPZ.mjs";
|
|
7
7
|
//#region extensions/whatsapp/src/channel.runtime.ts
|
|
8
8
|
async function startWebLoginWithQr(...args) {
|
|
9
9
|
return await startWebLoginWithQr$1(...args);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createWhatsAppPluginBase } from "./shared-
|
|
1
|
+
import { t as createWhatsAppPluginBase } from "./shared-DVgQ8kRG.mjs";
|
|
2
2
|
//#region extensions/whatsapp/src/channel.setup.ts
|
|
3
3
|
const whatsappSetupPlugin = { ...createWhatsAppPluginBase() };
|
|
4
4
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-D_NGDjCx.mjs";
|
|
2
2
|
import { c as normalizeWhatsAppPayloadTextPreservingIndentation, d as listWhatsAppSendResultMessageIds, f as mergeWhatsAppAcceptedSendError, g as withWhatsAppLogicalDeliveryActivity, h as rememberWhatsAppPartialSend, l as prepareWhatsAppOutboundMedia, m as rememberWhatsAppAcceptedSend, o as normalizeWhatsAppOutboundPayload, p as normalizeWhatsAppSendResult, r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-C6jDmcL9.mjs";
|
|
3
|
-
import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.mjs";
|
|
3
|
+
import { i as getWhatsAppRuntime, r as getWhatsAppChannelRuntime } from "./runtime-BLlToOi6.mjs";
|
|
4
4
|
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-hgLJoRc8.mjs";
|
|
5
5
|
import { a as markdownToWhatsAppChunks, c as toWhatsappJid, l as toWhatsappJidWithLid, n as isSelfChatMode, o as resolveEquivalentWhatsAppDirectChatJids, r as jidToE164, s as resolveJidToE164 } from "./targets-runtime-RBjx3pg_.mjs";
|
|
6
6
|
import { t as normalizeE164 } from "./text-runtime-CHl0iPYe.mjs";
|
|
@@ -32,7 +32,7 @@ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
|
32
32
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
33
33
|
import { DisconnectReason, downloadMediaMessage, isHostedLidUser, isHostedPnUser, isJidGroup, isJidGroup as isJidGroup$1, jidDecode, jidEncode, jidNormalizedUser, normalizeMessageContent as normalizeMessageContent$1 } from "baileys";
|
|
34
34
|
import { DEFAULT_ACCOUNT_ID, DEFAULT_MAIN_KEY, buildAgentMainSessionKey, buildAgentSessionKey, buildGroupHistoryKey, deriveLastRoutePolicy, normalizeAccountId, resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
35
|
-
import { asDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
35
|
+
import { asDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolvePromptHistoryLimit } from "openclaw/plugin-sdk/number-runtime";
|
|
36
36
|
import { filterSupplementalContextItems, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
|
|
37
37
|
import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
|
|
38
38
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
@@ -41,11 +41,10 @@ import { resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce }
|
|
|
41
41
|
import { resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime";
|
|
42
42
|
import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
43
43
|
import { drainPendingDeliveries } from "openclaw/plugin-sdk/delivery-queue-runtime";
|
|
44
|
-
import { DEFAULT_GROUP_HISTORY_LIMIT, buildHistoryContextFromEntries, buildInboundHistoryFromEntries, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
45
44
|
import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
46
|
-
import { fanInChannelIngressLifecycles, resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
47
45
|
import { getSessionEntry, patchSessionEntry, resolveGroupSessionKey, resolveStorePath, resolveStorePath as resolveStorePath$1, updateLastRoute } from "openclaw/plugin-sdk/session-store-runtime";
|
|
48
46
|
import { createInboundDebouncer, resolveInboundDebounceMs } from "openclaw/plugin-sdk/channel-inbound-debounce";
|
|
47
|
+
import { fanInChannelIngressLifecycles } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
49
48
|
import { saveMediaStream } from "openclaw/plugin-sdk/media-store";
|
|
50
49
|
import { upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
|
|
51
50
|
import { createDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
|
|
@@ -58,6 +57,7 @@ import { resolveAgentIdentity, resolveIdentityNamePrefix } from "openclaw/plugin
|
|
|
58
57
|
import { normalizeGroupActivation, parseActivationCommand } from "openclaw/plugin-sdk/group-activation";
|
|
59
58
|
import { formatAudioTranscriptForAgent } from "openclaw/plugin-sdk/media-understanding-runtime";
|
|
60
59
|
import { hasControlCommand, isControlCommandMessage, shouldComputeCommandAuthorized } from "openclaw/plugin-sdk/command-detection";
|
|
60
|
+
import { buildHistoryContextFromEntries, buildInboundHistoryFromEntries, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
61
61
|
import { createInternalHookEvent, deriveInboundMessageHookContext, fireAndForgetBoundedHook, toInternalMessageReceivedContext, toPluginMessageContext, toPluginMessageReceivedEvent, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
|
|
62
62
|
import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
|
|
63
63
|
import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
|
|
@@ -192,7 +192,7 @@ function resolveWhatsAppInboundPolicy(params) {
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
async function resolveWhatsAppIngressAccess(params) {
|
|
195
|
-
return await
|
|
195
|
+
return await getWhatsAppChannelRuntime().inbound.ingress.resolveStable({
|
|
196
196
|
channelId: "whatsapp",
|
|
197
197
|
accountId: params.policy.account.accountId,
|
|
198
198
|
identity: {
|
|
@@ -361,6 +361,7 @@ function createWhatsAppIngressMonitor(params) {
|
|
|
361
361
|
failedMaxEntries: 450
|
|
362
362
|
},
|
|
363
363
|
drain: {
|
|
364
|
+
deferredLaneOccupancy: "release",
|
|
364
365
|
resolveNonRetryableFailure: resolveWhatsAppIngressNonRetryableFailure,
|
|
365
366
|
deriveLaneKey: (record) => {
|
|
366
367
|
try {
|
|
@@ -608,19 +609,25 @@ function createWhatsAppInboundMessageDebouncer(options) {
|
|
|
608
609
|
for (const resolve of waiters) resolve();
|
|
609
610
|
};
|
|
610
611
|
const buildKey = (msg) => {
|
|
612
|
+
const admission = requireWhatsAppInboundAdmission(msg);
|
|
613
|
+
return `${admission.accountId}:${admission.conversation.id}`;
|
|
614
|
+
};
|
|
615
|
+
const resolveSenderKey = (msg) => {
|
|
611
616
|
const admission = requireWhatsAppInboundAdmission(msg);
|
|
612
617
|
const sender = msg.platform.sender;
|
|
613
|
-
|
|
614
|
-
return senderKey ? `${admission.accountId}:${admission.conversation.id}:${senderKey}` : null;
|
|
618
|
+
return admission.conversation.kind === "group" ? getPrimaryIdentityId(sender ?? null) ?? msg.platform.senderJid ?? msg.platform.senderE164 ?? msg.platform.senderName ?? admission.sender.id : admission.conversation.id;
|
|
615
619
|
};
|
|
616
620
|
const shouldDebounce = (msg) => options.shouldDebounce?.(msg) ?? true;
|
|
617
|
-
const trackKey = (key) => {
|
|
618
|
-
pendingKeys.set(key,
|
|
621
|
+
const trackKey = (key, senderKey) => {
|
|
622
|
+
pendingKeys.set(key, {
|
|
623
|
+
count: (pendingKeys.get(key)?.count ?? 0) + 1,
|
|
624
|
+
senderKey
|
|
625
|
+
});
|
|
619
626
|
};
|
|
620
627
|
const releaseKey = (entry) => {
|
|
621
628
|
if (!entry.debounceKey || entry.debounceKeyTracked !== true) return;
|
|
622
|
-
const
|
|
623
|
-
if (
|
|
629
|
+
const pending = pendingKeys.get(entry.debounceKey);
|
|
630
|
+
if (pending && pending.count > 1) pending.count -= 1;
|
|
624
631
|
else pendingKeys.delete(entry.debounceKey);
|
|
625
632
|
};
|
|
626
633
|
const orderEntries = (entries) => entries.toSorted((a, b) => {
|
|
@@ -703,9 +710,12 @@ function createWhatsAppInboundMessageDebouncer(options) {
|
|
|
703
710
|
const key = buildKey(message);
|
|
704
711
|
if (key) {
|
|
705
712
|
message.debounceKey = key;
|
|
713
|
+
const senderKey = resolveSenderKey(message);
|
|
714
|
+
const pending = pendingKeys.get(key);
|
|
715
|
+
if (pending && pending.senderKey !== senderKey) await debouncer.flushKey(key);
|
|
706
716
|
if (message.debounceMs > 0 && shouldDebounce(message)) {
|
|
707
717
|
message.debounceKeyTracked = true;
|
|
708
|
-
trackKey(key);
|
|
718
|
+
trackKey(key, senderKey);
|
|
709
719
|
options.onPendingWorkChanged();
|
|
710
720
|
notifyWork();
|
|
711
721
|
}
|
|
@@ -4323,7 +4333,7 @@ async function monitorWebChannel(verbose, listenerFactory = attachWebInboxToSock
|
|
|
4323
4333
|
const reconnectPolicy = resolveReconnectPolicy(cfg, tuning.reconnect);
|
|
4324
4334
|
const socketTiming = resolveWhatsAppSocketTiming(tuning.socketTiming);
|
|
4325
4335
|
const baseMentionConfig = buildMentionConfig(cfg);
|
|
4326
|
-
const groupHistoryLimit = account.historyLimit ?? cfg.channels?.whatsapp?.historyLimit ?? cfg.messages?.groupChat?.historyLimit
|
|
4336
|
+
const groupHistoryLimit = resolvePromptHistoryLimit(account.historyLimit ?? cfg.channels?.whatsapp?.historyLimit ?? cfg.messages?.groupChat?.historyLimit);
|
|
4327
4337
|
const groupHistories = /* @__PURE__ */ new Map();
|
|
4328
4338
|
const groupMemberNames = /* @__PURE__ */ new Map();
|
|
4329
4339
|
const groupMetadataCache = /* @__PURE__ */ new Map();
|
|
@@ -2,7 +2,7 @@ import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./acco
|
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.mjs";
|
|
3
3
|
import { r as hasWebCredsSync } from "./creds-files-Drg3usj1.mjs";
|
|
4
4
|
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-BGra1ZnM.mjs";
|
|
5
|
-
import { n as whatsappSetupAdapter } from "./shared-
|
|
5
|
+
import { n as whatsappSetupAdapter } from "./shared-DVgQ8kRG.mjs";
|
|
6
6
|
import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
7
7
|
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
8
8
|
//#region extensions/whatsapp/src/setup-finalize.ts
|
|
@@ -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-pGqWOiFX.mjs")).finalizeWhatsAppSetup(params),
|
|
40
40
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
|
|
41
41
|
onAccountRecorded: (accountId, options) => {
|
|
42
42
|
options?.onAccountId?.(channel, accountId);
|
|
@@ -27,7 +27,7 @@ async function readWhatsAppAccountLinkState(authDir) {
|
|
|
27
27
|
}
|
|
28
28
|
const loadWhatsAppChannelRuntime = createLazyRuntimeModule(async () => {
|
|
29
29
|
await loadWhatsAppAuthStore();
|
|
30
|
-
return await import("./channel.runtime-
|
|
30
|
+
return await import("./channel.runtime-rurG-kbr.mjs");
|
|
31
31
|
});
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region extensions/whatsapp/src/config-accessors.ts
|
|
@@ -116,7 +116,7 @@ const whatsappSetupContract = defineChannelSetupContract({
|
|
|
116
116
|
//#region extensions/whatsapp/src/shared.ts
|
|
117
117
|
const WHATSAPP_CHANNEL = "whatsapp";
|
|
118
118
|
async function loadWhatsAppSetupSurface() {
|
|
119
|
-
return await import("./setup-surface-
|
|
119
|
+
return await import("./setup-surface-B9CYwDPZ.mjs");
|
|
120
120
|
}
|
|
121
121
|
const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
|
|
122
122
|
const whatsappConfigAdapter = createScopedChannelConfigAdapter({
|
package/dist/agent-tools-api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount } from "./.setup/accounts-D_NGDjCx.mjs";
|
|
2
2
|
import { r as getWhatsAppConnectionController } from "./.setup/connection-controller-runtime-context-hgLJoRc8.mjs";
|
|
3
3
|
import { s as resolveJidToE164 } from "./.setup/targets-runtime-RBjx3pg_.mjs";
|
|
4
|
-
import { n as registerWhatsAppLoginTool } from "./.setup/agent-tools-login-
|
|
4
|
+
import { n as registerWhatsAppLoginTool } from "./.setup/agent-tools-login-CL5C1rA2.mjs";
|
|
5
5
|
import { createActionGate, stringEnum } from "openclaw/plugin-sdk/channel-actions";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { resolveOAuthDir } from "openclaw/plugin-sdk/state-paths";
|
package/dist/api.js
CHANGED
|
@@ -4,10 +4,10 @@ import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i
|
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./.setup/resolve-outbound-target-C2eUvsTc.mjs";
|
|
5
5
|
import { c as toWhatsappJid, i as markdownToWhatsApp, l as toWhatsappJidWithLid, n as isSelfChatMode, r as jidToE164, s as resolveJidToE164, t as assertWebChannel } from "./.setup/targets-runtime-RBjx3pg_.mjs";
|
|
6
6
|
import { n as resolveUserPath, t as normalizeE164 } from "./.setup/text-runtime-CHl0iPYe.mjs";
|
|
7
|
-
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./.setup/channel-
|
|
8
|
-
import { i as resolveWhatsAppGroupToolPolicy, r as resolveWhatsAppGroupRequireMention } from "./.setup/shared-
|
|
7
|
+
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./.setup/channel-Bg_fS2iF.mjs";
|
|
8
|
+
import { i as resolveWhatsAppGroupToolPolicy, r as resolveWhatsAppGroupRequireMention } from "./.setup/shared-DVgQ8kRG.mjs";
|
|
9
9
|
import { t as whatsappCommandPolicy } from "./.setup/command-policy-BIOSHySD.mjs";
|
|
10
|
-
import { t as whatsappSetupPlugin } from "./.setup/channel.setup-
|
|
10
|
+
import { t as whatsappSetupPlugin } from "./.setup/channel.setup-C8P5q8uD.mjs";
|
|
11
11
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./.setup/constants-C7m81BNe.mjs";
|
|
12
12
|
import { a as waitForWaConnection, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter } from "./.setup/socket-close-CCVSFufF.mjs";
|
|
13
13
|
import { n as getStatusCode, t as formatError } from "./.setup/session-errors-JuazczrA.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappPlugin } from "./.setup/channel-
|
|
1
|
+
import { t as whatsappPlugin } from "./.setup/channel-Bg_fS2iF.mjs";
|
|
2
2
|
export { whatsappPlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createWhatsAppLoginTool } from "./.setup/agent-tools-login-
|
|
1
|
+
import { t as createWhatsAppLoginTool } from "./.setup/agent-tools-login-CL5C1rA2.mjs";
|
|
2
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 "./.setup/auth-store-Dh8a3cba.mjs";
|
|
3
3
|
import { t as getActiveWebListener } from "./.setup/active-listener-CDjoX9QR.mjs";
|
|
4
4
|
import { n as getStatusCode, t as formatError } from "./.setup/session-errors-JuazczrA.mjs";
|
package/dist/runtime-api.js
CHANGED
|
@@ -3,14 +3,14 @@ import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./.setup/
|
|
|
3
3
|
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./.setup/send-C6jDmcL9.mjs";
|
|
4
4
|
import { a as setWhatsAppRuntime } from "./.setup/runtime-BLlToOi6.mjs";
|
|
5
5
|
import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
|
|
6
|
-
import { t as createWhatsAppLoginTool } from "./.setup/agent-tools-login-
|
|
6
|
+
import { t as createWhatsAppLoginTool } from "./.setup/agent-tools-login-CL5C1rA2.mjs";
|
|
7
7
|
import { M as waitForCredsSaveQueueWithTimeout, N 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, j as waitForCredsSaveQueue, 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, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./.setup/auth-store-Dh8a3cba.mjs";
|
|
8
8
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./.setup/constants-C7m81BNe.mjs";
|
|
9
9
|
import { n as resolveWebAccountId, t as getActiveWebListener } from "./.setup/active-listener-CDjoX9QR.mjs";
|
|
10
10
|
import { a as waitForWaConnection, i as newConnectionId, r as createWaSocket } from "./.setup/socket-close-CCVSFufF.mjs";
|
|
11
11
|
import { n as getStatusCode, t as formatError } from "./.setup/session-errors-JuazczrA.mjs";
|
|
12
12
|
import { p as extractText, s as extractContactContext, u as extractLocationData } from "./.setup/send-api-B4DOt2RJ.mjs";
|
|
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 "./.setup/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 "./.setup/monitor-By82ehLA.mjs";
|
|
14
14
|
import { t as loginWeb } from "./.setup/login-2dmd1TfE.mjs";
|
|
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, 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 };
|
package/dist/setup-entry.js
CHANGED
|
@@ -5,7 +5,7 @@ var setup_entry_default = defineBundledChannelSetupEntry({
|
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
features: { legacySessionSurfaces: true },
|
|
7
7
|
plugin: {
|
|
8
|
-
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-
|
|
8
|
+
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-2wUapweU.mjs", import.meta.url).href),
|
|
9
9
|
exportName: "whatsappSetupPlugin"
|
|
10
10
|
},
|
|
11
11
|
legacySessionSurface: {
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappSetupPlugin } from "./.setup/channel.setup-
|
|
1
|
+
import { t as whatsappSetupPlugin } from "./.setup/channel.setup-C8P5q8uD.mjs";
|
|
2
2
|
export { whatsappSetupPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "file-type",
|
|
3
|
-
"version": "22.0
|
|
3
|
+
"version": "22.1.0",
|
|
4
4
|
"description": "Detect the file type of a file, stream, or data",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/file-type",
|
|
@@ -228,7 +228,8 @@
|
|
|
228
228
|
"dat",
|
|
229
229
|
"key",
|
|
230
230
|
"numbers",
|
|
231
|
-
"pages"
|
|
231
|
+
"pages",
|
|
232
|
+
"iso"
|
|
232
233
|
],
|
|
233
234
|
"dependencies": {
|
|
234
235
|
"@tokenizer/inflate": "^0.4.1",
|
|
@@ -464,6 +464,7 @@ MIME media subtypes prefixed with `x-ft-` are custom and defined by us. They are
|
|
|
464
464
|
- [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Windows icon file
|
|
465
465
|
- [`ics`](https://en.wikipedia.org/wiki/ICalendar#Data_format) - iCalendar
|
|
466
466
|
- [`indd`](https://en.wikipedia.org/wiki/Adobe_InDesign#File_format) - Adobe InDesign document
|
|
467
|
+
- [`iso`](https://en.wikipedia.org/wiki/ISO_9660) - ISO 9660 disc image
|
|
467
468
|
- [`it`](https://wiki.openmpt.org/Manual:_Module_formats#The_Impulse_Tracker_format_.28.it.29) - Audio module format: Impulse Tracker
|
|
468
469
|
- [`j2c`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000
|
|
469
470
|
- [`jar`](https://en.wikipedia.org/wiki/JAR_(file_format)) - Java archive
|
|
@@ -578,6 +579,8 @@ MIME media subtypes prefixed with `x-ft-` are custom and defined by us. They are
|
|
|
578
579
|
- [`zip`](https://en.wikipedia.org/wiki/Zip_(file_format)) - Archive file
|
|
579
580
|
- [`zst`](https://en.wikipedia.org/wiki/Zstandard) - Archive file
|
|
580
581
|
|
|
582
|
+
ISO 9660 requires random-access input or `fileTypeStream()` with `sampleSize >= 32_774`; `fileTypeFromStream()` is unsupported.
|
|
583
|
+
|
|
581
584
|
*[Pull requests](.github/pull_request_template.md) are welcome for additional commonly used file types.*
|
|
582
585
|
|
|
583
586
|
The following file types will not be accepted, but most of them are supported by [third-party detectors](#available-third-party-file-type-detectors).
|
|
@@ -64,7 +64,7 @@ function getKnownFileSizeOrMaximum(fileSize) {
|
|
|
64
64
|
|
|
65
65
|
// Keep the specifier non-literal at the call site so browser bundlers do not try to resolve Node-only imports.
|
|
66
66
|
function importAtRuntime(specifier) {
|
|
67
|
-
return import(specifier);
|
|
67
|
+
return import(/* @vite-ignore */ /* webpackIgnore: true */ specifier);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
// Wrap stream in an identity TransformStream to avoid BYOB readers.
|
|
@@ -1689,6 +1689,33 @@ export class FileTypeParser {
|
|
|
1689
1689
|
mime: 'application/pgp-encrypted',
|
|
1690
1690
|
};
|
|
1691
1691
|
}
|
|
1692
|
+
|
|
1693
|
+
// ISO 9660 optical disc image: the Volume Descriptor Set starts at sector 16 (2048-byte
|
|
1694
|
+
// sectors). Every descriptor in that set carries the 5-byte standard identifier `CD001`
|
|
1695
|
+
// at offset 1, regardless of descriptor type, so checking the first one is sufficient.
|
|
1696
|
+
// Only attempted for random-access inputs (buffer/file/blob, or a stream sampled with a
|
|
1697
|
+
// large enough `sampleSize`): on an unknown-size stream this offset is far past what's
|
|
1698
|
+
// reasonable to buffer just to rule out one format, so it's left undetected there.
|
|
1699
|
+
const isoStandardIdentifierOffset = 32_769;
|
|
1700
|
+
const isoStandardIdentifierLength = 5;
|
|
1701
|
+
if (
|
|
1702
|
+
tokenizer.supportsRandomAccess()
|
|
1703
|
+
&& tokenizer.fileInfo.size >= (isoStandardIdentifierOffset + isoStandardIdentifierLength)
|
|
1704
|
+
) {
|
|
1705
|
+
const isoStandardIdentifier = new Uint8Array(isoStandardIdentifierLength);
|
|
1706
|
+
await tokenizer.peekBuffer(isoStandardIdentifier, {
|
|
1707
|
+
position: isoStandardIdentifierOffset,
|
|
1708
|
+
length: isoStandardIdentifierLength,
|
|
1709
|
+
mayBeLess: true,
|
|
1710
|
+
});
|
|
1711
|
+
|
|
1712
|
+
if (checkBytes(isoStandardIdentifier, stringToBytes('CD001'))) {
|
|
1713
|
+
return {
|
|
1714
|
+
ext: 'iso',
|
|
1715
|
+
mime: 'application/x-iso9660-image',
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1692
1719
|
};
|
|
1693
1720
|
// Detections with limited supporting data, resulting in a higher likelihood of false positives
|
|
1694
1721
|
detectImprecise = async tokenizer => {
|
|
@@ -184,6 +184,7 @@ export const extensions = [
|
|
|
184
184
|
'key',
|
|
185
185
|
'numbers',
|
|
186
186
|
'pages',
|
|
187
|
+
'iso',
|
|
187
188
|
];
|
|
188
189
|
|
|
189
190
|
export const mimeTypes = [
|
|
@@ -365,4 +366,5 @@ export const mimeTypes = [
|
|
|
365
366
|
'application/vnd.apple.keynote',
|
|
366
367
|
'application/vnd.apple.numbers',
|
|
367
368
|
'application/vnd.apple.pages',
|
|
369
|
+
'application/x-iso9660-image',
|
|
368
370
|
];
|
|
@@ -28,6 +28,9 @@ export default function pTimeout(promise, options) {
|
|
|
28
28
|
|
|
29
29
|
if (signal?.aborted) {
|
|
30
30
|
reject(getAbortedReason(signal));
|
|
31
|
+
// The input still needs a rejection handler even though cancellation won.
|
|
32
|
+
// eslint-disable-next-line promise/prefer-await-to-then, promise/prefer-catch
|
|
33
|
+
promise.then(resolve, reject);
|
|
31
34
|
return;
|
|
32
35
|
}
|
|
33
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/whatsapp",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.6",
|
|
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.3.30"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.9.
|
|
16
|
+
"openclaw": ">=2026.9.6"
|
|
17
17
|
},
|
|
18
18
|
"peerDependenciesMeta": {
|
|
19
19
|
"openclaw": {
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"minHostVersion": ">=2026.4.25"
|
|
66
66
|
},
|
|
67
67
|
"compat": {
|
|
68
|
-
"pluginApi": ">=2026.9.
|
|
68
|
+
"pluginApi": ">=2026.9.6"
|
|
69
69
|
},
|
|
70
70
|
"build": {
|
|
71
71
|
"bundledDist": false,
|
|
72
|
-
"openclawVersion": "2026.9.
|
|
72
|
+
"openclawVersion": "2026.9.6"
|
|
73
73
|
},
|
|
74
74
|
"release": {
|
|
75
75
|
"publishToClawHub": true,
|