@openclaw/whatsapp 2026.9.1-beta.1 → 2026.9.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/{accounts-BX2fZUyR.js → accounts-CiKHiuEe.js} +10 -27
- package/dist/{action-runtime-C075e6OP.js → action-runtime-CRZLhN3f.js} +2 -2
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/agent-tools-api.js +3 -3
- package/dist/api.js +10 -10
- package/dist/{approval-handler.runtime-CljxfPJz.js → approval-handler.runtime-C2cpkbpY.js} +8 -4
- package/dist/{approval-reactions-Jyr1JaAK.js → approval-reactions-DrZe-NmN.js} +7 -5
- package/dist/auth-presence.js +1 -1
- package/dist/{auth-store-CtpBqH5S.js → auth-store-ZWaclAbd.js} +8 -6
- package/dist/{channel-C4FMOZTE.js → channel-DebjeuFC.js} +56 -62
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-Bhp2BYRr.js → channel-react-action-CHeJSG9F.js} +3 -3
- package/dist/{channel.runtime-CrahUvcb.js → channel.runtime-B90_wffD.js} +4 -4
- package/dist/{channel.setup-CGcBvnpP.js → channel.setup-D1-jE0aE.js} +1 -1
- package/dist/{config-schema-BQP5YCeK.js → config-schema-BYA6e_Ii.js} +6 -4
- package/dist/{connection-controller-CIYuBJrs.js → connection-controller-DNp6U1NN.js} +2 -2
- package/dist/{constants-HU41RHGI.js → constants-C7m81BNe.js} +1 -1
- package/dist/{creds-files-W6B3EMZ8.js → creds-files-Drg3usj1.js} +1 -1
- package/dist/{directory-config-P7_3U73Z.js → directory-config-CoWFw1zn.js} +3 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-BPb-SjdE.js +65 -0
- package/dist/doctor-contract-api.js +21 -3
- package/dist/{group-session-key-DmFc_Cqi.js → group-session-key-BmVDSPr1.js} +11 -12
- package/dist/light-runtime-api.js +1 -1
- package/dist/{login-BkpKpndm.js → login-6j2iP9nR.js} +6 -5
- package/dist/{login-qr-DY4VFgOq.js → login-qr-DRFgI6k1.js} +9 -7
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-C_Nw23PZ.js → monitor-DyPdOPRx.js} +145 -130
- package/dist/{question-reactions-D3eAeB0i.js → question-reactions-bbe0Qnjn.js} +1 -1
- package/dist/runtime-api.js +9 -9
- package/dist/{send-DLMUc2uZ.js → send-BDDGPxav.js} +53 -28
- package/dist/{send-api-BtK45TmZ.js → send-api-C_Zn4Ij-.js} +48 -48
- package/dist/{setup-finalize-C1nij8NS.js → setup-finalize-C5QtbrWV.js} +7 -6
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-CjjqIxQP.js → setup-surface-WsAzq337.js} +3 -3
- package/dist/{shared-BekHi69d.js → shared-BzKxoeKY.js} +8 -7
- package/dist/{socket-close-2T0_jZTN.js → socket-close-B3X9uerq.js} +10 -7
- package/dist/{targets-runtime-TMk0lGuy.js → targets-runtime-RBjx3pg_.js} +1 -2
- package/dist/{text-runtime-CaKLhowd.js → text-runtime-DyfmcATV.js} +1 -1
- package/node_modules/baileys/node_modules/process-warning/.github/dependabot.yml +42 -2
- package/node_modules/baileys/node_modules/process-warning/.github/workflows/ci.yml +12 -1
- package/node_modules/baileys/node_modules/process-warning/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/baileys/node_modules/process-warning/LICENSE +1 -1
- package/node_modules/baileys/node_modules/process-warning/README.md +41 -2
- package/node_modules/baileys/node_modules/process-warning/index.js +85 -17
- package/node_modules/baileys/node_modules/process-warning/package.json +6 -7
- package/node_modules/baileys/node_modules/process-warning/test/emit-once-only.test.js +3 -3
- package/node_modules/baileys/node_modules/process-warning/test/emit-reset.test.js +4 -4
- package/node_modules/baileys/node_modules/process-warning/test/emit-unlimited.test.js +2 -2
- package/node_modules/baileys/node_modules/process-warning/test/spy-warning.test.js +143 -0
- package/node_modules/baileys/node_modules/process-warning/types/index.d.ts +15 -1
- package/node_modules/baileys/node_modules/process-warning/types/index.tst.ts +48 -0
- package/node_modules/baileys/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/baileys/node_modules/ws/package.json +1 -1
- package/node_modules/typebox/build/format/email.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
- package/node_modules/typebox/package.json +1 -1
- package/package.json +7 -6
- package/dist/doctor-CwzVXKoE.js +0 -10
- package/node_modules/baileys/node_modules/process-warning/types/index.test-d.ts +0 -36
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as listConfiguredAccountIds, r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.js";
|
|
2
|
-
import { n as hasWebCredsRegularFileSync, r as hasWebCredsSync } from "./creds-files-
|
|
2
|
+
import { n as hasWebCredsRegularFileSync, r as hasWebCredsSync } from "./creds-files-Drg3usj1.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import { DEFAULT_ACCOUNT_ID,
|
|
5
|
+
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, resolveAccountEntry, resolveMergedAccountConfig, resolveUserPath } from "openclaw/plugin-sdk/account-core";
|
|
6
6
|
import { resolveOAuthDir } from "openclaw/plugin-sdk/state-paths";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
//#region extensions/whatsapp/src/account-config.ts
|
|
@@ -12,36 +12,19 @@ function resolveWhatsAppDefaultAccountSharedConfig(cfg) {
|
|
|
12
12
|
const { enabled: _ignoredEnabled, name: _ignoredName, authDir: _ignoredAuthDir, selfChatMode: _ignoredSelfChatMode, ...sharedDefaults } = defaultAccount;
|
|
13
13
|
return sharedDefaults;
|
|
14
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
15
|
function resolveMergedWhatsAppAccountConfig(params) {
|
|
32
16
|
const rootCfg = params.cfg.channels?.whatsapp;
|
|
33
17
|
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
18
|
return {
|
|
41
19
|
accountId,
|
|
42
|
-
...
|
|
43
|
-
|
|
44
|
-
|
|
20
|
+
...resolveMergedAccountConfig({
|
|
21
|
+
channelConfig: {
|
|
22
|
+
...rootCfg,
|
|
23
|
+
...accountId === DEFAULT_ACCOUNT_ID ? void 0 : resolveWhatsAppDefaultAccountSharedConfig(params.cfg)
|
|
24
|
+
},
|
|
25
|
+
accounts: rootCfg?.accounts,
|
|
26
|
+
accountId,
|
|
27
|
+
omitKeys: ["defaultAccount"]
|
|
45
28
|
})
|
|
46
29
|
};
|
|
47
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
|
|
2
2
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-1GqbT1uX.js";
|
|
3
|
-
import { r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-
|
|
3
|
+
import { r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-BDDGPxav.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-CRZLhN3f.js";
|
|
2
2
|
export { handleWhatsAppAction };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "./action-runtime-
|
|
1
|
+
import { t as handleWhatsAppAction } from "./action-runtime-CRZLhN3f.js";
|
|
2
2
|
export { handleWhatsAppAction };
|
package/dist/agent-tools-api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
|
|
2
2
|
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-DG0tuYuw.js";
|
|
3
|
-
import { s as resolveJidToE164 } from "./targets-runtime-
|
|
3
|
+
import { s as resolveJidToE164 } from "./targets-runtime-RBjx3pg_.js";
|
|
4
4
|
import { n as registerWhatsAppLoginTool } from "./agent-tools-login-B-2qZPzc.js";
|
|
5
5
|
import { createActionGate, stringEnum } from "openclaw/plugin-sdk/channel-actions";
|
|
6
6
|
import path from "node:path";
|
|
@@ -20,7 +20,7 @@ const MAX_AUDIO_DURATION_MS = 6e4;
|
|
|
20
20
|
const MIN_CALL_WINDOW_MS = 115e3;
|
|
21
21
|
const MAX_CALL_WINDOW_MS = 175e3;
|
|
22
22
|
const MAX_MESSAGE_LENGTH = 4e3;
|
|
23
|
-
const MAX_COMMAND_OUTPUT_BYTES =
|
|
23
|
+
const MAX_COMMAND_OUTPUT_BYTES = 65536;
|
|
24
24
|
const MEOWCALLER_ANSWER_TIMEOUT = "45s";
|
|
25
25
|
const MEOWCALLER_MAX_DURATION = "65s";
|
|
26
26
|
const activeCallAccounts = /* @__PURE__ */ new Set();
|
package/dist/api.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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-
|
|
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-CiKHiuEe.js";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.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-CugRyONv.js";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-1GqbT1uX.js";
|
|
5
|
-
import { c as toWhatsappJid, i as markdownToWhatsApp, l as toWhatsappJidWithLid, n as isSelfChatMode, r as jidToE164, s as resolveJidToE164, t as assertWebChannel } from "./targets-runtime-
|
|
6
|
-
import { n as resolveUserPath, t as normalizeE164 } from "./text-runtime-
|
|
7
|
-
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-
|
|
8
|
-
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy } from "./shared-
|
|
5
|
+
import { c as toWhatsappJid, i as markdownToWhatsApp, l as toWhatsappJidWithLid, n as isSelfChatMode, r as jidToE164, s as resolveJidToE164, t as assertWebChannel } from "./targets-runtime-RBjx3pg_.js";
|
|
6
|
+
import { n as resolveUserPath, t as normalizeE164 } from "./text-runtime-DyfmcATV.js";
|
|
7
|
+
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./channel-DebjeuFC.js";
|
|
8
|
+
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy } from "./shared-BzKxoeKY.js";
|
|
9
9
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
|
|
10
|
-
import { t as whatsappSetupPlugin } from "./channel.setup-
|
|
11
|
-
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-
|
|
12
|
-
import { a as waitForWaConnection, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter } from "./socket-close-
|
|
10
|
+
import { t as whatsappSetupPlugin } from "./channel.setup-D1-jE0aE.js";
|
|
11
|
+
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./constants-C7m81BNe.js";
|
|
12
|
+
import { a as waitForWaConnection, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter } from "./socket-close-B3X9uerq.js";
|
|
13
13
|
import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
|
|
14
|
-
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-
|
|
15
|
-
import { _ as resolveInboundMediaMimetype, c as extractContextInfo, m as findMessageSection, o as describeReplyContext, p as extractText, t as createWebSendApi, u as extractLocationData } from "./send-api-
|
|
14
|
+
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-CoWFw1zn.js";
|
|
15
|
+
import { _ as resolveInboundMediaMimetype, c as extractContextInfo, m as findMessageSection, o as describeReplyContext, p as extractText, t as createWebSendApi, u as extractLocationData } from "./send-api-C_Zn4Ij-.js";
|
|
16
16
|
import { asBoolean, isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
17
17
|
import { formatLocationText } from "openclaw/plugin-sdk/channel-inbound";
|
|
18
18
|
//#region extensions/whatsapp/src/qa-driver.runtime.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./accounts-
|
|
1
|
+
import "./accounts-CiKHiuEe.js";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.js";
|
|
3
3
|
import { s as normalizeWhatsAppMessagingTarget } from "./normalize-target-CugRyONv.js";
|
|
4
|
-
import { i as sendTypingWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
4
|
+
import { i as sendTypingWhatsApp, t as sendMessageWhatsApp } from "./send-BDDGPxav.js";
|
|
5
5
|
import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.js";
|
|
6
6
|
import "./normalize-C7Hkc_vE.js";
|
|
7
|
-
import { i as unregisterWhatsAppApprovalReactionTarget, r as registerWhatsAppApprovalReactionTarget } from "./approval-reactions-
|
|
7
|
+
import { i as unregisterWhatsAppApprovalReactionTarget, r as registerWhatsAppApprovalReactionTarget } from "./approval-reactions-DrZe-NmN.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 { buildApprovalReactionPendingContent } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
@@ -16,7 +16,11 @@ function buildPendingPayload(params) {
|
|
|
16
16
|
return buildApprovalReactionPendingContent(params);
|
|
17
17
|
}
|
|
18
18
|
const whatsappApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
|
|
19
|
-
eventKinds: [
|
|
19
|
+
eventKinds: [
|
|
20
|
+
"exec",
|
|
21
|
+
"plugin",
|
|
22
|
+
"system-agent"
|
|
23
|
+
],
|
|
20
24
|
availability: {
|
|
21
25
|
isConfigured: ({ context }) => Boolean(context),
|
|
22
26
|
shouldHandle: ({ context }) => Boolean(context)
|
|
@@ -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-CiKHiuEe.js";
|
|
3
3
|
import { n as getOptionalWhatsAppRuntime } from "./runtime-BLlToOi6.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-BmVDSPr1.js";
|
|
5
5
|
import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
|
|
6
6
|
import { createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
7
|
import { approvalReactionDecisionSetsMatch, buildApprovalReactionDeliveredBindingMarker, createApprovalReactionTargetStore, listApprovalReactionBindings, readApprovalReactionDecisionList, readApprovalReactionDeliveredBinding, readApprovalReactionPresentationBinding, resolveTypedApprovalReactionTarget } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
@@ -18,15 +18,16 @@ var approval_reactions_exports = /* @__PURE__ */ __exportAll({
|
|
|
18
18
|
});
|
|
19
19
|
const PERSISTENT_NAMESPACE = "whatsapp.approval-reactions";
|
|
20
20
|
const PERSISTENT_MAX_ENTRIES = 1e3;
|
|
21
|
-
const DEFAULT_REACTION_TARGET_TTL_MS =
|
|
21
|
+
const DEFAULT_REACTION_TARGET_TTL_MS = 864e5;
|
|
22
22
|
const DELIVERY_BINDING_CHANNEL_DATA_KEY = "whatsappApprovalReactionBindingV1";
|
|
23
23
|
const loadResolveApprovalOverGateway = createLazyRuntimeSurface(() => import("openclaw/plugin-sdk/approval-gateway-runtime"), (runtime) => runtime.resolveApprovalOverGateway);
|
|
24
|
+
const reportPersistentApprovalReactionError = createPluginStateErrorReporter(getOptionalWhatsAppRuntime, "whatsapp", "approval-reaction-state", "WhatsApp persistent approval reaction state failed");
|
|
24
25
|
const whatsappApprovalReactionTargets = createApprovalReactionTargetStore({
|
|
25
26
|
namespace: PERSISTENT_NAMESPACE,
|
|
26
27
|
maxEntries: PERSISTENT_MAX_ENTRIES,
|
|
27
28
|
defaultTtlMs: DEFAULT_REACTION_TARGET_TTL_MS,
|
|
28
29
|
openStore: (storeParams) => getOptionalWhatsAppRuntime()?.state.openKeyedStore(storeParams),
|
|
29
|
-
logPersistentError:
|
|
30
|
+
logPersistentError: reportPersistentApprovalReactionError,
|
|
30
31
|
readPersistedTarget
|
|
31
32
|
});
|
|
32
33
|
function buildReactionTargetKey(params) {
|
|
@@ -88,7 +89,8 @@ function visibleApprovalBindingMatches(text, binding) {
|
|
|
88
89
|
"allow-always",
|
|
89
90
|
"deny"
|
|
90
91
|
] });
|
|
91
|
-
const
|
|
92
|
+
const visibleDecisions = decisionLines.map((line) => knownBindings.find((entry) => `${entry.emoji} ${entry.label}` === line)?.decision);
|
|
93
|
+
const decisions = readApprovalReactionDecisionList(visibleDecisions);
|
|
92
94
|
if (!decisions) return false;
|
|
93
95
|
return approvalReactionDecisionSetsMatch(binding.allowedDecisions, decisions);
|
|
94
96
|
}
|
package/dist/auth-presence.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as readWebCredsJsonRaw, c as resolveWebCredsPath, i as isWhatsAppBaileysAuthFileName, l as statWebCredsFileSync, o as readWebCredsJsonRawSync, r as hasWebCredsSync, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-
|
|
3
|
-
import { r as jidToE164 } from "./targets-runtime-
|
|
4
|
-
import { n as resolveUserPath, t as normalizeE164 } from "./text-runtime-
|
|
2
|
+
import { a as readWebCredsJsonRaw, c as resolveWebCredsPath, i as isWhatsAppBaileysAuthFileName, l as statWebCredsFileSync, o as readWebCredsJsonRawSync, r as hasWebCredsSync, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-Drg3usj1.js";
|
|
3
|
+
import { r as jidToE164 } from "./targets-runtime-RBjx3pg_.js";
|
|
4
|
+
import { n as resolveUserPath, t as normalizeE164 } from "./text-runtime-DyfmcATV.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { resolveOAuthDir as resolveOAuthDir$1 } from "openclaw/plugin-sdk/state-paths";
|
|
7
|
-
import {
|
|
7
|
+
import { isPathStrictlyInside } from "openclaw/plugin-sdk/file-access-runtime";
|
|
8
8
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
9
9
|
import { defaultRuntime, getChildLogger, info, success } from "openclaw/plugin-sdk/runtime-env";
|
|
10
10
|
import fs from "node:fs/promises";
|
|
11
|
-
import { isPathStrictlyInside } from "openclaw/plugin-sdk/file-access-runtime";
|
|
12
11
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/routing";
|
|
13
12
|
import { enqueueKeyedTask } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
14
13
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
14
|
+
import { replaceFileAtomic } from "openclaw/plugin-sdk/security-runtime";
|
|
15
15
|
//#region extensions/whatsapp/src/creds-persistence.ts
|
|
16
16
|
const CREDS_FILE_MODE = 384;
|
|
17
17
|
const CREDS_SAVE_FLUSH_TIMEOUT_MS = 15e3;
|
|
@@ -240,7 +240,9 @@ async function restoreCredsFromBackupIfNeeded(authDir, options) {
|
|
|
240
240
|
return false;
|
|
241
241
|
}
|
|
242
242
|
async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
|
|
243
|
-
const
|
|
243
|
+
const resolvedAuthDir = resolveUserPath(authDir);
|
|
244
|
+
const credsPath = resolveWebCredsPath(resolvedAuthDir);
|
|
245
|
+
const raw = await readWebCredsJsonRaw(credsPath);
|
|
244
246
|
if (!raw) return false;
|
|
245
247
|
try {
|
|
246
248
|
JSON.parse(raw);
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-CiKHiuEe.js";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.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-CugRyONv.js";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-1GqbT1uX.js";
|
|
5
|
-
import { c as normalizeWhatsAppPayloadTextPreservingIndentation, i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppOutboundPayload, s as normalizeWhatsAppPayloadText, t as sendMessageWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-
|
|
5
|
+
import { c as normalizeWhatsAppPayloadTextPreservingIndentation, i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppOutboundPayload, s as normalizeWhatsAppPayloadText, t as sendMessageWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-BDDGPxav.js";
|
|
6
6
|
import { i as getWhatsAppRuntime } from "./runtime-BLlToOi6.js";
|
|
7
7
|
import "./normalize-C7Hkc_vE.js";
|
|
8
|
-
import { c as toWhatsappJid } from "./targets-runtime-
|
|
9
|
-
import "./text-runtime-
|
|
10
|
-
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth, s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-
|
|
11
|
-
import { a as resolveWhatsAppGroupRequireMention, c as loadWhatsAppChannelRuntime, i as whatsappSetupContract, l as readWhatsAppAccountLinkState, n as whatsappSetupWizardProxy, o as resolveWhatsAppGroupToolPolicy, s as formatWhatsAppConfigAllowFromEntries, t as createWhatsAppPluginBase } from "./shared-
|
|
8
|
+
import { c as toWhatsappJid } from "./targets-runtime-RBjx3pg_.js";
|
|
9
|
+
import "./text-runtime-DyfmcATV.js";
|
|
10
|
+
import { c as getWhatsAppApprovalApprovers, l as whatsappApprovalAuth, s as lookupInboundMessageMetaForTarget, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-BmVDSPr1.js";
|
|
11
|
+
import { a as resolveWhatsAppGroupRequireMention, c as loadWhatsAppChannelRuntime, i as whatsappSetupContract, l as readWhatsAppAccountLinkState, n as whatsappSetupWizardProxy, o as resolveWhatsAppGroupToolPolicy, s as formatWhatsAppConfigAllowFromEntries, t as createWhatsAppPluginBase } from "./shared-BzKxoeKY.js";
|
|
12
12
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.js";
|
|
13
|
-
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-
|
|
13
|
+
import { f as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-ZWaclAbd.js";
|
|
14
14
|
import { createActionGate as createActionGate$1 } from "openclaw/plugin-sdk/channel-actions";
|
|
15
15
|
import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-core";
|
|
16
16
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
17
17
|
import { collectIssuesForEnabledAccounts, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState, isRecord as isRecord$1, readAccountStatusSnapshot } from "openclaw/plugin-sdk/status-helpers";
|
|
18
|
+
import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
18
19
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
19
20
|
import { buildChannelOutboundSessionRoute } from "openclaw/plugin-sdk/core";
|
|
20
|
-
import { chunkText } from "openclaw/plugin-sdk/reply-chunking";
|
|
21
|
-
import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
22
21
|
import { sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
23
22
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
|
24
23
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
@@ -67,7 +66,11 @@ const whatsappApproval = createApproverRestrictedNativeApprovalCapabilityFromFor
|
|
|
67
66
|
}, "plugin") }
|
|
68
67
|
},
|
|
69
68
|
createNativeRuntime: (routing) => createLazyChannelApprovalNativeRuntimeAdapter({
|
|
70
|
-
eventKinds: [
|
|
69
|
+
eventKinds: [
|
|
70
|
+
"exec",
|
|
71
|
+
"plugin",
|
|
72
|
+
"system-agent"
|
|
73
|
+
],
|
|
71
74
|
isConfigured: ({ cfg, accountId, context }) => Boolean(context) && routing.canAnyApprovalPotentiallyRouteToChannel({
|
|
72
75
|
cfg,
|
|
73
76
|
accountId,
|
|
@@ -79,7 +82,7 @@ const whatsappApproval = createApproverRestrictedNativeApprovalCapabilityFromFor
|
|
|
79
82
|
approvalKind,
|
|
80
83
|
request
|
|
81
84
|
}),
|
|
82
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
85
|
+
load: async () => (await import("./approval-handler.runtime-C2cpkbpY.js")).whatsappApprovalNativeRuntime
|
|
83
86
|
})
|
|
84
87
|
});
|
|
85
88
|
function buildWhatsAppPendingPayload(params, approvalKind) {
|
|
@@ -149,7 +152,7 @@ function resolveQuoteLookupAccountId(cfg, accountId) {
|
|
|
149
152
|
if (explicitAccountId) return explicitAccountId;
|
|
150
153
|
return resolveDefaultWhatsAppAccountId(cfg ?? {});
|
|
151
154
|
}
|
|
152
|
-
function createWhatsAppOutboundBase({
|
|
155
|
+
function createWhatsAppOutboundBase({ sendMessageWhatsApp, sendPollWhatsApp, shouldLogVerbose, resolveTarget, normalizeText = normalizeWhatsAppPayloadText, skipEmptyText = true }) {
|
|
153
156
|
const resolveQuotedMessageKey = (params) => {
|
|
154
157
|
const replyToId = params.replyToId?.trim();
|
|
155
158
|
if (!replyToId) return;
|
|
@@ -165,10 +168,34 @@ function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhat
|
|
|
165
168
|
media: cachedMeta?.media
|
|
166
169
|
};
|
|
167
170
|
};
|
|
171
|
+
const dispatchMessage = async (params, text, mediaOptions, mediaDeliveryOptions) => {
|
|
172
|
+
const lookupAccountId = resolveQuoteLookupAccountId(params.cfg, params.accountId);
|
|
173
|
+
const quotedMessageKey = resolveQuotedMessageKey({
|
|
174
|
+
accountId: lookupAccountId,
|
|
175
|
+
to: params.to,
|
|
176
|
+
replyToId: params.replyToId
|
|
177
|
+
});
|
|
178
|
+
const send = quotedMessageKey ? sendMessageWhatsApp : resolveOutboundSendDep(params.deps, "whatsapp", { legacyKeys: WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS }) ?? sendMessageWhatsApp;
|
|
179
|
+
const onDeliveryResult = params.onDeliveryResult;
|
|
180
|
+
return await send(params.to, text ?? normalizeText(params.text), {
|
|
181
|
+
verbose: false,
|
|
182
|
+
cfg: params.cfg,
|
|
183
|
+
...mediaOptions,
|
|
184
|
+
accountId: params.accountId ?? void 0,
|
|
185
|
+
gifPlayback: params.gifPlayback,
|
|
186
|
+
...mediaDeliveryOptions,
|
|
187
|
+
replyToIdSource: params.replyToIdSource,
|
|
188
|
+
replyToMode: params.replyToMode,
|
|
189
|
+
formatting: params.formatting,
|
|
190
|
+
onPlatformSendDispatch: params.onPlatformSendDispatch,
|
|
191
|
+
...quotedMessageKey ? { quotedMessageKey } : {},
|
|
192
|
+
...onDeliveryResult ? { onDeliveryResult: async (result) => {
|
|
193
|
+
await onDeliveryResult(attachChannelToResult("whatsapp", result));
|
|
194
|
+
} } : {}
|
|
195
|
+
});
|
|
196
|
+
};
|
|
168
197
|
const outbound = {
|
|
169
198
|
deliveryMode: "gateway",
|
|
170
|
-
chunker,
|
|
171
|
-
chunkerMode: "text",
|
|
172
199
|
textChunkLimit: 4e3,
|
|
173
200
|
sanitizeText: ({ text }) => normalizeText(text),
|
|
174
201
|
deliveryCapabilities: { durableFinal: {
|
|
@@ -180,50 +207,18 @@ function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhat
|
|
|
180
207
|
resolveTarget,
|
|
181
208
|
...createAttachedChannelResultAdapter({
|
|
182
209
|
channel: "whatsapp",
|
|
183
|
-
sendText: async (
|
|
184
|
-
const normalizedText = normalizeText(text);
|
|
210
|
+
sendText: async (params) => {
|
|
211
|
+
const normalizedText = normalizeText(params.text);
|
|
185
212
|
if (skipEmptyText && !normalizedText) return { messageId: "" };
|
|
186
|
-
|
|
187
|
-
const quotedMessageKey = resolveQuotedMessageKey({
|
|
188
|
-
accountId: lookupAccountId,
|
|
189
|
-
to,
|
|
190
|
-
replyToId
|
|
191
|
-
});
|
|
192
|
-
return await (quotedMessageKey ? sendMessageWhatsApp : resolveOutboundSendDep(deps, "whatsapp", { legacyKeys: WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS }) ?? sendMessageWhatsApp)(to, normalizedText, {
|
|
193
|
-
verbose: false,
|
|
194
|
-
cfg,
|
|
195
|
-
accountId: accountId ?? void 0,
|
|
196
|
-
gifPlayback,
|
|
197
|
-
...quotedMessageKey ? { quotedMessageKey } : {},
|
|
198
|
-
...onDeliveryResult ? { onDeliveryResult: async (result) => {
|
|
199
|
-
await onDeliveryResult(attachChannelToResult("whatsapp", result));
|
|
200
|
-
} } : {}
|
|
201
|
-
});
|
|
202
|
-
},
|
|
203
|
-
sendMedia: async ({ cfg, to, text, mediaUrl, mediaAccess, mediaLocalRoots, mediaReadFile, audioAsVoice, accountId, deps, gifPlayback, forceDocument, replyToId, onDeliveryResult }) => {
|
|
204
|
-
const lookupAccountId = resolveQuoteLookupAccountId(cfg, accountId);
|
|
205
|
-
const quotedMessageKey = resolveQuotedMessageKey({
|
|
206
|
-
accountId: lookupAccountId,
|
|
207
|
-
to,
|
|
208
|
-
replyToId
|
|
209
|
-
});
|
|
210
|
-
return await (quotedMessageKey ? sendMessageWhatsApp : resolveOutboundSendDep(deps, "whatsapp", { legacyKeys: WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS }) ?? sendMessageWhatsApp)(to, normalizeText(text), {
|
|
211
|
-
verbose: false,
|
|
212
|
-
cfg,
|
|
213
|
-
mediaUrl,
|
|
214
|
-
mediaAccess,
|
|
215
|
-
mediaLocalRoots,
|
|
216
|
-
mediaReadFile,
|
|
217
|
-
...audioAsVoice === void 0 ? {} : { audioAsVoice },
|
|
218
|
-
accountId: accountId ?? void 0,
|
|
219
|
-
gifPlayback,
|
|
220
|
-
forceDocument,
|
|
221
|
-
...quotedMessageKey ? { quotedMessageKey } : {},
|
|
222
|
-
...onDeliveryResult ? { onDeliveryResult: async (result) => {
|
|
223
|
-
await onDeliveryResult(attachChannelToResult("whatsapp", result));
|
|
224
|
-
} } : {}
|
|
225
|
-
});
|
|
213
|
+
return await dispatchMessage(params, normalizedText);
|
|
226
214
|
},
|
|
215
|
+
sendMedia: async (params) => await dispatchMessage(params, void 0, {
|
|
216
|
+
mediaUrl: params.mediaUrl,
|
|
217
|
+
mediaAccess: params.mediaAccess,
|
|
218
|
+
mediaLocalRoots: params.mediaLocalRoots,
|
|
219
|
+
mediaReadFile: params.mediaReadFile,
|
|
220
|
+
...params.audioAsVoice === void 0 ? {} : { audioAsVoice: params.audioAsVoice }
|
|
221
|
+
}, { forceDocument: params.forceDocument }),
|
|
227
222
|
sendPoll: async ({ cfg, to, poll, accountId }) => await sendPollWhatsApp(to, poll, {
|
|
228
223
|
verbose: shouldLogVerbose(),
|
|
229
224
|
accountId: accountId ?? void 0,
|
|
@@ -259,8 +254,8 @@ function createWhatsAppOutboundBase({ chunker, sendMessageWhatsApp, sendPollWhat
|
|
|
259
254
|
}
|
|
260
255
|
//#endregion
|
|
261
256
|
//#region extensions/whatsapp/src/channel-outbound.ts
|
|
262
|
-
const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-
|
|
263
|
-
const loadWhatsAppQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-
|
|
257
|
+
const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-DrZe-NmN.js").then((n) => n.t));
|
|
258
|
+
const loadWhatsAppQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-bbe0Qnjn.js").then((n) => n.n));
|
|
264
259
|
function normalizeWhatsAppChannelPayloadText(text) {
|
|
265
260
|
return normalizeWhatsAppPayloadTextPreservingIndentation(text);
|
|
266
261
|
}
|
|
@@ -285,7 +280,6 @@ async function registerDeliveredWhatsAppApprovalPayload(params) {
|
|
|
285
280
|
}
|
|
286
281
|
const whatsappChannelOutbound = {
|
|
287
282
|
...createWhatsAppOutboundBase({
|
|
288
|
-
chunker: chunkText,
|
|
289
283
|
sendMessageWhatsApp: async (to, text, options) => await sendMessageWhatsApp(to, text, {
|
|
290
284
|
...options,
|
|
291
285
|
preserveLeadingWhitespace: true
|
|
@@ -417,7 +411,7 @@ const WHATSAPP_ACCOUNT_STATUS_FIELDS = [
|
|
|
417
411
|
"lastError",
|
|
418
412
|
"healthState"
|
|
419
413
|
];
|
|
420
|
-
const RECENT_DISCONNECT_WARNING_WINDOW_MS =
|
|
414
|
+
const RECENT_DISCONNECT_WARNING_WINDOW_MS = 9e5;
|
|
421
415
|
function readLastDisconnect(value) {
|
|
422
416
|
if (typeof value === "string") {
|
|
423
417
|
const error = normalizeOptionalString(value);
|
|
@@ -524,8 +518,8 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
524
518
|
}
|
|
525
519
|
//#endregion
|
|
526
520
|
//#region extensions/whatsapp/src/channel.ts
|
|
527
|
-
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-
|
|
528
|
-
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-
|
|
521
|
+
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-CoWFw1zn.js").then((n) => n.t));
|
|
522
|
+
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-CHeJSG9F.js"));
|
|
529
523
|
function resolveWhatsAppTargetInfo(raw) {
|
|
530
524
|
const normalized = normalizeWhatsAppTarget(raw);
|
|
531
525
|
if (!normalized) return null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WhatsAppChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as WhatsAppChannelConfigSchema } from "./config-schema-BYA6e_Ii.js";
|
|
2
2
|
export { WhatsAppChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappPlugin } from "./channel-
|
|
1
|
+
import { t as whatsappPlugin } from "./channel-DebjeuFC.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-CiKHiuEe.js";
|
|
2
2
|
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-CugRyONv.js";
|
|
3
|
-
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-
|
|
4
|
-
import { a as sendWhatsAppUploadFile } from "./send-
|
|
3
|
+
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-CRZLhN3f.js";
|
|
4
|
+
import { a as sendWhatsAppUploadFile } from "./send-BDDGPxav.js";
|
|
5
5
|
import "./normalize-C7Hkc_vE.js";
|
|
6
6
|
import { jsonResult, readStringOrNumberParam, readStringParam as readStringParam$1, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
7
7
|
import { canonicalizeBase64, estimateBase64DecodedBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { startWebLoginWithQr as startWebLoginWithQr$1, waitForWebLogin as waitForWebLogin$1 } from "./login-qr-runtime.js";
|
|
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-
|
|
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-ZWaclAbd.js";
|
|
3
3
|
import { t as getActiveWebListener$1 } from "./active-listener-BEjWsCNM.js";
|
|
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-
|
|
4
|
+
import { t as monitorWebChannel$1 } from "./monitor-DyPdOPRx.js";
|
|
5
|
+
import { t as loginWeb$1 } from "./login-6j2iP9nR.js";
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-WsAzq337.js";
|
|
7
7
|
//#region extensions/whatsapp/src/channel.runtime.ts
|
|
8
8
|
function getActiveWebListener(...args) {
|
|
9
9
|
return getActiveWebListener$1(...args);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupContract, l as readWhatsAppAccountLinkState, n as whatsappSetupWizardProxy, o as resolveWhatsAppGroupToolPolicy, t as createWhatsAppPluginBase } from "./shared-
|
|
1
|
+
import { a as resolveWhatsAppGroupRequireMention, i as whatsappSetupContract, l as readWhatsAppAccountLinkState, n as whatsappSetupWizardProxy, o as resolveWhatsAppGroupToolPolicy, t as createWhatsAppPluginBase } from "./shared-BzKxoeKY.js";
|
|
2
2
|
//#region extensions/whatsapp/src/channel.setup.ts
|
|
3
3
|
const whatsappSetupPlugin = { ...createWhatsAppPluginBase({
|
|
4
4
|
groups: {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
|
|
2
2
|
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
3
3
|
import { WhatsAppConfigSchema } from "openclaw/plugin-sdk/bundled-channel-config-schema";
|
|
4
|
-
//#
|
|
5
|
-
|
|
6
|
-
const WhatsAppChannelConfigSchema = buildChannelConfigSchema(WhatsAppConfigSchema, { uiHints: {
|
|
4
|
+
//#region extensions/whatsapp/src/config-ui-hints.ts
|
|
5
|
+
const whatsAppChannelConfigUiHints = {
|
|
7
6
|
"": {
|
|
8
7
|
label: "WhatsApp",
|
|
9
8
|
help: "WhatsApp channel provider configuration for access policy and direct-message routing safety."
|
|
@@ -45,6 +44,9 @@ const WhatsAppChannelConfigSchema = buildChannelConfigSchema(WhatsAppConfigSchem
|
|
|
45
44
|
policyTargetDescription: "WhatsApp conversation IDs such as 123@g.us"
|
|
46
45
|
}
|
|
47
46
|
})
|
|
48
|
-
}
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region extensions/whatsapp/src/config-schema.ts
|
|
50
|
+
const WhatsAppChannelConfigSchema = buildChannelConfigSchema(WhatsAppConfigSchema, { uiHints: whatsAppChannelConfigUiHints });
|
|
49
51
|
//#endregion
|
|
50
52
|
export { WhatsAppChannelConfigSchema as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as getWhatsAppChannelRuntime } from "./runtime-BLlToOi6.js";
|
|
2
2
|
import { n as WHATSAPP_CONNECTION_OWNER_PENDING_CAPABILITY, t as WHATSAPP_CONNECTION_CONTROLLER_CAPABILITY } from "./connection-controller-runtime-context-DG0tuYuw.js";
|
|
3
|
-
import { M as waitForCredsSaveQueueWithTimeout, c as logoutWeb, f as readWebAuthExistsForDecision, k as resolveComparableIdentity, r as WhatsAppAuthUnstableError } from "./auth-store-
|
|
4
|
-
import { a as waitForWaConnection, m as acquireWhatsAppGatewayConnectionOwner, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, t as closeWhatsAppSocketAndWait } from "./socket-close-
|
|
3
|
+
import { M as waitForCredsSaveQueueWithTimeout, c as logoutWeb, f as readWebAuthExistsForDecision, k as resolveComparableIdentity, r as WhatsAppAuthUnstableError } from "./auth-store-ZWaclAbd.js";
|
|
4
|
+
import { a as waitForWaConnection, m as acquireWhatsAppGatewayConnectionOwner, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, t as closeWhatsAppSocketAndWait } from "./socket-close-B3X9uerq.js";
|
|
5
5
|
import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
|
|
6
6
|
import { computeBackoff, info, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
7
7
|
import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { assertNoSymlinkParents, assertNoSymlinkParentsSync, readRegularFile, readRegularFileSync, statRegularFile, statRegularFileSync } from "openclaw/plugin-sdk/
|
|
2
|
+
import { assertNoSymlinkParents, assertNoSymlinkParentsSync, readRegularFile, readRegularFileSync, statRegularFile, statRegularFileSync } from "openclaw/plugin-sdk/file-access-runtime";
|
|
3
3
|
//#region extensions/whatsapp/src/creds-files.ts
|
|
4
4
|
const BAILEYS_SIGNAL_AUTH_CATEGORIES = {
|
|
5
5
|
"app-state-sync-key": true,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { c as resolveMergedWhatsAppAccountConfig, o as resolveWhatsAppAuthDir } from "./accounts-
|
|
2
|
+
import { c as resolveMergedWhatsAppAccountConfig, o as resolveWhatsAppAuthDir } from "./accounts-CiKHiuEe.js";
|
|
3
3
|
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-CugRyONv.js";
|
|
4
4
|
import { i as hasPendingWhatsAppConnectionOwner, r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-DG0tuYuw.js";
|
|
5
5
|
import "./normalize-C7Hkc_vE.js";
|
|
6
|
-
import { M as waitForCredsSaveQueueWithTimeout, f as readWebAuthExistsForDecision } from "./auth-store-
|
|
6
|
+
import { M as waitForCredsSaveQueueWithTimeout, f as readWebAuthExistsForDecision } from "./auth-store-ZWaclAbd.js";
|
|
7
7
|
import { n as resolveWebAccountId } from "./active-listener-BEjWsCNM.js";
|
|
8
|
-
import { a as waitForWaConnection, h as acquireWhatsAppStandaloneConnectionOwner, n as createWaDirectorySocket, p as WhatsAppConnectionOwnerBusyError, t as closeWhatsAppSocketAndWait } from "./socket-close-
|
|
8
|
+
import { a as waitForWaConnection, h as acquireWhatsAppStandaloneConnectionOwner, n as createWaDirectorySocket, p as WhatsAppConnectionOwnerBusyError, t as closeWhatsAppSocketAndWait } from "./socket-close-B3X9uerq.js";
|
|
9
9
|
import { listResolvedDirectoryGroupEntriesFromMapKeys, listResolvedDirectoryUserEntriesFromAllowFrom } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
10
10
|
//#region extensions/whatsapp/src/directory-config.ts
|
|
11
11
|
var directory_config_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./directory-config-CoWFw1zn.js";
|
|
2
2
|
//#region extensions/whatsapp/directory-contract-api.ts
|
|
3
3
|
const whatsappDirectoryContractPlugin = {
|
|
4
4
|
id: "whatsapp",
|