@openclaw/zalo 2026.8.1 → 2026.8.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.
@@ -1,4 +1,4 @@
1
- import { t as sendMessageZalo } from "./send-Cb7ITYME.js";
1
+ import { t as sendMessageZalo } from "./send-w8RLKyQx.js";
2
2
  //#region extensions/zalo/src/actions.runtime.ts
3
3
  const zaloActionsRuntime = { sendMessageZalo };
4
4
  //#endregion
package/dist/api.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-CcCJ1E26.js";
2
- import { t as zaloPlugin } from "./channel-A8nLvhBc.js";
1
+ import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-DgD3ai3p.js";
2
+ import { t as zaloPlugin } from "./channel-D4w53_mh.js";
3
3
  import { n as resolveZaloRuntimeGroupPolicy } from "./group-access-8qHRzDHx.js";
4
4
  import { zaloSetupWizard } from "./setup-api.js";
5
5
  export { createZaloSetupWizardProxy, resolveZaloRuntimeGroupPolicy, zaloDmPolicy, zaloPlugin, zaloSetupAdapter, zaloSetupWizard };
@@ -1,4 +1,4 @@
1
- import { c as inspectZaloAccount, d as resolveZaloAccount, i as zaloSetupContract, l as listZaloAccountIds, p as buildSecretInputSchema, t as createZaloSetupWizardProxy, u as resolveDefaultZaloAccountId } from "./setup-core-CcCJ1E26.js";
1
+ import { c as inspectZaloAccount, d as resolveDefaultZaloAccountId, f as resolveZaloAccount, i as zaloSetupContract, l as isZaloAccountConfigured, m as buildSecretInputSchema, t as createZaloSetupWizardProxy, u as listZaloAccountIds } from "./setup-core-DgD3ai3p.js";
2
2
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-Cpsqe5Cv.js";
3
3
  import { describeWebhookAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
4
4
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
@@ -24,7 +24,7 @@ import { z } from "zod";
24
24
  import { buildChannelOutboundSessionRoute, stripChannelTargetPrefix, stripTargetKindPrefix } from "openclaw/plugin-sdk/core";
25
25
  import { coerceStatusIssueAccountId, readStatusIssueFields } from "openclaw/plugin-sdk/extension-shared";
26
26
  //#region extensions/zalo/src/actions.ts
27
- const loadZaloActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-3ZRHK2SE.js"), "zaloActionsRuntime");
27
+ const loadZaloActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-Bw8qKwdO.js"), "zaloActionsRuntime");
28
28
  const providerId = "zalo";
29
29
  const ZALO_ACTIONS = /* @__PURE__ */ new Set(["send"]);
30
30
  function listEnabledAccounts(cfg, accountId) {
@@ -186,8 +186,8 @@ function looksLikeZaloChatId(raw, normalized) {
186
186
  const target = normalizeZaloMessagingTarget(normalized ?? raw);
187
187
  return Boolean(target);
188
188
  }
189
- const loadZaloChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-gH4VQVIN.js"));
190
- const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface-CIpp_MDf.js").then((n) => n.t)).zaloSetupWizard);
189
+ const loadZaloChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-CcYsZxPw.js"));
190
+ const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface-D5xgPinc.js").then((n) => n.t)).zaloSetupWizard);
191
191
  const zaloTextChunkLimit = 2e3;
192
192
  async function sendZaloDelivery(ctx) {
193
193
  const result = await (await loadZaloChannelRuntime()).sendZaloText({
@@ -220,9 +220,6 @@ const zaloMessageAdapter = defineChannelMessageAdapter({
220
220
  media: sendZaloDelivery
221
221
  }
222
222
  });
223
- function isZaloAccountConfigured(account) {
224
- return account.tokenStatus ? account.tokenStatus !== "missing" : Boolean(account.token?.trim());
225
- }
226
223
  const zaloConfigAdapter = createScopedChannelConfigAdapter({
227
224
  sectionKey: "zalo",
228
225
  listAccountIds: listZaloAccountIds,
@@ -1,2 +1,2 @@
1
- import { t as zaloPlugin } from "./channel-A8nLvhBc.js";
1
+ import { t as zaloPlugin } from "./channel-D4w53_mh.js";
2
2
  export { zaloPlugin };
@@ -1,6 +1,6 @@
1
- import { m as normalizeSecretInputString } from "./setup-core-CcCJ1E26.js";
1
+ import { h as normalizeSecretInputString } from "./setup-core-DgD3ai3p.js";
2
2
  import { n as PAIRING_APPROVED_MESSAGE } from "./runtime-api-CN6fYNQK.js";
3
- import { a as getMe, n as resolveZaloProxyFetch, r as ZaloApiError, t as sendMessageZalo } from "./send-Cb7ITYME.js";
3
+ import { a as getMe, n as resolveZaloProxyFetch, r as ZaloApiError, t as sendMessageZalo } from "./send-w8RLKyQx.js";
4
4
  import { createAccountStatusSink } from "openclaw/plugin-sdk/channel-outbound";
5
5
  import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
6
6
  //#region extensions/zalo/src/probe.ts
@@ -35,7 +35,7 @@ async function probeZalo(token, timeoutMs = 5e3, fetcher) {
35
35
  //#endregion
36
36
  //#region extensions/zalo/src/channel.runtime.ts
37
37
  async function notifyZaloPairingApproval(params) {
38
- const { resolveZaloAccount } = await import("./setup-core-CcCJ1E26.js").then((n) => n.s);
38
+ const { resolveZaloAccount } = await import("./setup-core-DgD3ai3p.js").then((n) => n.s);
39
39
  const account = resolveZaloAccount({ cfg: params.cfg });
40
40
  if (!account.token) throw new Error("Zalo token not configured");
41
41
  await sendMessageZalo(params.id, PAIRING_APPROVED_MESSAGE, { token: account.token });
@@ -69,7 +69,7 @@ async function startZaloGatewayAccount(ctx) {
69
69
  setStatus: ctx.setStatus
70
70
  });
71
71
  ctx.log?.info(`[${account.accountId}] starting provider${zaloBotLabel} mode=${mode}`);
72
- const { monitorZaloProvider } = await import("./monitor-ado96nMT.js");
72
+ const { monitorZaloProvider } = await import("./monitor-BjoKVU7z.js");
73
73
  return monitorZaloProvider({
74
74
  token,
75
75
  account,
@@ -1,6 +1,6 @@
1
1
  import { n as resolveZaloRuntimeGroupPolicy, t as normalizeZaloAllowEntry } from "./group-access-8qHRzDHx.js";
2
2
  import { X as getZaloRuntime } from "./runtime-api-CN6fYNQK.js";
3
- import { c as sendChatAction, d as setWebhook, f as ZALO_OUTBOUND_MEDIA_TTL_MS, i as deleteWebhook, l as sendMessage, n as resolveZaloProxyFetch, o as getUpdates, r as ZaloApiError, s as getWebhookInfo, u as sendPhoto } from "./send-Cb7ITYME.js";
3
+ import { c as sendChatAction, d as setWebhook, f as ZALO_OUTBOUND_MEDIA_TTL_MS, i as deleteWebhook, l as sendMessage, n as resolveZaloProxyFetch, o as getUpdates, r as ZaloApiError, s as getWebhookInfo, u as sendPhoto } from "./send-w8RLKyQx.js";
4
4
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
5
5
  import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
6
6
  import { deliverTextOrMediaReply, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
@@ -174,8 +174,8 @@ function resolveZaloTimestampMs(date) {
174
174
  if (!date) return;
175
175
  return date >= UNIX_MILLISECONDS_THRESHOLD ? date : date * 1e3;
176
176
  }
177
- const loadZaloWebhookRuntime = createLazyRuntimeNamedExport(() => import("./monitor.webhook-CcTwt1dC.js"), "zaloWebhookRuntime");
178
- const loadZaloWebhookIngressRuntime = createLazyRuntimeNamedExport(() => import("./webhook-spool-DPgnFGD0.js"), "zaloWebhookIngressRuntime");
177
+ const loadZaloWebhookRuntime = createLazyRuntimeNamedExport(() => import("./monitor.webhook-B5RaWvFf.js"), "zaloWebhookRuntime");
178
+ const loadZaloWebhookIngressRuntime = createLazyRuntimeNamedExport(() => import("./webhook-spool-2fDB_7Qy.js"), "zaloWebhookIngressRuntime");
179
179
  const loadZaloWebhookModule = createLazyRuntimeModule(async () => ({
180
180
  ...await loadZaloWebhookRuntime(),
181
181
  ...await loadZaloWebhookIngressRuntime()
@@ -323,9 +323,7 @@ async function processUpdate(params) {
323
323
  case "message.sticker.received":
324
324
  logVerbose(core, runtime, `[${account.accountId}] Received sticker from ${message.from.id}`);
325
325
  break;
326
- case "message.unsupported.received":
327
- logVerbose(core, runtime, `[${account.accountId}] Received unsupported message type from ${message.from.id}`);
328
- break;
326
+ case "message.unsupported.received": logVerbose(core, runtime, `[${account.accountId}] Received unsupported message type from ${message.from.id}`);
329
327
  }
330
328
  }
331
329
  async function handleTextMessage(params) {
@@ -677,15 +675,16 @@ async function deliverZaloReply(params) {
677
675
  });
678
676
  } catch (error) {
679
677
  if (!visibleReplySent) throw error;
678
+ const receipt = createMessageReceiptFromOutboundResults({
679
+ results: acceptedMessageIds.map((messageId) => ({
680
+ channel: "zalo",
681
+ messageId
682
+ })),
683
+ kind: reply.hasMedia ? "media" : "text"
684
+ });
680
685
  throw createChannelPartialDeliveryError(error, {
681
686
  messageIds: acceptedMessageIds,
682
- receipt: createMessageReceiptFromOutboundResults({
683
- results: acceptedMessageIds.map((messageId) => ({
684
- channel: "zalo",
685
- messageId
686
- })),
687
- kind: reply.hasMedia ? "media" : "text"
688
- }),
687
+ receipt,
689
688
  visibleReplySent: true
690
689
  });
691
690
  }
@@ -1,5 +1,5 @@
1
1
  import { L as registerWebhookTarget, R as registerWebhookTargetWithPluginRoute, U as resolveWebhookTargetWithAuthOrRejectSync, Y as withResolvedWebhookRequestPipeline, i as WEBHOOK_RATE_LIMIT_DEFAULTS, r as WEBHOOK_ANOMALY_COUNTER_DEFAULTS, s as applyBasicWebhookRequestGuards, v as createFixedWindowRateLimiter, y as createWebhookAnomalyTracker, z as resolveClientIp } from "./runtime-api-CN6fYNQK.js";
2
- import { ZaloWebhookPayloadError } from "./webhook-spool-DPgnFGD0.js";
2
+ import { ZaloWebhookPayloadError } from "./webhook-spool-2fDB_7Qy.js";
3
3
  import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
4
4
  import { readWebhookBodyOrReject } from "openclaw/plugin-sdk/webhook-request-guards";
5
5
  //#region extensions/zalo/src/monitor.webhook.ts
@@ -90,7 +90,7 @@ async function handleZaloWebhookRequest(req, res) {
90
90
  const body = await readWebhookBodyOrReject({
91
91
  req,
92
92
  res,
93
- maxBytes: 1024 * 1024,
93
+ maxBytes: 1048576,
94
94
  timeoutMs: 3e4,
95
95
  invalidBodyMessage: "Bad Request"
96
96
  });
@@ -1,4 +1,4 @@
1
- import { d as resolveZaloAccount, f as resolveZaloToken } from "./setup-core-CcCJ1E26.js";
1
+ import { f as resolveZaloAccount, p as resolveZaloToken } from "./setup-core-DgD3ai3p.js";
2
2
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
3
3
  import { stripChannelTargetPrefix, stripTargetKindPrefix } from "openclaw/plugin-sdk/core";
4
4
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -9,7 +9,7 @@ import { resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-runtim
9
9
  import { makeProxyFetch } from "openclaw/plugin-sdk/fetch-runtime";
10
10
  //#region extensions/zalo/src/timeouts.ts
11
11
  const ZALO_DEFAULT_REQUEST_TIMEOUT_MS = 3e4;
12
- const ZALO_OUTBOUND_MEDIA_TTL_MS = 2 * 6e4;
12
+ const ZALO_OUTBOUND_MEDIA_TTL_MS = 12e4;
13
13
  const ZALO_SEND_PHOTO_REQUEST_TIMEOUT_MS = 15e4;
14
14
  //#endregion
15
15
  //#region extensions/zalo/src/api.ts
package/dist/setup-api.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-CcCJ1E26.js";
1
+ import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-DgD3ai3p.js";
2
2
  import { n as resolveZaloRuntimeGroupPolicy } from "./group-access-8qHRzDHx.js";
3
3
  import { loadBundledEntryExportSync } from "openclaw/plugin-sdk/channel-entry-contract";
4
4
  //#region extensions/zalo/setup-api.ts
@@ -93,6 +93,7 @@ function resolveZaloToken(config, accountId, options) {
93
93
  //#region extensions/zalo/src/accounts.ts
94
94
  var accounts_exports = /* @__PURE__ */ __exportAll({
95
95
  inspectZaloAccount: () => inspectZaloAccount,
96
+ isZaloAccountConfigured: () => isZaloAccountConfigured,
96
97
  listZaloAccountIds: () => listZaloAccountIds,
97
98
  resolveDefaultZaloAccountId: () => resolveDefaultZaloAccountId,
98
99
  resolveZaloAccount: () => resolveZaloAccount
@@ -129,10 +130,19 @@ function resolveZaloAccount(params) {
129
130
  });
130
131
  }
131
132
  function inspectZaloAccount(params) {
132
- return resolveZaloAccountWithMode({
133
+ const account = resolveZaloAccountWithMode({
133
134
  ...params,
134
135
  mode: "inspect"
135
136
  });
137
+ return {
138
+ ...account,
139
+ configured: isZaloAccountConfigured(account),
140
+ mode: account.config.webhookUrl ? "webhook" : "polling",
141
+ dmPolicy: account.config.dmPolicy ?? "pairing"
142
+ };
143
+ }
144
+ function isZaloAccountConfigured(account) {
145
+ return account.tokenStatus ? account.tokenStatus !== "missing" : Boolean(account.token?.trim());
136
146
  }
137
147
  //#endregion
138
148
  //#region extensions/zalo/src/setup-allow-from.ts
@@ -153,7 +163,7 @@ async function promptZaloAllowFrom(params) {
153
163
  cfg,
154
164
  accountId
155
165
  }).config.allowFrom ?? [];
156
- const unique = mergeAllowFromEntries(existingAllowFrom, [(await prompter.text({
166
+ const normalized = (await prompter.text({
157
167
  message: t$1("wizard.zalo.allowFromPrompt"),
158
168
  placeholder: "123456789",
159
169
  initialValue: existingAllowFrom[0] ? String(existingAllowFrom[0]) : void 0,
@@ -162,7 +172,8 @@ async function promptZaloAllowFrom(params) {
162
172
  if (!raw) return t$1("common.required");
163
173
  if (!/^\d+$/.test(raw)) return t$1("wizard.zalo.allowFromNumeric");
164
174
  }
165
- })).trim()]);
175
+ })).trim();
176
+ const unique = mergeAllowFromEntries(existingAllowFrom, [normalized]);
166
177
  if (accountId === DEFAULT_ACCOUNT_ID$1) return {
167
178
  ...cfg,
168
179
  channels: {
@@ -283,4 +294,4 @@ function createZaloSetupWizardProxy(loadWizard) {
283
294
  });
284
295
  }
285
296
  //#endregion
286
- export { noteZaloTokenHelp as a, inspectZaloAccount as c, resolveZaloAccount as d, resolveZaloToken as f, __exportAll as h, zaloSetupContract as i, listZaloAccountIds as l, normalizeSecretInputString as m, zaloDmPolicy as n, promptZaloAllowFrom as o, buildSecretInputSchema as p, zaloSetupAdapter as r, accounts_exports as s, createZaloSetupWizardProxy as t, resolveDefaultZaloAccountId as u };
297
+ export { noteZaloTokenHelp as a, inspectZaloAccount as c, resolveDefaultZaloAccountId as d, resolveZaloAccount as f, __exportAll as g, normalizeSecretInputString as h, zaloSetupContract as i, isZaloAccountConfigured as l, buildSecretInputSchema as m, zaloDmPolicy as n, promptZaloAllowFrom as o, resolveZaloToken as p, zaloSetupAdapter as r, accounts_exports as s, createZaloSetupWizardProxy as t, listZaloAccountIds as u };
@@ -1,4 +1,4 @@
1
- import { a as noteZaloTokenHelp, c as inspectZaloAccount, h as __exportAll, n as zaloDmPolicy, o as promptZaloAllowFrom } from "./setup-core-CcCJ1E26.js";
1
+ import { a as noteZaloTokenHelp, c as inspectZaloAccount, g as __exportAll, n as zaloDmPolicy, o as promptZaloAllowFrom } from "./setup-core-DgD3ai3p.js";
2
2
  import { DEFAULT_ACCOUNT_ID, buildSingleChannelSecretPromptState, createSetupTranslator, createStandardChannelSetupStatus, hasConfiguredSecretInput, promptSingleChannelSecretInput, runSingleChannelSecretStep } from "openclaw/plugin-sdk/setup";
3
3
  //#region extensions/zalo/src/setup-surface.ts
4
4
  var setup_surface_exports = /* @__PURE__ */ __exportAll({ zaloSetupWizard: () => zaloSetupWizard });
@@ -1,3 +1,3 @@
1
- import { r as zaloSetupAdapter } from "./setup-core-CcCJ1E26.js";
2
- import { n as zaloSetupWizard } from "./setup-surface-CIpp_MDf.js";
1
+ import { r as zaloSetupAdapter } from "./setup-core-DgD3ai3p.js";
2
+ import { n as zaloSetupWizard } from "./setup-surface-D5xgPinc.js";
3
3
  export { zaloSetupAdapter, zaloSetupWizard };
@@ -1,5 +1,5 @@
1
1
  import { X as getZaloRuntime } from "./runtime-api-CN6fYNQK.js";
2
- import { r as ZaloApiError } from "./send-Cb7ITYME.js";
2
+ import { r as ZaloApiError } from "./send-w8RLKyQx.js";
3
3
  import { DEFAULT_INGRESS_ADOPTION_STALL_MS, DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS, bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor } from "openclaw/plugin-sdk/channel-outbound";
4
4
  import { normalizeNullableString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { z } from "zod";
@@ -125,8 +125,9 @@ function isZaloAuthenticationFailure(error) {
125
125
  return false;
126
126
  }
127
127
  function createZaloWebhookIngress(options) {
128
+ const queue = options.queue ?? getZaloRuntime().state.openChannelIngressQueue({ accountId: options.accountId });
128
129
  const monitor = createChannelIngressMonitor({
129
- queue: options.queue ?? getZaloRuntime().state.openChannelIngressQueue({ accountId: options.accountId }),
130
+ queue,
130
131
  inspect: (rawEvent) => inspectZaloWebhookEvent(rawEvent),
131
132
  payload: {
132
133
  storage: "raw-event",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/zalo",
3
- "version": "2026.8.1",
3
+ "version": "2026.8.2",
4
4
  "description": "OpenClaw Zalo channel plugin for bot and webhook chats.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "type": "module",
10
10
  "peerDependencies": {
11
- "openclaw": ">=2026.8.1"
11
+ "openclaw": ">=2026.8.2"
12
12
  },
13
13
  "peerDependenciesMeta": {
14
14
  "openclaw": {
@@ -82,10 +82,10 @@
82
82
  "minHostVersion": ">=2026.4.10"
83
83
  },
84
84
  "compat": {
85
- "pluginApi": ">=2026.8.1"
85
+ "pluginApi": ">=2026.8.2"
86
86
  },
87
87
  "build": {
88
- "openclawVersion": "2026.8.1"
88
+ "openclawVersion": "2026.8.2"
89
89
  },
90
90
  "release": {
91
91
  "publishToClawHub": true,