@openclaw/whatsapp 2026.5.2 → 2026.5.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-control-BQ3tCkH8.js +288 -0
- package/dist/account-config-CNQ33oav.js +47 -0
- package/dist/account-ids-DG18xddX.js +5 -0
- package/dist/accounts-BDqgpFEB.js +116 -0
- package/dist/action-runtime-DTGNgG-i.js +74 -0
- package/dist/action-runtime-api.js +2 -0
- package/dist/action-runtime.runtime.js +2 -0
- package/dist/active-listener-N7GFKsuN.js +11 -0
- package/dist/agent-tools-login-DpRxLNRB.js +89 -0
- package/dist/api.js +148 -0
- package/dist/audio-preflight.runtime-Bcdsl_ri.js +7 -0
- package/dist/auth-presence.js +32 -0
- package/dist/auth-store-BjCb50Ry.js +381 -0
- package/dist/channel-DQ-5Xoj9.js +542 -0
- package/dist/channel-config-api.js +2 -0
- package/dist/channel-plugin-api.js +2 -0
- package/dist/channel-react-action-Df20qAy9.js +42 -0
- package/dist/channel.runtime-DKXRnA8x.js +55 -0
- package/dist/channel.setup-DOHR2BGp.js +20 -0
- package/dist/command-policy-O8sRnqUV.js +8 -0
- package/dist/config-schema-Dmo66Ubb.js +27 -0
- package/dist/connection-controller-BiHAsTM8.js +596 -0
- package/dist/connection-controller-registry-D_iIGz5m.js +22 -0
- package/dist/constants-DLGCIbfl.js +4 -0
- package/dist/constants.js +2 -0
- package/dist/contract-api.js +19 -0
- package/dist/creds-files-_2V8jzQa.js +19 -0
- package/dist/directory-config-DVs4ffXu.js +37 -0
- package/dist/directory-contract-api.js +2 -0
- package/dist/doctor-A9tXm9Om.js +48 -0
- package/dist/doctor-contract-api.js +10 -0
- package/dist/group-session-contract-B8QBn0I2.js +15 -0
- package/dist/identity-QHAlV7Fu.js +75 -0
- package/dist/index.js +18 -0
- package/dist/legacy-session-surface-api.js +8 -0
- package/dist/legacy-state-migrations-api.js +2 -0
- package/dist/light-runtime-api.js +5 -0
- package/dist/login-DymdrKca.js +52 -0
- package/dist/login-qr-DIS0Iv-7.js +378 -0
- package/dist/login-qr-api.js +2 -0
- package/dist/login-qr-runtime.js +16 -0
- package/dist/monitor-C4Fhg_lD.js +3349 -0
- package/dist/normalize-CWYiGkXw.js +2 -0
- package/dist/normalize-target-BPVHNsM5.js +74 -0
- package/dist/outbound-adapter-BssVnZdz.js +29 -0
- package/dist/outbound-base-Bq1UYEK5.js +119 -0
- package/dist/outbound-media-contract-CGss_QHy.js +163 -0
- package/dist/outbound-payload-test-api.js +2 -0
- package/dist/quoted-message-TENQzyxV.js +108 -0
- package/dist/reaction-level-CRVEVAfi.js +16 -0
- package/dist/reply-resolver.runtime-BRCgoO4C.js +2 -0
- package/dist/resolve-outbound-target-CN-Wo6IY.js +39 -0
- package/dist/rolldown-runtime-RkAeH_Qm.js +27 -0
- package/dist/runtime-6fZ67abR.js +8 -0
- package/dist/runtime-api.js +15 -0
- package/dist/runtime-group-policy-Gp1lQ0at.js +11 -0
- package/dist/secret-contract-api.js +5 -0
- package/dist/security-contract-DqH8JDX6.js +26 -0
- package/dist/security-contract-api.js +2 -0
- package/dist/send-CIyLFxdZ.js +234 -0
- package/dist/session-contract-B0efQf9P.js +27 -0
- package/dist/session-errors-CSuKZPub.js +63 -0
- package/dist/session.runtime-C1eSE_KK.js +13 -0
- package/dist/setup-core-DZKvpzbH.js +46 -0
- package/dist/setup-entry.js +23 -0
- package/dist/setup-plugin-api.js +2 -0
- package/dist/setup-surface-ieFnIW4g.js +344 -0
- package/dist/shared-D_wzSVar.js +307 -0
- package/dist/state-migrations-DnCdvoYD.js +39 -0
- package/dist/targets.js +2 -0
- package/dist/test-api.js +3 -0
- package/dist/text-runtime-C1zNiZeO.js +116 -0
- package/package.json +14 -6
- package/action-runtime-api.ts +0 -1
- package/action-runtime.runtime.ts +0 -1
- package/api.ts +0 -213
- package/auth-presence.ts +0 -80
- package/channel-config-api.ts +0 -1
- package/channel-plugin-api.ts +0 -3
- package/config-api.ts +0 -4
- package/constants.ts +0 -1
- package/contract-api.ts +0 -29
- package/directory-contract-api.ts +0 -4
- package/doctor-contract-api.ts +0 -8
- package/index.test.ts +0 -13
- package/index.ts +0 -16
- package/legacy-session-surface-api.ts +0 -6
- package/legacy-state-migrations-api.ts +0 -1
- package/light-runtime-api.ts +0 -12
- package/login-qr-api.ts +0 -1
- package/login-qr-runtime.ts +0 -23
- package/outbound-payload-test-api.ts +0 -1
- package/runtime-api.ts +0 -84
- package/secret-contract-api.ts +0 -4
- package/security-contract-api.ts +0 -4
- package/setup-entry.test.ts +0 -21
- package/setup-entry.ts +0 -21
- package/setup-plugin-api.ts +0 -3
- package/src/account-config.ts +0 -77
- package/src/account-ids.ts +0 -13
- package/src/account-types.ts +0 -5
- package/src/accounts.test.ts +0 -182
- package/src/accounts.ts +0 -176
- package/src/accounts.whatsapp-auth.test.ts +0 -59
- package/src/action-runtime-target-auth.ts +0 -27
- package/src/action-runtime.test.ts +0 -330
- package/src/action-runtime.ts +0 -76
- package/src/active-listener.test.ts +0 -65
- package/src/active-listener.ts +0 -17
- package/src/agent-tools-login.test.ts +0 -81
- package/src/agent-tools-login.ts +0 -113
- package/src/approval-auth.test.ts +0 -24
- package/src/approval-auth.ts +0 -27
- package/src/auth-store.runtime.ts +0 -1
- package/src/auth-store.test.ts +0 -311
- package/src/auth-store.ts +0 -502
- package/src/auto-reply/config.runtime.ts +0 -16
- package/src/auto-reply/constants.ts +0 -1
- package/src/auto-reply/deliver-reply.test.ts +0 -843
- package/src/auto-reply/deliver-reply.ts +0 -279
- package/src/auto-reply/loggers.ts +0 -6
- package/src/auto-reply/mentions.ts +0 -131
- package/src/auto-reply/monitor/ack-reaction.test.ts +0 -170
- package/src/auto-reply/monitor/ack-reaction.ts +0 -99
- package/src/auto-reply/monitor/audio-preflight.runtime.ts +0 -9
- package/src/auto-reply/monitor/broadcast.ts +0 -153
- package/src/auto-reply/monitor/commands.ts +0 -19
- package/src/auto-reply/monitor/echo.ts +0 -64
- package/src/auto-reply/monitor/group-activation.runtime.ts +0 -1
- package/src/auto-reply/monitor/group-activation.test.ts +0 -189
- package/src/auto-reply/monitor/group-activation.ts +0 -73
- package/src/auto-reply/monitor/group-gating.audio-preflight.test.ts +0 -103
- package/src/auto-reply/monitor/group-gating.runtime.ts +0 -8
- package/src/auto-reply/monitor/group-gating.ts +0 -217
- package/src/auto-reply/monitor/group-members.test.ts +0 -56
- package/src/auto-reply/monitor/group-members.ts +0 -65
- package/src/auto-reply/monitor/inbound-context.test.ts +0 -97
- package/src/auto-reply/monitor/inbound-context.ts +0 -92
- package/src/auto-reply/monitor/inbound-dispatch.runtime.ts +0 -21
- package/src/auto-reply/monitor/inbound-dispatch.test.ts +0 -895
- package/src/auto-reply/monitor/inbound-dispatch.ts +0 -422
- package/src/auto-reply/monitor/last-route.test.ts +0 -37
- package/src/auto-reply/monitor/last-route.ts +0 -61
- package/src/auto-reply/monitor/message-line.runtime.ts +0 -38
- package/src/auto-reply/monitor/message-line.ts +0 -54
- package/src/auto-reply/monitor/on-message.audio-preflight.test.ts +0 -354
- package/src/auto-reply/monitor/on-message.ts +0 -291
- package/src/auto-reply/monitor/peer.ts +0 -17
- package/src/auto-reply/monitor/process-message.audio-preflight.test.ts +0 -420
- package/src/auto-reply/monitor/process-message.test.ts +0 -355
- package/src/auto-reply/monitor/process-message.ts +0 -531
- package/src/auto-reply/monitor/runtime-api.ts +0 -30
- package/src/auto-reply/monitor-state.test.ts +0 -64
- package/src/auto-reply/monitor-state.ts +0 -106
- package/src/auto-reply/monitor.ts +0 -600
- package/src/auto-reply/reply-resolver.runtime.ts +0 -1
- package/src/auto-reply/types.ts +0 -48
- package/src/auto-reply/util.ts +0 -63
- package/src/auto-reply/web-auto-reply-monitor.test.ts +0 -687
- package/src/auto-reply/web-auto-reply-utils.test.ts +0 -392
- package/src/auto-reply.broadcast-groups.combined.test.ts +0 -246
- package/src/auto-reply.broadcast-groups.test-harness.ts +0 -47
- package/src/auto-reply.impl.ts +0 -6
- package/src/auto-reply.test-harness.ts +0 -421
- package/src/auto-reply.ts +0 -1
- package/src/auto-reply.web-auto-reply.compresses-common-formats-jpeg-cap.test.ts +0 -427
- package/src/auto-reply.web-auto-reply.connection-and-logging.e2e.test.ts +0 -908
- package/src/auto-reply.web-auto-reply.last-route.test.ts +0 -184
- package/src/channel-actions.runtime.ts +0 -7
- package/src/channel-actions.test.ts +0 -216
- package/src/channel-actions.ts +0 -84
- package/src/channel-outbound.test.ts +0 -131
- package/src/channel-outbound.ts +0 -36
- package/src/channel-react-action.runtime.ts +0 -7
- package/src/channel-react-action.test.ts +0 -294
- package/src/channel-react-action.ts +0 -84
- package/src/channel.runtime.ts +0 -117
- package/src/channel.setup.test.ts +0 -461
- package/src/channel.setup.ts +0 -28
- package/src/channel.ts +0 -339
- package/src/command-policy.ts +0 -7
- package/src/config-accessors.test.ts +0 -34
- package/src/config-accessors.ts +0 -22
- package/src/config-schema.test.ts +0 -121
- package/src/config-schema.ts +0 -6
- package/src/config-ui-hints.ts +0 -24
- package/src/connection-controller-registry.test.ts +0 -27
- package/src/connection-controller-registry.ts +0 -49
- package/src/connection-controller.test.ts +0 -282
- package/src/connection-controller.ts +0 -679
- package/src/creds-files.ts +0 -19
- package/src/creds-persistence.ts +0 -102
- package/src/directory-config.test.ts +0 -60
- package/src/directory-config.ts +0 -40
- package/src/directory-contract.test.ts +0 -56
- package/src/doctor-contract.ts +0 -11
- package/src/doctor.test.ts +0 -74
- package/src/doctor.ts +0 -56
- package/src/group-intro.ts +0 -15
- package/src/group-policy.test.ts +0 -36
- package/src/group-policy.ts +0 -40
- package/src/group-session-contract.ts +0 -20
- package/src/group-session-key.test.ts +0 -53
- package/src/group-session-key.ts +0 -41
- package/src/heartbeat.ts +0 -34
- package/src/identity.ts +0 -164
- package/src/inbound/access-control.test-harness.ts +0 -37
- package/src/inbound/access-control.test.ts +0 -375
- package/src/inbound/access-control.ts +0 -237
- package/src/inbound/dedupe.ts +0 -132
- package/src/inbound/extract.test.ts +0 -282
- package/src/inbound/extract.ts +0 -488
- package/src/inbound/lifecycle.ts +0 -39
- package/src/inbound/media.node.test.ts +0 -83
- package/src/inbound/media.ts +0 -102
- package/src/inbound/monitor.ts +0 -890
- package/src/inbound/runtime-api.ts +0 -7
- package/src/inbound/save-media.runtime.ts +0 -1
- package/src/inbound/send-api.test.ts +0 -319
- package/src/inbound/send-api.ts +0 -145
- package/src/inbound/send-result.ts +0 -61
- package/src/inbound/types.ts +0 -106
- package/src/inbound-context.contract.test.ts +0 -32
- package/src/inbound-policy.ts +0 -231
- package/src/inbound.media.test.ts +0 -320
- package/src/inbound.test.ts +0 -290
- package/src/inbound.ts +0 -9
- package/src/login-qr.test.ts +0 -483
- package/src/login-qr.ts +0 -542
- package/src/login.coverage.test.ts +0 -133
- package/src/login.test.ts +0 -89
- package/src/login.ts +0 -70
- package/src/logout.test.ts +0 -162
- package/src/media.test.ts +0 -480
- package/src/media.ts +0 -10
- package/src/monitor-inbox.allows-messages-from-senders-allowfrom-list.test-support.ts +0 -400
- package/src/monitor-inbox.append-upsert.test-support.ts +0 -133
- package/src/monitor-inbox.behavior.test.ts +0 -5
- package/src/monitor-inbox.blocks-messages-from-unauthorized-senders-not-allowfrom.test-support.ts +0 -362
- package/src/monitor-inbox.captures-media-path-image-messages.test-support.ts +0 -306
- package/src/monitor-inbox.streams-inbound-messages.test-support.ts +0 -729
- package/src/monitor-inbox.test-harness.ts +0 -304
- package/src/normalize-target.ts +0 -123
- package/src/normalize.ts +0 -7
- package/src/outbound-adapter.poll.test.ts +0 -62
- package/src/outbound-adapter.sendpayload.test.ts +0 -195
- package/src/outbound-adapter.ts +0 -36
- package/src/outbound-base.test.ts +0 -560
- package/src/outbound-base.ts +0 -244
- package/src/outbound-media-contract.ts +0 -278
- package/src/outbound-media.runtime.ts +0 -36
- package/src/outbound-payload.contract.test.ts +0 -61
- package/src/outbound-send-deps.ts +0 -1
- package/src/outbound-test-support.ts +0 -16
- package/src/pairing-security.test-harness.ts +0 -59
- package/src/qr-image.ts +0 -1
- package/src/qr-terminal.ts +0 -1
- package/src/quoted-message.test.ts +0 -83
- package/src/quoted-message.ts +0 -184
- package/src/reaction-level.test.ts +0 -94
- package/src/reaction-level.ts +0 -21
- package/src/reconnect.test.ts +0 -51
- package/src/reconnect.ts +0 -55
- package/src/resolve-outbound-target.test.ts +0 -288
- package/src/resolve-outbound-target.ts +0 -58
- package/src/resolve-target.test.ts +0 -120
- package/src/runtime-api.ts +0 -59
- package/src/runtime-group-policy.ts +0 -16
- package/src/runtime.ts +0 -9
- package/src/security-contract.ts +0 -47
- package/src/security-fix.ts +0 -71
- package/src/send.test.ts +0 -534
- package/src/send.ts +0 -292
- package/src/session-contract.test.ts +0 -31
- package/src/session-contract.ts +0 -43
- package/src/session-errors.ts +0 -125
- package/src/session-route.test.ts +0 -41
- package/src/session-route.ts +0 -32
- package/src/session.runtime.ts +0 -8
- package/src/session.test.ts +0 -559
- package/src/session.ts +0 -330
- package/src/setup-core.ts +0 -52
- package/src/setup-finalize.ts +0 -446
- package/src/setup-surface.test.ts +0 -367
- package/src/setup-surface.ts +0 -69
- package/src/setup-test-helpers.ts +0 -216
- package/src/shared.ts +0 -291
- package/src/socket-timing.test.ts +0 -49
- package/src/socket-timing.ts +0 -38
- package/src/state-migrations.ts +0 -54
- package/src/status-issues.test.ts +0 -137
- package/src/status-issues.ts +0 -185
- package/src/system-prompt.test.ts +0 -199
- package/src/system-prompt.ts +0 -31
- package/src/targets-runtime.ts +0 -180
- package/src/test-helpers.ts +0 -690
- package/src/text-runtime.test.ts +0 -162
- package/src/text-runtime.ts +0 -11
- package/src/vcard.ts +0 -84
- package/targets.ts +0 -5
- package/test-api.ts +0 -2
- package/tsconfig.json +0 -16
package/src/shared.ts
DELETED
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-core";
|
|
2
|
-
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
3
|
-
import { normalizeE164 } from "openclaw/plugin-sdk/account-resolution";
|
|
4
|
-
import {
|
|
5
|
-
adaptScopedAccountAccessor,
|
|
6
|
-
createScopedChannelConfigAdapter,
|
|
7
|
-
createScopedDmSecurityResolver,
|
|
8
|
-
} from "openclaw/plugin-sdk/channel-config-helpers";
|
|
9
|
-
import {
|
|
10
|
-
collectOpenGroupPolicyRouteAllowlistWarnings,
|
|
11
|
-
createAllowlistProviderGroupPolicyWarningCollector,
|
|
12
|
-
} from "openclaw/plugin-sdk/channel-policy";
|
|
13
|
-
import type { ChannelPlugin } from "openclaw/plugin-sdk/core";
|
|
14
|
-
import { createChannelPluginBase, getChatChannelMeta } from "openclaw/plugin-sdk/core";
|
|
15
|
-
import {
|
|
16
|
-
createDelegatedSetupWizardProxy,
|
|
17
|
-
type ChannelSetupWizard,
|
|
18
|
-
} from "openclaw/plugin-sdk/setup-runtime";
|
|
19
|
-
import {
|
|
20
|
-
hasAnyWhatsAppAuth,
|
|
21
|
-
listWhatsAppAccountIds,
|
|
22
|
-
resolveDefaultWhatsAppAccountId,
|
|
23
|
-
resolveWhatsAppAccount,
|
|
24
|
-
type ResolvedWhatsAppAccount,
|
|
25
|
-
} from "./accounts.js";
|
|
26
|
-
import { formatWhatsAppConfigAllowFromEntries } from "./config-accessors.js";
|
|
27
|
-
import { WhatsAppChannelConfigSchema } from "./config-schema.js";
|
|
28
|
-
import { whatsappDoctor } from "./doctor.js";
|
|
29
|
-
import { resolveLegacyGroupSessionKey } from "./group-session-contract.js";
|
|
30
|
-
import {
|
|
31
|
-
collectUnsupportedSecretRefConfigCandidates,
|
|
32
|
-
unsupportedSecretRefSurfacePatterns,
|
|
33
|
-
} from "./security-contract.js";
|
|
34
|
-
import { applyWhatsAppSecurityConfigFixes } from "./security-fix.js";
|
|
35
|
-
import {
|
|
36
|
-
canonicalizeLegacySessionKey,
|
|
37
|
-
deriveLegacySessionChatType,
|
|
38
|
-
isLegacyGroupSessionKey,
|
|
39
|
-
} from "./session-contract.js";
|
|
40
|
-
|
|
41
|
-
const WHATSAPP_CHANNEL = "whatsapp" as const;
|
|
42
|
-
|
|
43
|
-
const WHATSAPP_GROUP_SCOPE_FIELDS = ["groupPolicy", "groupAllowFrom", "groups"] as const;
|
|
44
|
-
|
|
45
|
-
type WhatsAppGroupScopeField = (typeof WHATSAPP_GROUP_SCOPE_FIELDS)[number];
|
|
46
|
-
|
|
47
|
-
function resolveWhatsAppAccountKey(
|
|
48
|
-
accounts: Record<string, unknown> | undefined,
|
|
49
|
-
accountId: string,
|
|
50
|
-
): string | undefined {
|
|
51
|
-
if (!accounts) {
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
if (Object.hasOwn(accounts, accountId)) {
|
|
55
|
-
return accountId;
|
|
56
|
-
}
|
|
57
|
-
const normalizedAccountId = accountId.trim().toLowerCase();
|
|
58
|
-
return Object.keys(accounts).find((key) => key.trim().toLowerCase() === normalizedAccountId);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function resolveWhatsAppGroupScopeBasePath(params: {
|
|
62
|
-
cfg: Parameters<typeof resolveWhatsAppAccount>[0]["cfg"];
|
|
63
|
-
accountId?: string | null;
|
|
64
|
-
}): string {
|
|
65
|
-
const accountId =
|
|
66
|
-
typeof params.accountId === "string"
|
|
67
|
-
? params.accountId.trim() || DEFAULT_ACCOUNT_ID
|
|
68
|
-
: DEFAULT_ACCOUNT_ID;
|
|
69
|
-
const accounts = params.cfg.channels?.whatsapp?.accounts;
|
|
70
|
-
const accountKey = resolveWhatsAppAccountKey(accounts, accountId);
|
|
71
|
-
const defaultAccountKey = resolveWhatsAppAccountKey(accounts, DEFAULT_ACCOUNT_ID);
|
|
72
|
-
const accountConfig = accountKey ? accounts?.[accountKey] : undefined;
|
|
73
|
-
const defaultAccountConfig = defaultAccountKey ? accounts?.[defaultAccountKey] : undefined;
|
|
74
|
-
const matchesAnyGroupScopeField = (config: Record<string, unknown> | undefined): boolean =>
|
|
75
|
-
WHATSAPP_GROUP_SCOPE_FIELDS.some((field) => config?.[field] !== undefined);
|
|
76
|
-
if (matchesAnyGroupScopeField(accountConfig)) {
|
|
77
|
-
return `channels.whatsapp.accounts.${accountKey}`;
|
|
78
|
-
}
|
|
79
|
-
if (accountId !== DEFAULT_ACCOUNT_ID && matchesAnyGroupScopeField(defaultAccountConfig)) {
|
|
80
|
-
return `channels.whatsapp.accounts.${defaultAccountKey}`;
|
|
81
|
-
}
|
|
82
|
-
return "channels.whatsapp";
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function resolveWhatsAppConfigPath(params: {
|
|
86
|
-
cfg: Parameters<typeof resolveWhatsAppAccount>[0]["cfg"];
|
|
87
|
-
accountId?: string | null;
|
|
88
|
-
field: WhatsAppGroupScopeField;
|
|
89
|
-
}): string {
|
|
90
|
-
return `${resolveWhatsAppGroupScopeBasePath(params)}.${params.field}`;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export async function loadWhatsAppChannelRuntime() {
|
|
94
|
-
return await import("./channel.runtime.js");
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
async function loadWhatsAppSetupSurface() {
|
|
98
|
-
return await import("./setup-surface.js");
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(
|
|
102
|
-
async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard,
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
const whatsappConfigAdapter = createScopedChannelConfigAdapter<ResolvedWhatsAppAccount>({
|
|
106
|
-
sectionKey: WHATSAPP_CHANNEL,
|
|
107
|
-
listAccountIds: listWhatsAppAccountIds,
|
|
108
|
-
resolveAccount: adaptScopedAccountAccessor(resolveWhatsAppAccount),
|
|
109
|
-
defaultAccountId: resolveDefaultWhatsAppAccountId,
|
|
110
|
-
clearBaseFields: [],
|
|
111
|
-
allowTopLevel: false,
|
|
112
|
-
resolveAllowFrom: (account) => account.allowFrom,
|
|
113
|
-
formatAllowFrom: (allowFrom) => formatWhatsAppConfigAllowFromEntries(allowFrom),
|
|
114
|
-
resolveDefaultTo: (account) => account.defaultTo,
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
const whatsappResolveDmPolicy = createScopedDmSecurityResolver<ResolvedWhatsAppAccount>({
|
|
118
|
-
channelKey: WHATSAPP_CHANNEL,
|
|
119
|
-
resolvePolicy: (account) => account.dmPolicy,
|
|
120
|
-
resolveAllowFrom: (account) => account.allowFrom,
|
|
121
|
-
policyPathSuffix: "dmPolicy",
|
|
122
|
-
normalizeEntry: (raw) => normalizeE164(raw),
|
|
123
|
-
inheritSharedDefaultsFromDefaultAccount: true,
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
function createWhatsAppSetupWizardProxy(
|
|
127
|
-
loadWizard: () => Promise<ChannelSetupWizard>,
|
|
128
|
-
): ChannelSetupWizard {
|
|
129
|
-
return createDelegatedSetupWizardProxy({
|
|
130
|
-
channel: WHATSAPP_CHANNEL,
|
|
131
|
-
loadWizard,
|
|
132
|
-
status: {
|
|
133
|
-
configuredLabel: "linked",
|
|
134
|
-
unconfiguredLabel: "not linked",
|
|
135
|
-
configuredHint: "linked",
|
|
136
|
-
unconfiguredHint: "not linked",
|
|
137
|
-
configuredScore: 5,
|
|
138
|
-
unconfiguredScore: 4,
|
|
139
|
-
},
|
|
140
|
-
resolveShouldPromptAccountIds: (params) => params.shouldPromptAccountIds,
|
|
141
|
-
credentials: [],
|
|
142
|
-
delegateFinalize: true,
|
|
143
|
-
disable: (cfg) => ({
|
|
144
|
-
...cfg,
|
|
145
|
-
channels: {
|
|
146
|
-
...cfg.channels,
|
|
147
|
-
whatsapp: {
|
|
148
|
-
...cfg.channels?.whatsapp,
|
|
149
|
-
enabled: false,
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
}),
|
|
153
|
-
onAccountRecorded: (accountId, options) => {
|
|
154
|
-
options?.onAccountId?.(WHATSAPP_CHANNEL, accountId);
|
|
155
|
-
},
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export function createWhatsAppPluginBase(params: {
|
|
160
|
-
groups: NonNullable<ChannelPlugin<ResolvedWhatsAppAccount>["groups"]>;
|
|
161
|
-
setupWizard: NonNullable<ChannelPlugin<ResolvedWhatsAppAccount>["setupWizard"]>;
|
|
162
|
-
setup: NonNullable<ChannelPlugin<ResolvedWhatsAppAccount>["setup"]>;
|
|
163
|
-
isConfigured: NonNullable<ChannelPlugin<ResolvedWhatsAppAccount>["config"]>["isConfigured"];
|
|
164
|
-
}) {
|
|
165
|
-
const collectWhatsAppSecurityWarnings = createAllowlistProviderGroupPolicyWarningCollector<{
|
|
166
|
-
account: ResolvedWhatsAppAccount;
|
|
167
|
-
cfg: Parameters<typeof resolveWhatsAppAccount>[0]["cfg"];
|
|
168
|
-
accountId?: string | null;
|
|
169
|
-
}>({
|
|
170
|
-
providerConfigPresent: (cfg) => cfg.channels?.whatsapp !== undefined,
|
|
171
|
-
resolveGroupPolicy: ({ account }) => account.groupPolicy,
|
|
172
|
-
collect: ({ account, accountId, cfg, groupPolicy }) =>
|
|
173
|
-
collectOpenGroupPolicyRouteAllowlistWarnings({
|
|
174
|
-
groupPolicy,
|
|
175
|
-
routeAllowlistConfigured:
|
|
176
|
-
Boolean(account.groups) && Object.keys(account.groups ?? {}).length > 0,
|
|
177
|
-
restrictSenders: {
|
|
178
|
-
surface: "WhatsApp groups",
|
|
179
|
-
openScope: "any member in allowed groups",
|
|
180
|
-
groupPolicyPath: resolveWhatsAppConfigPath({ cfg, accountId, field: "groupPolicy" }),
|
|
181
|
-
groupAllowFromPath: resolveWhatsAppConfigPath({
|
|
182
|
-
cfg,
|
|
183
|
-
accountId,
|
|
184
|
-
field: "groupAllowFrom",
|
|
185
|
-
}),
|
|
186
|
-
},
|
|
187
|
-
noRouteAllowlist: {
|
|
188
|
-
surface: "WhatsApp groups",
|
|
189
|
-
routeAllowlistPath: resolveWhatsAppConfigPath({ cfg, accountId, field: "groups" }),
|
|
190
|
-
routeScope: "group",
|
|
191
|
-
groupPolicyPath: resolveWhatsAppConfigPath({ cfg, accountId, field: "groupPolicy" }),
|
|
192
|
-
groupAllowFromPath: resolveWhatsAppConfigPath({
|
|
193
|
-
cfg,
|
|
194
|
-
accountId,
|
|
195
|
-
field: "groupAllowFrom",
|
|
196
|
-
}),
|
|
197
|
-
},
|
|
198
|
-
}),
|
|
199
|
-
});
|
|
200
|
-
const base = createChannelPluginBase({
|
|
201
|
-
id: WHATSAPP_CHANNEL,
|
|
202
|
-
meta: {
|
|
203
|
-
...getChatChannelMeta(WHATSAPP_CHANNEL),
|
|
204
|
-
showConfigured: false,
|
|
205
|
-
quickstartAllowFrom: true,
|
|
206
|
-
forceAccountBinding: true,
|
|
207
|
-
preferSessionLookupForAnnounceTarget: true,
|
|
208
|
-
},
|
|
209
|
-
setupWizard: params.setupWizard,
|
|
210
|
-
capabilities: {
|
|
211
|
-
chatTypes: ["direct", "group", "channel"],
|
|
212
|
-
polls: true,
|
|
213
|
-
reactions: true,
|
|
214
|
-
media: true,
|
|
215
|
-
tts: {
|
|
216
|
-
voice: {
|
|
217
|
-
synthesisTarget: "voice-note",
|
|
218
|
-
transcodesAudio: true,
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
reload: { configPrefixes: ["web"], noopPrefixes: ["channels.whatsapp"] },
|
|
223
|
-
gatewayMethods: ["web.login.start", "web.login.wait"],
|
|
224
|
-
configSchema: WhatsAppChannelConfigSchema,
|
|
225
|
-
config: {
|
|
226
|
-
...whatsappConfigAdapter,
|
|
227
|
-
isEnabled: (account, cfg) => account.enabled && cfg.web?.enabled !== false,
|
|
228
|
-
disabledReason: () => "disabled",
|
|
229
|
-
isConfigured: params.isConfigured,
|
|
230
|
-
hasPersistedAuthState: ({ cfg }) => hasAnyWhatsAppAuth(cfg),
|
|
231
|
-
unconfiguredReason: () => "not linked",
|
|
232
|
-
describeAccount: (account) =>
|
|
233
|
-
describeAccountSnapshot({
|
|
234
|
-
account,
|
|
235
|
-
configured: Boolean(account.authDir),
|
|
236
|
-
extra: {
|
|
237
|
-
linked: Boolean(account.authDir),
|
|
238
|
-
dmPolicy: account.dmPolicy,
|
|
239
|
-
allowFrom: account.allowFrom,
|
|
240
|
-
},
|
|
241
|
-
}),
|
|
242
|
-
},
|
|
243
|
-
security: {
|
|
244
|
-
applyConfigFixes: applyWhatsAppSecurityConfigFixes,
|
|
245
|
-
resolveDmPolicy: whatsappResolveDmPolicy,
|
|
246
|
-
collectWarnings: collectWhatsAppSecurityWarnings,
|
|
247
|
-
},
|
|
248
|
-
doctor: whatsappDoctor,
|
|
249
|
-
setup: params.setup,
|
|
250
|
-
groups: params.groups,
|
|
251
|
-
});
|
|
252
|
-
return {
|
|
253
|
-
...base,
|
|
254
|
-
setupWizard: base.setupWizard!,
|
|
255
|
-
capabilities: base.capabilities!,
|
|
256
|
-
reload: base.reload!,
|
|
257
|
-
gatewayMethods: base.gatewayMethods!,
|
|
258
|
-
configSchema: base.configSchema!,
|
|
259
|
-
config: base.config!,
|
|
260
|
-
messaging: {
|
|
261
|
-
defaultMarkdownTableMode: "bullets",
|
|
262
|
-
deriveLegacySessionChatType,
|
|
263
|
-
resolveLegacyGroupSessionKey,
|
|
264
|
-
isLegacyGroupSessionKey,
|
|
265
|
-
canonicalizeLegacySessionKey: (params) =>
|
|
266
|
-
canonicalizeLegacySessionKey({ key: params.key, agentId: params.agentId }),
|
|
267
|
-
},
|
|
268
|
-
secrets: {
|
|
269
|
-
unsupportedSecretRefSurfacePatterns,
|
|
270
|
-
collectUnsupportedSecretRefConfigCandidates,
|
|
271
|
-
},
|
|
272
|
-
security: base.security!,
|
|
273
|
-
groups: base.groups!,
|
|
274
|
-
} satisfies Pick<
|
|
275
|
-
ChannelPlugin<ResolvedWhatsAppAccount>,
|
|
276
|
-
| "id"
|
|
277
|
-
| "meta"
|
|
278
|
-
| "setupWizard"
|
|
279
|
-
| "capabilities"
|
|
280
|
-
| "reload"
|
|
281
|
-
| "gatewayMethods"
|
|
282
|
-
| "configSchema"
|
|
283
|
-
| "config"
|
|
284
|
-
| "messaging"
|
|
285
|
-
| "secrets"
|
|
286
|
-
| "security"
|
|
287
|
-
| "doctor"
|
|
288
|
-
| "setup"
|
|
289
|
-
| "groups"
|
|
290
|
-
>;
|
|
291
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { DEFAULT_WHATSAPP_SOCKET_TIMING, resolveWhatsAppSocketTiming } from "./socket-timing.js";
|
|
3
|
-
|
|
4
|
-
describe("resolveWhatsAppSocketTiming", () => {
|
|
5
|
-
it("uses OpenClaw's explicit WhatsApp Web socket defaults", () => {
|
|
6
|
-
expect(resolveWhatsAppSocketTiming({})).toEqual(DEFAULT_WHATSAPP_SOCKET_TIMING);
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
it("reads Baileys timing values from web.whatsapp config", () => {
|
|
10
|
-
expect(
|
|
11
|
-
resolveWhatsAppSocketTiming({
|
|
12
|
-
web: {
|
|
13
|
-
whatsapp: {
|
|
14
|
-
keepAliveIntervalMs: 10_000,
|
|
15
|
-
connectTimeoutMs: 90_000,
|
|
16
|
-
defaultQueryTimeoutMs: 120_000,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
}),
|
|
20
|
-
).toEqual({
|
|
21
|
-
keepAliveIntervalMs: 10_000,
|
|
22
|
-
connectTimeoutMs: 90_000,
|
|
23
|
-
defaultQueryTimeoutMs: 120_000,
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it("lets call-site overrides take precedence over config", () => {
|
|
28
|
-
expect(
|
|
29
|
-
resolveWhatsAppSocketTiming(
|
|
30
|
-
{
|
|
31
|
-
web: {
|
|
32
|
-
whatsapp: {
|
|
33
|
-
keepAliveIntervalMs: 10_000,
|
|
34
|
-
connectTimeoutMs: 90_000,
|
|
35
|
-
defaultQueryTimeoutMs: 120_000,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
keepAliveIntervalMs: 20_000,
|
|
41
|
-
},
|
|
42
|
-
),
|
|
43
|
-
).toEqual({
|
|
44
|
-
keepAliveIntervalMs: 20_000,
|
|
45
|
-
connectTimeoutMs: 90_000,
|
|
46
|
-
defaultQueryTimeoutMs: 120_000,
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
});
|
package/src/socket-timing.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
|
|
2
|
-
|
|
3
|
-
export type WhatsAppSocketTimingOptions = {
|
|
4
|
-
keepAliveIntervalMs?: number;
|
|
5
|
-
connectTimeoutMs?: number;
|
|
6
|
-
defaultQueryTimeoutMs?: number;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const DEFAULT_WHATSAPP_SOCKET_TIMING: Required<WhatsAppSocketTimingOptions> = {
|
|
10
|
-
keepAliveIntervalMs: 25_000,
|
|
11
|
-
connectTimeoutMs: 60_000,
|
|
12
|
-
defaultQueryTimeoutMs: 60_000,
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
function positiveInteger(value: number | undefined): number | undefined {
|
|
16
|
-
return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : undefined;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function resolveWhatsAppSocketTiming(
|
|
20
|
-
cfg: OpenClawConfig,
|
|
21
|
-
overrides?: WhatsAppSocketTimingOptions,
|
|
22
|
-
): Required<WhatsAppSocketTimingOptions> {
|
|
23
|
-
const configured = cfg.web?.whatsapp;
|
|
24
|
-
return {
|
|
25
|
-
keepAliveIntervalMs:
|
|
26
|
-
positiveInteger(overrides?.keepAliveIntervalMs) ??
|
|
27
|
-
positiveInteger(configured?.keepAliveIntervalMs) ??
|
|
28
|
-
DEFAULT_WHATSAPP_SOCKET_TIMING.keepAliveIntervalMs,
|
|
29
|
-
connectTimeoutMs:
|
|
30
|
-
positiveInteger(overrides?.connectTimeoutMs) ??
|
|
31
|
-
positiveInteger(configured?.connectTimeoutMs) ??
|
|
32
|
-
DEFAULT_WHATSAPP_SOCKET_TIMING.connectTimeoutMs,
|
|
33
|
-
defaultQueryTimeoutMs:
|
|
34
|
-
positiveInteger(overrides?.defaultQueryTimeoutMs) ??
|
|
35
|
-
positiveInteger(configured?.defaultQueryTimeoutMs) ??
|
|
36
|
-
DEFAULT_WHATSAPP_SOCKET_TIMING.defaultQueryTimeoutMs,
|
|
37
|
-
};
|
|
38
|
-
}
|
package/src/state-migrations.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
4
|
-
import type { ChannelLegacyStateMigrationPlan } from "openclaw/plugin-sdk/channel-contract";
|
|
5
|
-
|
|
6
|
-
function fileExists(pathValue: string): boolean {
|
|
7
|
-
try {
|
|
8
|
-
return fs.existsSync(pathValue) && fs.statSync(pathValue).isFile();
|
|
9
|
-
} catch {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function isLegacyWhatsAppAuthFile(name: string): boolean {
|
|
15
|
-
if (name === "creds.json" || name === "creds.json.bak") {
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
if (!name.endsWith(".json")) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
return /^(app-state-sync|session|sender-key|pre-key)-/.test(name);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function detectWhatsAppLegacyStateMigrations(params: {
|
|
25
|
-
oauthDir: string;
|
|
26
|
-
}): ChannelLegacyStateMigrationPlan[] {
|
|
27
|
-
const targetDir = path.join(params.oauthDir, "whatsapp", DEFAULT_ACCOUNT_ID);
|
|
28
|
-
const entries = (() => {
|
|
29
|
-
try {
|
|
30
|
-
return fs.readdirSync(params.oauthDir, { withFileTypes: true });
|
|
31
|
-
} catch {
|
|
32
|
-
return [];
|
|
33
|
-
}
|
|
34
|
-
})();
|
|
35
|
-
|
|
36
|
-
return entries.flatMap((entry) => {
|
|
37
|
-
if (!entry.isFile() || entry.name === "oauth.json" || !isLegacyWhatsAppAuthFile(entry.name)) {
|
|
38
|
-
return [];
|
|
39
|
-
}
|
|
40
|
-
const sourcePath = path.join(params.oauthDir, entry.name);
|
|
41
|
-
const targetPath = path.join(targetDir, entry.name);
|
|
42
|
-
if (fileExists(targetPath)) {
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
return [
|
|
46
|
-
{
|
|
47
|
-
kind: "move" as const,
|
|
48
|
-
label: `WhatsApp auth ${entry.name}`,
|
|
49
|
-
sourcePath,
|
|
50
|
-
targetPath,
|
|
51
|
-
},
|
|
52
|
-
];
|
|
53
|
-
});
|
|
54
|
-
}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { collectWhatsAppStatusIssues } from "./status-issues.js";
|
|
3
|
-
|
|
4
|
-
describe("collectWhatsAppStatusIssues", () => {
|
|
5
|
-
it("reports unlinked enabled accounts", () => {
|
|
6
|
-
const issues = collectWhatsAppStatusIssues([
|
|
7
|
-
{
|
|
8
|
-
accountId: "default",
|
|
9
|
-
enabled: true,
|
|
10
|
-
linked: false,
|
|
11
|
-
},
|
|
12
|
-
]);
|
|
13
|
-
|
|
14
|
-
expect(issues).toEqual([
|
|
15
|
-
expect.objectContaining({
|
|
16
|
-
channel: "whatsapp",
|
|
17
|
-
accountId: "default",
|
|
18
|
-
kind: "auth",
|
|
19
|
-
}),
|
|
20
|
-
]);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it("reports auth reads that are still stabilizing", () => {
|
|
24
|
-
const issues = collectWhatsAppStatusIssues([
|
|
25
|
-
{
|
|
26
|
-
accountId: "default",
|
|
27
|
-
enabled: true,
|
|
28
|
-
statusState: "unstable",
|
|
29
|
-
},
|
|
30
|
-
]);
|
|
31
|
-
|
|
32
|
-
expect(issues).toEqual([
|
|
33
|
-
expect.objectContaining({
|
|
34
|
-
channel: "whatsapp",
|
|
35
|
-
accountId: "default",
|
|
36
|
-
kind: "auth",
|
|
37
|
-
message: "Auth state is still stabilizing.",
|
|
38
|
-
}),
|
|
39
|
-
]);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it("reports linked but disconnected runtime state", () => {
|
|
43
|
-
const issues = collectWhatsAppStatusIssues([
|
|
44
|
-
{
|
|
45
|
-
accountId: "work",
|
|
46
|
-
enabled: true,
|
|
47
|
-
linked: true,
|
|
48
|
-
running: true,
|
|
49
|
-
connected: false,
|
|
50
|
-
reconnectAttempts: 2,
|
|
51
|
-
lastError: "socket closed",
|
|
52
|
-
},
|
|
53
|
-
]);
|
|
54
|
-
|
|
55
|
-
expect(issues).toEqual([
|
|
56
|
-
expect.objectContaining({
|
|
57
|
-
channel: "whatsapp",
|
|
58
|
-
accountId: "work",
|
|
59
|
-
kind: "runtime",
|
|
60
|
-
message: "Linked but disconnected (reconnectAttempts=2): socket closed",
|
|
61
|
-
}),
|
|
62
|
-
]);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it("reports linked but stale runtime state even while connected", () => {
|
|
66
|
-
const issues = collectWhatsAppStatusIssues([
|
|
67
|
-
{
|
|
68
|
-
accountId: "default",
|
|
69
|
-
enabled: true,
|
|
70
|
-
linked: true,
|
|
71
|
-
running: true,
|
|
72
|
-
connected: true,
|
|
73
|
-
healthState: "stale",
|
|
74
|
-
lastInboundAt: Date.now() - 2 * 60_000,
|
|
75
|
-
},
|
|
76
|
-
]);
|
|
77
|
-
|
|
78
|
-
expect(issues).toEqual([
|
|
79
|
-
expect.objectContaining({
|
|
80
|
-
channel: "whatsapp",
|
|
81
|
-
accountId: "default",
|
|
82
|
-
kind: "runtime",
|
|
83
|
-
message: expect.stringContaining("Linked but stale"),
|
|
84
|
-
}),
|
|
85
|
-
]);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
it("reports recently reconnected accounts even when the socket is currently healthy", () => {
|
|
89
|
-
const issues = collectWhatsAppStatusIssues([
|
|
90
|
-
{
|
|
91
|
-
accountId: "default",
|
|
92
|
-
enabled: true,
|
|
93
|
-
linked: true,
|
|
94
|
-
running: true,
|
|
95
|
-
connected: true,
|
|
96
|
-
reconnectAttempts: 3,
|
|
97
|
-
healthState: "healthy",
|
|
98
|
-
lastDisconnect: {
|
|
99
|
-
at: Date.now() - 2 * 60_000,
|
|
100
|
-
status: 408,
|
|
101
|
-
error: "status=408 Request Time-out Connection was lost",
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
]);
|
|
105
|
-
|
|
106
|
-
expect(issues).toEqual([
|
|
107
|
-
expect.objectContaining({
|
|
108
|
-
channel: "whatsapp",
|
|
109
|
-
accountId: "default",
|
|
110
|
-
kind: "runtime",
|
|
111
|
-
message:
|
|
112
|
-
"Linked but recently reconnected (reconnectAttempts=3): status=408 Request Time-out Connection was lost",
|
|
113
|
-
}),
|
|
114
|
-
]);
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
it("does not report old reconnect history after a stable healthy period", () => {
|
|
118
|
-
const issues = collectWhatsAppStatusIssues([
|
|
119
|
-
{
|
|
120
|
-
accountId: "default",
|
|
121
|
-
enabled: true,
|
|
122
|
-
linked: true,
|
|
123
|
-
running: true,
|
|
124
|
-
connected: true,
|
|
125
|
-
reconnectAttempts: 1,
|
|
126
|
-
healthState: "healthy",
|
|
127
|
-
lastDisconnect: {
|
|
128
|
-
at: Date.now() - 60 * 60_000,
|
|
129
|
-
status: 408,
|
|
130
|
-
error: "old disconnect",
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
]);
|
|
134
|
-
|
|
135
|
-
expect(issues).toEqual([]);
|
|
136
|
-
});
|
|
137
|
-
});
|