@openclaw/whatsapp 2026.10.5-beta.4 → 2026.10.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{action-runtime-DUSkWTiZ.mjs → action-runtime-B1UcIuRG.mjs} +1 -1
- package/dist/.setup/{active-listener-CDjoX9QR.mjs → active-listener-idMFscyE.mjs} +1 -1
- package/dist/.setup/{agent-tools-login-CB7OQbli.mjs → agent-tools-login-n7QVE3Am.mjs} +10 -1
- package/dist/.setup/{approval-handler.runtime-BEaAKSoU.mjs → approval-handler.runtime-DMDyXx9W.mjs} +5 -5
- package/dist/.setup/{approval-reactions-CWkZ_ham.mjs → approval-reactions-DYP0DYiU.mjs} +3 -3
- package/dist/.setup/audio-preflight.runtime-DOv4YzLh.mjs +1 -0
- package/dist/.setup/{channel-DcHw3Up2.mjs → channel-CecgCOxi.mjs} +13 -13
- package/dist/.setup/{channel-react-action-C5E8_iDk.mjs → channel-react-action-BkfwiSFM.mjs} +2 -2
- package/dist/.setup/{channel.runtime-DTj-wkEP.mjs → channel.runtime-BTx7s_SW.mjs} +4 -4
- package/dist/.setup/{channel.setup-BJWEyQlF.mjs → channel.setup-BACWTI6Q.mjs} +1 -1
- package/dist/.setup/{connection-controller-CejM7bhn.mjs → connection-controller-DpW6ILRo.mjs} +3 -3
- package/dist/.setup/{connection-controller-runtime-context-hgLJoRc8.mjs → connection-controller-runtime-context-x8C_unRx.mjs} +1 -1
- package/dist/.setup/{directory-config-DPLTUAqy.mjs → directory-config-CegsBv11.mjs} +4 -30
- package/dist/.setup/legacy-session-surface-api-BwP_Pgmu.mjs +1 -0
- package/dist/.setup/{login-DUx5JYuW.mjs → login-Bk8OQeE6.mjs} +4 -4
- package/dist/.setup/{login-qr-BAWbPonj.mjs → login-qr-B_6dpBr-.mjs} +6 -6
- package/dist/.setup/{monitor-CmXEQad9.mjs → monitor-5tf46zdS.mjs} +68 -147
- package/dist/.setup/{question-reactions-DywNaX8m.mjs → question-reactions-Rv9J2Lo1.mjs} +1 -1
- package/dist/.setup/reply-resolver.runtime-Byxo9w3l.mjs +1 -0
- package/dist/.setup/runtime-Botmatgn.mjs +17 -0
- package/dist/.setup/{send-CLBfAzd6.mjs → send-CIzCLFrJ.mjs} +1 -1
- package/dist/.setup/{send-api-COzRvqXx.mjs → send-api-Ck6tezjw.mjs} +1 -1
- package/dist/.setup/{setup-finalize-DSiP_-wa.mjs → setup-finalize-BtqJn6jL.mjs} +2 -2
- package/dist/.setup/setup-plugin-api-B6Nc07Ua.mjs +2 -0
- package/dist/.setup/{setup-surface-C_flQyHy.mjs → setup-surface-D6HuvKfd.mjs} +1 -1
- package/dist/.setup/{shared-SqcOkt51.mjs → shared-CbsgcYtM.mjs} +2 -2
- package/dist/.setup/{socket-close-C9OU9mVN.mjs → socket-close-BhMQls5y.mjs} +1 -6
- package/dist/action-runtime-api.js +1 -2
- package/dist/action-runtime.runtime.js +1 -2
- package/dist/agent-tools-api.js +2 -2
- package/dist/api.js +6 -6
- package/dist/channel-config-api.js +1 -2
- package/dist/channel-plugin-api.js +1 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +6 -6
- package/dist/light-runtime-api.js +2 -2
- package/dist/login-qr-api.js +1 -2
- package/dist/login-qr-runtime.js +2 -2
- package/dist/runtime-api.js +9 -9
- package/dist/runtime-setter-api.js +1 -2
- package/dist/security-contract-api.js +1 -2
- package/dist/setup-entry.js +2 -2
- package/dist/setup-plugin-api.js +1 -2
- package/node_modules/typebox/build/value/clean/from_object.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/package.json +11 -5
- package/dist/.setup/audio-preflight.runtime-Dg8oZgre.mjs +0 -2
- package/dist/.setup/legacy-session-surface-api-B2szjq4r.mjs +0 -2
- package/dist/.setup/reply-resolver.runtime-Ded8D58Y.mjs +0 -2
- package/dist/.setup/runtime-BLlToOi6.mjs +0 -21
- package/dist/.setup/setup-plugin-api-8WdNCjRW.mjs +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount } from "./accounts-F0vHuze2.mjs";
|
|
2
2
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-qikGL4r0.mjs";
|
|
3
|
-
import { r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-
|
|
3
|
+
import { r as sendReactionWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-CIzCLFrJ.mjs";
|
|
4
4
|
import { ToolAuthorizationError, createActionGate, jsonResult, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
//#region extensions/whatsapp/src/action-runtime-target-auth.ts
|
|
6
6
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.mjs";
|
|
2
|
-
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-
|
|
2
|
+
import { r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-x8C_unRx.mjs";
|
|
3
3
|
//#region extensions/whatsapp/src/active-listener.ts
|
|
4
4
|
function resolveWebAccountId(params) {
|
|
5
5
|
return (params.accountId ?? "").trim() || resolveDefaultWhatsAppAccountId(params.cfg);
|
|
@@ -6,6 +6,13 @@ import { textResult } from "openclaw/plugin-sdk/tool-results";
|
|
|
6
6
|
import { Type } from "typebox";
|
|
7
7
|
//#region extensions/whatsapp/src/agent-tools-login.ts
|
|
8
8
|
const QR_DATA_URL_MAX_LENGTH = 16384;
|
|
9
|
+
var WhatsAppToolInputError = class extends Error {
|
|
10
|
+
constructor(message) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.status = 400;
|
|
13
|
+
this.name = "ToolInputError";
|
|
14
|
+
}
|
|
15
|
+
};
|
|
9
16
|
function createWhatsAppLoginTool(context) {
|
|
10
17
|
if (context.senderIsOwner !== true) return null;
|
|
11
18
|
return {
|
|
@@ -41,7 +48,9 @@ function createWhatsAppLoginTool(context) {
|
|
|
41
48
|
qr: true
|
|
42
49
|
});
|
|
43
50
|
};
|
|
44
|
-
const
|
|
51
|
+
const rawAction = args?.action;
|
|
52
|
+
const action = rawAction === void 0 ? "start" : rawAction;
|
|
53
|
+
if (action !== "start" && action !== "wait") throw new WhatsAppToolInputError("Unknown WhatsApp login action. Expected \"start\" or \"wait\".");
|
|
45
54
|
const accountId = readNonBlankString(args.accountId);
|
|
46
55
|
const timeoutMs = readPositiveIntegerParam(args, "timeoutMs");
|
|
47
56
|
if (action === "wait") {
|
package/dist/.setup/{approval-handler.runtime-BEaAKSoU.mjs → approval-handler.runtime-DMDyXx9W.mjs}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "./accounts-F0vHuze2.mjs";
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId } from "./account-ids-CB5SOWjc.mjs";
|
|
3
3
|
import { s as normalizeWhatsAppMessagingTarget } from "./normalize-target-D67Kc3g6.mjs";
|
|
4
|
-
import { i as sendTypingWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
5
|
-
import { i as getWhatsAppRuntime } from "./runtime-
|
|
6
|
-
import { i as unregisterWhatsAppApprovalReactionTarget, r as registerWhatsAppApprovalReactionTarget } from "./approval-reactions-
|
|
4
|
+
import { i as sendTypingWhatsApp, t as sendMessageWhatsApp } from "./send-CIzCLFrJ.mjs";
|
|
5
|
+
import { i as getWhatsAppRuntime } from "./runtime-Botmatgn.mjs";
|
|
6
|
+
import { i as unregisterWhatsAppApprovalReactionTarget, r as registerWhatsAppApprovalReactionTarget } from "./approval-reactions-DYP0DYiU.mjs";
|
|
7
7
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
8
8
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
9
9
|
import { buildApprovalReactionPendingContent } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
10
|
-
import { buildChannelApprovalExpiredText, buildChannelApprovalResolvedText,
|
|
10
|
+
import { buildChannelApprovalExpiredText, buildChannelApprovalResolvedText, createChannelApprovalNativeRuntimeAdapterAsync, resolvePreparedApprovalAccountId } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
11
11
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
12
12
|
//#region extensions/whatsapp/src/approval-handler.runtime.ts
|
|
13
13
|
const log = createSubsystemLogger("whatsapp/approvals");
|
|
14
|
-
const whatsappApprovalNativeRuntime =
|
|
14
|
+
const whatsappApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapterAsync({
|
|
15
15
|
eventKinds: [
|
|
16
16
|
"exec",
|
|
17
17
|
"plugin",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.mjs";
|
|
2
2
|
import { a as resolveWhatsAppAccount } from "./accounts-F0vHuze2.mjs";
|
|
3
|
-
import { u as listWhatsAppDeliveredMessageIdentities } from "./send-
|
|
4
|
-
import { n as getOptionalWhatsAppRuntime } from "./runtime-
|
|
3
|
+
import { u as listWhatsAppDeliveredMessageIdentities } from "./send-CIzCLFrJ.mjs";
|
|
4
|
+
import { n as getOptionalWhatsAppRuntime } from "./runtime-Botmatgn.mjs";
|
|
5
5
|
import { c as whatsappApprovalAuth, s as getWhatsAppApprovalApprovers } from "./group-session-key-BbTPosdy.mjs";
|
|
6
6
|
import { t as buildWhatsAppReactionTargetKey } from "./reaction-target-CSPO7gtu.mjs";
|
|
7
7
|
import { normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -26,7 +26,7 @@ const whatsappApprovalReactionTargets = createApprovalReactionTargetStore({
|
|
|
26
26
|
namespace: PERSISTENT_NAMESPACE,
|
|
27
27
|
maxEntries: PERSISTENT_MAX_ENTRIES,
|
|
28
28
|
defaultTtlMs: DEFAULT_REACTION_TARGET_TTL_MS,
|
|
29
|
-
openStore: (storeParams) => getOptionalWhatsAppRuntime()?.state.
|
|
29
|
+
openStore: (storeParams) => getOptionalWhatsAppRuntime()?.state.openKeyedStoreV2(storeParams),
|
|
30
30
|
logPersistentError: reportPersistentApprovalReactionError,
|
|
31
31
|
readPersistedTarget: readApprovalReactionTargetRecord
|
|
32
32
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { transcribeFirstAudio } from "openclaw/plugin-sdk/media-runtime";
|
|
@@ -2,11 +2,11 @@ import { a as resolveWhatsAppAccount } from "./accounts-F0vHuze2.mjs";
|
|
|
2
2
|
import { r as resolveDefaultWhatsAppAccountId, t as listAccountIds } from "./account-ids-CB5SOWjc.mjs";
|
|
3
3
|
import { a as normalizeWhatsAppAllowFromEntries, c as normalizeWhatsAppTarget, i as looksLikeWhatsAppTargetId, n as isWhatsAppNewsletterJid, o as normalizeWhatsAppAllowFromEntry, s as normalizeWhatsAppMessagingTarget, t as isWhatsAppGroupJid } from "./normalize-target-D67Kc3g6.mjs";
|
|
4
4
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-qikGL4r0.mjs";
|
|
5
|
-
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppOutboundPayload, s as normalizeWhatsAppPayloadTextPreservingIndentation, t as sendMessageWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-
|
|
6
|
-
import { i as getWhatsAppRuntime } from "./runtime-
|
|
5
|
+
import { i as sendTypingWhatsApp, n as sendPollWhatsApp, o as normalizeWhatsAppOutboundPayload, s as normalizeWhatsAppPayloadTextPreservingIndentation, t as sendMessageWhatsApp, v as resolveWhatsAppReactionLevel } from "./send-CIzCLFrJ.mjs";
|
|
6
|
+
import { i as getWhatsAppRuntime } from "./runtime-Botmatgn.mjs";
|
|
7
7
|
import { c as toWhatsappJid } from "./targets-runtime-D5ryyPxh.mjs";
|
|
8
8
|
import { c as whatsappApprovalAuth, o as lookupInboundMessageMetaForTarget, s as getWhatsAppApprovalApprovers, t as resolveWhatsAppGroupSessionKey } from "./group-session-key-BbTPosdy.mjs";
|
|
9
|
-
import { a as loadWhatsAppChannelRuntime, t as createWhatsAppPluginBase } from "./shared-
|
|
9
|
+
import { a as loadWhatsAppChannelRuntime, t as createWhatsAppPluginBase } from "./shared-CbsgcYtM.mjs";
|
|
10
10
|
import { t as whatsappCommandPolicy } from "./command-policy-BIOSHySD.mjs";
|
|
11
11
|
import { d as readWebAuthExistsForDecision, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DOBi5BPe.mjs";
|
|
12
12
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -22,8 +22,8 @@ import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/
|
|
|
22
22
|
import { buildDmGroupAccountAllowlistAdapter } from "openclaw/plugin-sdk/allowlist-config-edit";
|
|
23
23
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
24
24
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
25
|
+
import { createApproverRestrictedNativeApprovalCapabilityFromForwardingRoutesAsync } from "openclaw/plugin-sdk/approval-delivery-runtime";
|
|
26
|
+
import { createLazyChannelApprovalNativeRuntimeAdapterAsync } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
27
27
|
import { buildApprovalReactionPromptPayloadForRequest } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
28
28
|
import { buildTypedApprovalPresentation } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
29
29
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
@@ -35,7 +35,7 @@ function isWhatsAppApprovalTransportEnabled(params) {
|
|
|
35
35
|
accountId: params.accountId
|
|
36
36
|
}).enabled;
|
|
37
37
|
}
|
|
38
|
-
const whatsappApproval =
|
|
38
|
+
const whatsappApproval = createApproverRestrictedNativeApprovalCapabilityFromForwardingRoutesAsync({
|
|
39
39
|
channel: "whatsapp",
|
|
40
40
|
channelLabel: "WhatsApp",
|
|
41
41
|
authorizeActorAction: (params) => whatsappApprovalAuth.authorizeActorAction(params),
|
|
@@ -64,7 +64,7 @@ const whatsappApproval = createApproverRestrictedNativeApprovalCapabilityFromFor
|
|
|
64
64
|
nowMs
|
|
65
65
|
}, "plugin") }
|
|
66
66
|
},
|
|
67
|
-
createNativeRuntime: (routing) =>
|
|
67
|
+
createNativeRuntime: (routing) => createLazyChannelApprovalNativeRuntimeAdapterAsync({
|
|
68
68
|
capabilityBoundary: true,
|
|
69
69
|
eventKinds: [
|
|
70
70
|
"exec",
|
|
@@ -76,13 +76,13 @@ const whatsappApproval = createApproverRestrictedNativeApprovalCapabilityFromFor
|
|
|
76
76
|
accountId,
|
|
77
77
|
nativeSessionOnly: true
|
|
78
78
|
}),
|
|
79
|
-
shouldHandle: ({ cfg, accountId, context, approvalKind, request }) => Boolean(context) && routing.shouldHandleApprovalRequest({
|
|
79
|
+
shouldHandle: async ({ cfg, accountId, context, approvalKind, request }) => Boolean(context) && routing.shouldHandleApprovalRequest({
|
|
80
80
|
cfg,
|
|
81
81
|
accountId,
|
|
82
82
|
approvalKind,
|
|
83
83
|
request
|
|
84
84
|
}),
|
|
85
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
85
|
+
load: async () => (await import("./approval-handler.runtime-DMDyXx9W.mjs")).whatsappApprovalNativeRuntime
|
|
86
86
|
})
|
|
87
87
|
});
|
|
88
88
|
function buildWhatsAppPendingPayload(params, approvalKind) {
|
|
@@ -242,8 +242,8 @@ const whatsappOutboundBase = {
|
|
|
242
242
|
};
|
|
243
243
|
//#endregion
|
|
244
244
|
//#region extensions/whatsapp/src/channel-outbound.ts
|
|
245
|
-
const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-
|
|
246
|
-
const loadWhatsAppQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-
|
|
245
|
+
const loadWhatsAppApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-DYP0DYiU.mjs").then((n) => n.t));
|
|
246
|
+
const loadWhatsAppQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-Rv9J2Lo1.mjs").then((n) => n.n));
|
|
247
247
|
async function prepareWhatsAppApprovalPayloadForDelivery(params) {
|
|
248
248
|
const questionPayload = questionGatewayRuntime.prepareReactionPayloadForDelivery({
|
|
249
249
|
payload: params.payload,
|
|
@@ -448,8 +448,8 @@ function collectWhatsAppStatusIssues(accounts) {
|
|
|
448
448
|
}
|
|
449
449
|
//#endregion
|
|
450
450
|
//#region extensions/whatsapp/src/channel.ts
|
|
451
|
-
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-
|
|
452
|
-
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-
|
|
451
|
+
const loadWhatsAppDirectoryConfig = createLazyRuntimeModule(() => import("./directory-config-CegsBv11.mjs").then((n) => n.t));
|
|
452
|
+
const loadWhatsAppChannelReactAction = createLazyRuntimeModule(() => import("./channel-react-action-BkfwiSFM.mjs"));
|
|
453
453
|
function projectWhatsAppRuntimeStatus(runtime) {
|
|
454
454
|
return {
|
|
455
455
|
connected: runtime?.connected ?? false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount, s as resolveWhatsAppMediaMaxBytes } from "./accounts-F0vHuze2.mjs";
|
|
2
2
|
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-D67Kc3g6.mjs";
|
|
3
|
-
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-
|
|
4
|
-
import { a as sendWhatsAppUploadFile } from "./send-
|
|
3
|
+
import { r as resolveAuthorizedWhatsAppOutboundTarget, t as handleWhatsAppAction } from "./action-runtime-B1UcIuRG.mjs";
|
|
4
|
+
import { a as sendWhatsAppUploadFile } from "./send-CIzCLFrJ.mjs";
|
|
5
5
|
import { jsonResult, readStringOrNumberParam, readStringParam as readStringParam$1, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
6
6
|
import { canonicalizeBase64, estimateBase64DecodedBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
7
7
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { startWebLoginWithQr, waitForWebLogin } from "../login-qr-runtime.js";
|
|
2
2
|
import { b as webAuthExists, c as logoutWeb, d as readWebAuthExistsForDecision, f as readWebAuthSnapshot, h as readWebSelfId, m as readWebAuthState, o as getWebAuthAgeMs, p as readWebAuthSnapshotBestEffort, s as logWebSelfId, u as readWebAuthExistsBestEffort } from "./auth-store-DOBi5BPe.mjs";
|
|
3
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
4
|
-
import { t as monitorWebChannel } from "./monitor-
|
|
5
|
-
import { t as loginWeb } from "./login-
|
|
6
|
-
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-
|
|
3
|
+
import { t as getActiveWebListener } from "./active-listener-idMFscyE.mjs";
|
|
4
|
+
import { t as monitorWebChannel } from "./monitor-5tf46zdS.mjs";
|
|
5
|
+
import { t as loginWeb } from "./login-Bk8OQeE6.mjs";
|
|
6
|
+
import { whatsappSetupWizard as whatsappSetupWizard$1 } from "./setup-surface-D6HuvKfd.mjs";
|
|
7
7
|
//#region extensions/whatsapp/src/channel.runtime.ts
|
|
8
8
|
const whatsappSetupWizard = { ...whatsappSetupWizard$1 };
|
|
9
9
|
//#endregion
|
package/dist/.setup/{connection-controller-CejM7bhn.mjs → connection-controller-DpW6ILRo.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as getWhatsAppChannelRuntime } from "./runtime-
|
|
2
|
-
import { n as WHATSAPP_CONNECTION_OWNER_PENDING_CAPABILITY, t as WHATSAPP_CONNECTION_CONTROLLER_CAPABILITY } from "./connection-controller-runtime-context-
|
|
1
|
+
import { r as getWhatsAppChannelRuntime } from "./runtime-Botmatgn.mjs";
|
|
2
|
+
import { n as WHATSAPP_CONNECTION_OWNER_PENDING_CAPABILITY, t as WHATSAPP_CONNECTION_CONTROLLER_CAPABILITY } from "./connection-controller-runtime-context-x8C_unRx.mjs";
|
|
3
3
|
import { O as resolveComparableIdentity, c as logoutWeb, d as readWebAuthExistsForDecision, j as waitForCredsSaveQueueWithTimeout, r as WhatsAppAuthUnstableError } from "./auth-store-DOBi5BPe.mjs";
|
|
4
|
-
import { d as DEFAULT_WHATSAPP_SOCKET_TIMING, i as waitForWaConnection, o as computeBackoff, r as createWaSocket, t as closeWhatsAppSocketAndWait, u as sleepWithAbort$1, y as acquireWhatsAppGatewayConnectionOwner } from "./socket-close-
|
|
4
|
+
import { d as DEFAULT_WHATSAPP_SOCKET_TIMING, i as waitForWaConnection, o as computeBackoff, r as createWaSocket, t as closeWhatsAppSocketAndWait, u as sleepWithAbort$1, y as acquireWhatsAppGatewayConnectionOwner } from "./socket-close-BhMQls5y.mjs";
|
|
5
5
|
import { n as getStatusCode, t as formatError } from "./session-errors-B8UcAnZN.mjs";
|
|
6
6
|
import { info } from "openclaw/plugin-sdk/runtime-env";
|
|
7
7
|
import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getOptionalWhatsAppChannelRuntime } from "./runtime-
|
|
1
|
+
import { t as getOptionalWhatsAppChannelRuntime } from "./runtime-Botmatgn.mjs";
|
|
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";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.mjs";
|
|
2
2
|
import { c as resolveMergedWhatsAppAccountConfig, o as resolveWhatsAppAuthDir } from "./accounts-F0vHuze2.mjs";
|
|
3
3
|
import { c as normalizeWhatsAppTarget, t as isWhatsAppGroupJid } from "./normalize-target-D67Kc3g6.mjs";
|
|
4
|
-
import { i as hasPendingWhatsAppConnectionOwner, r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-
|
|
4
|
+
import { i as hasPendingWhatsAppConnectionOwner, r as getWhatsAppConnectionController } from "./connection-controller-runtime-context-x8C_unRx.mjs";
|
|
5
5
|
import { d as readWebAuthExistsForDecision, j as waitForCredsSaveQueueWithTimeout } from "./auth-store-DOBi5BPe.mjs";
|
|
6
|
-
import { n as resolveWebAccountId } from "./active-listener-
|
|
7
|
-
import { b as acquireWhatsAppStandaloneConnectionOwner, i as waitForWaConnection, n as createWaDirectorySocket, t as closeWhatsAppSocketAndWait, v as WhatsAppConnectionOwnerBusyError } from "./socket-close-
|
|
6
|
+
import { n as resolveWebAccountId } from "./active-listener-idMFscyE.mjs";
|
|
7
|
+
import { b as acquireWhatsAppStandaloneConnectionOwner, i as waitForWaConnection, n as createWaDirectorySocket, t as closeWhatsAppSocketAndWait, v as WhatsAppConnectionOwnerBusyError } from "./socket-close-BhMQls5y.mjs";
|
|
8
8
|
import { listResolvedDirectoryGroupEntriesFromMapKeys, listResolvedDirectoryUserEntriesFromAllowFrom } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
9
9
|
//#region extensions/whatsapp/src/directory-config.ts
|
|
10
10
|
var directory_config_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -70,7 +70,6 @@ function unavailable(reason, message, cause) {
|
|
|
70
70
|
return new WhatsAppDirectoryUnavailableError(reason, message, cause ? { cause } : void 0);
|
|
71
71
|
}
|
|
72
72
|
const pendingStandaloneCleanups = /* @__PURE__ */ new Map();
|
|
73
|
-
const STANDALONE_CLEANUP_RETRY_MS = 1e3;
|
|
74
73
|
async function completeStandaloneCleanup(cleanup) {
|
|
75
74
|
if (cleanup.sock && !cleanup.socketClosed) {
|
|
76
75
|
await closeWhatsAppSocketAndWait(cleanup.sock, "OpenClaw WhatsApp standalone directory socket close");
|
|
@@ -81,35 +80,12 @@ async function completeStandaloneCleanup(cleanup) {
|
|
|
81
80
|
}
|
|
82
81
|
await cleanup.ownerLease.release();
|
|
83
82
|
if (pendingStandaloneCleanups.get(cleanup.authDir) === cleanup) pendingStandaloneCleanups.delete(cleanup.authDir);
|
|
84
|
-
if (cleanup.retryTimer) {
|
|
85
|
-
clearTimeout(cleanup.retryTimer);
|
|
86
|
-
cleanup.retryTimer = null;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function runStandaloneCleanup(cleanup) {
|
|
90
|
-
if (cleanup.inFlight) return cleanup.inFlight;
|
|
91
|
-
const task = completeStandaloneCleanup(cleanup).finally(() => {
|
|
92
|
-
if (cleanup.inFlight === task) cleanup.inFlight = null;
|
|
93
|
-
});
|
|
94
|
-
cleanup.inFlight = task;
|
|
95
|
-
return task;
|
|
96
|
-
}
|
|
97
|
-
function scheduleStandaloneCleanupRetry(cleanup) {
|
|
98
|
-
if (cleanup.retryTimer) return;
|
|
99
|
-
cleanup.retryTimer = setTimeout(() => {
|
|
100
|
-
cleanup.retryTimer = null;
|
|
101
|
-
runStandaloneCleanup(cleanup).catch(() => {
|
|
102
|
-
scheduleStandaloneCleanupRetry(cleanup);
|
|
103
|
-
});
|
|
104
|
-
}, STANDALONE_CLEANUP_RETRY_MS);
|
|
105
|
-
cleanup.retryTimer.unref?.();
|
|
106
83
|
}
|
|
107
84
|
async function finishStandaloneCleanupOrThrow(cleanup, operationError) {
|
|
108
85
|
try {
|
|
109
|
-
await
|
|
86
|
+
await completeStandaloneCleanup(cleanup);
|
|
110
87
|
} catch (cleanupError) {
|
|
111
88
|
pendingStandaloneCleanups.set(cleanup.authDir, cleanup);
|
|
112
|
-
scheduleStandaloneCleanupRetry(cleanup);
|
|
113
89
|
throw unavailable("cleanup_failed", "WhatsApp live group lookup could not safely close its standalone connection.", operationError === void 0 ? cleanupError : new AggregateError([operationError, cleanupError], "WhatsApp live group lookup and cleanup failed", { cause: operationError }));
|
|
114
90
|
}
|
|
115
91
|
}
|
|
@@ -134,9 +110,7 @@ async function listGroupsThroughStandaloneOwner(params) {
|
|
|
134
110
|
}
|
|
135
111
|
const cleanup = {
|
|
136
112
|
authDir,
|
|
137
|
-
inFlight: null,
|
|
138
113
|
ownerLease,
|
|
139
|
-
retryTimer: null,
|
|
140
114
|
sock: null,
|
|
141
115
|
socketClosed: true
|
|
142
116
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { whatsappLegacySessionSurface } from "../legacy-session-surface-api.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BBjsoOtd.mjs";
|
|
2
2
|
import { a as resolveWhatsAppAccount } from "./accounts-F0vHuze2.mjs";
|
|
3
3
|
import { y as restoreCredsFromBackupIfNeeded } from "./auth-store-DOBi5BPe.mjs";
|
|
4
|
-
import { _ as renderQrTerminal, h as resolveWhatsAppSocketTiming, r as createWaSocket } from "./socket-close-
|
|
5
|
-
import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-
|
|
4
|
+
import { _ as renderQrTerminal, h as resolveWhatsAppSocketTiming, r as createWaSocket } from "./socket-close-BhMQls5y.mjs";
|
|
5
|
+
import { a as closeWaSocketSoon, o as waitForWhatsAppLoginResult } from "./connection-controller-DpW6ILRo.mjs";
|
|
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";
|
|
9
9
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
10
|
-
import {
|
|
10
|
+
import { captureRuntimeConfigAsyncReader } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
11
11
|
//#region extensions/whatsapp/src/login.ts
|
|
12
12
|
var login_exports = /* @__PURE__ */ __exportAll({ loginWeb: () => loginWeb });
|
|
13
13
|
const QR_LINK_INSTRUCTION = "Open the WhatsApp app, go to Linked Devices, then scan this QR:";
|
|
14
14
|
const CLEAR_TERMINAL = "\x1B[2J\x1B[H";
|
|
15
15
|
async function loginWeb(verbose, waitForConnection, runtime = defaultRuntime, accountId, options) {
|
|
16
|
-
const cfg =
|
|
16
|
+
const cfg = await captureRuntimeConfigAsyncReader()();
|
|
17
17
|
const account = resolveWhatsAppAccount({
|
|
18
18
|
cfg,
|
|
19
19
|
accountId
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as resolveWhatsAppAccount } from "./accounts-F0vHuze2.mjs";
|
|
2
2
|
import { c as logoutWeb, d as readWebAuthExistsForDecision, h as readWebSelfId, n as WHATSAPP_AUTH_UNSTABLE_CODE } from "./auth-store-DOBi5BPe.mjs";
|
|
3
|
-
import { t as getActiveWebListener } from "./active-listener-
|
|
4
|
-
import { h as resolveWhatsAppSocketTiming, r as createWaSocket } from "./socket-close-
|
|
3
|
+
import { t as getActiveWebListener } from "./active-listener-idMFscyE.mjs";
|
|
4
|
+
import { h as resolveWhatsAppSocketTiming, r as createWaSocket } from "./socket-close-BhMQls5y.mjs";
|
|
5
5
|
import { t as formatError } from "./session-errors-B8UcAnZN.mjs";
|
|
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-DpW6ILRo.mjs";
|
|
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";
|
|
@@ -11,7 +11,7 @@ import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
|
11
11
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
12
12
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
14
|
-
import {
|
|
14
|
+
import { captureRuntimeConfigAsyncReader } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
15
15
|
import { setImmediate } from "node:timers/promises";
|
|
16
16
|
//#region extensions/whatsapp/src/login-qr.ts
|
|
17
17
|
const ACTIVE_LOGIN_TTL_MS = 18e4;
|
|
@@ -146,7 +146,7 @@ async function waitForQrOrRecoveredLogin(params) {
|
|
|
146
146
|
}
|
|
147
147
|
async function startWebLoginWithQr(opts = {}) {
|
|
148
148
|
const runtime = opts.runtime ?? defaultRuntime;
|
|
149
|
-
const cfg =
|
|
149
|
+
const cfg = await captureRuntimeConfigAsyncReader()();
|
|
150
150
|
const account = resolveWhatsAppAccount({
|
|
151
151
|
cfg,
|
|
152
152
|
accountId: opts.accountId
|
|
@@ -290,7 +290,7 @@ async function startWebLoginWithQr(opts = {}) {
|
|
|
290
290
|
}
|
|
291
291
|
async function waitForWebLogin(opts = {}) {
|
|
292
292
|
const runtime = opts.runtime ?? defaultRuntime;
|
|
293
|
-
const cfg =
|
|
293
|
+
const cfg = await captureRuntimeConfigAsyncReader()();
|
|
294
294
|
const account = resolveWhatsAppAccount({
|
|
295
295
|
cfg,
|
|
296
296
|
accountId: opts.accountId
|