@openclaw/zalouser 2026.5.28-beta.3 → 2026.5.28-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.
@@ -1,2 +1,2 @@
1
- import { n as getZaloUserInfo, t as checkZaloAuthenticated } from "./zalo-js-CoAYxl2h.js";
1
+ import { n as getZaloUserInfo, t as checkZaloAuthenticated } from "./zalo-js-Cblh09JJ.js";
2
2
  export { checkZaloAuthenticated, getZaloUserInfo };
@@ -1,10 +1,10 @@
1
- import "./setup-surface-DQBRWLnI.js";
2
- import "./shared-BweDHhLM.js";
3
- import { n as parseZalouserOutboundTarget } from "./channel-DlMjHD00.js";
1
+ import "./setup-surface-W1VQqpf0.js";
2
+ import "./shared-BnQwl7bD.js";
3
+ import { n as parseZalouserOutboundTarget } from "./channel-BYQ2rvLF.js";
4
4
  import "./security-audit-DhK2UscX.js";
5
- import { i as listZaloFriendsMatching, n as getZaloUserInfo, s as listZaloGroupsMatching, t as checkZaloAuthenticated } from "./zalo-js-CoAYxl2h.js";
6
- import "./channel.setup-CdA5CvO0.js";
7
- import { i as sendMessageZalouser, n as sendImageZalouser, r as sendLinkZalouser } from "./send-C65xy6Wd.js";
5
+ import { i as listZaloFriendsMatching, n as getZaloUserInfo, s as listZaloGroupsMatching, t as checkZaloAuthenticated } from "./zalo-js-Cblh09JJ.js";
6
+ import "./channel.setup-Bf53Feb_.js";
7
+ import { i as sendMessageZalouser, n as sendImageZalouser, r as sendLinkZalouser } from "./send-C04FGz0_.js";
8
8
  import { stringEnum } from "openclaw/plugin-sdk/channel-actions";
9
9
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
10
10
  import { Type } from "typebox";
package/dist/api.js CHANGED
@@ -1,7 +1,7 @@
1
- import { n as zalouserSetupWizard } from "./setup-surface-DQBRWLnI.js";
2
- import { n as createZalouserSetupWizardProxy, r as zalouserSetupAdapter } from "./shared-BweDHhLM.js";
3
- import { t as zalouserPlugin } from "./channel-DlMjHD00.js";
1
+ import { n as zalouserSetupWizard } from "./setup-surface-W1VQqpf0.js";
2
+ import { n as createZalouserSetupWizardProxy, r as zalouserSetupAdapter } from "./shared-BnQwl7bD.js";
3
+ import { t as zalouserPlugin } from "./channel-BYQ2rvLF.js";
4
4
  import { n as isZalouserMutableGroupEntry, t as collectZalouserSecurityAuditFindings } from "./security-audit-DhK2UscX.js";
5
- import { t as zalouserSetupPlugin } from "./channel.setup-CdA5CvO0.js";
6
- import { t as createZalouserTool } from "./api-BBqnUi9A.js";
5
+ import { t as zalouserSetupPlugin } from "./channel.setup-Bf53Feb_.js";
6
+ import { t as createZalouserTool } from "./api-DhDa8sPp.js";
7
7
  export { collectZalouserSecurityAuditFindings, createZalouserSetupWizardProxy, createZalouserTool, isZalouserMutableGroupEntry, zalouserPlugin, zalouserSetupAdapter, zalouserSetupPlugin, zalouserSetupWizard };
@@ -1,4 +1,4 @@
1
- import { a as DEFAULT_ACCOUNT_ID, c as isNumericTargetId, d as checkZcaAuthenticated, f as listZalouserAccountIds, i as writeQrDataUrlToTempFile, l as normalizeAccountId, m as resolveZalouserAccountSync, n as createZalouserSetupWizardProxy, o as chunkTextForOutbound, p as resolveDefaultZalouserAccountId, r as zalouserSetupAdapter, s as isDangerousNameMatchingEnabled, t as createZalouserPluginBase, u as sendPayloadWithChunkedTextAndMedia } from "./shared-BweDHhLM.js";
1
+ import { a as DEFAULT_ACCOUNT_ID, c as isNumericTargetId, d as checkZcaAuthenticated, f as listZalouserAccountIds, i as writeQrDataUrlToTempFile, l as normalizeAccountId, m as resolveZalouserAccountSync, n as createZalouserSetupWizardProxy, o as chunkTextForOutbound, p as resolveDefaultZalouserAccountId, r as zalouserSetupAdapter, s as isDangerousNameMatchingEnabled, t as createZalouserPluginBase, u as sendPayloadWithChunkedTextAndMedia } from "./shared-BnQwl7bD.js";
2
2
  import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
3
3
  import { createAccountStatusSink, defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-outbound";
4
4
  import { buildPassiveProbedChannelStatusSummary, coerceStatusIssueAccountId, readStatusIssueFields } from "openclaw/plugin-sdk/extension-shared";
@@ -204,7 +204,7 @@ function resolveZalouserOutboundSessionRoute(params) {
204
204
  }
205
205
  //#endregion
206
206
  //#region extensions/zalouser/src/channel.adapters.ts
207
- const loadZalouserChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel.runtime-C6g86q6_.js"));
207
+ const loadZalouserChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel.runtime-Dyh9b6nd.js"));
208
208
  const ZALOUSER_TEXT_CHUNK_LIMIT = 2e3;
209
209
  function resolveZalouserQrProfile(accountId) {
210
210
  const normalized = normalizeAccountId(accountId);
@@ -535,8 +535,8 @@ function collectZalouserStatusIssues(accounts) {
535
535
  }
536
536
  //#endregion
537
537
  //#region extensions/zalouser/src/channel.ts
538
- const loadZalouserChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-C6g86q6_.js"));
539
- const zalouserSetupWizardProxy = createZalouserSetupWizardProxy(async () => (await import("./setup-surface-DQBRWLnI.js").then((n) => n.t)).zalouserSetupWizard);
538
+ const loadZalouserChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-Dyh9b6nd.js"));
539
+ const zalouserSetupWizardProxy = createZalouserSetupWizardProxy(async () => (await import("./setup-surface-W1VQqpf0.js").then((n) => n.t)).zalouserSetupWizard);
540
540
  function mapUser(params) {
541
541
  return {
542
542
  kind: "user",
@@ -653,7 +653,7 @@ const zalouserPlugin = createChatChannelPlugin({
653
653
  setStatus: ctx.setStatus
654
654
  });
655
655
  ctx.log?.info(`[${account.accountId}] starting zalouser provider${userLabel}`);
656
- const { monitorZalouserProvider } = await import("./monitor-fmAC676K.js");
656
+ const { monitorZalouserProvider } = await import("./monitor-Dv5gqTDI.js");
657
657
  return monitorZalouserProvider({
658
658
  account,
659
659
  config: ctx.cfg,
@@ -1,2 +1,2 @@
1
- import { t as zalouserPlugin } from "./channel-DlMjHD00.js";
1
+ import { t as zalouserPlugin } from "./channel-BYQ2rvLF.js";
2
2
  export { zalouserPlugin };
@@ -1,6 +1,6 @@
1
1
  import { t as collectZalouserSecurityAuditFindings } from "./security-audit-DhK2UscX.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-CoAYxl2h.js";
3
- import { a as sendReactionZalouser, i as sendMessageZalouser } from "./send-C65xy6Wd.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-Cblh09JJ.js";
3
+ import { a as sendReactionZalouser, i as sendMessageZalouser } from "./send-C04FGz0_.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,5 +1,5 @@
1
- import { n as zalouserSetupWizard } from "./setup-surface-DQBRWLnI.js";
2
- import { r as zalouserSetupAdapter, t as createZalouserPluginBase } from "./shared-BweDHhLM.js";
1
+ import { n as zalouserSetupWizard } from "./setup-surface-W1VQqpf0.js";
2
+ import { r as zalouserSetupAdapter, t as createZalouserPluginBase } from "./shared-BnQwl7bD.js";
3
3
  //#region extensions/zalouser/src/channel.setup.ts
4
4
  const zalouserSetupPlugin = { ...createZalouserPluginBase({
5
5
  setupWizard: zalouserSetupWizard,
@@ -1,6 +1,6 @@
1
- import { a as formatZalouserMessageSidFull, c as findZalouserGroupEntry, l as isZalouserGroupEntryAllowed, o as resolveZalouserMessageSid, r as getZalouserRuntime, s as buildZalouserGroupCandidates } from "./channel-DlMjHD00.js";
2
- import { o as listZaloGroups, r as listZaloFriends, u as resolveZaloGroupContext, v as startZaloListener } from "./zalo-js-CoAYxl2h.js";
3
- import { i as sendMessageZalouser, o as sendSeenZalouser, s as sendTypingZalouser, t as sendDeliveredZalouser } from "./send-C65xy6Wd.js";
1
+ import { a as formatZalouserMessageSidFull, c as findZalouserGroupEntry, l as isZalouserGroupEntryAllowed, o as resolveZalouserMessageSid, r as getZalouserRuntime, s as buildZalouserGroupCandidates } from "./channel-BYQ2rvLF.js";
2
+ import { o as listZaloGroups, r as listZaloFriends, u as resolveZaloGroupContext, v as startZaloListener } from "./zalo-js-Cblh09JJ.js";
3
+ import { i as sendMessageZalouser, o as sendSeenZalouser, s as sendTypingZalouser, t as sendDeliveredZalouser } from "./send-C04FGz0_.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";
@@ -443,7 +443,10 @@ async function processMessage(message, account, config, core, runtime, historySt
443
443
  GroupChannel: isGroup ? groupName || void 0 : void 0,
444
444
  GroupMembers: isGroup ? groupMembers : void 0,
445
445
  WasMentioned: isGroup ? mentionDecision.effectiveWasMentioned : void 0,
446
- CommandAuthorized: commandAuthorized
446
+ CommandAuthorized: commandAuthorized,
447
+ ReplyToId: message.quotedGlobalMsgId || void 0,
448
+ ReplyToBody: message.quotedBody || void 0,
449
+ ReplyToIsQuote: message.quotedGlobalMsgId ? true : void 0
447
450
  }
448
451
  });
449
452
  await core.channel.inbound.dispatchReply({
@@ -1,9 +1,9 @@
1
- import { n as zalouserSetupWizard } from "./setup-surface-DQBRWLnI.js";
2
- import { n as createZalouserSetupWizardProxy, r as zalouserSetupAdapter } from "./shared-BweDHhLM.js";
3
- import { i as setZalouserRuntime, t as zalouserPlugin } from "./channel-DlMjHD00.js";
1
+ import { n as zalouserSetupWizard } from "./setup-surface-W1VQqpf0.js";
2
+ import { n as createZalouserSetupWizardProxy, r as zalouserSetupAdapter } from "./shared-BnQwl7bD.js";
3
+ import { i as setZalouserRuntime, t as zalouserPlugin } from "./channel-BYQ2rvLF.js";
4
4
  import { n as isZalouserMutableGroupEntry, t as collectZalouserSecurityAuditFindings } from "./security-audit-DhK2UscX.js";
5
- import { t as zalouserSetupPlugin } from "./channel.setup-CdA5CvO0.js";
6
- import { t as createZalouserTool } from "./api-BBqnUi9A.js";
5
+ import { t as zalouserSetupPlugin } from "./channel.setup-Bf53Feb_.js";
6
+ import { t as createZalouserTool } from "./api-DhDa8sPp.js";
7
7
  import { createChannelMessageReplyPipeline } from "openclaw/plugin-sdk/channel-outbound";
8
8
  import { buildBaseAccountStatusSnapshot } from "openclaw/plugin-sdk/status-helpers";
9
9
  import { formatAllowFromLowercase, mergeAllowlist, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
@@ -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-CoAYxl2h.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-Cblh09JJ.js";
2
2
  //#region extensions/zalouser/src/text-styles.ts
3
3
  const ESCAPE_SENTINEL_START = "";
4
4
  const ESCAPE_SENTINEL_END = "";
@@ -1,2 +1,2 @@
1
- import { t as zalouserSetupPlugin } from "./channel.setup-CdA5CvO0.js";
1
+ import { t as zalouserSetupPlugin } from "./channel.setup-Bf53Feb_.js";
2
2
  export { zalouserSetupPlugin };
@@ -1,5 +1,5 @@
1
- import { d as checkZcaAuthenticated, f as listZalouserAccountIds, i as writeQrDataUrlToTempFile, m as resolveZalouserAccountSync, p as resolveDefaultZalouserAccountId } from "./shared-BweDHhLM.js";
2
- import { b as waitForZaloQrLogin, c as logoutZaloProfile, d as resolveZaloGroupsByEntries, l as resolveZaloAllowFromEntries, y as startZaloQrLogin } from "./zalo-js-CoAYxl2h.js";
1
+ import { d as checkZcaAuthenticated, f as listZalouserAccountIds, i as writeQrDataUrlToTempFile, m as resolveZalouserAccountSync, p as resolveDefaultZalouserAccountId } from "./shared-BnQwl7bD.js";
2
+ import { b as waitForZaloQrLogin, c as logoutZaloProfile, d as resolveZaloGroupsByEntries, l as resolveZaloAllowFromEntries, y as startZaloQrLogin } from "./zalo-js-Cblh09JJ.js";
3
3
  import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { DEFAULT_ACCOUNT_ID, addWildcardAllowFrom, createSetupTranslator, formatCliCommand, formatDocsLink, formatResolvedUnresolvedNote, mergeAllowFromEntries, normalizeAccountId, patchScopedAccountConfig } from "openclaw/plugin-sdk/setup";
5
5
  //#region \0rolldown/runtime.js
@@ -19,7 +19,7 @@ import { createDangerousNameMatchingMutableAllowlistWarningCollector } from "ope
19
19
  //#region extensions/zalouser/src/accounts.ts
20
20
  let zalouserAccountsRuntimePromise;
21
21
  async function loadZalouserAccountsRuntime() {
22
- zalouserAccountsRuntimePromise ??= import("./accounts.runtime-BtI8gfc2.js");
22
+ zalouserAccountsRuntimePromise ??= import("./accounts.runtime-UypUaEfF.js");
23
23
  return await zalouserAccountsRuntimePromise;
24
24
  }
25
25
  const { listAccountIds: listZalouserAccountIds, resolveDefaultAccountId: resolveDefaultZalouserAccountId } = createAccountListHelpers("zalouser", { implicitDefaultAccount: {
@@ -5,7 +5,7 @@ import { randomUUID } from "node:crypto";
5
5
  import fs from "node:fs";
6
6
  import os from "node:os";
7
7
  import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
8
- import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
8
+ import { asFiniteNumberInRange, parseStrictFiniteNumber, parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
9
9
  import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
10
10
  import { privateFileStoreSync, readRegularFileSync, statRegularFileSync, withTimeout } from "openclaw/plugin-sdk/security-runtime";
11
11
  import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
@@ -110,6 +110,8 @@ const GROUP_CONTEXT_CACHE_TTL_MS = 5 * 6e4;
110
110
  const GROUP_CONTEXT_CACHE_MAX_ENTRIES = 500;
111
111
  const LISTENER_WATCHDOG_INTERVAL_MS = 3e4;
112
112
  const LISTENER_WATCHDOG_MAX_GAP_MS = 35e3;
113
+ const ZALO_TIMESTAMP_MS_THRESHOLD = 0xe8d4a51000;
114
+ const MAX_SAFE_ZALO_TIMESTAMP_SECONDS = Number.MAX_SAFE_INTEGER / 1e3;
113
115
  const apiByProfile = /* @__PURE__ */ new Map();
114
116
  const apiInitByProfile = /* @__PURE__ */ new Map();
115
117
  const credentialSignaturesByProfile = /* @__PURE__ */ new Map();
@@ -218,10 +220,15 @@ function normalizeMessageContent(content) {
218
220
  }
219
221
  }
220
222
  function resolveInboundTimestamp(rawTs) {
221
- if (typeof rawTs === "number" && Number.isFinite(rawTs)) return rawTs > 0xe8d4a51000 ? rawTs : rawTs * 1e3;
222
- const parsed = Number.parseInt(typeof rawTs === "string" ? rawTs : typeof rawTs === "number" ? String(rawTs) : "", 10);
223
- if (!Number.isFinite(parsed) || parsed <= 0) return Date.now();
224
- return parsed > 0xe8d4a51000 ? parsed : parsed * 1e3;
223
+ const timestamp = asFiniteNumberInRange(typeof rawTs === "number" ? rawTs : typeof rawTs === "string" ? parseStrictFiniteNumber(rawTs) : void 0, {
224
+ min: 0,
225
+ minExclusive: true,
226
+ max: Number.MAX_SAFE_INTEGER
227
+ });
228
+ if (timestamp === void 0) return Date.now();
229
+ if (timestamp > ZALO_TIMESTAMP_MS_THRESHOLD) return Math.trunc(timestamp);
230
+ if (timestamp > MAX_SAFE_ZALO_TIMESTAMP_SECONDS) return Date.now();
231
+ return Math.trunc(timestamp * 1e3);
225
232
  }
226
233
  function extractMentionIds(rawMentions) {
227
234
  if (!Array.isArray(rawMentions)) return [];
@@ -600,6 +607,8 @@ function toInboundMessage(message, ownUserId) {
600
607
  const normalizedOwnUserId = toNumberId(ownUserId);
601
608
  const mentionIds = extractMentionIds(data.mentions);
602
609
  const quoteOwnerId = data.quote && typeof data.quote === "object" ? toNumberId(data.quote.ownerId) : "";
610
+ const quotedGlobalMsgId = data.quote && typeof data.quote === "object" ? toStringValue(data.quote.globalMsgId) : "";
611
+ const quotedBody = data.quote && typeof data.quote === "object" ? toStringValue(data.quote.msg) : "";
603
612
  const hasAnyMention = mentionIds.length > 0;
604
613
  const canResolveExplicitMention = Boolean(normalizedOwnUserId);
605
614
  const wasExplicitlyMentioned = Boolean(normalizedOwnUserId && mentionIds.some((id) => id === normalizedOwnUserId));
@@ -621,6 +630,9 @@ function toInboundMessage(message, ownUserId) {
621
630
  canResolveExplicitMention,
622
631
  wasExplicitlyMentioned,
623
632
  implicitMention,
633
+ quotedGlobalMsgId: quotedGlobalMsgId || void 0,
634
+ quotedOwnerId: quoteOwnerId || void 0,
635
+ quotedBody: quotedBody || void 0,
624
636
  eventMessage,
625
637
  raw: message
626
638
  };
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@openclaw/zalouser",
3
- "version": "2026.5.28-beta.3",
3
+ "version": "2026.5.28-beta.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/zalouser",
9
- "version": "2026.5.28-beta.3",
9
+ "version": "2026.5.28-beta.4",
10
10
  "dependencies": {
11
11
  "typebox": "1.1.38",
12
12
  "zca-js": "2.1.2",
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.5.28-beta.3"
16
+ "openclaw": ">=2026.5.28-beta.4"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/zalouser",
3
- "version": "2026.5.28-beta.3",
3
+ "version": "2026.5.28-beta.4",
4
4
  "description": "OpenClaw Zalo Personal Account plugin via native zca-js integration.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.5.28-beta.3"
16
+ "openclaw": ">=2026.5.28-beta.4"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -50,10 +50,10 @@
50
50
  "minHostVersion": ">=2026.4.10"
51
51
  },
52
52
  "compat": {
53
- "pluginApi": ">=2026.5.28-beta.3"
53
+ "pluginApi": ">=2026.5.28-beta.4"
54
54
  },
55
55
  "build": {
56
- "openclawVersion": "2026.5.28-beta.3"
56
+ "openclawVersion": "2026.5.28-beta.4"
57
57
  },
58
58
  "release": {
59
59
  "publishToClawHub": true,