@openclaw/whatsapp 2026.10.5-beta.4 → 2026.10.10-beta.2

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 (51) hide show
  1. package/dist/.setup/{action-runtime-DUSkWTiZ.mjs → action-runtime-B1UcIuRG.mjs} +1 -1
  2. package/dist/.setup/{active-listener-CDjoX9QR.mjs → active-listener-idMFscyE.mjs} +1 -1
  3. package/dist/.setup/{agent-tools-login-CB7OQbli.mjs → agent-tools-login-n7QVE3Am.mjs} +10 -1
  4. package/dist/.setup/{approval-handler.runtime-BEaAKSoU.mjs → approval-handler.runtime-DMDyXx9W.mjs} +5 -5
  5. package/dist/.setup/{approval-reactions-CWkZ_ham.mjs → approval-reactions-DYP0DYiU.mjs} +3 -3
  6. package/dist/.setup/audio-preflight.runtime-DOv4YzLh.mjs +1 -0
  7. package/dist/.setup/{channel-DcHw3Up2.mjs → channel-CecgCOxi.mjs} +13 -13
  8. package/dist/.setup/{channel-react-action-C5E8_iDk.mjs → channel-react-action-BkfwiSFM.mjs} +2 -2
  9. package/dist/.setup/{channel.runtime-DTj-wkEP.mjs → channel.runtime-BTx7s_SW.mjs} +4 -4
  10. package/dist/.setup/{channel.setup-BJWEyQlF.mjs → channel.setup-BACWTI6Q.mjs} +1 -1
  11. package/dist/.setup/{connection-controller-CejM7bhn.mjs → connection-controller-DpW6ILRo.mjs} +3 -3
  12. package/dist/.setup/{connection-controller-runtime-context-hgLJoRc8.mjs → connection-controller-runtime-context-x8C_unRx.mjs} +1 -1
  13. package/dist/.setup/{directory-config-DPLTUAqy.mjs → directory-config-CegsBv11.mjs} +4 -30
  14. package/dist/.setup/legacy-session-surface-api-BwP_Pgmu.mjs +1 -0
  15. package/dist/.setup/{login-DUx5JYuW.mjs → login-Bk8OQeE6.mjs} +4 -4
  16. package/dist/.setup/{login-qr-BAWbPonj.mjs → login-qr-B_6dpBr-.mjs} +6 -6
  17. package/dist/.setup/{monitor-CmXEQad9.mjs → monitor-5tf46zdS.mjs} +68 -147
  18. package/dist/.setup/{question-reactions-DywNaX8m.mjs → question-reactions-Rv9J2Lo1.mjs} +1 -1
  19. package/dist/.setup/reply-resolver.runtime-Byxo9w3l.mjs +1 -0
  20. package/dist/.setup/runtime-Botmatgn.mjs +17 -0
  21. package/dist/.setup/{send-CLBfAzd6.mjs → send-CIzCLFrJ.mjs} +1 -1
  22. package/dist/.setup/{send-api-COzRvqXx.mjs → send-api-Ck6tezjw.mjs} +1 -1
  23. package/dist/.setup/{setup-finalize-DSiP_-wa.mjs → setup-finalize-BtqJn6jL.mjs} +2 -2
  24. package/dist/.setup/setup-plugin-api-B6Nc07Ua.mjs +2 -0
  25. package/dist/.setup/{setup-surface-C_flQyHy.mjs → setup-surface-D6HuvKfd.mjs} +1 -1
  26. package/dist/.setup/{shared-SqcOkt51.mjs → shared-CbsgcYtM.mjs} +2 -2
  27. package/dist/.setup/{socket-close-C9OU9mVN.mjs → socket-close-BhMQls5y.mjs} +1 -6
  28. package/dist/action-runtime-api.js +1 -2
  29. package/dist/action-runtime.runtime.js +1 -2
  30. package/dist/agent-tools-api.js +2 -2
  31. package/dist/api.js +6 -6
  32. package/dist/channel-config-api.js +1 -2
  33. package/dist/channel-plugin-api.js +1 -2
  34. package/dist/directory-contract-api.js +1 -1
  35. package/dist/doctor-contract-api.js +6 -6
  36. package/dist/light-runtime-api.js +2 -2
  37. package/dist/login-qr-api.js +1 -2
  38. package/dist/login-qr-runtime.js +2 -2
  39. package/dist/runtime-api.js +9 -9
  40. package/dist/runtime-setter-api.js +1 -2
  41. package/dist/security-contract-api.js +1 -2
  42. package/dist/setup-entry.js +2 -2
  43. package/dist/setup-plugin-api.js +1 -2
  44. package/node_modules/typebox/build/value/clean/from_object.mjs +1 -1
  45. package/node_modules/typebox/package.json +1 -1
  46. package/package.json +11 -5
  47. package/dist/.setup/audio-preflight.runtime-Dg8oZgre.mjs +0 -2
  48. package/dist/.setup/legacy-session-surface-api-B2szjq4r.mjs +0 -2
  49. package/dist/.setup/reply-resolver.runtime-Ded8D58Y.mjs +0 -2
  50. package/dist/.setup/runtime-BLlToOi6.mjs +0 -21
  51. package/dist/.setup/setup-plugin-api-8WdNCjRW.mjs +0 -3
@@ -39,7 +39,7 @@ async function listSources(params) {
39
39
  }
40
40
  const sources = /* @__PURE__ */ new Map();
41
41
  for (const entry of await fs$1.readdir(params.oauthDir, { withFileTypes: true })) {
42
- const name = runtime_doctor_migrations_exports.resolveLegacyMigrationSourcePath?.(entry.name) ?? entry.name;
42
+ const name = runtime_doctor_migrations_exports.resolveLegacyMigrationSourcePath(entry.name);
43
43
  if (!entry.isFile() || !isWhatsAppBaileysAuthFileName(name)) continue;
44
44
  const source = sources.get(name) ?? {
45
45
  name,
@@ -80,7 +80,7 @@ const whatsappLegacyStateMigration = {
80
80
  };
81
81
  const assertCurrent = params.context.channelIngressQueues?.find((entry) => entry.channelId === "whatsapp")?.assertCurrent;
82
82
  const { backupLegacyStateSource } = runtime_doctor_migrations_exports;
83
- if (!assertCurrent || !backupLegacyStateSource) return warn("WhatsApp credential import requires offline Doctor repair. Update OpenClaw core and run openclaw doctor --fix; original files remain unchanged.");
83
+ if (!assertCurrent) return warn("WhatsApp credential import requires offline Doctor repair. Update OpenClaw core and run openclaw doctor --fix; original files remain unchanged.");
84
84
  const backups = [];
85
85
  for (const source of sources) backups.push({
86
86
  source,
@@ -105,7 +105,7 @@ const whatsappLegacyStateMigration = {
105
105
  const canonical = await credentials.exists(targetCreds) ? await credentials.read(targetCreds) : void 0;
106
106
  const legacy = backups.find(({ source }) => source.name === "creds.json");
107
107
  if (!legacy) return warn("WhatsApp shared-root key files have no creds.json identity. Kept all original files and private .migrated backups; restore the original creds.json before retrying Doctor.", Boolean(canonical));
108
- if (canonical && !canonical.buffer.equals(legacy.backup.bytes)) return warn("WhatsApp canonical credentials differ from the legacy shared root. Kept both complete sets and private .migrated backups; choose the intended authDir before removing either set.", true);
108
+ if (canonical && !canonical.buffer.equals(legacy.backup.bytes)) return warn("WhatsApp current credentials differ from the legacy shared root. Kept both complete sets and private .migrated backups; choose the intended authDir before removing either set.", true);
109
109
  const targetNames = await fs$1.readdir(path.join(params.oauthDir, targetDir)).catch((error) => {
110
110
  if (extractErrorCode(error) === "ENOENT") return [];
111
111
  throw error;
@@ -124,7 +124,7 @@ const whatsappLegacyStateMigration = {
124
124
  const receipts = receiptStore.withCurrent({ assertCurrent });
125
125
  const sourceIdentity = legacy.backup.snapshot.sha256;
126
126
  const previous = await receipts.lookup(sourceIdentity);
127
- if (previous && (!canonical || previous.targetDigest !== credentialSetDigest(targetFiles))) return warn("WhatsApp credential migration previously started, but its complete canonical credential set is absent or changed. Kept source files and backups; restore the complete intended account or select its authDir explicitly. Doctor will not recreate credentials after logout.", Boolean(canonical));
127
+ if (previous && (!canonical || previous.targetDigest !== credentialSetDigest(targetFiles))) return warn("WhatsApp credential migration previously started, but its complete current credential set is absent or changed. Kept source files and backups; restore the complete intended account or select its authDir explicitly. Doctor will not recreate credentials after logout.", Boolean(canonical));
128
128
  if (!canonical) {
129
129
  const sourceNames = new Set(sources.map((source) => source.name));
130
130
  if (targetNames.some((name) => isWhatsAppBaileysAuthFileName(name) && !sourceNames.has(name))) return warn("WhatsApp default account contains unmatched auth files without creds.json. Kept the incomplete account and legacy credentials separate; choose the intended credential set before retrying Doctor.");
@@ -153,7 +153,7 @@ const whatsappLegacyStateMigration = {
153
153
  private: true
154
154
  });
155
155
  const target = await credentials.read(relativePath);
156
- if (!target.buffer.equals(backup.bytes)) throw new Error("WhatsApp canonical credentials changed during import; original files retained.");
156
+ if (!target.buffer.equals(backup.bytes)) throw new Error("WhatsApp current credentials changed during import; original files retained.");
157
157
  targets.push({
158
158
  source,
159
159
  backup,
@@ -170,7 +170,7 @@ const whatsappLegacyStateMigration = {
170
170
  requireDirectories: true
171
171
  });
172
172
  const current = readRegularFileSync({ filePath: targetPath });
173
- if (current.stat.dev !== target.stat.dev || current.stat.ino !== target.stat.ino || !current.buffer.equals(target.buffer)) throw new Error("WhatsApp canonical credentials changed during import; original backup retained.");
173
+ if (current.exactIdentity.dev !== target.exactIdentity.dev || current.exactIdentity.ino !== target.exactIdentity.ino || !current.buffer.equals(target.buffer)) throw new Error("WhatsApp current credentials changed during import; original backup retained.");
174
174
  });
175
175
  changes.push(`Moved WhatsApp auth ${source.name} into the default account; backup: ${backup.backupPath}`);
176
176
  }
@@ -1,5 +1,5 @@
1
- import { t as createWhatsAppLoginTool } from "./.setup/agent-tools-login-CB7OQbli.mjs";
1
+ import { t as createWhatsAppLoginTool } from "./.setup/agent-tools-login-n7QVE3Am.mjs";
2
2
  import { b as webAuthExists, c as logoutWeb, h as readWebSelfId, l as pickWebChannel, o as getWebAuthAgeMs, s as logWebSelfId, t as WA_WEB_AUTH_DIR, v as resolveDefaultWebAuthDir } from "./.setup/auth-store-DOBi5BPe.mjs";
3
- import { t as getActiveWebListener } from "./.setup/active-listener-CDjoX9QR.mjs";
3
+ import { t as getActiveWebListener } from "./.setup/active-listener-idMFscyE.mjs";
4
4
  import { n as getStatusCode, t as formatError } from "./.setup/session-errors-B8UcAnZN.mjs";
5
5
  export { WA_WEB_AUTH_DIR, createWhatsAppLoginTool, formatError, getActiveWebListener, getStatusCode, getWebAuthAgeMs, logWebSelfId, logoutWeb, pickWebChannel, readWebSelfId, resolveDefaultWebAuthDir, webAuthExists };
@@ -1,2 +1 @@
1
- import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
2
- export { startWebLoginWithQr, waitForWebLogin };
1
+ export { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
@@ -1,10 +1,10 @@
1
1
  //#region extensions/whatsapp/login-qr-runtime.ts
2
2
  async function startWebLoginWithQr(...args) {
3
- const { startWebLoginWithQr: startWebLoginWithQrLocal } = await import("./.setup/login-qr-BAWbPonj.mjs");
3
+ const { startWebLoginWithQr: startWebLoginWithQrLocal } = await import("./.setup/login-qr-B_6dpBr-.mjs");
4
4
  return await startWebLoginWithQrLocal(...args);
5
5
  }
6
6
  async function waitForWebLogin(...args) {
7
- const { waitForWebLogin: waitForWebLoginLocal } = await import("./.setup/login-qr-BAWbPonj.mjs");
7
+ const { waitForWebLogin: waitForWebLoginLocal } = await import("./.setup/login-qr-B_6dpBr-.mjs");
8
8
  return await waitForWebLoginLocal(...args);
9
9
  }
10
10
  //#endregion
@@ -1,16 +1,16 @@
1
1
  import { a as readWebCredsJsonRawSync, n as hasWebCredsSync, o as resolveWebCredsBackupPath, s as resolveWebCredsPath } from "./.setup/creds-files-B8WcOAmE.mjs";
2
- import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./.setup/action-runtime-DUSkWTiZ.mjs";
3
- import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./.setup/send-CLBfAzd6.mjs";
4
- import { a as setWhatsAppRuntime } from "./.setup/runtime-BLlToOi6.mjs";
2
+ import { n as whatsAppActionRuntime, t as handleWhatsAppAction } from "./.setup/action-runtime-B1UcIuRG.mjs";
3
+ import { i as sendTypingWhatsApp, n as sendPollWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./.setup/send-CIzCLFrJ.mjs";
4
+ import { a as setWhatsAppRuntime } from "./.setup/runtime-Botmatgn.mjs";
5
5
  import { startWebLoginWithQr, waitForWebLogin } from "./login-qr-runtime.js";
6
- import { t as createWhatsAppLoginTool } from "./.setup/agent-tools-login-CB7OQbli.mjs";
6
+ import { t as createWhatsAppLoginTool } from "./.setup/agent-tools-login-n7QVE3Am.mjs";
7
7
  import { A as waitForCredsSaveQueue, M as writeCredsJsonAtomically, _ as readWebSelfIdentityForDecision, a as formatWhatsAppWebAuthStatusState, b as webAuthExists, c as logoutWeb, d as readWebAuthExistsForDecision, f as readWebAuthSnapshot, g as readWebSelfIdentity, h as readWebSelfId, j as waitForCredsSaveQueueWithTimeout, l as pickWebChannel, m as readWebAuthState, n as WHATSAPP_AUTH_UNSTABLE_CODE, o as getWebAuthAgeMs, p as readWebAuthSnapshotBestEffort, r as WhatsAppAuthUnstableError, s as logWebSelfId, t as WA_WEB_AUTH_DIR, u as readWebAuthExistsBestEffort, v as resolveDefaultWebAuthDir, y as restoreCredsFromBackupIfNeeded } from "./.setup/auth-store-DOBi5BPe.mjs";
8
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 { i as waitForWaConnection, r as createWaSocket, s as newConnectionId } from "./.setup/socket-close-C9OU9mVN.mjs";
9
+ import { n as resolveWebAccountId, t as getActiveWebListener } from "./.setup/active-listener-idMFscyE.mjs";
10
+ import { i as waitForWaConnection, r as createWaSocket, s as newConnectionId } from "./.setup/socket-close-BhMQls5y.mjs";
11
11
  import { n as getStatusCode, t as formatError } from "./.setup/session-errors-B8UcAnZN.mjs";
12
- import { p as extractText, s as extractContactContext, u as extractLocationData } from "./.setup/send-api-COzRvqXx.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-CmXEQad9.mjs";
14
- import { t as loginWeb } from "./.setup/login-DUx5JYuW.mjs";
12
+ import { p as extractText, s as extractContactContext, u as extractLocationData } from "./.setup/send-api-Ck6tezjw.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-5tf46zdS.mjs";
14
+ import { t as loginWeb } from "./.setup/login-Bk8OQeE6.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, readWebCredsJsonRawSync as 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 @@
1
- import { a as setWhatsAppRuntime } from "./.setup/runtime-BLlToOi6.mjs";
2
- export { setWhatsAppRuntime };
1
+ export { a as setWhatsAppRuntime } from "./.setup/runtime-Botmatgn.mjs";
@@ -1,2 +1 @@
1
- import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./.setup/security-contract-nAzD945y.mjs";
2
- export { collectUnsupportedSecretRefConfigCandidates, unsupportedSecretRefSurfacePatterns };
1
+ export { t as collectUnsupportedSecretRefConfigCandidates, n as unsupportedSecretRefSurfacePatterns } from "./.setup/security-contract-nAzD945y.mjs";
@@ -5,11 +5,11 @@ var setup_entry_default = defineBundledChannelSetupEntry({
5
5
  importMetaUrl: import.meta.url,
6
6
  features: { legacySessionSurfaces: true },
7
7
  plugin: {
8
- specifier: fileURLToPath(new URL(".setup/setup-plugin-api-8WdNCjRW.mjs", import.meta.url).href),
8
+ specifier: fileURLToPath(new URL(".setup/setup-plugin-api-B6Nc07Ua.mjs", import.meta.url).href),
9
9
  exportName: "whatsappSetupPlugin"
10
10
  },
11
11
  legacySessionSurface: {
12
- specifier: fileURLToPath(new URL(".setup/legacy-session-surface-api-B2szjq4r.mjs", import.meta.url).href),
12
+ specifier: fileURLToPath(new URL(".setup/legacy-session-surface-api-BwP_Pgmu.mjs", import.meta.url).href),
13
13
  exportName: "whatsappLegacySessionSurface"
14
14
  }
15
15
  });
@@ -1,2 +1 @@
1
- import { t as whatsappSetupPlugin } from "./.setup/channel.setup-BJWEyQlF.mjs";
2
- export { whatsappSetupPlugin };
1
+ export { t as whatsappSetupPlugin } from "./.setup/channel.setup-BACWTI6Q.mjs";
@@ -12,7 +12,7 @@ export function FromObject(context, type, value) {
12
12
  return value;
13
13
  const additionalProperties = GetAdditionalProperties(type);
14
14
  for (const key of Guard.Keys(value)) {
15
- if (Guard.HasPropertyKey(type.properties, key)) {
15
+ if (Guard.HasPropertyKey(type.properties, key) && IsSchema(type.properties[key])) {
16
16
  value[key] = FromType(context, type.properties[key], value[key]);
17
17
  continue;
18
18
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
4
- "version": "1.3.34",
4
+ "version": "1.3.35",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "jsonschema"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/whatsapp",
3
- "version": "2026.10.5-beta.4",
3
+ "version": "2026.10.10-beta.2",
4
4
  "description": "OpenClaw WhatsApp channel plugin for WhatsApp Web chats.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,10 +10,10 @@
10
10
  "dependencies": {
11
11
  "audio-decode": "3.12.0",
12
12
  "baileys": "7.0.0-rc14",
13
- "typebox": "1.3.34"
13
+ "typebox": "1.3.35"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.10.5-beta.4"
16
+ "openclaw": ">=2026.10.10-beta.2"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -41,6 +41,12 @@
41
41
  "docsLabel": "whatsapp",
42
42
  "blurb": "works with your own number; recommend a separate phone + eSIM.",
43
43
  "systemImage": "message",
44
+ "doctorCapabilities": {
45
+ "dmAllowFromMode": "topOnly",
46
+ "groupModel": "sender",
47
+ "groupAllowFromFallbackToAllowFrom": true,
48
+ "warnOnEmptyGroupSenderAllowlist": true
49
+ },
44
50
  "persistedAuthState": {
45
51
  "specifier": "./dist/auth-presence.js",
46
52
  "exportName": "hasAnyWhatsAppAuth"
@@ -65,11 +71,11 @@
65
71
  "minHostVersion": ">=2026.4.25"
66
72
  },
67
73
  "compat": {
68
- "pluginApi": ">=2026.10.5-beta.4"
74
+ "pluginApi": ">=2026.10.10-beta.2"
69
75
  },
70
76
  "build": {
71
77
  "bundledDist": false,
72
- "openclawVersion": "2026.10.5-beta.4"
78
+ "openclawVersion": "2026.10.10-beta.2"
73
79
  },
74
80
  "release": {
75
81
  "publishToClawHub": true,
@@ -1,2 +0,0 @@
1
- import { transcribeFirstAudio } from "openclaw/plugin-sdk/media-runtime";
2
- export { transcribeFirstAudio };
@@ -1,2 +0,0 @@
1
- import { whatsappLegacySessionSurface } from "../legacy-session-surface-api.js";
2
- export { whatsappLegacySessionSurface };
@@ -1,2 +0,0 @@
1
- import { getReplyFromConfig } from "openclaw/plugin-sdk/reply-runtime";
2
- export { getReplyFromConfig };
@@ -1,21 +0,0 @@
1
- import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
2
- //#region extensions/whatsapp/src/runtime.ts
3
- const runtimeStore = createPluginRuntimeStore({
4
- pluginId: "whatsapp",
5
- errorMessage: "WhatsApp runtime not initialized"
6
- });
7
- const channelRuntimeStore = createPluginRuntimeStore({
8
- key: "plugin-runtime:whatsapp:channel-context-owner",
9
- errorMessage: "WhatsApp channel runtime not initialized"
10
- });
11
- /** Injects current helpers while preserving the process-lifetime channel context owner. */
12
- function setWhatsAppRuntime(next) {
13
- if (!channelRuntimeStore.tryGetRuntime()) channelRuntimeStore.setRuntime(next.channel);
14
- runtimeStore.setRuntime(next);
15
- }
16
- const getWhatsAppRuntime = runtimeStore.getRuntime;
17
- const getOptionalWhatsAppRuntime = runtimeStore.tryGetRuntime;
18
- const getWhatsAppChannelRuntime = channelRuntimeStore.getRuntime;
19
- const getOptionalWhatsAppChannelRuntime = channelRuntimeStore.tryGetRuntime;
20
- //#endregion
21
- export { setWhatsAppRuntime as a, getWhatsAppRuntime as i, getOptionalWhatsAppRuntime as n, getWhatsAppChannelRuntime as r, getOptionalWhatsAppChannelRuntime as t };
@@ -1,3 +0,0 @@
1
- import { t as whatsappSetupPlugin } from "./channel.setup-BJWEyQlF.mjs";
2
- import "../setup-plugin-api.js";
3
- export { whatsappSetupPlugin };