@openclaw/whatsapp 2026.7.2-beta.3 → 2026.7.2-beta.4

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.
Files changed (144) hide show
  1. package/dist/{access-control-tjy_em01.js → access-control-CRz_v6bR.js} +4 -5
  2. package/dist/{accounts-ejK8sXPU.js → accounts-CxPuEFi-.js} +1 -1
  3. package/dist/{action-runtime-p0V390gA.js → action-runtime-CHU7xb6o.js} +2 -2
  4. package/dist/action-runtime-api.js +1 -1
  5. package/dist/action-runtime.runtime.js +1 -1
  6. package/dist/{active-listener-BbdlXooT.js → active-listener-BEjWsCNM.js} +1 -1
  7. package/dist/api.js +12 -15
  8. package/dist/{approval-handler.runtime-BO1oJ-b8.js → approval-handler.runtime-C4ddB7Kc.js} +4 -4
  9. package/dist/{approval-reactions-CrZFAyf-.js → approval-reactions-P2HXjmln.js} +3 -3
  10. package/dist/{auth-store-BQi9pZqQ.js → auth-store-DirYMTbo.js} +4 -3
  11. package/dist/call-tool-api.js +4 -4
  12. package/dist/{channel-B2I4Opzb.js → channel-B9xjrOGG.js} +28 -19
  13. package/dist/channel-config-api.js +1 -1
  14. package/dist/channel-plugin-api.js +1 -1
  15. package/dist/{channel-react-action-CPRQE-s3.js → channel-react-action-CBW-PA8q.js} +10 -13
  16. package/dist/{channel.runtime-CjkhQzk8.js → channel.runtime-DdKuhlNu.js} +5 -5
  17. package/dist/{channel.setup-BMWE9LmN.js → channel.setup-DXUCPHel.js} +3 -6
  18. package/dist/{config-schema-BZ8h1hWA.js → config-schema-C6IeKIC0.js} +6 -0
  19. package/dist/{connection-controller-HGaffeFb.js → connection-controller-BVRExqrB.js} +8 -10
  20. package/dist/{connection-controller-runtime-context-9mEeAvu1.js → connection-controller-runtime-context-DG0tuYuw.js} +3 -3
  21. package/dist/contract-api.js +1 -1
  22. package/dist/{directory-config-BZ775eGX.js → directory-config-BTbJkV1W.js} +5 -5
  23. package/dist/directory-contract-api.js +1 -1
  24. package/dist/doctor-CwzVXKoE.js +10 -0
  25. package/dist/doctor-contract-api.js +35 -79
  26. package/dist/{group-session-key-Dh8WZun_.js → group-session-key-DJSdYfnb.js} +9 -4
  27. package/dist/{identity-D7L8LCuH.js → identity-BM4_wZeM.js} +2 -2
  28. package/dist/light-runtime-api.js +2 -2
  29. package/dist/{login-ifOXCBjo.js → login-BKUm7KSk.js} +6 -7
  30. package/dist/{login-qr-DUHzVH_Y.js → login-qr-DagJvMbg.js} +7 -8
  31. package/dist/login-qr-runtime.js +1 -1
  32. package/dist/{monitor-_jqDKBXj.js → monitor-CBVNJ2lb.js} +206 -232
  33. package/dist/{question-reactions-C0qJ6wGA.js → question-reactions-CaOrSYzU.js} +1 -1
  34. package/dist/runtime-BLlToOi6.js +21 -0
  35. package/dist/runtime-api.js +10 -10
  36. package/dist/runtime-setter-api.js +1 -1
  37. package/dist/{send-SB-4JrVZ.js → send-DhJVN30g.js} +38 -84
  38. package/dist/{send-api-BG0MgoFI.js → send-api-CpHwbor_.js} +39 -33
  39. package/dist/{setup-finalize-Cc-4iWGj.js → setup-finalize-9XzKdFq6.js} +3 -3
  40. package/dist/setup-plugin-api.js +1 -1
  41. package/dist/{setup-surface-DhnXEZir.js → setup-surface-Kv3mPki2.js} +3 -3
  42. package/dist/{setup-core-BbIgEl2M.js → shared-CuqHFnKd.js} +78 -56
  43. package/dist/{socket-close-jNGyZY4T.js → socket-close-BoSHhQNJ.js} +5 -6
  44. package/dist/{targets-runtime-Bsh0HR9y.js → targets-runtime-CKFrhoX4.js} +142 -29
  45. package/dist/text-runtime-CU_IlbK5.js +4 -0
  46. package/node_modules/@protobufjs/utf8/CHANGELOG.md +8 -0
  47. package/node_modules/@protobufjs/utf8/index.js +29 -18
  48. package/node_modules/@protobufjs/utf8/package.json +2 -2
  49. package/node_modules/@protobufjs/utf8/tests/index.js +5 -0
  50. package/node_modules/@thi.ng/bitstream/package.json +4 -4
  51. package/node_modules/@thi.ng/errors/package.json +4 -4
  52. package/node_modules/@types/node/README.md +1 -1
  53. package/node_modules/@types/node/fs/promises.d.ts +16 -6
  54. package/node_modules/@types/node/package.json +2 -2
  55. package/node_modules/audio-type/package.json +3 -2
  56. package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -1
  57. package/node_modules/lru-cache/dist/commonjs/browser/index.js +11 -4
  58. package/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -1
  59. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +1 -1
  60. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +3 -3
  61. package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
  62. package/node_modules/lru-cache/dist/commonjs/index.js +11 -4
  63. package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
  64. package/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  65. package/node_modules/lru-cache/dist/commonjs/index.min.js.map +3 -3
  66. package/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -1
  67. package/node_modules/lru-cache/dist/commonjs/node/index.js +11 -4
  68. package/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -1
  69. package/node_modules/lru-cache/dist/commonjs/node/index.min.js +1 -1
  70. package/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +3 -3
  71. package/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
  72. package/node_modules/lru-cache/dist/esm/browser/index.js +11 -4
  73. package/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
  74. package/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
  75. package/node_modules/lru-cache/dist/esm/browser/index.min.js.map +3 -3
  76. package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
  77. package/node_modules/lru-cache/dist/esm/index.js +11 -4
  78. package/node_modules/lru-cache/dist/esm/index.js.map +1 -1
  79. package/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  80. package/node_modules/lru-cache/dist/esm/index.min.js.map +3 -3
  81. package/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
  82. package/node_modules/lru-cache/dist/esm/node/index.js +11 -4
  83. package/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
  84. package/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
  85. package/node_modules/lru-cache/dist/esm/node/index.min.js.map +3 -3
  86. package/node_modules/lru-cache/package.json +1 -1
  87. package/node_modules/music-metadata/lib/common/Util.d.ts +1 -1
  88. package/node_modules/music-metadata/lib/common/Util.js +7 -1
  89. package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +23 -3
  90. package/node_modules/music-metadata/lib/id3v2/FrameParser.js +2 -2
  91. package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +1 -1
  92. package/node_modules/music-metadata/lib/mp4/AtomToken.js +38 -13
  93. package/node_modules/music-metadata/lib/mpeg/MpegParser.js +1 -1
  94. package/node_modules/music-metadata/package.json +6 -6
  95. package/node_modules/p-queue/dist/index.js +17 -6
  96. package/node_modules/p-queue/package.json +1 -1
  97. package/node_modules/protobufjs/dist/light/protobuf.js +145 -188
  98. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  99. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  100. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  101. package/node_modules/protobufjs/dist/minimal/protobuf.js +33 -76
  102. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  103. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
  104. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  105. package/node_modules/protobufjs/dist/protobuf.js +168 -208
  106. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  107. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  108. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  109. package/node_modules/protobufjs/index.d.ts +0 -8
  110. package/node_modules/protobufjs/package.json +2 -3
  111. package/node_modules/protobufjs/src/parse.js +3 -0
  112. package/node_modules/protobufjs/src/util/minimal.js +0 -3
  113. package/node_modules/typebox/build/compile/validator.d.mts +1 -4
  114. package/node_modules/typebox/build/guard/guard.d.mts +1 -1
  115. package/node_modules/typebox/build/guard/guard.mjs +5 -2
  116. package/node_modules/typebox/build/guard/string.mjs +16 -4
  117. package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  118. package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
  119. package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
  120. package/node_modules/typebox/build/typebox.d.mts +1 -1
  121. package/node_modules/typebox/build/typebox.mjs +1 -1
  122. package/node_modules/typebox/package.json +1 -1
  123. package/node_modules/typebox/readme.md +29 -32
  124. package/node_modules/ws/lib/receiver.js +15 -32
  125. package/node_modules/ws/lib/websocket-server.js +4 -4
  126. package/node_modules/ws/lib/websocket.js +4 -4
  127. package/node_modules/ws/package.json +5 -1
  128. package/npm-shrinkwrap.json +41 -45
  129. package/openclaw.plugin.json +139 -179
  130. package/package.json +21 -11
  131. package/dist/doctor-By3SB4lm.js +0 -48
  132. package/dist/runtime-BfAdAEYT.js +0 -8
  133. package/dist/text-runtime-BTGkMN0o.js +0 -4
  134. package/node_modules/@protobufjs/inquire/CHANGELOG.md +0 -8
  135. package/node_modules/@protobufjs/inquire/LICENSE +0 -26
  136. package/node_modules/@protobufjs/inquire/README.md +0 -13
  137. package/node_modules/@protobufjs/inquire/index.d.ts +0 -10
  138. package/node_modules/@protobufjs/inquire/index.js +0 -38
  139. package/node_modules/@protobufjs/inquire/package.json +0 -21
  140. package/node_modules/@protobufjs/inquire/tests/data/array.js +0 -1
  141. package/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +0 -1
  142. package/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +0 -1
  143. package/node_modules/@protobufjs/inquire/tests/data/object.js +0 -1
  144. package/node_modules/@protobufjs/inquire/tests/index.js +0 -20
@@ -1,95 +1,51 @@
1
- import { t as normalizeCompatibilityConfig$1 } from "./doctor-By3SB4lm.js";
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 legacyConfigRules = streamingAliasMigration.legacyConfigRules;
12
- /** Deep-fills fields missing from target with copies of source values. */
13
- function fillMissingStreamingFields(target, source) {
14
- let filled = false;
15
- const value = { ...target };
16
- for (const [key, sourceValue] of Object.entries(source)) {
17
- if (sourceValue === void 0) continue;
18
- const existing = value[key];
19
- if (existing === void 0) {
20
- value[key] = structuredClone(sourceValue);
21
- filled = true;
22
- continue;
23
- }
24
- const existingRecord = asObjectRecord(existing);
25
- const sourceRecord = asObjectRecord(sourceValue);
26
- if (!existingRecord || !sourceRecord) continue;
27
- const merged = fillMissingStreamingFields(existingRecord, sourceRecord);
28
- if (merged.filled) {
29
- value[key] = merged.value;
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
- if (!accountsChanged) return params.cfg;
66
- return {
67
- ...params.cfg,
68
- channels: {
69
- ...channels,
70
- whatsapp: {
71
- ...entry,
72
- accounts: nextAccounts
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 accountsBefore = asObjectRecord(asObjectRecord(ackReaction.config.channels?.whatsapp)?.accounts);
80
- const accountsWithoutStreamingBefore = new Set(Object.entries(accountsBefore ?? {}).filter(([, account]) => asObjectRecord(account)?.streaming === void 0).map(([accountId]) => accountId));
81
- const aliases = streamingAliasMigration.normalizeChannelConfig({
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-ejK8sXPU.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-CxPuEFi-.js";
2
2
  import { c as normalizeWhatsAppTarget } from "./normalize-target-DSZnHkKF.js";
3
3
  import "./normalize-C-Z16y7Q.js";
4
- import { r as jidToE164 } from "./targets-runtime-Bsh0HR9y.js";
5
- import "./text-runtime-BTGkMN0o.js";
4
+ import { r as jidToE164 } from "./targets-runtime-CKFrhoX4.js";
5
+ import "./text-runtime-CU_IlbK5.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: params.messageText ?? "" }
139
+ message: { conversation: previewText }
135
140
  } };
136
141
  }
137
142
  //#endregion
@@ -1,5 +1,5 @@
1
- import { r as jidToE164 } from "./targets-runtime-Bsh0HR9y.js";
2
- import { n as normalizeE164 } from "./text-runtime-BTGkMN0o.js";
1
+ import { r as jidToE164 } from "./targets-runtime-CKFrhoX4.js";
2
+ import { t as normalizeE164 } from "./text-runtime-CU_IlbK5.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-BQi9pZqQ.js";
3
- import { t as getActiveWebListener } from "./active-listener-BbdlXooT.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-DirYMTbo.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-ejK8sXPU.js";
3
- import { b as restoreCredsFromBackupIfNeeded } from "./auth-store-BQi9pZqQ.js";
4
- import { f as renderQrTerminal, r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-jNGyZY4T.js";
5
- import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-HGaffeFb.js";
2
+ import { a as resolveWhatsAppAccount } from "./accounts-CxPuEFi-.js";
3
+ import { b as restoreCredsFromBackupIfNeeded } from "./auth-store-DirYMTbo.js";
4
+ import { f as renderQrTerminal, r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-BoSHhQNJ.js";
5
+ import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-BVRExqrB.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(cfg);
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-ejK8sXPU.js";
2
- import { c as logoutWeb, f as readWebAuthExistsForDecision, g as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-BQi9pZqQ.js";
3
- import { t as getActiveWebListener } from "./active-listener-BbdlXooT.js";
4
- import { r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-jNGyZY4T.js";
1
+ import { a as resolveWhatsAppAccount } from "./accounts-CxPuEFi-.js";
2
+ import { c as logoutWeb, f as readWebAuthExistsForDecision, g as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DirYMTbo.js";
3
+ import { t as getActiveWebListener } from "./active-listener-BEjWsCNM.js";
4
+ import { r as createWaSocket, u as resolveWhatsAppSocketTiming } from "./socket-close-BoSHhQNJ.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-HGaffeFb.js";
6
+ import { i as closeWaSocket, o as waitForWhatsAppLoginResult, t as WHATSAPP_LOGGED_OUT_QR_MESSAGE } from "./connection-controller-BVRExqrB.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(cfg);
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,
@@ -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-DUHzVH_Y.js"));
3
+ const loadLoginQrModule = createLazyRuntimeModule(() => import("./login-qr-DagJvMbg.js"));
4
4
  async function startWebLoginWithQr(...args) {
5
5
  const { startWebLoginWithQr: startWebLoginWithQrLocal } = await loadLoginQrModule();
6
6
  return await startWebLoginWithQrLocal(...args);