@openclaw/zalo 2026.9.3 → 2026.9.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,4 +1,4 @@
1
- import { t as sendMessageZalo } from "./send-t9-KoXB7.js";
1
+ import { t as sendMessageZalo } from "./send-CIMDH1gH.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-Dqyf4d6u.js";
2
- import { t as zaloPlugin } from "./channel-CZH37RQ2.js";
1
+ import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-CCMLSh4Q.js";
2
+ import { t as zaloPlugin } from "./channel-mgXGK008.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 isZaloAccountConfigured, d as resolveZaloAccount, i as zaloSetupContract, l as listZaloAccountIds, p as buildSecretInputSchema, s as inspectZaloAccount, t as createZaloSetupWizardProxy, u as resolveDefaultZaloAccountId } from "./setup-core-Dqyf4d6u.js";
1
+ import { c as isZaloAccountConfigured, d as resolveZaloAccount, i as zaloSetupContract, l as listZaloAccountIds, p as buildSecretInputSchema, s as inspectZaloAccount, t as createZaloSetupWizardProxy, u as resolveDefaultZaloAccountId } from "./setup-core-CCMLSh4Q.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-WFgEmWkO.js"), "zaloActionsRuntime");
27
+ const loadZaloActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-2MsIGd0H.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-BqEJimCD.js"));
190
- const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface-BFvZntBt.js").then((n) => n.t)).zaloSetupWizard);
189
+ const loadZaloChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-aikbF-5l.js"));
190
+ const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface--Y84d_LY.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({
@@ -1,2 +1,2 @@
1
- import { t as zaloPlugin } from "./channel-CZH37RQ2.js";
1
+ import { t as zaloPlugin } from "./channel-mgXGK008.js";
2
2
  export { zaloPlugin };
@@ -1,5 +1,5 @@
1
- import { m as normalizeSecretInputString } from "./setup-core-Dqyf4d6u.js";
2
- import { a as getMe, n as resolveZaloProxyFetch, r as ZaloApiError, t as sendMessageZalo } from "./send-t9-KoXB7.js";
1
+ import { m as normalizeSecretInputString } from "./setup-core-CCMLSh4Q.js";
2
+ import { a as getMe, n as resolveZaloProxyFetch, r as ZaloApiError, t as sendMessageZalo } from "./send-CIMDH1gH.js";
3
3
  import { createAccountStatusSink } from "openclaw/plugin-sdk/channel-outbound";
4
4
  import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
5
5
  //#region extensions/zalo/src/probe.ts
@@ -62,7 +62,7 @@ async function startZaloGatewayAccount(ctx) {
62
62
  setStatus: ctx.setStatus
63
63
  });
64
64
  ctx.log?.info(`[${account.accountId}] starting provider${zaloBotLabel} mode=${mode}`);
65
- const { monitorZaloProvider } = await import("./monitor-CTyUtP5Q.js");
65
+ const { monitorZaloProvider } = await import("./monitor-CXlZtCk9.js");
66
66
  return monitorZaloProvider({
67
67
  token,
68
68
  account,
@@ -1,6 +1,6 @@
1
1
  import { n as resolveZaloRuntimeGroupPolicy, t as normalizeZaloAllowEntry } from "./group-access-8qHRzDHx.js";
2
2
  import { t as getZaloRuntime } from "./runtime-Dfhzt7qb.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-t9-KoXB7.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-CIMDH1gH.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";
@@ -173,8 +173,8 @@ function resolveZaloTimestampMs(date) {
173
173
  if (!date) return;
174
174
  return date >= UNIX_MILLISECONDS_THRESHOLD ? date : date * 1e3;
175
175
  }
176
- const loadZaloWebhookRuntime = createLazyRuntimeNamedExport(() => import("./monitor.webhook-DwzCNZOX.js"), "zaloWebhookRuntime");
177
- const loadZaloWebhookIngressRuntime = createLazyRuntimeNamedExport(() => import("./webhook-spool-CwqUe2i6.js"), "zaloWebhookIngressRuntime");
176
+ const loadZaloWebhookRuntime = createLazyRuntimeNamedExport(() => import("./monitor.webhook-DOCUBaE5.js"), "zaloWebhookRuntime");
177
+ const loadZaloWebhookIngressRuntime = createLazyRuntimeNamedExport(() => import("./webhook-spool-CPxf_Kwe.js"), "zaloWebhookIngressRuntime");
178
178
  const loadZaloWebhookModule = createLazyRuntimeModule(async () => ({
179
179
  ...await loadZaloWebhookRuntime(),
180
180
  ...await loadZaloWebhookIngressRuntime()
@@ -1,5 +1,5 @@
1
1
  import { WEBHOOK_ANOMALY_COUNTER_DEFAULTS, WEBHOOK_RATE_LIMIT_DEFAULTS, applyBasicWebhookRequestGuards, createFixedWindowRateLimiter, createWebhookAnomalyTracker, registerWebhookTarget, registerWebhookTargetWithPluginRoute, resolveClientIp, resolveWebhookTargetWithAuthOrRejectSync, withResolvedWebhookRequestPipeline } from "./runtime-api.js";
2
- import { ZaloWebhookPayloadError } from "./webhook-spool-CwqUe2i6.js";
2
+ import { ZaloWebhookPayloadError } from "./webhook-spool-CPxf_Kwe.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
@@ -1,4 +1,4 @@
1
- import { d as resolveZaloAccount, f as resolveZaloToken } from "./setup-core-Dqyf4d6u.js";
1
+ import { d as resolveZaloAccount, f as resolveZaloToken } from "./setup-core-CCMLSh4Q.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";
package/dist/setup-api.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-Dqyf4d6u.js";
1
+ import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-CCMLSh4Q.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
@@ -6,7 +6,7 @@ import { tryReadSecretFileSync } from "openclaw/plugin-sdk/secret-file-runtime";
6
6
  import { buildSecretInputSchema, normalizeSecretInputString, resolveSecretInputString } from "openclaw/plugin-sdk/secret-input";
7
7
  import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
8
8
  import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
9
- import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, createDelegatedSetupWizardProxy, createPatchedAccountSetupAdapter, createSetupInputPresenceValidator, createSetupTranslator, formatDocsLink, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1, patchScopedAccountConfig, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
9
+ import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, createDelegatedSetupWizardProxy, createPatchedAccountSetupAdapter, createSetupInputPresenceValidator, createSetupTranslator, formatDocsLink, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1, patchScopedAccountConfig, patchTopLevelChannelConfigSection, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
10
10
  //#region extensions/zalo/src/token.ts
11
11
  function readTokenFromFile(tokenFile, configPath) {
12
12
  const result = tryReadSecretFileSync(tokenFile, "Zalo token file", { rejectSymlink: true }, { configPath });
@@ -155,38 +155,24 @@ async function promptZaloAllowFrom(params) {
155
155
  }
156
156
  })).trim();
157
157
  const unique = mergeAllowFromEntries(existingAllowFrom, [normalized]);
158
- if (accountId === DEFAULT_ACCOUNT_ID$1) return {
159
- ...cfg,
160
- channels: {
161
- ...cfg.channels,
162
- zalo: {
163
- ...cfg.channels?.zalo,
164
- enabled: true,
158
+ const currentAccount = cfg.channels?.zalo?.accounts?.[accountId];
159
+ return patchTopLevelChannelConfigSection({
160
+ cfg,
161
+ channel: "zalo",
162
+ enabled: true,
163
+ patch: accountId === DEFAULT_ACCOUNT_ID$1 ? {
164
+ dmPolicy: "allowlist",
165
+ allowFrom: unique
166
+ } : { accounts: {
167
+ ...cfg.channels?.zalo?.accounts,
168
+ [accountId]: {
169
+ ...currentAccount,
170
+ enabled: currentAccount?.enabled ?? true,
165
171
  dmPolicy: "allowlist",
166
172
  allowFrom: unique
167
173
  }
168
- }
169
- };
170
- const currentAccount = cfg.channels?.zalo?.accounts?.[accountId];
171
- return {
172
- ...cfg,
173
- channels: {
174
- ...cfg.channels,
175
- zalo: {
176
- ...cfg.channels?.zalo,
177
- enabled: true,
178
- accounts: {
179
- ...cfg.channels?.zalo?.accounts,
180
- [accountId]: {
181
- ...currentAccount,
182
- enabled: currentAccount?.enabled ?? true,
183
- dmPolicy: "allowlist",
184
- allowFrom: unique
185
- }
186
- }
187
- }
188
- }
189
- };
174
+ } }
175
+ });
190
176
  }
191
177
  //#endregion
192
178
  //#region extensions/zalo/src/setup-core.ts
@@ -1,5 +1,5 @@
1
- import { a as noteZaloTokenHelp, n as zaloDmPolicy, o as promptZaloAllowFrom, s as inspectZaloAccount } from "./setup-core-Dqyf4d6u.js";
2
- import { DEFAULT_ACCOUNT_ID, buildSingleChannelSecretPromptState, createSetupTranslator, createStandardChannelSetupStatus, hasConfiguredSecretInput, promptSingleChannelSecretInput, runSingleChannelSecretStep } from "openclaw/plugin-sdk/setup";
1
+ import { a as noteZaloTokenHelp, n as zaloDmPolicy, o as promptZaloAllowFrom, s as inspectZaloAccount } from "./setup-core-CCMLSh4Q.js";
2
+ import { DEFAULT_ACCOUNT_ID, buildSingleChannelSecretPromptState, createSetupTranslator, createStandardChannelSetupStatus, hasConfiguredSecretInput, patchTopLevelChannelConfigSection, promptSingleChannelSecretInput, runSingleChannelSecretStep } from "openclaw/plugin-sdk/setup";
3
3
  //#region \0rolldown/runtime.js
4
4
  var __defProp = Object.defineProperty;
5
5
  var __exportAll = (all, no_symbols) => {
@@ -18,60 +18,32 @@ const t = createSetupTranslator();
18
18
  const channel = "zalo";
19
19
  function setZaloUpdateMode(cfg, accountId, mode, webhookUrl, webhookSecret, webhookPath) {
20
20
  const isDefault = accountId === DEFAULT_ACCOUNT_ID;
21
+ const next = { ...isDefault ? cfg.channels?.zalo : cfg.channels?.zalo?.accounts?.[accountId] };
21
22
  if (mode === "polling") {
22
- if (isDefault) {
23
- const { webhookUrl: _url, webhookSecret: _secret, webhookPath: _path, ...rest } = cfg.channels?.zalo ?? {};
24
- return {
25
- ...cfg,
26
- channels: {
27
- ...cfg.channels,
28
- zalo: rest
29
- }
30
- };
31
- }
23
+ delete next.webhookUrl;
24
+ delete next.webhookSecret;
25
+ delete next.webhookPath;
26
+ } else {
27
+ next.webhookUrl = webhookUrl;
28
+ next.webhookSecret = webhookSecret;
29
+ next.webhookPath = webhookPath;
30
+ }
31
+ let patch = next;
32
+ if (!isDefault) {
32
33
  const accounts = { ...cfg.channels?.zalo?.accounts };
33
- const { webhookUrl: _url, webhookSecret: _secret, webhookPath: _path, ...rest } = accounts[accountId] ?? {};
34
- accounts[accountId] = rest;
35
- return {
36
- ...cfg,
37
- channels: {
38
- ...cfg.channels,
39
- zalo: {
40
- ...cfg.channels?.zalo,
41
- accounts
42
- }
43
- }
44
- };
34
+ accounts[accountId] = next;
35
+ patch = { accounts };
45
36
  }
46
- if (isDefault) return {
47
- ...cfg,
48
- channels: {
49
- ...cfg.channels,
50
- zalo: {
51
- ...cfg.channels?.zalo,
52
- webhookUrl,
53
- webhookSecret,
54
- webhookPath
55
- }
56
- }
57
- };
58
- const accounts = { ...cfg.channels?.zalo?.accounts };
59
- accounts[accountId] = {
60
- ...accounts[accountId],
61
- webhookUrl,
62
- webhookSecret,
63
- webhookPath
64
- };
65
- return {
66
- ...cfg,
67
- channels: {
68
- ...cfg.channels,
69
- zalo: {
70
- ...cfg.channels?.zalo,
71
- accounts
72
- }
73
- }
74
- };
37
+ return patchTopLevelChannelConfigSection({
38
+ cfg,
39
+ channel,
40
+ clearFields: isDefault && mode === "polling" ? [
41
+ "webhookUrl",
42
+ "webhookSecret",
43
+ "webhookPath"
44
+ ] : void 0,
45
+ patch
46
+ });
75
47
  }
76
48
  const zaloSetupWizard = {
77
49
  channel,
@@ -117,44 +89,25 @@ const zaloSetupWizard = {
117
89
  inputPrompt: t("wizard.zalo.tokenInput"),
118
90
  preferredEnvVar: "ZALO_BOT_TOKEN",
119
91
  onMissingConfigured: async () => await noteZaloTokenHelp(prompter),
120
- applyUseEnv: async (currentCfg) => accountId === DEFAULT_ACCOUNT_ID ? {
121
- ...currentCfg,
122
- channels: {
123
- ...currentCfg.channels,
124
- zalo: {
125
- ...currentCfg.channels?.zalo,
126
- enabled: true
127
- }
128
- }
129
- } : currentCfg,
130
- applySet: async (currentCfg, value) => accountId === DEFAULT_ACCOUNT_ID ? {
131
- ...currentCfg,
132
- channels: {
133
- ...currentCfg.channels,
134
- zalo: {
135
- ...currentCfg.channels?.zalo,
92
+ applyUseEnv: async (currentCfg) => accountId === DEFAULT_ACCOUNT_ID ? patchTopLevelChannelConfigSection({
93
+ cfg: currentCfg,
94
+ channel,
95
+ enabled: true,
96
+ patch: {}
97
+ }) : currentCfg,
98
+ applySet: async (currentCfg, value) => patchTopLevelChannelConfigSection({
99
+ cfg: currentCfg,
100
+ channel,
101
+ enabled: true,
102
+ patch: accountId === DEFAULT_ACCOUNT_ID ? { botToken: value } : { accounts: {
103
+ ...currentCfg.channels?.zalo?.accounts,
104
+ [accountId]: {
105
+ ...currentCfg.channels?.zalo?.accounts?.[accountId],
136
106
  enabled: true,
137
107
  botToken: value
138
108
  }
139
- }
140
- } : {
141
- ...currentCfg,
142
- channels: {
143
- ...currentCfg.channels,
144
- zalo: {
145
- ...currentCfg.channels?.zalo,
146
- enabled: true,
147
- accounts: {
148
- ...currentCfg.channels?.zalo?.accounts,
149
- [accountId]: {
150
- ...currentCfg.channels?.zalo?.accounts?.[accountId],
151
- enabled: true,
152
- botToken: value
153
- }
154
- }
155
- }
156
- }
157
- }
109
+ } }
110
+ })
158
111
  })).cfg;
159
112
  if (await prompter.confirm({
160
113
  message: t("wizard.zalo.webhookModePrompt"),
@@ -1,3 +1,3 @@
1
- import { n as zaloSetupWizard } from "./setup-surface-BFvZntBt.js";
2
- import { r as zaloSetupAdapter } from "./setup-core-Dqyf4d6u.js";
1
+ import { n as zaloSetupWizard } from "./setup-surface--Y84d_LY.js";
2
+ import { r as zaloSetupAdapter } from "./setup-core-CCMLSh4Q.js";
3
3
  export { zaloSetupAdapter, zaloSetupWizard };
@@ -1,5 +1,5 @@
1
1
  import { t as getZaloRuntime } from "./runtime-Dfhzt7qb.js";
2
- import { r as ZaloApiError } from "./send-t9-KoXB7.js";
2
+ import { r as ZaloApiError } from "./send-CIMDH1gH.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";
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "id": "zalo",
3
+ "categories": [
4
+ "channels"
5
+ ],
3
6
  "doctorContract": {},
4
7
  "name": "Zalo",
5
8
  "description": "OpenClaw Zalo channel plugin for bot and webhook chats.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/zalo",
3
- "version": "2026.9.3",
3
+ "version": "2026.9.4",
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.9.3"
11
+ "openclaw": ">=2026.9.4"
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.9.3"
85
+ "pluginApi": ">=2026.9.4"
86
86
  },
87
87
  "build": {
88
- "openclawVersion": "2026.9.3"
88
+ "openclawVersion": "2026.9.4"
89
89
  },
90
90
  "release": {
91
91
  "publishToClawHub": true,