@openclaw/whatsapp 2026.8.1 → 2026.8.33
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-CeKQbu_s.js → .setup/accounts-u_tUoK19.mjs} +2 -2
- package/dist/{action-runtime-YA_Yvunu.js → .setup/action-runtime-BVUf4f89.mjs} +3 -3
- package/dist/{active-listener-BEjWsCNM.js → .setup/active-listener-CDjoX9QR.mjs} +2 -2
- package/dist/{agent-tools-login-B-2qZPzc.js → .setup/agent-tools-login-B6MAs75N.mjs} +2 -2
- package/dist/{approval-handler.runtime-C7jZ8rsD.js → .setup/approval-handler.runtime-CgvhxI9D.mjs} +7 -7
- package/dist/{approval-reactions-rpaNVHzZ.js → .setup/approval-reactions-C9Nq1Mee.mjs} +9 -7
- package/dist/{auth-store-CtpBqH5S.js → .setup/auth-store-BLlwNwk9.mjs} +8 -6
- package/dist/{channel-Dx09AAmX.js → .setup/channel-Dhl5A0do.mjs} +31 -27
- package/dist/{channel-react-action-n9a8Hk5i.js → .setup/channel-react-action-N47OoLaS.mjs} +5 -5
- package/dist/{channel.runtime-D_PjmeMT.js → .setup/channel.runtime-y-t7P-gt.mjs} +6 -6
- package/dist/{channel.setup-CRJQiWbh.js → .setup/channel.setup-DWNu3iNB.mjs} +1 -1
- package/dist/{config-schema-BQP5YCeK.js → .setup/config-schema-BYA6e_Ii.mjs} +6 -4
- package/dist/{connection-controller-CIYuBJrs.js → .setup/connection-controller-DdJ3ZYk3.mjs} +5 -5
- package/dist/{connection-controller-runtime-context-DG0tuYuw.js → .setup/connection-controller-runtime-context-hgLJoRc8.mjs} +1 -1
- package/dist/{constants-HU41RHGI.js → .setup/constants-C7m81BNe.mjs} +1 -1
- package/dist/{directory-config-Ci8Jjsw4.js → .setup/directory-config-CyZpW0t5.mjs} +8 -8
- package/dist/{group-session-key-CH9jJIVQ.js → .setup/group-session-key-Bx_RT7LG.mjs} +6 -6
- package/dist/.setup/legacy-session-surface-api-B2szjq4r.mjs +2 -0
- package/dist/{login-1u5WcfTn.js → .setup/login-B6mR1G7c.mjs} +7 -6
- package/dist/{login-qr-B_1sr0hk.js → .setup/login-qr-y11oWl3Y.mjs} +11 -9
- package/dist/{monitor-CySzv38g.js → .setup/monitor-CZx0S7kj.mjs} +88 -72
- package/dist/.setup/normalize-B1wBftQ7.mjs +2 -0
- package/dist/{question-reactions-B9D6MHXZ.js → .setup/question-reactions-CP6JdAfC.mjs} +2 -2
- package/dist/{resolve-outbound-target-1GqbT1uX.js → .setup/resolve-outbound-target-CHYl534S.mjs} +1 -1
- package/dist/{send-C3S-NqyO.js → .setup/send-DhVkeVOL.mjs} +57 -32
- package/dist/{send-api-C-FFC1p_.js → .setup/send-api-BkGtYGVg.mjs} +44 -42
- package/dist/{session.runtime-Nsqaehbd.js → .setup/session.runtime-DcJuO42v.mjs} +1 -1
- package/dist/{setup-finalize-CRzMpx84.js → .setup/setup-finalize-CQGl6GiM.mjs} +9 -8
- package/dist/.setup/setup-plugin-api-CNoGyXrL.mjs +3 -0
- package/dist/{setup-surface-ym4doiv3.js → .setup/setup-surface-B51IvfDU.mjs} +4 -4
- package/dist/{shared-D3B14d45.js → .setup/shared-BGXdIKoz.mjs} +14 -13
- package/dist/{socket-close-2T0_jZTN.js → .setup/socket-close-Ci2nLeBQ.mjs} +12 -9
- package/dist/{targets-runtime-TMk0lGuy.js → .setup/targets-runtime-RBjx3pg_.mjs} +1 -2
- package/dist/{text-runtime-CaKLhowd.js → .setup/text-runtime-CHl0iPYe.mjs} +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/agent-tools-api.js +5 -5
- package/dist/api.js +15 -15
- package/dist/auth-presence.js +1 -1
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +5 -5
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +2 -2
- package/dist/legacy-session-surface-api.js +1 -1
- package/dist/light-runtime-api.js +4 -4
- package/dist/login-qr-runtime.js +1 -1
- package/dist/runtime-api.js +13 -13
- package/dist/runtime-setter-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -2
- package/dist/setup-plugin-api.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 +5 -5
- package/dist/normalize-C7Hkc_vE.js +0 -2
- package/node_modules/baileys/node_modules/process-warning/types/index.test-d.ts +0 -36
- /package/dist/{account-ids-CB5SOWjc.js → .setup/account-ids-CB5SOWjc.mjs} +0 -0
- /package/dist/{audio-preflight.runtime-C_glQhZY.js → .setup/audio-preflight.runtime-C_glQhZY.mjs} +0 -0
- /package/dist/{command-policy-BIOSHySD.js → .setup/command-policy-BIOSHySD.mjs} +0 -0
- /package/dist/{creds-files-W6B3EMZ8.js → .setup/creds-files-W6B3EMZ8.mjs} +0 -0
- /package/dist/{doctor-CwzVXKoE.js → .setup/doctor-CwzVXKoE.mjs} +0 -0
- /package/dist/{group-config-path-BGyzT9Lg.js → .setup/group-config-path-BGyzT9Lg.mjs} +0 -0
- /package/dist/{group-session-contract-DDnZSsJ1.js → .setup/group-session-contract-DDnZSsJ1.mjs} +0 -0
- /package/dist/{normalize-target-CugRyONv.js → .setup/normalize-target-CugRyONv.mjs} +0 -0
- /package/dist/{reply-resolver.runtime-Ded8D58Y.js → .setup/reply-resolver.runtime-Ded8D58Y.mjs} +0 -0
- /package/dist/{rolldown-runtime-D7D4PA-g.js → .setup/rolldown-runtime-D7D4PA-g.mjs} +0 -0
- /package/dist/{runtime-BLlToOi6.js → .setup/runtime-BLlToOi6.mjs} +0 -0
- /package/dist/{runtime-group-policy-DeSRFXEV.js → .setup/runtime-group-policy-DeSRFXEV.mjs} +0 -0
- /package/dist/{security-contract-nAzD945y.js → .setup/security-contract-nAzD945y.mjs} +0 -0
- /package/dist/{session-contract-DMTm6Q_L.js → .setup/session-contract-DMTm6Q_L.mjs} +0 -0
- /package/dist/{session-errors-JuazczrA.js → .setup/session-errors-JuazczrA.mjs} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-
|
|
2
|
-
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.
|
|
3
|
-
import { r as hasWebCredsSync } from "./creds-files-W6B3EMZ8.
|
|
4
|
-
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-CugRyONv.
|
|
5
|
-
import { r as whatsappSetupAdapter } from "./shared-
|
|
1
|
+
import { a as resolveWhatsAppAccount, o as resolveWhatsAppAuthDir } from "./accounts-u_tUoK19.mjs";
|
|
2
|
+
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.mjs";
|
|
3
|
+
import { r as hasWebCredsSync } from "./creds-files-W6B3EMZ8.mjs";
|
|
4
|
+
import { a as normalizeWhatsAppAllowFromEntries, o as normalizeWhatsAppAllowFromEntry } from "./normalize-target-CugRyONv.mjs";
|
|
5
|
+
import { r as whatsappSetupAdapter } from "./shared-BGXdIKoz.mjs";
|
|
6
6
|
import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
7
7
|
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
8
8
|
//#region extensions/whatsapp/src/setup-finalize.ts
|
|
@@ -94,7 +94,7 @@ async function detectWhatsAppLinked(cfg, accountId) {
|
|
|
94
94
|
async function promptWhatsAppOwnerAllowFrom(params) {
|
|
95
95
|
const { prompter, existingAllowFrom } = params;
|
|
96
96
|
await prompter.note(t("wizard.whatsapp.ownerNumberNote"), t("wizard.whatsapp.numberTitle"));
|
|
97
|
-
const
|
|
97
|
+
const entry = await prompter.text({
|
|
98
98
|
message: t("wizard.whatsapp.personalNumberPrompt"),
|
|
99
99
|
placeholder: "+15555550123",
|
|
100
100
|
initialValue: existingAllowFrom[0],
|
|
@@ -103,7 +103,8 @@ async function promptWhatsAppOwnerAllowFrom(params) {
|
|
|
103
103
|
if (!raw) return t("common.required");
|
|
104
104
|
if (!normalizeWhatsAppAllowFromEntry(raw)) return `Invalid number: ${raw}`;
|
|
105
105
|
}
|
|
106
|
-
})
|
|
106
|
+
});
|
|
107
|
+
const normalized = normalizeWhatsAppAllowFromEntry(trimPromptText(entry));
|
|
107
108
|
if (!normalized) throw new Error("Invalid WhatsApp owner number (expected E.164 after validation).");
|
|
108
109
|
return {
|
|
109
110
|
normalized,
|
|
@@ -295,7 +296,7 @@ async function finalizeWhatsAppSetup(params) {
|
|
|
295
296
|
};
|
|
296
297
|
let loginWeb;
|
|
297
298
|
try {
|
|
298
|
-
({loginWeb} = await import("./login-
|
|
299
|
+
({loginWeb} = await import("./login-B6mR1G7c.mjs").then((n) => n.n));
|
|
299
300
|
} catch (error) {
|
|
300
301
|
await reportLoginFailure(error);
|
|
301
302
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as resolveWhatsAppAuthDir } from "./accounts-
|
|
2
|
-
import { t as listAccountIds } from "./account-ids-CB5SOWjc.
|
|
3
|
-
import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-
|
|
1
|
+
import { o as resolveWhatsAppAuthDir } from "./accounts-u_tUoK19.mjs";
|
|
2
|
+
import { t as listAccountIds } from "./account-ids-CB5SOWjc.mjs";
|
|
3
|
+
import { a as formatWhatsAppWebAuthStatusState, h as readWebAuthState } from "./auth-store-BLlwNwk9.mjs";
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID, createSetupTranslator, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
5
5
|
//#region extensions/whatsapp/src/setup-surface.ts
|
|
6
6
|
const t = createSetupTranslator();
|
|
@@ -36,7 +36,7 @@ const whatsappSetupWizard = {
|
|
|
36
36
|
},
|
|
37
37
|
resolveShouldPromptAccountIds: ({ shouldPromptAccountIds }) => shouldPromptAccountIds,
|
|
38
38
|
credentials: [],
|
|
39
|
-
finalize: async (params) => await (await import("./setup-finalize-
|
|
39
|
+
finalize: async (params) => await (await import("./setup-finalize-CQGl6GiM.mjs")).finalizeWhatsAppSetup(params),
|
|
40
40
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false),
|
|
41
41
|
onAccountRecorded: (accountId, options) => {
|
|
42
42
|
options?.onAccountId?.(channel, accountId);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-
|
|
2
|
-
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.
|
|
3
|
-
import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-CugRyONv.
|
|
4
|
-
import { t as WhatsAppChannelConfigSchema } from "./config-schema-
|
|
5
|
-
import { n as whatsappDoctor } from "./doctor-CwzVXKoE.
|
|
6
|
-
import { t as resolveWhatsAppConfigPath } from "./group-config-path-BGyzT9Lg.
|
|
7
|
-
import { t as resolveLegacyGroupSessionKey } from "./group-session-contract-DDnZSsJ1.
|
|
8
|
-
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-nAzD945y.
|
|
9
|
-
import { n as deriveLegacySessionChatType, r as isLegacyGroupSessionKey, t as canonicalizeLegacySessionKey } from "./session-contract-DMTm6Q_L.
|
|
1
|
+
import { a as resolveWhatsAppAccount, n as hasAnyWhatsAppAuth } from "./accounts-u_tUoK19.mjs";
|
|
2
|
+
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.mjs";
|
|
3
|
+
import { a as normalizeWhatsAppAllowFromEntries } from "./normalize-target-CugRyONv.mjs";
|
|
4
|
+
import { t as WhatsAppChannelConfigSchema } from "./config-schema-BYA6e_Ii.mjs";
|
|
5
|
+
import { n as whatsappDoctor } from "./doctor-CwzVXKoE.mjs";
|
|
6
|
+
import { t as resolveWhatsAppConfigPath } from "./group-config-path-BGyzT9Lg.mjs";
|
|
7
|
+
import { t as resolveLegacyGroupSessionKey } from "./group-session-contract-DDnZSsJ1.mjs";
|
|
8
|
+
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-nAzD945y.mjs";
|
|
9
|
+
import { n as deriveLegacySessionChatType, r as isLegacyGroupSessionKey, t as canonicalizeLegacySessionKey } from "./session-contract-DMTm6Q_L.mjs";
|
|
10
10
|
import { normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
11
11
|
import { normalizeE164 } from "openclaw/plugin-sdk/account-resolution";
|
|
12
12
|
import { createChannelPluginBase } from "openclaw/plugin-sdk/core";
|
|
@@ -20,14 +20,14 @@ import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createSco
|
|
|
20
20
|
import { createDelegatedSetupWizardProxy } from "openclaw/plugin-sdk/setup-runtime";
|
|
21
21
|
import { readChannelAllowFromStore } from "openclaw/plugin-sdk/channel-pairing";
|
|
22
22
|
//#region extensions/whatsapp/src/channel-runtime-loader.ts
|
|
23
|
-
const loadWhatsAppAuthStore = createLazyRuntimeModule(() => import("./auth-store-
|
|
23
|
+
const loadWhatsAppAuthStore = createLazyRuntimeModule(() => import("./auth-store-BLlwNwk9.mjs").then((n) => n.i));
|
|
24
24
|
async function readWhatsAppAccountLinkState(authDir) {
|
|
25
25
|
const state = await (await loadWhatsAppAuthStore()).readWebAuthState(authDir);
|
|
26
26
|
return state === "unstable" ? "unknown" : state;
|
|
27
27
|
}
|
|
28
28
|
const loadWhatsAppChannelRuntime = createLazyRuntimeModule(async () => {
|
|
29
29
|
await loadWhatsAppAuthStore();
|
|
30
|
-
return await import("./channel.runtime-
|
|
30
|
+
return await import("./channel.runtime-y-t7P-gt.mjs");
|
|
31
31
|
});
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region extensions/whatsapp/src/config-accessors.ts
|
|
@@ -96,7 +96,8 @@ function applyGroupAllowFromFromStore(params) {
|
|
|
96
96
|
return changed ? next : params.cfg;
|
|
97
97
|
}
|
|
98
98
|
async function applyWhatsAppSecurityConfigFixes(params) {
|
|
99
|
-
const
|
|
99
|
+
const fromStore = await readChannelAllowFromStore("whatsapp", params.env, DEFAULT_ACCOUNT_ID).catch(() => []);
|
|
100
|
+
const normalized = normalizeUniqueStringEntries(fromStore);
|
|
100
101
|
if (normalized.length === 0) return {
|
|
101
102
|
config: params.cfg,
|
|
102
103
|
changes: []
|
|
@@ -115,7 +116,7 @@ async function applyWhatsAppSecurityConfigFixes(params) {
|
|
|
115
116
|
//#region extensions/whatsapp/src/shared.ts
|
|
116
117
|
const WHATSAPP_CHANNEL = "whatsapp";
|
|
117
118
|
async function loadWhatsAppSetupSurface() {
|
|
118
|
-
return await import("./setup-surface-
|
|
119
|
+
return await import("./setup-surface-B51IvfDU.mjs");
|
|
119
120
|
}
|
|
120
121
|
const whatsappSetupWizardProxy = createWhatsAppSetupWizardProxy(async () => (await loadWhatsAppSetupSurface()).whatsappSetupWizard);
|
|
121
122
|
const whatsappConfigAdapter = createScopedChannelConfigAdapter({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as resolveWebCredsPath, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-W6B3EMZ8.
|
|
2
|
-
import { A as enqueueCredsSave, M as waitForCredsSaveQueueWithTimeout, N as writeCredsJsonAtomically, P as writeWebCredsRawAtomically, b as restoreCredsFromBackupIfNeeded, u as readCredsJsonRaw, y as resolveDefaultWebAuthDir } from "./auth-store-
|
|
3
|
-
import { n as getStatusCode } from "./session-errors-JuazczrA.
|
|
4
|
-
import { a as makeWASocket, i as makeCacheableSignalKeyStore, n as createBaileysSignalRepository, r as fetchLatestBaileysVersion, s as useMultiFileAuthState } from "./session.runtime-
|
|
1
|
+
import { c as resolveWebCredsPath, s as resolveWebCredsBackupPath, t as assertWebCredsPathRegularFileOrMissing } from "./creds-files-W6B3EMZ8.mjs";
|
|
2
|
+
import { A as enqueueCredsSave, M as waitForCredsSaveQueueWithTimeout, N as writeCredsJsonAtomically, P as writeWebCredsRawAtomically, b as restoreCredsFromBackupIfNeeded, u as readCredsJsonRaw, y as resolveDefaultWebAuthDir } from "./auth-store-BLlwNwk9.mjs";
|
|
3
|
+
import { n as getStatusCode } from "./session-errors-JuazczrA.mjs";
|
|
4
|
+
import { a as makeWASocket, i as makeCacheableSignalKeyStore, n as createBaileysSignalRepository, r as fetchLatestBaileysVersion, s as useMultiFileAuthState } from "./session.runtime-DcJuO42v.mjs";
|
|
5
5
|
import { VERSION, formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
6
6
|
import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
7
7
|
import { danger, getChildLogger, success, toPinoLikeLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -22,7 +22,7 @@ var WhatsAppConnectionOwnerBusyError = class extends Error {
|
|
|
22
22
|
this.name = "WhatsAppConnectionOwnerBusyError";
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const OWNER_LOCK_STALE_MS =
|
|
25
|
+
const OWNER_LOCK_STALE_MS = 3e5;
|
|
26
26
|
const GATEWAY_LOCAL_OWNER_WAIT_MS = 15e4;
|
|
27
27
|
const processOwners = /* @__PURE__ */ new Map();
|
|
28
28
|
function ownershipCancelledError(signal) {
|
|
@@ -325,7 +325,8 @@ async function createWaSocket(printQr, verbose, opts = {}) {
|
|
|
325
325
|
return await createWaSocketInternal(printQr, verbose, opts, "normal");
|
|
326
326
|
}
|
|
327
327
|
async function createWaSocketInternal(printQr, verbose, opts, receiveMode) {
|
|
328
|
-
const
|
|
328
|
+
const baseLogger = getChildLogger({ module: "baileys" }, { level: verbose ? "info" : "silent" });
|
|
329
|
+
const logger = toPinoLikeLogger(baseLogger, verbose ? "info" : "silent");
|
|
329
330
|
const authDir = resolveUserPath(opts.authDir ?? resolveDefaultWebAuthDir());
|
|
330
331
|
await rejectUnsafeWebCredsPath(authDir);
|
|
331
332
|
await opts.beforeCredentialPersistence?.();
|
|
@@ -357,13 +358,14 @@ async function createWaSocketInternal(printQr, verbose, opts, receiveMode) {
|
|
|
357
358
|
else pendingSocketAbort = { error };
|
|
358
359
|
opts.onCredentialPersistenceError?.(error);
|
|
359
360
|
};
|
|
360
|
-
const
|
|
361
|
+
const persistedSignalKeys = opts.beforeCredentialPersistence ? {
|
|
361
362
|
...state.keys,
|
|
362
363
|
async set(data) {
|
|
363
364
|
await opts.beforeCredentialPersistence?.();
|
|
364
365
|
await state.keys.set(data);
|
|
365
366
|
}
|
|
366
|
-
} : state.keys
|
|
367
|
+
} : state.keys;
|
|
368
|
+
const cachedSignalKeys = makeCacheableSignalKeyStore(persistedSignalKeys, logger);
|
|
367
369
|
const signalKeys = opts.beforeCredentialPersistence ? {
|
|
368
370
|
...cachedSignalKeys,
|
|
369
371
|
get(type, ids) {
|
|
@@ -542,7 +544,8 @@ async function waitForWaConnection(sock, options = { timeout: "none" }) {
|
|
|
542
544
|
}
|
|
543
545
|
if (update.connection === "close") {
|
|
544
546
|
cleanup();
|
|
545
|
-
|
|
547
|
+
const disconnectError = update.lastDisconnect?.error ?? update.lastDisconnect;
|
|
548
|
+
reject(toErrorObject(disconnectError ?? /* @__PURE__ */ new Error("Connection closed"), "Non-Error rejection"));
|
|
546
549
|
}
|
|
547
550
|
};
|
|
548
551
|
sock.ev.on("connection.update", handler);
|
|
@@ -282,8 +282,7 @@ function markdownToWhatsAppChunks(text, limit, tableMode = "bullets", chunkMode
|
|
|
282
282
|
if (!text.trim()) return chunkMarkdownTextWithMode(text, limit, chunkMode);
|
|
283
283
|
const { ir, escapedMarkers } = prepareWhatsAppMarkdown(text, tableMode);
|
|
284
284
|
const render = (chunk) => renderWhatsAppMarkdownIR(chunk, escapedMarkers);
|
|
285
|
-
|
|
286
|
-
let chunks = ir.styles.length === 0 && ir.links.length === 0 ? chunkMarkdownTextWithMode(rendered, limit, chunkMode) : splitWhatsAppIRForChunkMode(ir, limit, chunkMode).flatMap((source) => renderMarkdownIRChunksWithinLimit({
|
|
285
|
+
let chunks = ir.styles.length === 0 && ir.links.length === 0 ? chunkMarkdownTextWithMode(render(ir), limit, chunkMode) : splitWhatsAppIRForChunkMode(ir, limit, chunkMode).flatMap((source) => renderMarkdownIRChunksWithinLimit({
|
|
287
286
|
ir: source,
|
|
288
287
|
limit,
|
|
289
288
|
renderChunk: render,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./targets-runtime-
|
|
1
|
+
import "./targets-runtime-RBjx3pg_.mjs";
|
|
2
2
|
import { sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile, stripToolCallXmlTags } from "openclaw/plugin-sdk/text-chunking";
|
|
3
3
|
import { normalizeE164, resolveUserPath as resolveUserPath$1 } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
4
4
|
export { stripToolCallXmlTags as a, sanitizeAssistantVisibleTextWithProfile as i, resolveUserPath$1 as n, sanitizeAssistantVisibleText as r, normalizeE164 as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "
|
|
1
|
+
import { t as handleWhatsAppAction } from "./.setup/action-runtime-BVUf4f89.mjs";
|
|
2
2
|
export { handleWhatsAppAction };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleWhatsAppAction } from "
|
|
1
|
+
import { t as handleWhatsAppAction } from "./.setup/action-runtime-BVUf4f89.mjs";
|
|
2
2
|
export { handleWhatsAppAction };
|
package/dist/agent-tools-api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "
|
|
2
|
-
import { r as getWhatsAppConnectionController } from "
|
|
3
|
-
import { s as resolveJidToE164 } from "
|
|
4
|
-
import { n as registerWhatsAppLoginTool } from "
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./.setup/accounts-u_tUoK19.mjs";
|
|
2
|
+
import { r as getWhatsAppConnectionController } from "./.setup/connection-controller-runtime-context-hgLJoRc8.mjs";
|
|
3
|
+
import { s as resolveJidToE164 } from "./.setup/targets-runtime-RBjx3pg_.mjs";
|
|
4
|
+
import { n as registerWhatsAppLoginTool } from "./.setup/agent-tools-login-B6MAs75N.mjs";
|
|
5
5
|
import { createActionGate, stringEnum } from "openclaw/plugin-sdk/channel-actions";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { resolveOAuthDir } from "openclaw/plugin-sdk/state-paths";
|
|
@@ -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 "
|
|
2
|
-
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "
|
|
3
|
-
import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, r as isWhatsAppUserTarget, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "
|
|
4
|
-
import { t as resolveWhatsAppOutboundTarget } from "
|
|
5
|
-
import { c as toWhatsappJid, i as markdownToWhatsApp, l as toWhatsappJidWithLid, n as isSelfChatMode, r as jidToE164, s as resolveJidToE164, t as assertWebChannel } from "
|
|
6
|
-
import { n as resolveUserPath, t as normalizeE164 } from "
|
|
7
|
-
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "
|
|
8
|
-
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy } from "
|
|
9
|
-
import { t as whatsappCommandPolicy } from "
|
|
10
|
-
import { t as whatsappSetupPlugin } from "
|
|
11
|
-
import { t as DEFAULT_WEB_MEDIA_BYTES } from "
|
|
12
|
-
import { a as waitForWaConnection, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter } from "
|
|
13
|
-
import { n as getStatusCode, t as formatError } from "
|
|
14
|
-
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "
|
|
15
|
-
import { _ as resolveInboundMediaMimetype, c as extractContextInfo, m as findMessageSection, o as describeReplyContext, p as extractText, t as createWebSendApi, u as extractLocationData } from "
|
|
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 "./.setup/accounts-u_tUoK19.mjs";
|
|
2
|
+
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./.setup/account-ids-CB5SOWjc.mjs";
|
|
3
|
+
import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, r as isWhatsAppUserTarget, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./.setup/normalize-target-CugRyONv.mjs";
|
|
4
|
+
import { t as resolveWhatsAppOutboundTarget } from "./.setup/resolve-outbound-target-CHYl534S.mjs";
|
|
5
|
+
import { c as toWhatsappJid, i as markdownToWhatsApp, l as toWhatsappJidWithLid, n as isSelfChatMode, r as jidToE164, s as resolveJidToE164, t as assertWebChannel } from "./.setup/targets-runtime-RBjx3pg_.mjs";
|
|
6
|
+
import { n as resolveUserPath, t as normalizeE164 } from "./.setup/text-runtime-CHl0iPYe.mjs";
|
|
7
|
+
import { n as WHATSAPP_LEGACY_OUTBOUND_SEND_DEP_KEYS, t as whatsappPlugin } from "./.setup/channel-Dhl5A0do.mjs";
|
|
8
|
+
import { a as resolveWhatsAppGroupRequireMention, o as resolveWhatsAppGroupToolPolicy } from "./.setup/shared-BGXdIKoz.mjs";
|
|
9
|
+
import { t as whatsappCommandPolicy } from "./.setup/command-policy-BIOSHySD.mjs";
|
|
10
|
+
import { t as whatsappSetupPlugin } from "./.setup/channel.setup-DWNu3iNB.mjs";
|
|
11
|
+
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./.setup/constants-C7m81BNe.mjs";
|
|
12
|
+
import { a as waitForWaConnection, o as DEFAULT_WHATSAPP_SOCKET_TIMING, r as createWaSocket, s as createWhatsAppSocketOperationTimeoutAdapter } from "./.setup/socket-close-Ci2nLeBQ.mjs";
|
|
13
|
+
import { n as getStatusCode, t as formatError } from "./.setup/session-errors-JuazczrA.mjs";
|
|
14
|
+
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./.setup/directory-config-CyZpW0t5.mjs";
|
|
15
|
+
import { _ as resolveInboundMediaMimetype, c as extractContextInfo, m as findMessageSection, o as describeReplyContext, p as extractText, t as createWebSendApi, u as extractLocationData } from "./.setup/send-api-BkGtYGVg.mjs";
|
|
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
|
package/dist/auth-presence.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WhatsAppChannelConfigSchema } from "
|
|
1
|
+
import { t as WhatsAppChannelConfigSchema } from "./.setup/config-schema-BYA6e_Ii.mjs";
|
|
2
2
|
export { WhatsAppChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappPlugin } from "
|
|
1
|
+
import { t as whatsappPlugin } from "./.setup/channel-Dhl5A0do.mjs";
|
|
2
2
|
export { whatsappPlugin };
|
package/dist/contract-api.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as normalizeWhatsAppTarget$1, t as isWhatsAppGroupJid$1 } from "
|
|
2
|
-
import { t as whatsappCommandPolicy$1 } from "
|
|
3
|
-
import { t as resolveLegacyGroupSessionKey$1 } from "
|
|
4
|
-
import { r as isLegacyGroupSessionKey$1, t as canonicalizeLegacySessionKey$1 } from "
|
|
5
|
-
import { t as resolveWhatsAppRuntimeGroupPolicy$1 } from "
|
|
1
|
+
import { c as normalizeWhatsAppTarget$1, t as isWhatsAppGroupJid$1 } from "./.setup/normalize-target-CugRyONv.mjs";
|
|
2
|
+
import { t as whatsappCommandPolicy$1 } from "./.setup/command-policy-BIOSHySD.mjs";
|
|
3
|
+
import { t as resolveLegacyGroupSessionKey$1 } from "./.setup/group-session-contract-DDnZSsJ1.mjs";
|
|
4
|
+
import { r as isLegacyGroupSessionKey$1, t as canonicalizeLegacySessionKey$1 } from "./.setup/session-contract-DMTm6Q_L.mjs";
|
|
5
|
+
import { t as resolveWhatsAppRuntimeGroupPolicy$1 } from "./.setup/runtime-group-policy-DeSRFXEV.mjs";
|
|
6
6
|
//#region extensions/whatsapp/contract-api.ts
|
|
7
7
|
const canonicalizeLegacySessionKey = canonicalizeLegacySessionKey$1;
|
|
8
8
|
const isLegacyGroupSessionKey = isLegacyGroupSessionKey$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "
|
|
1
|
+
import { n as listWhatsAppDirectoryGroupsFromConfig, r as listWhatsAppDirectoryPeersFromConfig } from "./.setup/directory-config-CyZpW0t5.mjs";
|
|
2
2
|
//#region extensions/whatsapp/directory-contract-api.ts
|
|
3
3
|
const whatsappDirectoryContractPlugin = {
|
|
4
4
|
id: "whatsapp",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isWhatsAppBaileysAuthFileName } from "
|
|
2
|
-
import { t as normalizeCompatibilityConfig$1 } from "
|
|
1
|
+
import { i as isWhatsAppBaileysAuthFileName } from "./.setup/creds-files-W6B3EMZ8.mjs";
|
|
2
|
+
import { t as normalizeCompatibilityConfig$1 } from "./.setup/doctor-CwzVXKoE.mjs";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileExists } from "openclaw/plugin-sdk/security-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as isLegacyGroupSessionKey, t as canonicalizeLegacySessionKey } from "
|
|
1
|
+
import { r as isLegacyGroupSessionKey, t as canonicalizeLegacySessionKey } from "./.setup/session-contract-DMTm6Q_L.mjs";
|
|
2
2
|
//#region extensions/whatsapp/legacy-session-surface-api.ts
|
|
3
3
|
const whatsappLegacySessionSurface = {
|
|
4
4
|
isLegacyGroupSessionKey,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createWhatsAppLoginTool } from "
|
|
2
|
-
import { c as logoutWeb, g as readWebSelfId, l as pickWebChannel, o as getWebAuthAgeMs, s as logWebSelfId, t as WA_WEB_AUTH_DIR, x as webAuthExists, y as resolveDefaultWebAuthDir } from "
|
|
3
|
-
import { t as getActiveWebListener } from "
|
|
4
|
-
import { n as getStatusCode, t as formatError } from "
|
|
1
|
+
import { t as createWhatsAppLoginTool } from "./.setup/agent-tools-login-B6MAs75N.mjs";
|
|
2
|
+
import { c as logoutWeb, g as readWebSelfId, l as pickWebChannel, o as getWebAuthAgeMs, s as logWebSelfId, t as WA_WEB_AUTH_DIR, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./.setup/auth-store-BLlwNwk9.mjs";
|
|
3
|
+
import { t as getActiveWebListener } from "./.setup/active-listener-CDjoX9QR.mjs";
|
|
4
|
+
import { n as getStatusCode, t as formatError } from "./.setup/session-errors-JuazczrA.mjs";
|
|
5
5
|
export { WA_WEB_AUTH_DIR, createWhatsAppLoginTool, formatError, getActiveWebListener, getStatusCode, getWebAuthAgeMs, logWebSelfId, logoutWeb, pickWebChannel, readWebSelfId, resolveDefaultWebAuthDir, webAuthExists };
|
package/dist/login-qr-runtime.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
2
2
|
//#region extensions/whatsapp/login-qr-runtime.ts
|
|
3
|
-
const loadLoginQrModule = createLazyRuntimeModule(() => import("
|
|
3
|
+
const loadLoginQrModule = createLazyRuntimeModule(() => import("./.setup/login-qr-y11oWl3Y.mjs"));
|
|
4
4
|
async function startWebLoginWithQr(...args) {
|
|
5
5
|
const { startWebLoginWithQr: startWebLoginWithQrLocal } = await loadLoginQrModule();
|
|
6
6
|
return await startWebLoginWithQrLocal(...args);
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { c as resolveWebCredsPath, r as hasWebCredsSync, s as resolveWebCredsBackupPath } from "
|
|
2
|
-
import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "
|
|
3
|
-
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "
|
|
4
|
-
import { a as setWhatsAppRuntime } from "
|
|
1
|
+
import { c as resolveWebCredsPath, r as hasWebCredsSync, s as resolveWebCredsBackupPath } from "./.setup/creds-files-W6B3EMZ8.mjs";
|
|
2
|
+
import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./.setup/action-runtime-BVUf4f89.mjs";
|
|
3
|
+
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./.setup/send-DhVkeVOL.mjs";
|
|
4
|
+
import { a as setWhatsAppRuntime } from "./.setup/runtime-BLlToOi6.mjs";
|
|
5
5
|
import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
|
|
6
|
-
import { t as createWhatsAppLoginTool } from "
|
|
7
|
-
import { M as waitForCredsSaveQueueWithTimeout, N as writeCredsJsonAtomically, _ as readWebSelfIdentity, a as formatWhatsAppWebAuthStatusState, b as restoreCredsFromBackupIfNeeded, c as logoutWeb, d as readWebAuthExistsBestEffort, f as readWebAuthExistsForDecision, g as readWebSelfId, h as readWebAuthState, j as waitForCredsSaveQueue, l as pickWebChannel, m as readWebAuthSnapshotBestEffort, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as getWebAuthAgeMs, p as readWebAuthSnapshot, r as WhatsAppAuthUnstableError, s as logWebSelfId, t as WA_WEB_AUTH_DIR, u as readCredsJsonRaw, v as readWebSelfIdentityForDecision, x as webAuthExists, y as resolveDefaultWebAuthDir } from "
|
|
8
|
-
import { t as DEFAULT_WEB_MEDIA_BYTES } from "
|
|
9
|
-
import { n as resolveWebAccountId, t as getActiveWebListener } from "
|
|
10
|
-
import { a as waitForWaConnection, i as newConnectionId, r as createWaSocket } from "
|
|
11
|
-
import { n as getStatusCode, t as formatError } from "
|
|
12
|
-
import { p as extractText, s as extractContactContext, u as extractLocationData } from "
|
|
13
|
-
import { a as loadWebMediaRaw, c as monitorWebInbox, i as loadWebMedia, l as resetWebInboundDedupe, n as LocalMediaAccessError, o as optimizeImageToJpeg, r as getDefaultLocalRoots, s as optimizeImageToPng, t as monitorWebChannel } from "
|
|
14
|
-
import { t as loginWeb } from "
|
|
6
|
+
import { t as createWhatsAppLoginTool } from "./.setup/agent-tools-login-B6MAs75N.mjs";
|
|
7
|
+
import { M as waitForCredsSaveQueueWithTimeout, N as writeCredsJsonAtomically, _ as readWebSelfIdentity, a as formatWhatsAppWebAuthStatusState, b as restoreCredsFromBackupIfNeeded, c as logoutWeb, d as readWebAuthExistsBestEffort, f as readWebAuthExistsForDecision, g as readWebSelfId, h as readWebAuthState, j as waitForCredsSaveQueue, l as pickWebChannel, m as readWebAuthSnapshotBestEffort, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as getWebAuthAgeMs, p as readWebAuthSnapshot, r as WhatsAppAuthUnstableError, s as logWebSelfId, t as WA_WEB_AUTH_DIR, u as readCredsJsonRaw, v as readWebSelfIdentityForDecision, x as webAuthExists, y as resolveDefaultWebAuthDir } from "./.setup/auth-store-BLlwNwk9.mjs";
|
|
8
|
+
import { t as DEFAULT_WEB_MEDIA_BYTES } from "./.setup/constants-C7m81BNe.mjs";
|
|
9
|
+
import { n as resolveWebAccountId, t as getActiveWebListener } from "./.setup/active-listener-CDjoX9QR.mjs";
|
|
10
|
+
import { a as waitForWaConnection, i as newConnectionId, r as createWaSocket } from "./.setup/socket-close-Ci2nLeBQ.mjs";
|
|
11
|
+
import { n as getStatusCode, t as formatError } from "./.setup/session-errors-JuazczrA.mjs";
|
|
12
|
+
import { p as extractText, s as extractContactContext, u as extractLocationData } from "./.setup/send-api-BkGtYGVg.mjs";
|
|
13
|
+
import { a as loadWebMediaRaw, c as monitorWebInbox, i as loadWebMedia, l as resetWebInboundDedupe, n as LocalMediaAccessError, o as optimizeImageToJpeg, r as getDefaultLocalRoots, s as optimizeImageToPng, t as monitorWebChannel } from "./.setup/monitor-CZx0S7kj.mjs";
|
|
14
|
+
import { t as loginWeb } from "./.setup/login-B6mR1G7c.mjs";
|
|
15
15
|
import { HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, SILENT_REPLY_TOKEN, stripHeartbeatToken } from "openclaw/plugin-sdk/reply-runtime";
|
|
16
16
|
export { DEFAULT_WEB_MEDIA_BYTES, HEARTBEAT_PROMPT, HEARTBEAT_TOKEN, LocalMediaAccessError, SILENT_REPLY_TOKEN, WA_WEB_AUTH_DIR, WHATSAPP_AUTH_UNSTABLE_CODE, WhatsAppAuthUnstableError, createWaSocket, createWhatsAppLoginTool, extractContactContext, extractLocationData, extractText, formatError, formatWhatsAppWebAuthStatusState, getActiveWebListener, getDefaultLocalRoots, getStatusCode, getWebAuthAgeMs, handleWhatsAppAction, hasWebCredsSync, loadWebMedia, loadWebMediaRaw, logWebSelfId, loginWeb, logoutWeb, monitorWebChannel, monitorWebInbox, newConnectionId, optimizeImageToJpeg, optimizeImageToPng, pickWebChannel, readCredsJsonRaw, readWebAuthExistsBestEffort, readWebAuthExistsForDecision, readWebAuthSnapshot, readWebAuthSnapshotBestEffort, readWebAuthState, readWebSelfId, readWebSelfIdentity, readWebSelfIdentityForDecision, resetWebInboundDedupe, resolveDefaultWebAuthDir, resolveWebAccountId, resolveWebCredsBackupPath, resolveWebCredsPath, restoreCredsFromBackupIfNeeded, sendMessageWhatsApp, sendPollWhatsApp, sendReactionWhatsApp, sendTypingWhatsApp, setWhatsAppRuntime, startWebLoginWithQr, stripHeartbeatToken, waitForCredsSaveQueue, waitForCredsSaveQueueWithTimeout, waitForWaConnection, waitForWebLogin, webAuthExists, whatsAppActionRuntime, writeCredsJsonAtomically };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as setWhatsAppRuntime } from "
|
|
1
|
+
import { a as setWhatsAppRuntime } from "./.setup/runtime-BLlToOi6.mjs";
|
|
2
2
|
export { setWhatsAppRuntime };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "
|
|
1
|
+
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./.setup/security-contract-nAzD945y.mjs";
|
|
2
2
|
export { collectUnsupportedSecretRefConfigCandidates, unsupportedSecretRefSurfacePatterns };
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
2
3
|
//#region extensions/whatsapp/setup-entry.ts
|
|
3
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
4
5
|
importMetaUrl: import.meta.url,
|
|
5
6
|
features: { legacySessionSurfaces: true },
|
|
6
7
|
plugin: {
|
|
7
|
-
specifier: "
|
|
8
|
+
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-CNoGyXrL.mjs", import.meta.url).href),
|
|
8
9
|
exportName: "whatsappSetupPlugin"
|
|
9
10
|
},
|
|
10
11
|
legacySessionSurface: {
|
|
11
|
-
specifier: "
|
|
12
|
+
specifier: fileURLToPath(new URL(".setup/legacy-session-surface-api-B2szjq4r.mjs", import.meta.url).href),
|
|
12
13
|
exportName: "whatsappLegacySessionSurface"
|
|
13
14
|
}
|
|
14
15
|
});
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as whatsappSetupPlugin } from "
|
|
1
|
+
import { t as whatsappSetupPlugin } from "./.setup/channel.setup-DWNu3iNB.mjs";
|
|
2
2
|
export { whatsappSetupPlugin };
|
|
@@ -2,12 +2,52 @@ version: 2
|
|
|
2
2
|
updates:
|
|
3
3
|
- package-ecosystem: "github-actions"
|
|
4
4
|
directory: "/"
|
|
5
|
+
commit-message:
|
|
6
|
+
# Prefix all commit messages with "chore: "
|
|
7
|
+
prefix: "chore"
|
|
5
8
|
schedule:
|
|
6
|
-
interval: "
|
|
9
|
+
interval: "weekly"
|
|
10
|
+
cooldown:
|
|
11
|
+
default-days: 7
|
|
12
|
+
allow:
|
|
13
|
+
- dependency-name: "*"
|
|
14
|
+
update-types:
|
|
15
|
+
- "version-update:semver-major"
|
|
7
16
|
open-pull-requests-limit: 10
|
|
8
17
|
|
|
9
18
|
- package-ecosystem: "npm"
|
|
10
19
|
directory: "/"
|
|
20
|
+
commit-message:
|
|
21
|
+
# Prefix all commit messages with "chore: "
|
|
22
|
+
prefix: "chore"
|
|
11
23
|
schedule:
|
|
12
|
-
interval: "
|
|
24
|
+
interval: "weekly"
|
|
25
|
+
cooldown:
|
|
26
|
+
default-days: 7
|
|
27
|
+
versioning-strategy: "increase-if-necessary"
|
|
28
|
+
allow:
|
|
29
|
+
- dependency-name: "*"
|
|
30
|
+
update-types:
|
|
31
|
+
- "version-update:semver-major"
|
|
32
|
+
ignore:
|
|
33
|
+
# TODO: remove ignore until neostandard support ESLint 10
|
|
34
|
+
- dependency-name: "eslint"
|
|
35
|
+
- dependency-name: "neostandard"
|
|
36
|
+
- dependency-name: "@stylistic/*"
|
|
13
37
|
open-pull-requests-limit: 10
|
|
38
|
+
groups:
|
|
39
|
+
# Production dependencies with breaking changes
|
|
40
|
+
dependencies:
|
|
41
|
+
dependency-type: "production"
|
|
42
|
+
# ESLint related dependencies
|
|
43
|
+
dev-dependencies-eslint:
|
|
44
|
+
patterns:
|
|
45
|
+
- "eslint"
|
|
46
|
+
- "neostandard"
|
|
47
|
+
- "@stylistic/*"
|
|
48
|
+
# TypeScript related dependencies
|
|
49
|
+
dev-dependencies-typescript:
|
|
50
|
+
patterns:
|
|
51
|
+
- "@types/*"
|
|
52
|
+
- "tstyche"
|
|
53
|
+
- "typescript"
|
|
@@ -14,9 +14,20 @@ on:
|
|
|
14
14
|
- 'docs/**'
|
|
15
15
|
- '*.md'
|
|
16
16
|
|
|
17
|
+
# This allows a subsequently queued workflow run to interrupt previous runs
|
|
18
|
+
concurrency:
|
|
19
|
+
group: "${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
|
|
20
|
+
cancel-in-progress: true
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
|
|
17
25
|
jobs:
|
|
18
26
|
test:
|
|
19
|
-
|
|
27
|
+
permissions:
|
|
28
|
+
contents: write
|
|
29
|
+
pull-requests: write
|
|
30
|
+
uses: fastify/workflows/.github/workflows/plugins-ci.yml@2073dc8e1f9e172bf42daa3843c9dbd31af1e8cb # v6.0.0
|
|
20
31
|
with:
|
|
21
32
|
license-check: true
|
|
22
33
|
lint: true
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Lock Threads
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 0 1 * *'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: lock
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lock-threads:
|
|
16
|
+
permissions:
|
|
17
|
+
issues: write
|
|
18
|
+
pull-requests: write
|
|
19
|
+
uses: fastify/workflows/.github/workflows/lock-threads.yml@2073dc8e1f9e172bf42daa3843c9dbd31af1e8cb # v6.0.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Fastify
|
|
3
|
+
Copyright (c) 2020-present The Fastify team <https://github.com/fastify/fastify#team>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/process-warning)
|
|
5
5
|
[](https://github.com/neostandard/neostandard)
|
|
6
6
|
|
|
7
|
-
A small utility for generating consistent warning objects across your codebase.
|
|
7
|
+
A small utility for generating consistent [warning objects](https://nodejs.org/api/process.html#event-warning) across your codebase.
|
|
8
8
|
It also exposes a utility for emitting those warnings, guaranteeing that they are issued only once (unless configured otherwise).
|
|
9
9
|
|
|
10
10
|
_This module is used by the [Fastify](https://fastify.dev) framework and it was called `fastify-warning` prior to version 1.0.0._
|
|
@@ -31,7 +31,7 @@ const warning = createWarning({
|
|
|
31
31
|
message: 'Hello %s',
|
|
32
32
|
unlimited: true
|
|
33
33
|
})
|
|
34
|
-
warning('world')
|
|
34
|
+
const emitted = warning('world')
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
#### Methods
|
|
@@ -101,6 +101,45 @@ FST_ERROR_CODE('world') // will be emitted
|
|
|
101
101
|
FST_ERROR_CODE('world') // will be emitted again
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
+
#### `spyWarning(warning)`
|
|
105
|
+
|
|
106
|
+
Spy the created warning function for testing purpose.
|
|
107
|
+
|
|
108
|
+
```js
|
|
109
|
+
const { test } = require('node:test')
|
|
110
|
+
const { createWarning, spyWarning } = require('process-warning')
|
|
111
|
+
const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s' })
|
|
112
|
+
|
|
113
|
+
test('spy warning', t => {
|
|
114
|
+
const spyData = spyWarning(FST_ERROR_CODE)
|
|
115
|
+
|
|
116
|
+
// call after spy
|
|
117
|
+
const emitted = FST_ERROR_CODE('world')
|
|
118
|
+
t.assert.strictEqual(emitted, true)
|
|
119
|
+
|
|
120
|
+
// restore the warning function
|
|
121
|
+
// it must be called when you do not need to spy anymore
|
|
122
|
+
// otherwise, the calls data will accumulates.
|
|
123
|
+
t.after(() => spyData.restore())
|
|
124
|
+
|
|
125
|
+
t.assert.strictEqual(FST_ERROR_CODE.emitted, true)
|
|
126
|
+
// calls return the arguments and result.
|
|
127
|
+
// result indicate whether warning is emitted through process.emitWarning
|
|
128
|
+
console.log(spyData.calls) // [{ arguments: ['world'], result: true }]
|
|
129
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['world'])
|
|
130
|
+
t.assert.strictEqual(spyData.calls[0].result, true)
|
|
131
|
+
// number of times called the function
|
|
132
|
+
console.log(spyData.callCount()) // 1
|
|
133
|
+
t.assert.strictEqual(spyData.callCount(), 1)
|
|
134
|
+
|
|
135
|
+
// reset the spy stat and warning state
|
|
136
|
+
spyData.reset()
|
|
137
|
+
t.assert.strictEqual(FST_ERROR_CODE.emitted, false)
|
|
138
|
+
t.assert.deepStrictEqual(spyData.calls, [])
|
|
139
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
140
|
+
})
|
|
141
|
+
```
|
|
142
|
+
|
|
104
143
|
#### Suppressing warnings
|
|
105
144
|
|
|
106
145
|
It is possible to suppress warnings by utilizing one of node's built-in warning suppression mechanisms.
|