@openclaw/whatsapp 2026.7.2-beta.1 → 2026.7.2-beta.3
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-DazDX3RB.js → access-control-tjy_em01.js} +1 -1
- package/dist/{accounts-CKOFMPf-.js → accounts-ejK8sXPU.js} +43 -3
- package/dist/action-runtime-api.js +1 -1
- package/dist/{action-runtime-Bf-12TIH.js → action-runtime-p0V390gA.js} +2 -2
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/{active-listener-5kHap439.js → active-listener-BbdlXooT.js} +1 -1
- package/dist/api.js +10 -10
- package/dist/{approval-handler.runtime-CBiGQuZ5.js → approval-handler.runtime-BO1oJ-b8.js} +3 -3
- package/dist/{approval-reactions-BGQoz25s.js → approval-reactions-CrZFAyf-.js} +2 -2
- package/dist/call-tool-api.js +2 -2
- package/dist/{channel-D_1cK7-w.js → channel-B2I4Opzb.js} +30 -28
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-PoRWfP9x.js → channel-react-action-CPRQE-s3.js} +3 -3
- package/dist/{channel.runtime-BPrKzcYd.js → channel.runtime-CjkhQzk8.js} +4 -4
- package/dist/{channel.setup-eX64WZDx.js → channel.setup-BMWE9LmN.js} +2 -2
- package/dist/{connection-controller-C1rwfWb4.js → connection-controller-HGaffeFb.js} +183 -22
- package/dist/{connection-controller-runtime-context-CbTsqmPT.js → connection-controller-runtime-context-9mEeAvu1.js} +10 -1
- package/dist/contract-api.js +1 -1
- package/dist/directory-config-BZ775eGX.js +196 -0
- package/dist/directory-contract-api.js +1 -1
- package/dist/{group-session-key-CLTZeH_F.js → group-session-key-Dh8WZun_.js} +1 -1
- package/dist/legacy-state-migrations-api.js +1 -1
- package/dist/light-runtime-api.js +1 -1
- package/dist/{login-DGIoToX8.js → login-ifOXCBjo.js} +3 -3
- package/dist/{login-qr-X-CZHOk9.js → login-qr-DUHzVH_Y.js} +4 -4
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-BKtA0lzq.js → monitor-_jqDKBXj.js} +586 -382
- package/dist/question-reactions-C0qJ6wGA.js +142 -0
- package/dist/runtime-api.js +7 -7
- package/dist/{send-D9Ydnn4o.js → send-SB-4JrVZ.js} +2 -3
- package/dist/{send-api-W33lI2nR.js → send-api-BG0MgoFI.js} +3 -3
- package/dist/{setup-core-BXDFGqky.js → setup-core-BbIgEl2M.js} +3 -3
- package/dist/{setup-finalize-DzOHXnPj.js → setup-finalize-Cc-4iWGj.js} +3 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-5EUmMLHS.js → setup-surface-DhnXEZir.js} +2 -2
- package/dist/{session-mxWFn0eS.js → socket-close-jNGyZY4T.js} +221 -1
- package/dist/{state-migrations-D_BmQUR9.js → state-migrations-CAMTrs2U.js} +1 -8
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
- package/dist/account-config-LiT9wWH9.js +0 -43
- package/dist/constants.js +0 -2
- package/dist/directory-config-CLBQrjtC.js +0 -37
- package/dist/targets.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-ejK8sXPU.js";
|
|
2
2
|
import { n as isSelfChatMode } from "./targets-runtime-Bsh0HR9y.js";
|
|
3
3
|
import { n as normalizeE164 } from "./text-runtime-BTGkMN0o.js";
|
|
4
4
|
import { a as getSelfIdentity, o as getSenderIdentity } from "./identity-D7L8LCuH.js";
|
|
@@ -1,11 +1,51 @@
|
|
|
1
|
-
import { t as resolveMergedWhatsAppAccountConfig } from "./account-config-LiT9wWH9.js";
|
|
2
1
|
import { n as listConfiguredAccountIds, r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
|
|
3
2
|
import { n as hasWebCredsRegularFileSync, r as hasWebCredsSync } from "./creds-files-B1kSWtBg.js";
|
|
4
3
|
import fs from "node:fs";
|
|
5
4
|
import path from "node:path";
|
|
6
|
-
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, resolveUserPath } from "openclaw/plugin-sdk/account-core";
|
|
5
|
+
import { DEFAULT_ACCOUNT_ID, mergeAccountConfig, normalizeAccountId, resolveAccountEntry, resolveMergedAccountConfig, resolveUserPath } from "openclaw/plugin-sdk/account-core";
|
|
7
6
|
import { resolveOAuthDir } from "openclaw/plugin-sdk/state-paths";
|
|
8
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
|
+
//#region extensions/whatsapp/src/account-config.ts
|
|
9
|
+
function resolveWhatsAppDefaultAccountSharedConfig(cfg) {
|
|
10
|
+
const defaultAccount = resolveAccountEntry(cfg.channels?.whatsapp?.accounts, DEFAULT_ACCOUNT_ID);
|
|
11
|
+
if (!defaultAccount) return;
|
|
12
|
+
const { enabled: _ignoredEnabled, name: _ignoredName, authDir: _ignoredAuthDir, selfChatMode: _ignoredSelfChatMode, ...sharedDefaults } = defaultAccount;
|
|
13
|
+
return sharedDefaults;
|
|
14
|
+
}
|
|
15
|
+
function resolveWhatsAppAccountConfigForTest(cfg, accountId) {
|
|
16
|
+
return resolveAccountEntry(cfg.channels?.whatsapp?.accounts, accountId);
|
|
17
|
+
}
|
|
18
|
+
function resolveMergedNamedWhatsAppAccountConfig(params) {
|
|
19
|
+
const rootCfg = params.cfg.channels?.whatsapp;
|
|
20
|
+
const accountConfig = resolveWhatsAppAccountConfigForTest(params.cfg, params.accountId);
|
|
21
|
+
return {
|
|
22
|
+
...mergeAccountConfig({
|
|
23
|
+
channelConfig: rootCfg,
|
|
24
|
+
accountConfig: void 0,
|
|
25
|
+
omitKeys: ["defaultAccount"]
|
|
26
|
+
}),
|
|
27
|
+
...resolveWhatsAppDefaultAccountSharedConfig(params.cfg),
|
|
28
|
+
...accountConfig
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function resolveMergedWhatsAppAccountConfig(params) {
|
|
32
|
+
const rootCfg = params.cfg.channels?.whatsapp;
|
|
33
|
+
const accountId = params.accountId?.trim() || rootCfg?.defaultAccount || DEFAULT_ACCOUNT_ID;
|
|
34
|
+
const base = resolveMergedAccountConfig({
|
|
35
|
+
channelConfig: rootCfg,
|
|
36
|
+
accounts: rootCfg?.accounts,
|
|
37
|
+
accountId,
|
|
38
|
+
omitKeys: ["defaultAccount"]
|
|
39
|
+
});
|
|
40
|
+
return {
|
|
41
|
+
accountId,
|
|
42
|
+
...accountId === DEFAULT_ACCOUNT_ID ? base : resolveMergedNamedWhatsAppAccountConfig({
|
|
43
|
+
cfg: params.cfg,
|
|
44
|
+
accountId
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
9
49
|
//#region extensions/whatsapp/src/accounts.ts
|
|
10
50
|
const DEFAULT_WHATSAPP_MEDIA_MAX_MB = 50;
|
|
11
51
|
function listWhatsAppAuthDirs(cfg) {
|
|
@@ -110,4 +150,4 @@ function listEnabledWhatsAppAccounts(cfg) {
|
|
|
110
150
|
})).filter((account) => account.enabled);
|
|
111
151
|
}
|
|
112
152
|
//#endregion
|
|
113
|
-
export { resolveWhatsAppAccount as a, listWhatsAppAuthDirs as i, hasAnyWhatsAppAuth as n, resolveWhatsAppAuthDir as o, listEnabledWhatsAppAccounts as r, resolveWhatsAppMediaMaxBytes as s, DEFAULT_WHATSAPP_MEDIA_MAX_MB as t };
|
|
153
|
+
export { resolveWhatsAppAccount as a, resolveMergedWhatsAppAccountConfig as c, listWhatsAppAuthDirs as i, hasAnyWhatsAppAuth as n, resolveWhatsAppAuthDir as o, listEnabledWhatsAppAccounts as r, resolveWhatsAppMediaMaxBytes as s, DEFAULT_WHATSAPP_MEDIA_MAX_MB as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./action-runtime-p0V390gA.js";
|
|
2
2
|
export { handleWhatsAppAction };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-ejK8sXPU.js";
|
|
2
2
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-BR97fAbB.js";
|
|
3
|
-
import { r as sendReactionWhatsApp, u as resolveWhatsAppReactionLevel } from "./send-
|
|
3
|
+
import { r as sendReactionWhatsApp, u as resolveWhatsAppReactionLevel } from "./send-SB-4JrVZ.js";
|
|
4
4
|
import { ToolAuthorizationError, createActionGate, jsonResult, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
//#region extensions/whatsapp/src/action-runtime-target-auth.ts
|
|
6
6
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./action-runtime-p0V390gA.js";
|
|
2
2
|
export { handleWhatsAppAction };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
|
|
2
|
-
import {
|
|
2
|
+
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-9mEeAvu1.js";
|
|
3
3
|
//#region extensions/whatsapp/src/active-listener.ts
|
|
4
4
|
function resolveWebAccountId(params) {
|
|
5
5
|
return (params.accountId ?? "").trim() || resolveDefaultWhatsAppAccountId(params.cfg);
|
package/dist/api.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
+
import { a as resolveWhatsAppAccount, i as listWhatsAppAuthDirs, n as hasAnyWhatsAppAuth, o as resolveWhatsAppAuthDir, r as listEnabledWhatsAppAccounts, s as resolveWhatsAppMediaMaxBytes, t as DEFAULT_WHATSAPP_MEDIA_MAX_MB } from "./accounts-ejK8sXPU.js";
|
|
1
2
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
|
|
2
|
-
import { a as resolveWhatsAppAccount, i as listWhatsAppAuthDirs, n as hasAnyWhatsAppAuth, o as resolveWhatsAppAuthDir, r as listEnabledWhatsAppAccounts, s as resolveWhatsAppMediaMaxBytes, t as DEFAULT_WHATSAPP_MEDIA_MAX_MB } from "./accounts-CKOFMPf-.js";
|
|
3
3
|
import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, r as isWhatsAppUserTarget, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-DSZnHkKF.js";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-BR97fAbB.js";
|
|
5
|
-
import "./send-
|
|
5
|
+
import "./send-SB-4JrVZ.js";
|
|
6
6
|
import { c as toWhatsappJidWithLid, i as markdownToWhatsApp, n as isSelfChatMode, o as resolveJidToE164, r as jidToE164, s as toWhatsappJid, t as assertWebChannel } from "./targets-runtime-Bsh0HR9y.js";
|
|
7
7
|
import { n as normalizeE164, r as resolveUserPath } from "./text-runtime-BTGkMN0o.js";
|
|
8
|
-
import { n as resolveWhatsAppGroupIntroHint, r as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-
|
|
8
|
+
import { n as resolveWhatsAppGroupIntroHint, r as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-B2I4Opzb.js";
|
|
9
9
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
|
|
10
|
-
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy } from "./setup-core-
|
|
10
|
+
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy } from "./setup-core-BbIgEl2M.js";
|
|
11
11
|
import "./config-schema-BZ8h1hWA.js";
|
|
12
|
-
import { t as whatsappSetupPlugin } from "./channel.setup-
|
|
12
|
+
import { t as whatsappSetupPlugin } from "./channel.setup-BMWE9LmN.js";
|
|
13
13
|
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-HU41RHGI.js";
|
|
14
|
-
import {
|
|
15
|
-
import { n as testing } from "./access-control-DazDX3RB.js";
|
|
16
|
-
import { _ as extractLocationData, b as extractText, d as normalizeMessageContent, f as resolveInboundMediaMimetype, h as extractContextInfo, p as describeReplyContext, t as createWebSendApi } from "./send-api-W33lI2nR.js";
|
|
17
|
-
import { a as createWhatsAppSocketOperationTimeoutAdapter, i as DEFAULT_WHATSAPP_SOCKET_TIMING, r as waitForWaConnection, t as createWaSocket } from "./session-mxWFn0eS.js";
|
|
14
|
+
import { a as waitForWaConnection, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter } from "./socket-close-jNGyZY4T.js";
|
|
18
15
|
import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
|
|
16
|
+
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-BZ775eGX.js";
|
|
17
|
+
import { n as testing } from "./access-control-tjy_em01.js";
|
|
18
|
+
import { _ as extractLocationData, b as extractText, d as normalizeMessageContent, f as resolveInboundMediaMimetype, h as extractContextInfo, p as describeReplyContext, t as createWebSendApi } from "./send-api-BG0MgoFI.js";
|
|
19
19
|
import "openclaw/plugin-sdk/channel-actions";
|
|
20
20
|
import "openclaw/plugin-sdk/account-resolution";
|
|
21
21
|
import "openclaw/plugin-sdk/core";
|
|
22
22
|
import "openclaw/plugin-sdk/account-id";
|
|
23
23
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
24
24
|
import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
|
|
25
|
-
createLazyRuntimeModule(() => import("./channel.runtime-
|
|
25
|
+
createLazyRuntimeModule(() => import("./channel.runtime-CjkhQzk8.js"));
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region extensions/whatsapp/src/qa-driver.runtime.ts
|
|
28
28
|
function isRecord(value) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import "./accounts-ejK8sXPU.js";
|
|
1
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
|
|
2
|
-
import "./accounts-CKOFMPf-.js";
|
|
3
3
|
import { s as normalizeWhatsAppMessagingTarget } from "./normalize-target-DSZnHkKF.js";
|
|
4
|
-
import { i as sendTypingWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
4
|
+
import { i as sendTypingWhatsApp, t as sendMessageWhatsApp } from "./send-SB-4JrVZ.js";
|
|
5
5
|
import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
|
|
6
6
|
import "./normalize-C-Z16y7Q.js";
|
|
7
|
-
import { i as unregisterWhatsAppApprovalReactionTarget, r as registerWhatsAppApprovalReactionTarget } from "./approval-reactions-
|
|
7
|
+
import { i as unregisterWhatsAppApprovalReactionTarget, r as registerWhatsAppApprovalReactionTarget } from "./approval-reactions-CrZFAyf-.js";
|
|
8
8
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
9
9
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
10
10
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
2
|
+
import { a as resolveWhatsAppAccount } from "./accounts-ejK8sXPU.js";
|
|
3
3
|
import { t as getOptionalWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
|
|
4
|
-
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth } from "./group-session-key-
|
|
4
|
+
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth } from "./group-session-key-Dh8WZun_.js";
|
|
5
5
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
6
|
import { createApprovalReactionTargetStore, listApprovalReactionBindings, resolveTypedApprovalReactionTarget } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
7
7
|
//#region extensions/whatsapp/src/approval-reactions.ts
|
package/dist/call-tool-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
2
|
-
import {
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-ejK8sXPU.js";
|
|
2
|
+
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-9mEeAvu1.js";
|
|
3
3
|
import { o as resolveJidToE164 } from "./targets-runtime-Bsh0HR9y.js";
|
|
4
4
|
import { createActionGate, stringEnum } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
import path from "node:path";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-ejK8sXPU.js";
|
|
1
2
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
|
|
2
|
-
import { a as resolveWhatsAppAccount } from "./accounts-CKOFMPf-.js";
|
|
3
3
|
import { c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as normalizeWhatsAppAllowFromEntry, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-DSZnHkKF.js";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-BR97fAbB.js";
|
|
5
|
-
import { a as normalizeWhatsAppOutboundPayload, i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppPayloadText, s as normalizeWhatsAppPayloadTextPreservingIndentation, t as sendMessageWhatsApp, u as resolveWhatsAppReactionLevel } from "./send-
|
|
5
|
+
import { a as normalizeWhatsAppOutboundPayload, i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppPayloadText, s as normalizeWhatsAppPayloadTextPreservingIndentation, t as sendMessageWhatsApp, u as resolveWhatsAppReactionLevel } from "./send-SB-4JrVZ.js";
|
|
6
6
|
import { n as getWhatsAppRuntime } from "./runtime-BfAdAEYT.js";
|
|
7
7
|
import "./normalize-C-Z16y7Q.js";
|
|
8
8
|
import { s as toWhatsappJid } from "./targets-runtime-Bsh0HR9y.js";
|
|
9
9
|
import "./text-runtime-BTGkMN0o.js";
|
|
10
10
|
import { t as createWhatsAppLoginTool } from "./agent-tools-login-DfyToBpG.js";
|
|
11
|
-
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth, s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-
|
|
11
|
+
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth, s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-Dh8WZun_.js";
|
|
12
12
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
|
|
13
|
-
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, r as loadWhatsAppChannelRuntime, s as formatWhatsAppConfigAllowFromEntries, t as whatsappSetupAdapter } from "./setup-core-
|
|
13
|
+
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, r as loadWhatsAppChannelRuntime, s as formatWhatsAppConfigAllowFromEntries, t as whatsappSetupAdapter } from "./setup-core-BbIgEl2M.js";
|
|
14
14
|
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-BQi9pZqQ.js";
|
|
15
|
-
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-
|
|
15
|
+
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-CAMTrs2U.js";
|
|
16
16
|
import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
|
|
17
17
|
import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-core";
|
|
18
18
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
19
|
-
import { asString, collectIssuesForEnabledAccounts, createAsyncComputedAccountStatusAdapter, createDefaultChannelRuntimeState, isRecord as isRecord$1 } from "openclaw/plugin-sdk/status-helpers";
|
|
19
|
+
import { asString, collectIssuesForEnabledAccounts, createAsyncComputedAccountStatusAdapter, createDefaultChannelRuntimeState, isRecord as isRecord$1, readAccountStatusSnapshot } from "openclaw/plugin-sdk/status-helpers";
|
|
20
20
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
21
21
|
import { buildChannelOutboundSessionRoute } from "openclaw/plugin-sdk/core";
|
|
22
22
|
import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -30,6 +30,7 @@ import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-s
|
|
|
30
30
|
import { createChannelApproverDmTargetResolver, createChannelNativeOriginTargetResolver, createNativeApprovalChannelRouteGates, createNativeApprovalForwardingFallbackSuppressor } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
31
31
|
import { buildApprovalReactionPromptPayloadForRequest } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
32
32
|
import { buildTypedApprovalPresentation } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
33
|
+
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
33
34
|
import { chunkText } from "openclaw/plugin-sdk/reply-chunking";
|
|
34
35
|
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
35
36
|
//#region extensions/whatsapp/src/approval-native.ts
|
|
@@ -224,7 +225,7 @@ const whatsappApprovalCapability = createChannelApprovalCapability({
|
|
|
224
225
|
approvalKind,
|
|
225
226
|
request
|
|
226
227
|
}),
|
|
227
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
228
|
+
load: async () => (await import("./approval-handler.runtime-BO1oJ-b8.js")).whatsappApprovalNativeRuntime
|
|
228
229
|
})
|
|
229
230
|
});
|
|
230
231
|
//#endregion
|
|
@@ -390,7 +391,8 @@ function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhat
|
|
|
390
391
|
}
|
|
391
392
|
//#endregion
|
|
392
393
|
//#region extensions/whatsapp/src/channel-outbound.ts
|
|
393
|
-
const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-
|
|
394
|
+
const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-CrZFAyf-.js").then((n) => n.t));
|
|
395
|
+
const loadWhatsAppQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-C0qJ6wGA.js").then((n) => n.n));
|
|
394
396
|
function normalizeWhatsAppChannelPayloadText(text) {
|
|
395
397
|
return normalizeWhatsAppPayloadTextPreservingIndentation(text);
|
|
396
398
|
}
|
|
@@ -399,12 +401,18 @@ function normalizeWhatsAppChannelSendText(text) {
|
|
|
399
401
|
return normalized.trim() ? normalized : "";
|
|
400
402
|
}
|
|
401
403
|
async function prepareWhatsAppApprovalPayloadForDelivery(params) {
|
|
404
|
+
const questionPayload = questionGatewayRuntime.prepareReactionPayloadForDelivery({
|
|
405
|
+
payload: params.payload,
|
|
406
|
+
presentation: params.presentation
|
|
407
|
+
});
|
|
408
|
+
if (questionPayload) return questionPayload;
|
|
402
409
|
return (await loadWhatsAppApprovalReactionsModule()).prepareWhatsAppApprovalPayloadForDelivery({
|
|
403
410
|
payload: params.payload,
|
|
404
411
|
presentation: params.presentation
|
|
405
412
|
});
|
|
406
413
|
}
|
|
407
414
|
async function registerDeliveredWhatsAppApprovalPayload(params) {
|
|
415
|
+
(await loadWhatsAppQuestionReactionsModule()).registerWhatsAppQuestionReactionTargetForDeliveredPayload(params);
|
|
408
416
|
(await loadWhatsAppApprovalReactionsModule()).registerWhatsAppApprovalReactionTargetForDeliveredPayload(params);
|
|
409
417
|
}
|
|
410
418
|
const whatsappChannelOutbound = {
|
|
@@ -541,23 +549,16 @@ function resolveWhatsAppOutboundSessionRoute(params) {
|
|
|
541
549
|
}
|
|
542
550
|
//#endregion
|
|
543
551
|
//#region extensions/whatsapp/src/status-issues.ts
|
|
552
|
+
const WHATSAPP_ACCOUNT_STATUS_FIELDS = [
|
|
553
|
+
"statusState",
|
|
554
|
+
"linked",
|
|
555
|
+
"reconnectAttempts",
|
|
556
|
+
"lastDisconnect",
|
|
557
|
+
"lastInboundAt",
|
|
558
|
+
"lastError",
|
|
559
|
+
"healthState"
|
|
560
|
+
];
|
|
544
561
|
const RECENT_DISCONNECT_WARNING_WINDOW_MS = 900 * 1e3;
|
|
545
|
-
function readWhatsAppAccountStatus(value) {
|
|
546
|
-
if (!isRecord$1(value)) return null;
|
|
547
|
-
return {
|
|
548
|
-
accountId: value.accountId,
|
|
549
|
-
statusState: value.statusState,
|
|
550
|
-
enabled: value.enabled,
|
|
551
|
-
linked: value.linked,
|
|
552
|
-
connected: value.connected,
|
|
553
|
-
running: value.running,
|
|
554
|
-
reconnectAttempts: value.reconnectAttempts,
|
|
555
|
-
lastDisconnect: value.lastDisconnect,
|
|
556
|
-
lastInboundAt: value.lastInboundAt,
|
|
557
|
-
lastError: value.lastError,
|
|
558
|
-
healthState: value.healthState
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
562
|
function readLastDisconnect(value) {
|
|
562
563
|
if (typeof value === "string") {
|
|
563
564
|
const error = asString(value);
|
|
@@ -579,7 +580,7 @@ function isRecentDisconnect(disconnect, now = Date.now()) {
|
|
|
579
580
|
function collectWhatsAppStatusIssues(accounts) {
|
|
580
581
|
return collectIssuesForEnabledAccounts({
|
|
581
582
|
accounts,
|
|
582
|
-
readAccount:
|
|
583
|
+
readAccount: (value) => readAccountStatusSnapshot(value, WHATSAPP_ACCOUNT_STATUS_FIELDS),
|
|
583
584
|
collectIssues: ({ account, accountId, issues }) => {
|
|
584
585
|
const linked = account.linked === true;
|
|
585
586
|
const statusState = asString(account.statusState);
|
|
@@ -664,8 +665,8 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
664
665
|
}
|
|
665
666
|
//#endregion
|
|
666
667
|
//#region extensions/whatsapp/src/channel.ts
|
|
667
|
-
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-
|
|
668
|
-
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-
|
|
668
|
+
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-BZ775eGX.js").then((n) => n.t));
|
|
669
|
+
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-CPRQE-s3.js"));
|
|
669
670
|
function resolveWhatsAppTargetInfo(raw) {
|
|
670
671
|
const normalized = normalizeWhatsAppTarget(raw);
|
|
671
672
|
if (!normalized) return null;
|
|
@@ -765,7 +766,8 @@ const whatsappPlugin = createChatChannelPlugin({
|
|
|
765
766
|
};
|
|
766
767
|
},
|
|
767
768
|
listPeers: async (params) => (await loadWhatsAppDirectoryConfig()).listWhatsAppDirectoryPeersFromConfig(params),
|
|
768
|
-
listGroups: async (params) => (await loadWhatsAppDirectoryConfig()).listWhatsAppDirectoryGroupsFromConfig(params)
|
|
769
|
+
listGroups: async (params) => (await loadWhatsAppDirectoryConfig()).listWhatsAppDirectoryGroupsFromConfig(params),
|
|
770
|
+
listGroupsLive: async (params) => (await loadWhatsAppDirectoryConfig()).listWhatsAppDirectoryGroupsLive(params)
|
|
769
771
|
},
|
|
770
772
|
actions: {
|
|
771
773
|
describeMessageTool: ({ cfg, accountId }) => describeWhatsAppMessageActions({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappPlugin } from "./channel-
|
|
1
|
+
import { t as whatsappPlugin } from "./channel-B2I4Opzb.js";
|
|
2
2
|
export { whatsappPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-ejK8sXPU.js";
|
|
2
2
|
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-DSZnHkKF.js";
|
|
3
|
-
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-
|
|
4
|
-
import { t as sendMessageWhatsApp } from "./send-
|
|
3
|
+
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-p0V390gA.js";
|
|
4
|
+
import { t as sendMessageWhatsApp } from "./send-SB-4JrVZ.js";
|
|
5
5
|
import "./normalize-C-Z16y7Q.js";
|
|
6
6
|
import { jsonResult, readStringOrNumberParam, readStringParam as readStringParam$1, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
7
7
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { startWebLoginWithQr as startWebLoginWithQr$1, waitForWebLogin as waitForWebLogin$1 } from "./login-qr-runtime.js";
|
|
2
2
|
import { c as logoutWeb$1, d as readWebAuthExistsBestEffort$1, f as readWebAuthExistsForDecision$1, g as readWebSelfId$1, h as readWebAuthState$1, m as readWebAuthSnapshotBestEffort$1, o as getWebAuthAgeMs$1, p as readWebAuthSnapshot$1, s as logWebSelfId$1, x as webAuthExists$1 } from "./auth-store-BQi9pZqQ.js";
|
|
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-
|
|
3
|
+
import { t as getActiveWebListener$1 } from "./active-listener-BbdlXooT.js";
|
|
4
|
+
import { t as monitorWebChannel$1 } from "./monitor-_jqDKBXj.js";
|
|
5
|
+
import { t as loginWeb$1 } from "./login-ifOXCBjo.js";
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-DhnXEZir.js";
|
|
7
7
|
//#region extensions/whatsapp/src/channel.runtime.ts
|
|
8
8
|
function getActiveWebListener(...args) {
|
|
9
9
|
return getActiveWebListener$1(...args);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, t as whatsappSetupAdapter } from "./setup-core-
|
|
2
|
-
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-
|
|
1
|
+
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupWizardProxy, n as createWhatsAppPluginBase, o as resolveWhatsAppGroupToolPolicy, t as whatsappSetupAdapter } from "./setup-core-BbIgEl2M.js";
|
|
2
|
+
import { t as detectWhatsAppLegacyStateMigrations } from "./state-migrations-CAMTrs2U.js";
|
|
3
3
|
//#region extensions/whatsapp/src/channel.setup.ts
|
|
4
4
|
async function isWhatsAppAuthConfigured(account) {
|
|
5
5
|
const { readWebAuthState } = await import("./auth-store-BQi9pZqQ.js").then((n) => n.i);
|