@openclaw/whatsapp 2026.7.2-beta.3 → 2026.7.2-beta.5
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/README.md +1 -1
- package/dist/{access-control-tjy_em01.js → access-control-pZcxTmd5.js} +4 -5
- package/dist/{accounts-ejK8sXPU.js → accounts-CSqLvCY5.js} +1 -2
- package/dist/{action-runtime-p0V390gA.js → action-runtime-B2bNDUwE.js} +3 -3
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/{active-listener-BbdlXooT.js → active-listener-BEjWsCNM.js} +1 -1
- package/dist/api.js +13 -22
- package/dist/{approval-handler.runtime-BO1oJ-b8.js → approval-handler.runtime-CmtqgLSQ.js} +6 -6
- package/dist/{approval-reactions-CrZFAyf-.js → approval-reactions-Cu66aYdq.js} +4 -4
- package/dist/{auth-store-BQi9pZqQ.js → auth-store-DcEpIOmE.js} +4 -3
- package/dist/call-tool-api.js +4 -4
- package/dist/{channel-B2I4Opzb.js → channel-DcWBc3Hb.js} +39 -67
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-CPRQE-s3.js → channel-react-action-DUIkjl6w.js} +12 -15
- package/dist/{channel.runtime-CjkhQzk8.js → channel.runtime-Q5fJ2I2b.js} +5 -5
- package/dist/{channel.setup-BMWE9LmN.js → channel.setup-C_1u6HN6.js} +3 -6
- package/dist/{config-schema-BZ8h1hWA.js → config-schema-DARep0Nn.js} +7 -5
- package/dist/{connection-controller-HGaffeFb.js → connection-controller-BOB2MVKY.js} +8 -10
- package/dist/{connection-controller-runtime-context-9mEeAvu1.js → connection-controller-runtime-context-DG0tuYuw.js} +3 -3
- package/dist/contract-api.js +2 -2
- package/dist/{directory-config-BZ775eGX.js → directory-config-DalGrfGN.js} +7 -7
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-CwzVXKoE.js +10 -0
- package/dist/doctor-contract-api.js +35 -79
- package/dist/{group-session-key-Dh8WZun_.js → group-session-key-DVMZlO3x.js} +11 -6
- package/dist/{identity-D7L8LCuH.js → identity-CPrT5aEU.js} +2 -2
- package/dist/light-runtime-api.js +2 -2
- package/dist/{login-ifOXCBjo.js → login-CvY2Dhch.js} +6 -7
- package/dist/{login-qr-DUHzVH_Y.js → login-qr-Bncpb6js.js} +7 -8
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-_jqDKBXj.js → monitor-B7phZF9w.js} +427 -525
- package/dist/normalize-C7Hkc_vE.js +2 -0
- package/dist/{normalize-target-DSZnHkKF.js → normalize-target-CugRyONv.js} +6 -2
- package/dist/{question-reactions-C0qJ6wGA.js → question-reactions-CRsnyoMK.js} +1 -1
- package/dist/{resolve-outbound-target-BR97fAbB.js → resolve-outbound-target-1GqbT1uX.js} +1 -1
- package/dist/runtime-BLlToOi6.js +21 -0
- package/dist/runtime-api.js +10 -10
- package/dist/runtime-setter-api.js +1 -1
- package/dist/{send-SB-4JrVZ.js → send-BTXJAyK4.js} +40 -86
- package/dist/{send-api-BG0MgoFI.js → send-api-BY_AkSiB.js} +41 -35
- package/dist/{setup-finalize-Cc-4iWGj.js → setup-finalize-C-m-vCl9.js} +4 -4
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-DhnXEZir.js → setup-surface-BjvUbR6M.js} +3 -3
- package/dist/{setup-core-BbIgEl2M.js → shared-UcAwtJaq.js} +79 -57
- package/dist/{socket-close-jNGyZY4T.js → socket-close-DridEuzz.js} +5 -6
- package/dist/{targets-runtime-Bsh0HR9y.js → targets-runtime-TMk0lGuy.js} +133 -29
- package/dist/text-runtime-CaKLhowd.js +4 -0
- package/node_modules/@protobufjs/utf8/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/utf8/index.js +29 -18
- package/node_modules/@protobufjs/utf8/package.json +2 -2
- package/node_modules/@protobufjs/utf8/tests/index.js +5 -0
- package/node_modules/@thi.ng/bitstream/package.json +4 -4
- package/node_modules/@thi.ng/errors/package.json +4 -4
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/fs/promises.d.ts +16 -6
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/audio-type/package.json +3 -2
- package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -1
- package/node_modules/lru-cache/dist/commonjs/browser/index.js +11 -4
- package/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -1
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +1 -1
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +3 -3
- package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/lru-cache/dist/commonjs/index.js +11 -4
- package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
- package/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
- package/node_modules/lru-cache/dist/commonjs/index.min.js.map +3 -3
- package/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -1
- package/node_modules/lru-cache/dist/commonjs/node/index.js +11 -4
- package/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -1
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js +1 -1
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +3 -3
- package/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
- package/node_modules/lru-cache/dist/esm/browser/index.js +11 -4
- package/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
- package/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
- package/node_modules/lru-cache/dist/esm/browser/index.min.js.map +3 -3
- package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
- package/node_modules/lru-cache/dist/esm/index.js +11 -4
- package/node_modules/lru-cache/dist/esm/index.js.map +1 -1
- package/node_modules/lru-cache/dist/esm/index.min.js +1 -1
- package/node_modules/lru-cache/dist/esm/index.min.js.map +3 -3
- package/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
- package/node_modules/lru-cache/dist/esm/node/index.js +11 -4
- package/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
- package/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
- package/node_modules/lru-cache/dist/esm/node/index.min.js.map +3 -3
- package/node_modules/lru-cache/package.json +1 -1
- package/node_modules/music-metadata/lib/common/Util.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/Util.js +7 -1
- package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +23 -3
- package/node_modules/music-metadata/lib/id3v2/FrameParser.js +2 -2
- package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +1 -1
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +38 -13
- package/node_modules/music-metadata/lib/mpeg/MpegParser.js +1 -1
- package/node_modules/music-metadata/package.json +6 -6
- package/node_modules/p-queue/dist/index.js +17 -6
- package/node_modules/p-queue/package.json +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.js +145 -188
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +33 -76
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +168 -208
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/index.d.ts +0 -8
- package/node_modules/protobufjs/package.json +2 -3
- package/node_modules/protobufjs/src/parse.js +3 -0
- package/node_modules/protobufjs/src/util/minimal.js +0 -3
- package/node_modules/typebox/build/compile/validator.d.mts +1 -4
- package/node_modules/typebox/build/guard/guard.d.mts +1 -1
- package/node_modules/typebox/build/guard/guard.mjs +5 -2
- package/node_modules/typebox/build/guard/string.mjs +16 -4
- package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
- package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
- package/node_modules/typebox/build/typebox.d.mts +1 -1
- package/node_modules/typebox/build/typebox.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +29 -32
- package/node_modules/ws/lib/receiver.js +15 -32
- package/node_modules/ws/lib/websocket-server.js +4 -4
- package/node_modules/ws/lib/websocket.js +4 -4
- package/node_modules/ws/package.json +5 -1
- package/openclaw.plugin.json +138 -194
- package/package.json +21 -12
- package/dist/doctor-By3SB4lm.js +0 -48
- package/dist/normalize-C-Z16y7Q.js +0 -2
- package/dist/runtime-BfAdAEYT.js +0 -8
- package/dist/text-runtime-BTGkMN0o.js +0 -4
- package/node_modules/@protobufjs/inquire/CHANGELOG.md +0 -8
- package/node_modules/@protobufjs/inquire/LICENSE +0 -26
- package/node_modules/@protobufjs/inquire/README.md +0 -13
- package/node_modules/@protobufjs/inquire/index.d.ts +0 -10
- package/node_modules/@protobufjs/inquire/index.js +0 -38
- package/node_modules/@protobufjs/inquire/package.json +0 -21
- package/node_modules/@protobufjs/inquire/tests/data/array.js +0 -1
- package/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +0 -1
- package/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +0 -1
- package/node_modules/@protobufjs/inquire/tests/data/object.js +0 -1
- package/node_modules/@protobufjs/inquire/tests/index.js +0 -20
- package/npm-shrinkwrap.json +0 -958
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as getOptionalWhatsAppChannelRuntime } from "./runtime-BLlToOi6.js";
|
|
2
2
|
import { getChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
3
3
|
//#region extensions/whatsapp/src/connection-controller-runtime-context.ts
|
|
4
4
|
const WHATSAPP_CONNECTION_CONTROLLER_CAPABILITY = "connection-controller";
|
|
5
5
|
const WHATSAPP_CONNECTION_OWNER_PENDING_CAPABILITY = "connection-owner-pending";
|
|
6
6
|
function getWhatsAppConnectionController(accountId) {
|
|
7
7
|
return getChannelRuntimeContext({
|
|
8
|
-
channelRuntime:
|
|
8
|
+
channelRuntime: getOptionalWhatsAppChannelRuntime() ?? void 0,
|
|
9
9
|
channelId: "whatsapp",
|
|
10
10
|
accountId,
|
|
11
11
|
capability: "connection-controller"
|
|
@@ -13,7 +13,7 @@ function getWhatsAppConnectionController(accountId) {
|
|
|
13
13
|
}
|
|
14
14
|
function hasPendingWhatsAppConnectionOwner(accountId) {
|
|
15
15
|
return Boolean(getChannelRuntimeContext({
|
|
16
|
-
channelRuntime:
|
|
16
|
+
channelRuntime: getOptionalWhatsAppChannelRuntime() ?? void 0,
|
|
17
17
|
channelId: "whatsapp",
|
|
18
18
|
accountId,
|
|
19
19
|
capability: WHATSAPP_CONNECTION_OWNER_PENDING_CAPABILITY
|
package/dist/contract-api.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as normalizeWhatsAppTarget$1, t as isWhatsAppGroupJid$1 } from "./normalize-target-
|
|
1
|
+
import { c as normalizeWhatsAppTarget$1, t as isWhatsAppGroupJid$1 } from "./normalize-target-CugRyONv.js";
|
|
2
2
|
import { t as whatsappCommandPolicy$1 } from "./command-policy-BIOSHySD.js";
|
|
3
3
|
import { t as resolveLegacyGroupSessionKey$1 } from "./group-session-contract-DDnZSsJ1.js";
|
|
4
4
|
import { r as isLegacyGroupSessionKey$1, t as canonicalizeLegacySessionKey$1 } from "./session-contract-DMTm6Q_L.js";
|
|
5
|
-
import { a as resolveWhatsAppRuntimeGroupPolicy$1, n as testing } from "./access-control-
|
|
5
|
+
import { a as resolveWhatsAppRuntimeGroupPolicy$1, n as testing } from "./access-control-pZcxTmd5.js";
|
|
6
6
|
//#region extensions/whatsapp/contract-api.ts
|
|
7
7
|
const canonicalizeLegacySessionKey = canonicalizeLegacySessionKey$1;
|
|
8
8
|
const isLegacyGroupSessionKey = isLegacyGroupSessionKey$1;
|
|
@@ -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-
|
|
3
|
-
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-
|
|
4
|
-
import { i as hasPendingWhatsAppConnectionOwner, r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-
|
|
5
|
-
import "./normalize-
|
|
6
|
-
import { f as readWebAuthExistsForDecision, w as waitForCredsSaveQueueWithTimeout } from "./auth-store-
|
|
7
|
-
import { n as resolveWebAccountId } from "./active-listener-
|
|
8
|
-
import { a as waitForWaConnection, h as acquireWhatsAppStandaloneConnectionOwner, n as createWaDirectorySocket, p as WhatsAppConnectionOwnerBusyError, t as closeWhatsAppSocketAndWait } from "./socket-close-
|
|
2
|
+
import { c as resolveMergedWhatsAppAccountConfig, o as resolveWhatsAppAuthDir } from "./accounts-CSqLvCY5.js";
|
|
3
|
+
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-CugRyONv.js";
|
|
4
|
+
import { i as hasPendingWhatsAppConnectionOwner, r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-DG0tuYuw.js";
|
|
5
|
+
import "./normalize-C7Hkc_vE.js";
|
|
6
|
+
import { f as readWebAuthExistsForDecision, w as waitForCredsSaveQueueWithTimeout } from "./auth-store-DcEpIOmE.js";
|
|
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-DridEuzz.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-DalGrfGN.js";
|
|
2
2
|
//#region extensions/whatsapp/directory-contract-api.ts
|
|
3
3
|
const whatsappDirectoryContractPlugin = {
|
|
4
4
|
id: "whatsapp",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region extensions/whatsapp/src/doctor.ts
|
|
2
|
+
function normalizeCompatibilityConfig({ cfg }) {
|
|
3
|
+
return {
|
|
4
|
+
config: cfg,
|
|
5
|
+
changes: []
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
const whatsappDoctor = { normalizeCompatibilityConfig };
|
|
9
|
+
//#endregion
|
|
10
|
+
export { whatsappDoctor as n, normalizeCompatibilityConfig as t };
|
|
@@ -1,95 +1,51 @@
|
|
|
1
|
-
import { t as normalizeCompatibilityConfig$1 } from "./doctor-
|
|
2
|
-
import { asObjectRecord, defineChannelAliasMigration } from "openclaw/plugin-sdk/runtime-doctor";
|
|
1
|
+
import { t as normalizeCompatibilityConfig$1 } from "./doctor-CwzVXKoE.js";
|
|
2
|
+
import { asObjectRecord, defineChannelAliasMigration, hasLegacyAccountStreamingAliases, stripRetiredChannelKeys } from "openclaw/plugin-sdk/runtime-doctor";
|
|
3
3
|
//#region extensions/whatsapp/src/doctor-contract.ts
|
|
4
4
|
const streamingAliasMigration = defineChannelAliasMigration({
|
|
5
5
|
channelId: "whatsapp",
|
|
6
6
|
streaming: {
|
|
7
7
|
defaultMode: "partial",
|
|
8
8
|
deliveryOnly: true
|
|
9
|
-
}
|
|
9
|
+
},
|
|
10
|
+
accountStreamingInheritsDefaultAccount: true
|
|
10
11
|
});
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
filled = true;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
value,
|
|
35
|
-
filled
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function seedMigratedAccountStreaming(params) {
|
|
39
|
-
const channels = params.cfg.channels;
|
|
40
|
-
const entry = asObjectRecord(channels?.whatsapp);
|
|
41
|
-
const accounts = asObjectRecord(entry?.accounts);
|
|
42
|
-
if (!entry || !accounts) return params.cfg;
|
|
43
|
-
const rootStreaming = asObjectRecord(entry.streaming);
|
|
44
|
-
const defaultKey = Object.hasOwn(accounts, "default") ? "default" : Object.keys(accounts).find((key) => key.trim().toLowerCase() === "default");
|
|
45
|
-
let accountsChanged = false;
|
|
46
|
-
const nextAccounts = { ...accounts };
|
|
47
|
-
const seedOrder = Object.keys(accounts).toSorted((left, right) => left === defaultKey ? -1 : right === defaultKey ? 1 : left.localeCompare(right));
|
|
48
|
-
for (const accountId of seedOrder) {
|
|
49
|
-
const account = asObjectRecord(nextAccounts[accountId]);
|
|
50
|
-
const created = asObjectRecord(account?.streaming);
|
|
51
|
-
if (!account || !created || !params.accountsWithoutStreamingBefore.has(accountId)) continue;
|
|
52
|
-
const defaultStreaming = defaultKey ? asObjectRecord(asObjectRecord(nextAccounts[defaultKey])?.streaming) : null;
|
|
53
|
-
const inheritedSource = accountId === defaultKey ? rootStreaming : defaultStreaming ?? rootStreaming;
|
|
54
|
-
if (!inheritedSource) continue;
|
|
55
|
-
const seeded = fillMissingStreamingFields(created, inheritedSource);
|
|
56
|
-
if (!seeded.filled) continue;
|
|
57
|
-
nextAccounts[accountId] = {
|
|
58
|
-
...account,
|
|
59
|
-
streaming: seeded.value
|
|
60
|
-
};
|
|
61
|
-
accountsChanged = true;
|
|
62
|
-
const sourcePath = accountId === defaultKey ? "channels.whatsapp.streaming" : "effective channels.whatsapp streaming defaults";
|
|
63
|
-
params.changes.push(`Copied ${sourcePath} into channels.whatsapp.accounts.${accountId}.streaming to keep inherited settings while migrating flat streaming keys.`);
|
|
12
|
+
const hasExposeErrorText = (value) => Object.hasOwn(asObjectRecord(value) ?? {}, "exposeErrorText");
|
|
13
|
+
const legacyConfigRules = [
|
|
14
|
+
...streamingAliasMigration.legacyConfigRules,
|
|
15
|
+
{
|
|
16
|
+
path: [
|
|
17
|
+
"channels",
|
|
18
|
+
"whatsapp",
|
|
19
|
+
"exposeErrorText"
|
|
20
|
+
],
|
|
21
|
+
message: "channels.whatsapp.exposeErrorText is retired and ignored. Run \"openclaw doctor --fix\"."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
path: [
|
|
25
|
+
"channels",
|
|
26
|
+
"whatsapp",
|
|
27
|
+
"accounts"
|
|
28
|
+
],
|
|
29
|
+
message: "channels.whatsapp.accounts.<id>.exposeErrorText is retired and ignored. Run \"openclaw doctor --fix\".",
|
|
30
|
+
match: (value) => hasLegacyAccountStreamingAliases(value, hasExposeErrorText)
|
|
64
31
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
};
|
|
32
|
+
];
|
|
33
|
+
function removeExposeErrorText(cfg, changes) {
|
|
34
|
+
return stripRetiredChannelKeys({
|
|
35
|
+
cfg,
|
|
36
|
+
channelId: "whatsapp",
|
|
37
|
+
keys: /* @__PURE__ */ new Set(["exposeErrorText"]),
|
|
38
|
+
scope: "root-and-accounts",
|
|
39
|
+
onRemove: ({ key, pathPrefix }) => changes.push(`Removed retired ${pathPrefix}.${key}.`)
|
|
40
|
+
}).config;
|
|
76
41
|
}
|
|
77
42
|
function normalizeCompatibilityConfig({ cfg }) {
|
|
78
43
|
const ackReaction = normalizeCompatibilityConfig$1({ cfg });
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
cfg: ackReaction.config,
|
|
44
|
+
const retiredConfig = removeExposeErrorText(ackReaction.config, ackReaction.changes);
|
|
45
|
+
return streamingAliasMigration.normalizeChannelConfig({
|
|
46
|
+
cfg: retiredConfig,
|
|
83
47
|
changes: ackReaction.changes
|
|
84
48
|
});
|
|
85
|
-
return {
|
|
86
|
-
config: seedMigratedAccountStreaming({
|
|
87
|
-
cfg: aliases.config,
|
|
88
|
-
accountsWithoutStreamingBefore,
|
|
89
|
-
changes: aliases.changes
|
|
90
|
-
}),
|
|
91
|
-
changes: aliases.changes
|
|
92
|
-
};
|
|
93
49
|
}
|
|
94
50
|
//#endregion
|
|
95
51
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
2
|
-
import { c as normalizeWhatsAppTarget } from "./normalize-target-
|
|
3
|
-
import "./normalize-
|
|
4
|
-
import { r as jidToE164 } from "./targets-runtime-
|
|
5
|
-
import "./text-runtime-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-CSqLvCY5.js";
|
|
2
|
+
import { c as normalizeWhatsAppTarget } from "./normalize-target-CugRyONv.js";
|
|
3
|
+
import "./normalize-C7Hkc_vE.js";
|
|
4
|
+
import { r as jidToE164 } from "./targets-runtime-TMk0lGuy.js";
|
|
5
|
+
import "./text-runtime-CaKLhowd.js";
|
|
6
6
|
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
7
|
+
import { formatMediaPlaceholderText } from "openclaw/plugin-sdk/channel-inbound";
|
|
7
8
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
8
9
|
//#region extensions/whatsapp/src/approval-auth.ts
|
|
9
10
|
function normalizeWhatsAppApproverId(value) {
|
|
@@ -59,6 +60,7 @@ function lookupInboundMessageMeta(accountId, remoteJid, messageId) {
|
|
|
59
60
|
participant: entry.participant,
|
|
60
61
|
participantE164: entry.participantE164,
|
|
61
62
|
body: entry.body,
|
|
63
|
+
media: entry.media,
|
|
62
64
|
fromMe: entry.fromMe
|
|
63
65
|
};
|
|
64
66
|
}
|
|
@@ -96,6 +98,7 @@ function lookupInboundMessageMetaForTarget(accountId, targetJid, messageId) {
|
|
|
96
98
|
participant: exact.participant,
|
|
97
99
|
participantE164: exact.participantE164,
|
|
98
100
|
body: exact.body,
|
|
101
|
+
media: exact.media,
|
|
99
102
|
fromMe: exact.fromMe
|
|
100
103
|
};
|
|
101
104
|
const prefix = `${accountId}:`;
|
|
@@ -112,6 +115,7 @@ function lookupInboundMessageMetaForTarget(accountId, targetJid, messageId) {
|
|
|
112
115
|
participant: entry.participant,
|
|
113
116
|
participantE164: entry.participantE164,
|
|
114
117
|
body: entry.body,
|
|
118
|
+
media: entry.media,
|
|
115
119
|
fromMe: entry.fromMe
|
|
116
120
|
};
|
|
117
121
|
if (!matchesQuotedConversationTarget(targetJid, candidate)) continue;
|
|
@@ -124,6 +128,7 @@ function buildQuotedMessageOptions(params) {
|
|
|
124
128
|
const id = params.messageId?.trim();
|
|
125
129
|
const remoteJid = params.remoteJid?.trim();
|
|
126
130
|
if (!id || !remoteJid) return;
|
|
131
|
+
const previewText = [params.messageText, formatMediaPlaceholderText(params.media ? [params.media] : [])].filter(Boolean).join("\n");
|
|
127
132
|
return { quoted: {
|
|
128
133
|
key: {
|
|
129
134
|
remoteJid,
|
|
@@ -131,7 +136,7 @@ function buildQuotedMessageOptions(params) {
|
|
|
131
136
|
fromMe: params.fromMe ?? false,
|
|
132
137
|
participant: params.participant
|
|
133
138
|
},
|
|
134
|
-
message: { conversation:
|
|
139
|
+
message: { conversation: previewText }
|
|
135
140
|
} };
|
|
136
141
|
}
|
|
137
142
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as jidToE164 } from "./targets-runtime-
|
|
2
|
-
import {
|
|
1
|
+
import { r as jidToE164 } from "./targets-runtime-TMk0lGuy.js";
|
|
2
|
+
import { t as normalizeE164 } from "./text-runtime-CaKLhowd.js";
|
|
3
3
|
//#region extensions/whatsapp/src/identity.ts
|
|
4
4
|
const WHATSAPP_LID_RE = /@(lid|hosted\.lid)$/i;
|
|
5
5
|
function normalizeDeviceScopedJid(jid) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as createWhatsAppLoginTool } from "./agent-tools-login-DfyToBpG.js";
|
|
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 "./auth-store-
|
|
3
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
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 "./auth-store-DcEpIOmE.js";
|
|
3
|
+
import { t as getActiveWebListener } from "./active-listener-BEjWsCNM.js";
|
|
4
4
|
import { n as getStatusCode, t as formatError } from "./session-errors-JuazczrA.js";
|
|
5
5
|
export { WA_WEB_AUTH_DIR, createWhatsAppLoginTool, formatError, getActiveWebListener, getStatusCode, getWebAuthAgeMs, logWebSelfId, logoutWeb, pickWebChannel, readWebSelfId, resolveDefaultWebAuthDir, webAuthExists };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
3
|
-
import { b as restoreCredsFromBackupIfNeeded } from "./auth-store-
|
|
4
|
-
import { f as renderQrTerminal, r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-
|
|
5
|
-
import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-
|
|
2
|
+
import { a as resolveWhatsAppAccount } from "./accounts-CSqLvCY5.js";
|
|
3
|
+
import { b as restoreCredsFromBackupIfNeeded } from "./auth-store-DcEpIOmE.js";
|
|
4
|
+
import { f as renderQrTerminal, r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-DridEuzz.js";
|
|
5
|
+
import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-BOB2MVKY.js";
|
|
6
6
|
import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|
7
7
|
import { logInfo } from "openclaw/plugin-sdk/logging-core";
|
|
8
8
|
import { danger, defaultRuntime, success } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -12,12 +12,11 @@ var login_exports = /* @__PURE__ */ __exportAll({ loginWeb: () => loginWeb });
|
|
|
12
12
|
const QR_LINK_INSTRUCTION = "Open the WhatsApp app, go to Linked Devices, then scan this QR:";
|
|
13
13
|
const CLEAR_TERMINAL = "\x1B[2J\x1B[H";
|
|
14
14
|
async function loginWeb(verbose, waitForConnection, runtime = defaultRuntime, accountId, options) {
|
|
15
|
-
const cfg = getRuntimeConfig();
|
|
16
15
|
const account = resolveWhatsAppAccount({
|
|
17
|
-
cfg,
|
|
16
|
+
cfg: getRuntimeConfig(),
|
|
18
17
|
accountId
|
|
19
18
|
});
|
|
20
|
-
const socketTiming = resolveWhatsAppSocketTiming(
|
|
19
|
+
const socketTiming = resolveWhatsAppSocketTiming();
|
|
21
20
|
const restoredFromBackup = await restoreCredsFromBackupIfNeeded(account.authDir, { beforeCredentialPersistence: options?.beforeCredentialPersistence });
|
|
22
21
|
const credentialPersistenceState = { failure: null };
|
|
23
22
|
let resolveCredentialPersistenceFailure = (_failure) => {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as resolveWhatsAppAccount } from "./accounts-
|
|
2
|
-
import { c as logoutWeb, f as readWebAuthExistsForDecision, g as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-
|
|
3
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
4
|
-
import { r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-
|
|
1
|
+
import { a as resolveWhatsAppAccount } from "./accounts-CSqLvCY5.js";
|
|
2
|
+
import { c as logoutWeb, f as readWebAuthExistsForDecision, g as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DcEpIOmE.js";
|
|
3
|
+
import { t as getActiveWebListener } from "./active-listener-BEjWsCNM.js";
|
|
4
|
+
import { r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-DridEuzz.js";
|
|
5
5
|
import { t as formatError } from "./session-errors-JuazczrA.js";
|
|
6
|
-
import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-
|
|
6
|
+
import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-BOB2MVKY.js";
|
|
7
7
|
import { logInfo } from "openclaw/plugin-sdk/logging-core";
|
|
8
8
|
import { danger, defaultRuntime, info, success } from "openclaw/plugin-sdk/runtime-env";
|
|
9
9
|
import { renderQrPngDataUrl } from "openclaw/plugin-sdk/media-runtime";
|
|
@@ -185,12 +185,11 @@ async function waitForQrOrRecoveredLogin(params) {
|
|
|
185
185
|
}
|
|
186
186
|
async function startWebLoginWithQr(opts = {}) {
|
|
187
187
|
const runtime = opts.runtime ?? defaultRuntime;
|
|
188
|
-
const cfg = getRuntimeConfig();
|
|
189
188
|
const account = resolveWhatsAppAccount({
|
|
190
|
-
cfg,
|
|
189
|
+
cfg: getRuntimeConfig(),
|
|
191
190
|
accountId: opts.accountId
|
|
192
191
|
});
|
|
193
|
-
const socketTiming = resolveWhatsAppSocketTiming(
|
|
192
|
+
const socketTiming = resolveWhatsAppSocketTiming();
|
|
194
193
|
const authState = await readWebAuthExistsForDecision(account.authDir);
|
|
195
194
|
if (authState.outcome === "unstable") return {
|
|
196
195
|
code: WHATSAPP_AUTH_UNSTABLE_CODE,
|
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("./login-qr-
|
|
3
|
+
const loadLoginQrModule = createLazyRuntimeModule(() => import("./login-qr-Bncpb6js.js"));
|
|
4
4
|
async function startWebLoginWithQr(...args) {
|
|
5
5
|
const { startWebLoginWithQr: startWebLoginWithQrLocal } = await loadLoginQrModule();
|
|
6
6
|
return await startWebLoginWithQrLocal(...args);
|