@openclaw/zalouser 2026.5.28-beta.4 → 2026.5.30-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.
@@ -1,2 +1,2 @@
1
- import { n as getZaloUserInfo, t as checkZaloAuthenticated } from "./zalo-js-Cblh09JJ.js";
1
+ import { n as getZaloUserInfo, t as checkZaloAuthenticated } from "./zalo-js-l0Tyf2K3.js";
2
2
  export { checkZaloAuthenticated, getZaloUserInfo };
@@ -1,10 +1,10 @@
1
- import "./setup-surface-W1VQqpf0.js";
2
- import "./shared-BnQwl7bD.js";
3
- import { n as parseZalouserOutboundTarget } from "./channel-BYQ2rvLF.js";
1
+ import "./setup-surface-zKvcbJnA.js";
2
+ import "./shared-Rt4cSzmB.js";
3
+ import { n as parseZalouserOutboundTarget } from "./channel-CoDRB2DN.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-Cblh09JJ.js";
6
- import "./channel.setup-Bf53Feb_.js";
7
- import { i as sendMessageZalouser, n as sendImageZalouser, r as sendLinkZalouser } from "./send-C04FGz0_.js";
5
+ import { i as listZaloFriendsMatching, n as getZaloUserInfo, s as listZaloGroupsMatching, t as checkZaloAuthenticated } from "./zalo-js-l0Tyf2K3.js";
6
+ import "./channel.setup-z4cyh1zU.js";
7
+ import { i as sendMessageZalouser, n as sendImageZalouser, r as sendLinkZalouser } from "./send-Be8iWEWq.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-W1VQqpf0.js";
2
- import { n as createZalouserSetupWizardProxy, r as zalouserSetupAdapter } from "./shared-BnQwl7bD.js";
3
- import { t as zalouserPlugin } from "./channel-BYQ2rvLF.js";
1
+ import { n as zalouserSetupWizard } from "./setup-surface-zKvcbJnA.js";
2
+ import { n as createZalouserSetupWizardProxy, r as zalouserSetupAdapter } from "./shared-Rt4cSzmB.js";
3
+ import { t as zalouserPlugin } from "./channel-CoDRB2DN.js";
4
4
  import { n as isZalouserMutableGroupEntry, t as collectZalouserSecurityAuditFindings } from "./security-audit-DhK2UscX.js";
5
- import { t as zalouserSetupPlugin } from "./channel.setup-Bf53Feb_.js";
6
- import { t as createZalouserTool } from "./api-DhDa8sPp.js";
5
+ import { t as zalouserSetupPlugin } from "./channel.setup-z4cyh1zU.js";
6
+ import { t as createZalouserTool } from "./api-DNQas3Fj.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-BnQwl7bD.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-Rt4cSzmB.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-Dyh9b6nd.js"));
207
+ const loadZalouserChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel.runtime-CxnamX0S.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-Dyh9b6nd.js"));
539
- const zalouserSetupWizardProxy = createZalouserSetupWizardProxy(async () => (await import("./setup-surface-W1VQqpf0.js").then((n) => n.t)).zalouserSetupWizard);
538
+ const loadZalouserChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-CxnamX0S.js"));
539
+ const zalouserSetupWizardProxy = createZalouserSetupWizardProxy(async () => (await import("./setup-surface-zKvcbJnA.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-Dv5gqTDI.js");
656
+ const { monitorZalouserProvider } = await import("./monitor-BCvGZgOR.js");
657
657
  return monitorZalouserProvider({
658
658
  account,
659
659
  config: ctx.cfg,
@@ -1,2 +1,2 @@
1
- import { t as zalouserPlugin } from "./channel-BYQ2rvLF.js";
1
+ import { t as zalouserPlugin } from "./channel-CoDRB2DN.js";
2
2
  export { zalouserPlugin };
@@ -1,11 +1,12 @@
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-Cblh09JJ.js";
3
- import { a as sendReactionZalouser, i as sendMessageZalouser } from "./send-C04FGz0_.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-l0Tyf2K3.js";
3
+ import { a as sendReactionZalouser, i as sendMessageZalouser } from "./send-Be8iWEWq.js";
4
+ import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
4
5
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
5
6
  //#region extensions/zalouser/src/probe.ts
6
7
  async function probeZalouser(profile, timeoutMs) {
7
8
  try {
8
- const user = timeoutMs ? await Promise.race([getZaloUserInfo(profile), new Promise((resolve) => setTimeout(() => resolve(null), Math.max(timeoutMs, 1e3)))]) : await getZaloUserInfo(profile);
9
+ const user = timeoutMs ? await Promise.race([getZaloUserInfo(profile), new Promise((resolve) => setTimeout(() => resolve(null), resolveTimerTimeoutMs(timeoutMs, 1e3, 1e3)))]) : await getZaloUserInfo(profile);
9
10
  if (!user) return {
10
11
  ok: false,
11
12
  error: "Not authenticated"
@@ -1,5 +1,5 @@
1
- import { n as zalouserSetupWizard } from "./setup-surface-W1VQqpf0.js";
2
- import { r as zalouserSetupAdapter, t as createZalouserPluginBase } from "./shared-BnQwl7bD.js";
1
+ import { n as zalouserSetupWizard } from "./setup-surface-zKvcbJnA.js";
2
+ import { r as zalouserSetupAdapter, t as createZalouserPluginBase } from "./shared-Rt4cSzmB.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-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";
1
+ import { a as formatZalouserMessageSidFull, c as findZalouserGroupEntry, l as isZalouserGroupEntryAllowed, o as resolveZalouserMessageSid, r as getZalouserRuntime, s as buildZalouserGroupCandidates } from "./channel-CoDRB2DN.js";
2
+ import { o as listZaloGroups, r as listZaloFriends, u as resolveZaloGroupContext, v as startZaloListener } from "./zalo-js-l0Tyf2K3.js";
3
+ import { i as sendMessageZalouser, o as sendSeenZalouser, s as sendTypingZalouser, t as sendDeliveredZalouser } from "./send-Be8iWEWq.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";
@@ -1,9 +1,9 @@
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";
1
+ import { n as zalouserSetupWizard } from "./setup-surface-zKvcbJnA.js";
2
+ import { n as createZalouserSetupWizardProxy, r as zalouserSetupAdapter } from "./shared-Rt4cSzmB.js";
3
+ import { i as setZalouserRuntime, t as zalouserPlugin } from "./channel-CoDRB2DN.js";
4
4
  import { n as isZalouserMutableGroupEntry, t as collectZalouserSecurityAuditFindings } from "./security-audit-DhK2UscX.js";
5
- import { t as zalouserSetupPlugin } from "./channel.setup-Bf53Feb_.js";
6
- import { t as createZalouserTool } from "./api-DhDa8sPp.js";
5
+ import { t as zalouserSetupPlugin } from "./channel.setup-z4cyh1zU.js";
6
+ import { t as createZalouserTool } from "./api-DNQas3Fj.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-Cblh09JJ.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-l0Tyf2K3.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-Bf53Feb_.js";
1
+ import { t as zalouserSetupPlugin } from "./channel.setup-z4cyh1zU.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-BnQwl7bD.js";
2
- import { b as waitForZaloQrLogin, c as logoutZaloProfile, d as resolveZaloGroupsByEntries, l as resolveZaloAllowFromEntries, y as startZaloQrLogin } from "./zalo-js-Cblh09JJ.js";
1
+ import { d as checkZcaAuthenticated, f as listZalouserAccountIds, i as writeQrDataUrlToTempFile, m as resolveZalouserAccountSync, p as resolveDefaultZalouserAccountId } from "./shared-Rt4cSzmB.js";
2
+ import { b as waitForZaloQrLogin, c as logoutZaloProfile, d as resolveZaloGroupsByEntries, l as resolveZaloAllowFromEntries, y as startZaloQrLogin } from "./zalo-js-l0Tyf2K3.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-UypUaEfF.js");
22
+ zalouserAccountsRuntimePromise ??= import("./accounts.runtime-D7JXF5Ud.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 { asFiniteNumberInRange, parseStrictFiniteNumber, parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
8
+ import { asFiniteNumberInRange, isFutureDateTimestampMs, parseStrictFiniteNumber, parseStrictNonNegativeInteger, resolveExpiresAtMsFromDurationMs, resolveTimerTimeoutMs } 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";
@@ -555,7 +555,7 @@ function readCachedGroupContext(profile, groupId) {
555
555
  const key = makeGroupContextCacheKey(profile, groupId);
556
556
  const cached = groupContextCache.get(key);
557
557
  if (!cached) return null;
558
- if (cached.expiresAt <= Date.now()) {
558
+ if (!isFutureDateTimestampMs(cached.expiresAt)) {
559
559
  groupContextCache.delete(key);
560
560
  return null;
561
561
  }
@@ -565,7 +565,7 @@ function readCachedGroupContext(profile, groupId) {
565
565
  }
566
566
  function trimGroupContextCache(now) {
567
567
  for (const [key, value] of groupContextCache) {
568
- if (value.expiresAt > now) continue;
568
+ if (isFutureDateTimestampMs(value.expiresAt, { nowMs: now })) continue;
569
569
  groupContextCache.delete(key);
570
570
  }
571
571
  while (groupContextCache.size > GROUP_CONTEXT_CACHE_MAX_ENTRIES) {
@@ -578,9 +578,11 @@ function writeCachedGroupContext(profile, context) {
578
578
  const now = Date.now();
579
579
  const key = makeGroupContextCacheKey(profile, context.groupId);
580
580
  if (groupContextCache.has(key)) groupContextCache.delete(key);
581
+ const expiresAt = resolveExpiresAtMsFromDurationMs(GROUP_CONTEXT_CACHE_TTL_MS, { nowMs: now });
582
+ if (expiresAt === void 0) return;
581
583
  groupContextCache.set(key, {
582
584
  value: context,
583
- expiresAt: now + GROUP_CONTEXT_CACHE_TTL_MS
585
+ expiresAt
584
586
  });
585
587
  trimGroupContextCache(now);
586
588
  }
@@ -1073,7 +1075,7 @@ async function startZaloQrLogin(params) {
1073
1075
  }
1074
1076
  const active = activeQrLogins.get(profile);
1075
1077
  if (!active) return { message: "Failed to initialize Zalo QR login." };
1076
- const timeoutMs = Math.max(params.timeoutMs ?? DEFAULT_QR_START_TIMEOUT_MS, 3e3);
1078
+ const timeoutMs = resolveTimerTimeoutMs(params.timeoutMs, DEFAULT_QR_START_TIMEOUT_MS, 3e3);
1077
1079
  const deadline = Date.now() + timeoutMs;
1078
1080
  while (Date.now() < deadline) {
1079
1081
  if (active.error) {
@@ -1109,7 +1111,7 @@ async function waitForZaloQrLogin(params) {
1109
1111
  message: "QR login expired. Start again to generate a fresh QR code."
1110
1112
  };
1111
1113
  }
1112
- const timeoutMs = Math.max(params.timeoutMs ?? DEFAULT_QR_WAIT_TIMEOUT_MS, 1e3);
1114
+ const timeoutMs = resolveTimerTimeoutMs(params.timeoutMs, DEFAULT_QR_WAIT_TIMEOUT_MS, 1e3);
1113
1115
  const deadline = Date.now() + timeoutMs;
1114
1116
  while (Date.now() < deadline) {
1115
1117
  if (active.error) {
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@openclaw/zalouser",
3
- "version": "2026.5.28-beta.4",
3
+ "version": "2026.5.30-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/zalouser",
9
- "version": "2026.5.28-beta.4",
9
+ "version": "2026.5.30-beta.1",
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.4"
16
+ "openclaw": ">=2026.5.30-beta.1"
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.4",
3
+ "version": "2026.5.30-beta.1",
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.4"
16
+ "openclaw": ">=2026.5.30-beta.1"
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.4"
53
+ "pluginApi": ">=2026.5.30-beta.1"
54
54
  },
55
55
  "build": {
56
- "openclawVersion": "2026.5.28-beta.4"
56
+ "openclawVersion": "2026.5.30-beta.1"
57
57
  },
58
58
  "release": {
59
59
  "publishToClawHub": true,