@openclaw/zalouser 2026.5.14-beta.1 → 2026.5.14-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.
- package/dist/{accounts-iV_px99V.js → accounts-CTecjIqR.js} +1 -1
- package/dist/{accounts.runtime-B4Mw_Xgv.js → accounts.runtime-BtpFX7w7.js} +1 -1
- package/dist/{api-CaGurb-M.js → api-BKTe9er6.js} +8 -8
- package/dist/api.js +6 -6
- package/dist/{channel-D4jRkVKJ.js → channel-BbRxSL6F.js} +113 -11
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-DKtPzBr_.js → channel.runtime-oMRJXO6B.js} +3 -3
- package/dist/{channel.setup-Bfi-3_EI.js → channel.setup-D-TSDzJ-.js} +2 -3
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{monitor-j5lov4Dd.js → monitor-_QHUT-X9.js} +3 -3
- package/dist/runtime-api.js +6 -7
- package/dist/{send-CH7XlJaj.js → send-SPumHuhS.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-Cz9-SO_8.js → setup-surface-Dv3nk0fI.js} +3 -3
- package/dist/{shared-BwUAKszU.js → shared-O0YC-vIX.js} +43 -4
- package/dist/test-api.js +4 -4
- package/package.json +4 -4
- package/dist/runtime-nbWip_ng.js +0 -106
- package/dist/setup-core-CqipqY98.js +0 -40
- /package/dist/{doctor-contract-DgqHp8E2.js → doctor-contract-BIY2IHB_.js} +0 -0
- /package/dist/{security-audit-BZLhil-V.js → security-audit-DUQOetcM.js} +0 -0
- /package/dist/{session-route-81QGCeV2.js → session-route-DWMin5CB.js} +0 -0
- /package/dist/{zalo-js-KeIEcTqZ.js → zalo-js-QSY2SsUF.js} +0 -0
|
@@ -3,7 +3,7 @@ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runti
|
|
|
3
3
|
//#region extensions/zalouser/src/accounts.ts
|
|
4
4
|
let zalouserAccountsRuntimePromise;
|
|
5
5
|
async function loadZalouserAccountsRuntime() {
|
|
6
|
-
zalouserAccountsRuntimePromise ??= import("./accounts.runtime-
|
|
6
|
+
zalouserAccountsRuntimePromise ??= import("./accounts.runtime-BtpFX7w7.js");
|
|
7
7
|
return await zalouserAccountsRuntimePromise;
|
|
8
8
|
}
|
|
9
9
|
const { listAccountIds: listZalouserAccountIds, resolveDefaultAccountId: resolveDefaultZalouserAccountId } = createAccountListHelpers("zalouser");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as getZaloUserInfo, t as checkZaloAuthenticated } from "./zalo-js-
|
|
1
|
+
import { n as getZaloUserInfo, t as checkZaloAuthenticated } from "./zalo-js-QSY2SsUF.js";
|
|
2
2
|
export { checkZaloAuthenticated, getZaloUserInfo };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./setup-surface-
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
4
|
-
import "./
|
|
5
|
-
import "./security-audit-
|
|
6
|
-
import { i as listZaloFriendsMatching, n as getZaloUserInfo, s as listZaloGroupsMatching, t as checkZaloAuthenticated } from "./zalo-js-
|
|
7
|
-
import "./channel.setup-
|
|
8
|
-
import { i as sendMessageZalouser, n as sendImageZalouser, r as sendLinkZalouser } from "./send-
|
|
1
|
+
import "./setup-surface-Dv3nk0fI.js";
|
|
2
|
+
import "./shared-O0YC-vIX.js";
|
|
3
|
+
import "./channel-BbRxSL6F.js";
|
|
4
|
+
import { r as parseZalouserOutboundTarget } from "./session-route-DWMin5CB.js";
|
|
5
|
+
import "./security-audit-DUQOetcM.js";
|
|
6
|
+
import { i as listZaloFriendsMatching, n as getZaloUserInfo, s as listZaloGroupsMatching, t as checkZaloAuthenticated } from "./zalo-js-QSY2SsUF.js";
|
|
7
|
+
import "./channel.setup-D-TSDzJ-.js";
|
|
8
|
+
import { i as sendMessageZalouser, n as sendImageZalouser, r as sendLinkZalouser } from "./send-SPumHuhS.js";
|
|
9
9
|
import { stringEnum } from "openclaw/plugin-sdk/channel-actions";
|
|
10
10
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
11
11
|
import { Type } from "typebox";
|
package/dist/api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as zalouserSetupWizard } from "./setup-surface-
|
|
2
|
-
import { n as
|
|
3
|
-
import { t as zalouserPlugin } from "./channel-
|
|
4
|
-
import { n as isZalouserMutableGroupEntry, t as collectZalouserSecurityAuditFindings } from "./security-audit-
|
|
5
|
-
import { t as zalouserSetupPlugin } from "./channel.setup-
|
|
6
|
-
import { t as createZalouserTool } from "./api-
|
|
1
|
+
import { n as zalouserSetupWizard } from "./setup-surface-Dv3nk0fI.js";
|
|
2
|
+
import { n as createZalouserSetupWizardProxy, r as zalouserSetupAdapter } from "./shared-O0YC-vIX.js";
|
|
3
|
+
import { t as zalouserPlugin } from "./channel-BbRxSL6F.js";
|
|
4
|
+
import { n as isZalouserMutableGroupEntry, t as collectZalouserSecurityAuditFindings } from "./security-audit-DUQOetcM.js";
|
|
5
|
+
import { t as zalouserSetupPlugin } from "./channel.setup-D-TSDzJ-.js";
|
|
6
|
+
import { t as createZalouserTool } from "./api-BKTe9er6.js";
|
|
7
7
|
export { collectZalouserSecurityAuditFindings, createZalouserSetupWizardProxy, createZalouserTool, isZalouserMutableGroupEntry, zalouserPlugin, zalouserSetupAdapter, zalouserSetupPlugin, zalouserSetupWizard };
|
|
@@ -1,21 +1,123 @@
|
|
|
1
|
-
import { a as resolveZalouserAccountSync, i as resolveDefaultZalouserAccountId, r as listZalouserAccountIds, t as checkZcaAuthenticated } from "./accounts-
|
|
2
|
-
import { a as isNumericTargetId, i as
|
|
3
|
-
import {
|
|
4
|
-
import { n as zalouserSetupAdapter, r as writeQrDataUrlToTempFile, t as createZalouserSetupWizardProxy } from "./setup-core-CqipqY98.js";
|
|
5
|
-
import { i as resolveZalouserOutboundSessionRoute, n as parseZalouserDirectoryGroupId, r as parseZalouserOutboundTarget, t as normalizeZalouserTarget } from "./session-route-81QGCeV2.js";
|
|
1
|
+
import { a as resolveZalouserAccountSync, i as resolveDefaultZalouserAccountId, r as listZalouserAccountIds, t as checkZcaAuthenticated } from "./accounts-CTecjIqR.js";
|
|
2
|
+
import { a as DEFAULT_ACCOUNT_ID, c as isNumericTargetId, i as writeQrDataUrlToTempFile, l as normalizeAccountId, n as createZalouserSetupWizardProxy, o as chunkTextForOutbound, r as zalouserSetupAdapter, s as isDangerousNameMatchingEnabled, t as createZalouserPluginBase, u as sendPayloadWithChunkedTextAndMedia } from "./shared-O0YC-vIX.js";
|
|
3
|
+
import { i as resolveZalouserOutboundSessionRoute, n as parseZalouserDirectoryGroupId, r as parseZalouserOutboundTarget, t as normalizeZalouserTarget } from "./session-route-DWMin5CB.js";
|
|
6
4
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
7
5
|
import { createAccountStatusSink } from "openclaw/plugin-sdk/channel-lifecycle";
|
|
8
6
|
import { buildPassiveProbedChannelStatusSummary, coerceStatusIssueAccountId, readStatusIssueFields } from "openclaw/plugin-sdk/extension-shared";
|
|
9
7
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
10
8
|
import { createAsyncComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
11
|
-
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
|
+
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
10
|
import { createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
13
11
|
import { defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-message";
|
|
14
12
|
import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
|
|
15
13
|
import { createEmptyChannelResult, createRawChannelSendResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
16
14
|
import { createStaticReplyToModeResolver } from "openclaw/plugin-sdk/conversation-runtime";
|
|
15
|
+
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
16
|
+
//#region extensions/zalouser/src/group-policy.ts
|
|
17
|
+
function toGroupCandidate(value) {
|
|
18
|
+
return value?.trim() ?? "";
|
|
19
|
+
}
|
|
20
|
+
function normalizeZalouserGroupSlug(raw) {
|
|
21
|
+
const trimmed = normalizeOptionalLowercaseString(raw) ?? "";
|
|
22
|
+
if (!trimmed) return "";
|
|
23
|
+
return trimmed.replace(/^#/, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
24
|
+
}
|
|
25
|
+
function buildZalouserGroupCandidates(params) {
|
|
26
|
+
const seen = /* @__PURE__ */ new Set();
|
|
27
|
+
const out = [];
|
|
28
|
+
const push = (value) => {
|
|
29
|
+
const normalized = toGroupCandidate(value);
|
|
30
|
+
if (!normalized || seen.has(normalized)) return;
|
|
31
|
+
seen.add(normalized);
|
|
32
|
+
out.push(normalized);
|
|
33
|
+
};
|
|
34
|
+
const groupId = toGroupCandidate(params.groupId);
|
|
35
|
+
const groupChannel = toGroupCandidate(params.groupChannel);
|
|
36
|
+
const groupName = toGroupCandidate(params.groupName);
|
|
37
|
+
push(groupId);
|
|
38
|
+
if (params.includeGroupIdAlias === true && groupId) push(`group:${groupId}`);
|
|
39
|
+
if (params.allowNameMatching !== false) {
|
|
40
|
+
push(groupChannel);
|
|
41
|
+
push(groupName);
|
|
42
|
+
if (groupName) push(normalizeZalouserGroupSlug(groupName));
|
|
43
|
+
}
|
|
44
|
+
if (params.includeWildcard !== false) push("*");
|
|
45
|
+
return out;
|
|
46
|
+
}
|
|
47
|
+
function findZalouserGroupEntry(groups, candidates) {
|
|
48
|
+
if (!groups) return;
|
|
49
|
+
for (const candidate of candidates) {
|
|
50
|
+
const entry = groups[candidate];
|
|
51
|
+
if (entry) return entry;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function isZalouserGroupEntryAllowed(entry) {
|
|
55
|
+
if (!entry) return false;
|
|
56
|
+
return entry.allow !== false && entry.enabled !== false;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region extensions/zalouser/src/message-sid.ts
|
|
60
|
+
function toMessageSidPart(value) {
|
|
61
|
+
if (typeof value === "string") return value.trim();
|
|
62
|
+
if (typeof value === "number" && Number.isFinite(value)) return String(Math.trunc(value));
|
|
63
|
+
return "";
|
|
64
|
+
}
|
|
65
|
+
function parseZalouserMessageSidFull(value) {
|
|
66
|
+
const raw = toMessageSidPart(value);
|
|
67
|
+
if (!raw) return null;
|
|
68
|
+
const [msgIdPart, cliMsgIdPart] = raw.split(":").map((entry) => entry.trim());
|
|
69
|
+
if (!msgIdPart || !cliMsgIdPart) return null;
|
|
70
|
+
return {
|
|
71
|
+
msgId: msgIdPart,
|
|
72
|
+
cliMsgId: cliMsgIdPart
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function resolveZalouserReactionMessageIds(params) {
|
|
76
|
+
const explicitMessageId = toMessageSidPart(params.messageId);
|
|
77
|
+
const explicitCliMsgId = toMessageSidPart(params.cliMsgId);
|
|
78
|
+
if (explicitMessageId && explicitCliMsgId) return {
|
|
79
|
+
msgId: explicitMessageId,
|
|
80
|
+
cliMsgId: explicitCliMsgId
|
|
81
|
+
};
|
|
82
|
+
const parsedFromCurrent = parseZalouserMessageSidFull(params.currentMessageId);
|
|
83
|
+
if (parsedFromCurrent) return parsedFromCurrent;
|
|
84
|
+
const currentRaw = toMessageSidPart(params.currentMessageId);
|
|
85
|
+
if (!currentRaw) return null;
|
|
86
|
+
if (explicitMessageId && !explicitCliMsgId) return {
|
|
87
|
+
msgId: explicitMessageId,
|
|
88
|
+
cliMsgId: currentRaw
|
|
89
|
+
};
|
|
90
|
+
if (!explicitMessageId && explicitCliMsgId) return {
|
|
91
|
+
msgId: currentRaw,
|
|
92
|
+
cliMsgId: explicitCliMsgId
|
|
93
|
+
};
|
|
94
|
+
return {
|
|
95
|
+
msgId: currentRaw,
|
|
96
|
+
cliMsgId: currentRaw
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function formatZalouserMessageSidFull(params) {
|
|
100
|
+
const msgId = toMessageSidPart(params.msgId);
|
|
101
|
+
const cliMsgId = toMessageSidPart(params.cliMsgId);
|
|
102
|
+
if (!msgId && !cliMsgId) return;
|
|
103
|
+
if (msgId && cliMsgId) return `${msgId}:${cliMsgId}`;
|
|
104
|
+
return msgId || cliMsgId || void 0;
|
|
105
|
+
}
|
|
106
|
+
function resolveZalouserMessageSid(params) {
|
|
107
|
+
const msgId = toMessageSidPart(params.msgId);
|
|
108
|
+
const cliMsgId = toMessageSidPart(params.cliMsgId);
|
|
109
|
+
if (msgId || cliMsgId) return msgId || cliMsgId;
|
|
110
|
+
return toMessageSidPart(params.fallback) || void 0;
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region extensions/zalouser/src/runtime.ts
|
|
114
|
+
const { setRuntime: setZalouserRuntime, getRuntime: getZalouserRuntime } = createPluginRuntimeStore({
|
|
115
|
+
pluginId: "zalouser",
|
|
116
|
+
errorMessage: "Zalouser runtime not initialized"
|
|
117
|
+
});
|
|
118
|
+
//#endregion
|
|
17
119
|
//#region extensions/zalouser/src/channel.adapters.ts
|
|
18
|
-
const loadZalouserChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel.runtime-
|
|
120
|
+
const loadZalouserChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel.runtime-oMRJXO6B.js"));
|
|
19
121
|
const ZALOUSER_TEXT_CHUNK_LIMIT = 2e3;
|
|
20
122
|
function resolveZalouserQrProfile(accountId) {
|
|
21
123
|
const normalized = normalizeAccountId(accountId);
|
|
@@ -346,8 +448,8 @@ function collectZalouserStatusIssues(accounts) {
|
|
|
346
448
|
}
|
|
347
449
|
//#endregion
|
|
348
450
|
//#region extensions/zalouser/src/channel.ts
|
|
349
|
-
const loadZalouserChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-
|
|
350
|
-
const zalouserSetupWizardProxy = createZalouserSetupWizardProxy(async () => (await import("./setup-surface-
|
|
451
|
+
const loadZalouserChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-oMRJXO6B.js"));
|
|
452
|
+
const zalouserSetupWizardProxy = createZalouserSetupWizardProxy(async () => (await import("./setup-surface-Dv3nk0fI.js").then((n) => n.t)).zalouserSetupWizard);
|
|
351
453
|
function mapUser(params) {
|
|
352
454
|
return {
|
|
353
455
|
kind: "user",
|
|
@@ -464,7 +566,7 @@ const zalouserPlugin = createChatChannelPlugin({
|
|
|
464
566
|
setStatus: ctx.setStatus
|
|
465
567
|
});
|
|
466
568
|
ctx.log?.info(`[${account.accountId}] starting zalouser provider${userLabel}`);
|
|
467
|
-
const { monitorZalouserProvider } = await import("./monitor-
|
|
569
|
+
const { monitorZalouserProvider } = await import("./monitor-_QHUT-X9.js");
|
|
468
570
|
return monitorZalouserProvider({
|
|
469
571
|
account,
|
|
470
572
|
config: ctx.cfg,
|
|
@@ -497,4 +599,4 @@ const zalouserPlugin = createChatChannelPlugin({
|
|
|
497
599
|
outbound: zalouserOutboundAdapter
|
|
498
600
|
});
|
|
499
601
|
//#endregion
|
|
500
|
-
export { zalouserPlugin as t };
|
|
602
|
+
export { resolveZalouserMessageSid as a, isZalouserGroupEntryAllowed as c, formatZalouserMessageSidFull as i, getZalouserRuntime as n, buildZalouserGroupCandidates as o, setZalouserRuntime as r, findZalouserGroupEntry as s, zalouserPlugin as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as zalouserPlugin } from "./channel-
|
|
1
|
+
import { t as zalouserPlugin } from "./channel-BbRxSL6F.js";
|
|
2
2
|
export { zalouserPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as collectZalouserSecurityAuditFindings } from "./security-audit-
|
|
2
|
-
import { a as listZaloGroupMembers, b as waitForZaloQrLogin, c as logoutZaloProfile, i as listZaloFriendsMatching, n as getZaloUserInfo, s as listZaloGroupsMatching, y as startZaloQrLogin } from "./zalo-js-
|
|
3
|
-
import { a as sendReactionZalouser, i as sendMessageZalouser } from "./send-
|
|
1
|
+
import { t as collectZalouserSecurityAuditFindings } from "./security-audit-DUQOetcM.js";
|
|
2
|
+
import { a as listZaloGroupMembers, b as waitForZaloQrLogin, c as logoutZaloProfile, i as listZaloFriendsMatching, n as getZaloUserInfo, s as listZaloGroupsMatching, y as startZaloQrLogin } from "./zalo-js-QSY2SsUF.js";
|
|
3
|
+
import { a as sendReactionZalouser, i as sendMessageZalouser } from "./send-SPumHuhS.js";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
5
|
//#region extensions/zalouser/src/probe.ts
|
|
6
6
|
async function probeZalouser(profile, timeoutMs) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { n as zalouserSetupWizard } from "./setup-surface-
|
|
2
|
-
import { t as createZalouserPluginBase } from "./shared-
|
|
3
|
-
import { n as zalouserSetupAdapter } from "./setup-core-CqipqY98.js";
|
|
1
|
+
import { n as zalouserSetupWizard } from "./setup-surface-Dv3nk0fI.js";
|
|
2
|
+
import { r as zalouserSetupAdapter, t as createZalouserPluginBase } from "./shared-O0YC-vIX.js";
|
|
4
3
|
//#region extensions/zalouser/src/channel.setup.ts
|
|
5
4
|
const zalouserSetupPlugin = { ...createZalouserPluginBase({
|
|
6
5
|
setupWizard: zalouserSetupWizard,
|
package/dist/contract-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
2
|
-
import { t as collectZalouserSecurityAuditFindings } from "./security-audit-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BIY2IHB_.js";
|
|
2
|
+
import { t as collectZalouserSecurityAuditFindings } from "./security-audit-DUQOetcM.js";
|
|
3
3
|
export { collectZalouserSecurityAuditFindings, legacyConfigRules, normalizeCompatibilityConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BIY2IHB_.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as isZalouserGroupEntryAllowed, i as
|
|
2
|
-
import { o as listZaloGroups, r as listZaloFriends, u as resolveZaloGroupContext, v as startZaloListener } from "./zalo-js-
|
|
3
|
-
import { i as sendMessageZalouser, o as sendSeenZalouser, s as sendTypingZalouser, t as sendDeliveredZalouser } from "./send-
|
|
1
|
+
import { a as resolveZalouserMessageSid, c as isZalouserGroupEntryAllowed, i as formatZalouserMessageSidFull, n as getZalouserRuntime, o as buildZalouserGroupCandidates, s as findZalouserGroupEntry } from "./channel-BbRxSL6F.js";
|
|
2
|
+
import { o as listZaloGroups, r as listZaloFriends, u as resolveZaloGroupContext, v as startZaloListener } from "./zalo-js-QSY2SsUF.js";
|
|
3
|
+
import { i as sendMessageZalouser, o as sendSeenZalouser, s as sendTypingZalouser, t as sendDeliveredZalouser } from "./send-SPumHuhS.js";
|
|
4
4
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { mergeAllowlist, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { n as zalouserSetupWizard } from "./setup-surface-
|
|
2
|
-
import { n as
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as createZalouserTool } from "./api-CaGurb-M.js";
|
|
1
|
+
import { n as zalouserSetupWizard } from "./setup-surface-Dv3nk0fI.js";
|
|
2
|
+
import { n as createZalouserSetupWizardProxy, r as zalouserSetupAdapter } from "./shared-O0YC-vIX.js";
|
|
3
|
+
import { r as setZalouserRuntime, t as zalouserPlugin } from "./channel-BbRxSL6F.js";
|
|
4
|
+
import { n as isZalouserMutableGroupEntry, t as collectZalouserSecurityAuditFindings } from "./security-audit-DUQOetcM.js";
|
|
5
|
+
import { t as zalouserSetupPlugin } from "./channel.setup-D-TSDzJ-.js";
|
|
6
|
+
import { t as createZalouserTool } from "./api-BKTe9er6.js";
|
|
8
7
|
import { buildBaseAccountStatusSnapshot } from "openclaw/plugin-sdk/status-helpers";
|
|
9
8
|
import { formatAllowFromLowercase, mergeAllowlist, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
|
|
10
9
|
import { DEFAULT_ACCOUNT_ID, buildChannelConfigSchema, normalizeAccountId } from "openclaw/plugin-sdk/core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as TextStyle, _ as sendZaloTypingEvent, f as sendZaloDeliveredEvent, g as sendZaloTextMessage, h as sendZaloSeenEvent, m as sendZaloReaction, p as sendZaloLink, x as createZalouserSendReceipt } from "./zalo-js-
|
|
1
|
+
import { S as TextStyle, _ as sendZaloTypingEvent, f as sendZaloDeliveredEvent, g as sendZaloTextMessage, h as sendZaloSeenEvent, m as sendZaloReaction, p as sendZaloLink, x as createZalouserSendReceipt } from "./zalo-js-QSY2SsUF.js";
|
|
2
2
|
//#region extensions/zalouser/src/text-styles.ts
|
|
3
3
|
const ESCAPE_SENTINEL_START = "";
|
|
4
4
|
const ESCAPE_SENTINEL_END = "";
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as zalouserSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { t as zalouserSetupPlugin } from "./channel.setup-D-TSDzJ-.js";
|
|
2
2
|
export { zalouserSetupPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveZalouserAccountSync, i as resolveDefaultZalouserAccountId, r as listZalouserAccountIds, t as checkZcaAuthenticated } from "./accounts-
|
|
2
|
-
import {
|
|
3
|
-
import { b as waitForZaloQrLogin, c as logoutZaloProfile, d as resolveZaloGroupsByEntries, l as resolveZaloAllowFromEntries, y as startZaloQrLogin } from "./zalo-js-
|
|
1
|
+
import { a as resolveZalouserAccountSync, i as resolveDefaultZalouserAccountId, r as listZalouserAccountIds, t as checkZcaAuthenticated } from "./accounts-CTecjIqR.js";
|
|
2
|
+
import { i as writeQrDataUrlToTempFile } from "./shared-O0YC-vIX.js";
|
|
3
|
+
import { b as waitForZaloQrLogin, c as logoutZaloProfile, d as resolveZaloGroupsByEntries, l as resolveZaloAllowFromEntries, y as startZaloQrLogin } from "./zalo-js-QSY2SsUF.js";
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID, addWildcardAllowFrom, formatCliCommand, formatDocsLink, formatResolvedUnresolvedNote, mergeAllowFromEntries, normalizeAccountId, patchScopedAccountConfig } from "openclaw/plugin-sdk/setup";
|
|
5
5
|
//#region \0rolldown/runtime.js
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveZalouserAccountSync, i as resolveDefaultZalouserAccountId, r as listZalouserAccountIds, t as checkZcaAuthenticated } from "./accounts-
|
|
2
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
3
|
-
import { n as isZalouserMutableGroupEntry } from "./security-audit-
|
|
1
|
+
import { a as resolveZalouserAccountSync, i as resolveDefaultZalouserAccountId, r as listZalouserAccountIds, t as checkZcaAuthenticated } from "./accounts-CTecjIqR.js";
|
|
2
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BIY2IHB_.js";
|
|
3
|
+
import { n as isZalouserMutableGroupEntry } from "./security-audit-DUQOetcM.js";
|
|
4
4
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
5
5
|
import { AllowFromListSchema, DmPolicySchema, GroupPolicySchema, MarkdownConfigSchema, ToolPolicySchema, buildCatchallMultiAccountChannelSchema, buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/core";
|
|
@@ -8,9 +8,48 @@ import { isDangerousNameMatchingEnabled as isDangerousNameMatchingEnabled$1 } fr
|
|
|
8
8
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
9
9
|
import { isNumericTargetId, sendPayloadWithChunkedTextAndMedia } from "openclaw/plugin-sdk/reply-payload";
|
|
10
10
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
11
|
+
import fsp from "node:fs/promises";
|
|
12
|
+
import path from "node:path";
|
|
13
|
+
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
|
|
14
|
+
import { createDelegatedSetupWizardProxy, createPatchedAccountSetupAdapter } from "openclaw/plugin-sdk/setup-runtime";
|
|
11
15
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
12
16
|
import { z } from "zod";
|
|
13
17
|
import { createDangerousNameMatchingMutableAllowlistWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
18
|
+
//#region extensions/zalouser/src/qr-temp-file.ts
|
|
19
|
+
async function writeQrDataUrlToTempFile(qrDataUrl, profile) {
|
|
20
|
+
const base64 = (qrDataUrl.trim().match(/^data:image\/png;base64,(.+)$/i)?.[1] ?? "").trim();
|
|
21
|
+
if (!base64) return null;
|
|
22
|
+
const safeProfile = profile.replace(/[^a-zA-Z0-9_-]+/g, "-") || "default";
|
|
23
|
+
const filePath = path.join(resolvePreferredOpenClawTmpDir(), `openclaw-zalouser-qr-${safeProfile}.png`);
|
|
24
|
+
await fsp.writeFile(filePath, Buffer.from(base64, "base64"));
|
|
25
|
+
return filePath;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region extensions/zalouser/src/setup-core.ts
|
|
29
|
+
const channel = "zalouser";
|
|
30
|
+
const zalouserSetupAdapter = createPatchedAccountSetupAdapter({
|
|
31
|
+
channelKey: channel,
|
|
32
|
+
validateInput: () => null,
|
|
33
|
+
buildPatch: () => ({})
|
|
34
|
+
});
|
|
35
|
+
function createZalouserSetupWizardProxy(loadWizard) {
|
|
36
|
+
return createDelegatedSetupWizardProxy({
|
|
37
|
+
channel,
|
|
38
|
+
loadWizard,
|
|
39
|
+
status: {
|
|
40
|
+
configuredLabel: "logged in",
|
|
41
|
+
unconfiguredLabel: "needs QR login",
|
|
42
|
+
configuredHint: "recommended · logged in",
|
|
43
|
+
unconfiguredHint: "recommended · QR login",
|
|
44
|
+
configuredScore: 1,
|
|
45
|
+
unconfiguredScore: 15
|
|
46
|
+
},
|
|
47
|
+
credentials: [],
|
|
48
|
+
delegatePrepare: true,
|
|
49
|
+
delegateFinalize: true
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
14
53
|
//#region extensions/zalouser/src/config-schema.ts
|
|
15
54
|
const groupConfigSchema = z.object({
|
|
16
55
|
enabled: z.boolean().optional(),
|
|
@@ -117,4 +156,4 @@ function createZalouserPluginBase(params) {
|
|
|
117
156
|
};
|
|
118
157
|
}
|
|
119
158
|
//#endregion
|
|
120
|
-
export {
|
|
159
|
+
export { DEFAULT_ACCOUNT_ID as a, isNumericTargetId as c, writeQrDataUrlToTempFile as i, normalizeAccountId as l, createZalouserSetupWizardProxy as n, chunkTextForOutbound as o, zalouserSetupAdapter as r, isDangerousNameMatchingEnabled$1 as s, createZalouserPluginBase as t, sendPayloadWithChunkedTextAndMedia as u };
|
package/dist/test-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as resolveZalouserAccountSync, i as resolveDefaultZalouserAccountId, n as getZcaUserInfo, r as listZalouserAccountIds, t as checkZcaAuthenticated } from "./accounts-
|
|
2
|
-
import { r as parseZalouserOutboundTarget } from "./session-route-
|
|
3
|
-
import { a as listZaloGroupMembers, b as waitForZaloQrLogin, c as logoutZaloProfile, d as resolveZaloGroupsByEntries, i as listZaloFriendsMatching, l as resolveZaloAllowFromEntries, n as getZaloUserInfo, s as listZaloGroupsMatching, t as checkZaloAuthenticated, y as startZaloQrLogin } from "./zalo-js-
|
|
4
|
-
import { i as sendMessageZalouser } from "./send-
|
|
1
|
+
import { a as resolveZalouserAccountSync, i as resolveDefaultZalouserAccountId, n as getZcaUserInfo, r as listZalouserAccountIds, t as checkZcaAuthenticated } from "./accounts-CTecjIqR.js";
|
|
2
|
+
import { r as parseZalouserOutboundTarget } from "./session-route-DWMin5CB.js";
|
|
3
|
+
import { a as listZaloGroupMembers, b as waitForZaloQrLogin, c as logoutZaloProfile, d as resolveZaloGroupsByEntries, i as listZaloFriendsMatching, l as resolveZaloAllowFromEntries, n as getZaloUserInfo, s as listZaloGroupsMatching, t as checkZaloAuthenticated, y as startZaloQrLogin } from "./zalo-js-QSY2SsUF.js";
|
|
4
|
+
import { i as sendMessageZalouser } from "./send-SPumHuhS.js";
|
|
5
5
|
export { checkZaloAuthenticated, checkZcaAuthenticated, getZaloUserInfo, getZcaUserInfo, listZaloFriendsMatching, listZaloGroupMembers, listZaloGroupsMatching, listZalouserAccountIds, logoutZaloProfile, parseZalouserOutboundTarget, resolveDefaultZalouserAccountId, resolveZaloAllowFromEntries, resolveZaloGroupsByEntries, resolveZalouserAccountSync, sendMessageZalouser, startZaloQrLogin, waitForZaloQrLogin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/zalouser",
|
|
3
|
-
"version": "2026.5.14-beta.
|
|
3
|
+
"version": "2026.5.14-beta.2",
|
|
4
4
|
"description": "OpenClaw Zalo Personal Account plugin via native zca-js integration",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"openclaw": "workspace:*"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"openclaw": ">=2026.5.14-beta.
|
|
20
|
+
"openclaw": ">=2026.5.14-beta.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependenciesMeta": {
|
|
23
23
|
"openclaw": {
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"minHostVersion": ">=2026.4.10"
|
|
55
55
|
},
|
|
56
56
|
"compat": {
|
|
57
|
-
"pluginApi": ">=2026.5.14-beta.
|
|
57
|
+
"pluginApi": ">=2026.5.14-beta.2"
|
|
58
58
|
},
|
|
59
59
|
"build": {
|
|
60
|
-
"openclawVersion": "2026.5.14-beta.
|
|
60
|
+
"openclawVersion": "2026.5.14-beta.2"
|
|
61
61
|
},
|
|
62
62
|
"release": {
|
|
63
63
|
"publishToClawHub": true,
|
package/dist/runtime-nbWip_ng.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
3
|
-
//#region extensions/zalouser/src/group-policy.ts
|
|
4
|
-
function toGroupCandidate(value) {
|
|
5
|
-
return value?.trim() ?? "";
|
|
6
|
-
}
|
|
7
|
-
function normalizeZalouserGroupSlug(raw) {
|
|
8
|
-
const trimmed = normalizeOptionalLowercaseString(raw) ?? "";
|
|
9
|
-
if (!trimmed) return "";
|
|
10
|
-
return trimmed.replace(/^#/, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
11
|
-
}
|
|
12
|
-
function buildZalouserGroupCandidates(params) {
|
|
13
|
-
const seen = /* @__PURE__ */ new Set();
|
|
14
|
-
const out = [];
|
|
15
|
-
const push = (value) => {
|
|
16
|
-
const normalized = toGroupCandidate(value);
|
|
17
|
-
if (!normalized || seen.has(normalized)) return;
|
|
18
|
-
seen.add(normalized);
|
|
19
|
-
out.push(normalized);
|
|
20
|
-
};
|
|
21
|
-
const groupId = toGroupCandidate(params.groupId);
|
|
22
|
-
const groupChannel = toGroupCandidate(params.groupChannel);
|
|
23
|
-
const groupName = toGroupCandidate(params.groupName);
|
|
24
|
-
push(groupId);
|
|
25
|
-
if (params.includeGroupIdAlias === true && groupId) push(`group:${groupId}`);
|
|
26
|
-
if (params.allowNameMatching !== false) {
|
|
27
|
-
push(groupChannel);
|
|
28
|
-
push(groupName);
|
|
29
|
-
if (groupName) push(normalizeZalouserGroupSlug(groupName));
|
|
30
|
-
}
|
|
31
|
-
if (params.includeWildcard !== false) push("*");
|
|
32
|
-
return out;
|
|
33
|
-
}
|
|
34
|
-
function findZalouserGroupEntry(groups, candidates) {
|
|
35
|
-
if (!groups) return;
|
|
36
|
-
for (const candidate of candidates) {
|
|
37
|
-
const entry = groups[candidate];
|
|
38
|
-
if (entry) return entry;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function isZalouserGroupEntryAllowed(entry) {
|
|
42
|
-
if (!entry) return false;
|
|
43
|
-
return entry.allow !== false && entry.enabled !== false;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region extensions/zalouser/src/message-sid.ts
|
|
47
|
-
function toMessageSidPart(value) {
|
|
48
|
-
if (typeof value === "string") return value.trim();
|
|
49
|
-
if (typeof value === "number" && Number.isFinite(value)) return String(Math.trunc(value));
|
|
50
|
-
return "";
|
|
51
|
-
}
|
|
52
|
-
function parseZalouserMessageSidFull(value) {
|
|
53
|
-
const raw = toMessageSidPart(value);
|
|
54
|
-
if (!raw) return null;
|
|
55
|
-
const [msgIdPart, cliMsgIdPart] = raw.split(":").map((entry) => entry.trim());
|
|
56
|
-
if (!msgIdPart || !cliMsgIdPart) return null;
|
|
57
|
-
return {
|
|
58
|
-
msgId: msgIdPart,
|
|
59
|
-
cliMsgId: cliMsgIdPart
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function resolveZalouserReactionMessageIds(params) {
|
|
63
|
-
const explicitMessageId = toMessageSidPart(params.messageId);
|
|
64
|
-
const explicitCliMsgId = toMessageSidPart(params.cliMsgId);
|
|
65
|
-
if (explicitMessageId && explicitCliMsgId) return {
|
|
66
|
-
msgId: explicitMessageId,
|
|
67
|
-
cliMsgId: explicitCliMsgId
|
|
68
|
-
};
|
|
69
|
-
const parsedFromCurrent = parseZalouserMessageSidFull(params.currentMessageId);
|
|
70
|
-
if (parsedFromCurrent) return parsedFromCurrent;
|
|
71
|
-
const currentRaw = toMessageSidPart(params.currentMessageId);
|
|
72
|
-
if (!currentRaw) return null;
|
|
73
|
-
if (explicitMessageId && !explicitCliMsgId) return {
|
|
74
|
-
msgId: explicitMessageId,
|
|
75
|
-
cliMsgId: currentRaw
|
|
76
|
-
};
|
|
77
|
-
if (!explicitMessageId && explicitCliMsgId) return {
|
|
78
|
-
msgId: currentRaw,
|
|
79
|
-
cliMsgId: explicitCliMsgId
|
|
80
|
-
};
|
|
81
|
-
return {
|
|
82
|
-
msgId: currentRaw,
|
|
83
|
-
cliMsgId: currentRaw
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function formatZalouserMessageSidFull(params) {
|
|
87
|
-
const msgId = toMessageSidPart(params.msgId);
|
|
88
|
-
const cliMsgId = toMessageSidPart(params.cliMsgId);
|
|
89
|
-
if (!msgId && !cliMsgId) return;
|
|
90
|
-
if (msgId && cliMsgId) return `${msgId}:${cliMsgId}`;
|
|
91
|
-
return msgId || cliMsgId || void 0;
|
|
92
|
-
}
|
|
93
|
-
function resolveZalouserMessageSid(params) {
|
|
94
|
-
const msgId = toMessageSidPart(params.msgId);
|
|
95
|
-
const cliMsgId = toMessageSidPart(params.cliMsgId);
|
|
96
|
-
if (msgId || cliMsgId) return msgId || cliMsgId;
|
|
97
|
-
return toMessageSidPart(params.fallback) || void 0;
|
|
98
|
-
}
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region extensions/zalouser/src/runtime.ts
|
|
101
|
-
const { setRuntime: setZalouserRuntime, getRuntime: getZalouserRuntime } = createPluginRuntimeStore({
|
|
102
|
-
pluginId: "zalouser",
|
|
103
|
-
errorMessage: "Zalouser runtime not initialized"
|
|
104
|
-
});
|
|
105
|
-
//#endregion
|
|
106
|
-
export { resolveZalouserReactionMessageIds as a, isZalouserGroupEntryAllowed as c, resolveZalouserMessageSid as i, setZalouserRuntime as n, buildZalouserGroupCandidates as o, formatZalouserMessageSidFull as r, findZalouserGroupEntry as s, getZalouserRuntime as t };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import fsp from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
|
|
4
|
-
import { createDelegatedSetupWizardProxy, createPatchedAccountSetupAdapter } from "openclaw/plugin-sdk/setup-runtime";
|
|
5
|
-
//#region extensions/zalouser/src/qr-temp-file.ts
|
|
6
|
-
async function writeQrDataUrlToTempFile(qrDataUrl, profile) {
|
|
7
|
-
const base64 = (qrDataUrl.trim().match(/^data:image\/png;base64,(.+)$/i)?.[1] ?? "").trim();
|
|
8
|
-
if (!base64) return null;
|
|
9
|
-
const safeProfile = profile.replace(/[^a-zA-Z0-9_-]+/g, "-") || "default";
|
|
10
|
-
const filePath = path.join(resolvePreferredOpenClawTmpDir(), `openclaw-zalouser-qr-${safeProfile}.png`);
|
|
11
|
-
await fsp.writeFile(filePath, Buffer.from(base64, "base64"));
|
|
12
|
-
return filePath;
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region extensions/zalouser/src/setup-core.ts
|
|
16
|
-
const channel = "zalouser";
|
|
17
|
-
const zalouserSetupAdapter = createPatchedAccountSetupAdapter({
|
|
18
|
-
channelKey: channel,
|
|
19
|
-
validateInput: () => null,
|
|
20
|
-
buildPatch: () => ({})
|
|
21
|
-
});
|
|
22
|
-
function createZalouserSetupWizardProxy(loadWizard) {
|
|
23
|
-
return createDelegatedSetupWizardProxy({
|
|
24
|
-
channel,
|
|
25
|
-
loadWizard,
|
|
26
|
-
status: {
|
|
27
|
-
configuredLabel: "logged in",
|
|
28
|
-
unconfiguredLabel: "needs QR login",
|
|
29
|
-
configuredHint: "recommended · logged in",
|
|
30
|
-
unconfiguredHint: "recommended · QR login",
|
|
31
|
-
configuredScore: 1,
|
|
32
|
-
unconfiguredScore: 15
|
|
33
|
-
},
|
|
34
|
-
credentials: [],
|
|
35
|
-
delegatePrepare: true,
|
|
36
|
-
delegateFinalize: true
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
export { zalouserSetupAdapter as n, writeQrDataUrlToTempFile as r, createZalouserSetupWizardProxy as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|