@openclaw/zalo 2026.5.14-beta.2 → 2026.5.16-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.
@@ -1,4 +1,4 @@
1
- import { t as sendMessageZalo } from "./send-DC0JAcxV.js";
1
+ import { t as sendMessageZalo } from "./send-CGzQv_0x.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-c-VVz39c.js";
2
- import { t as zaloPlugin } from "./channel-Ds8WfCFp.js";
1
+ import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-BCJZqQ4h.js";
2
+ import { t as zaloPlugin } from "./channel-CyjQoH_Y.js";
3
3
  import { n as resolveZaloRuntimeGroupPolicy } from "./group-access-Boqk-JNd.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 listZaloAccountIds, f as buildSecretInputSchema, l as resolveDefaultZaloAccountId, r as zaloSetupAdapter, s as listEnabledZaloAccounts, t as createZaloSetupWizardProxy, u as resolveZaloAccount } from "./setup-core-c-VVz39c.js";
1
+ import { c as listZaloAccountIds, f as buildSecretInputSchema, l as resolveDefaultZaloAccountId, r as zaloSetupAdapter, s as listEnabledZaloAccounts, t as createZaloSetupWizardProxy, u as resolveZaloAccount } from "./setup-core-BCJZqQ4h.js";
2
2
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-Dw93tGo2.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 { AllowFromListSchema, DmPolicySchema, GroupPolicySchema, MarkdownConfigS
24
24
  import { z } from "zod";
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-DPLidmVV.js"), "zaloActionsRuntime");
27
+ const loadZaloActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-BlO0GsLJ.js"), "zaloActionsRuntime");
28
28
  const providerId = "zalo";
29
29
  function listEnabledAccounts(cfg, accountId) {
30
30
  return (accountId ? [resolveZaloAccount({
@@ -173,8 +173,8 @@ function normalizeZaloMessagingTarget(raw) {
173
173
  if (!trimmed) return;
174
174
  return trimmed.replace(/^(zalo|zl):/i, "").trim();
175
175
  }
176
- const loadZaloChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BwHejuBf.js"));
177
- const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface-DY3c-fas.js")).zaloSetupWizard);
176
+ const loadZaloChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-CqN55WSq.js"));
177
+ const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface-BdKDXxKU.js")).zaloSetupWizard);
178
178
  const zaloTextChunkLimit = 2e3;
179
179
  const zaloRawSendResultAdapter = createRawChannelSendResultAdapter({
180
180
  channel: "zalo",
@@ -1,2 +1,2 @@
1
- import { t as zaloPlugin } from "./channel-Ds8WfCFp.js";
1
+ import { t as zaloPlugin } from "./channel-CyjQoH_Y.js";
2
2
  export { zaloPlugin };
@@ -1,6 +1,6 @@
1
- import { p as normalizeSecretInputString } from "./setup-core-c-VVz39c.js";
1
+ import { p as normalizeSecretInputString } from "./setup-core-BCJZqQ4h.js";
2
2
  import { i as PAIRING_APPROVED_MESSAGE } from "./runtime-api-CnYIxmRv.js";
3
- import { a as getMe, n as resolveZaloProxyFetch, r as ZaloApiError, t as sendMessageZalo } from "./send-DC0JAcxV.js";
3
+ import { a as getMe, n as resolveZaloProxyFetch, r as ZaloApiError, t as sendMessageZalo } from "./send-CGzQv_0x.js";
4
4
  import { createAccountStatusSink } from "openclaw/plugin-sdk/channel-lifecycle";
5
5
  //#region extensions/zalo/src/probe.ts
6
6
  async function probeZalo(token, timeoutMs = 5e3, fetcher) {
@@ -52,7 +52,7 @@ async function probeZalo(token, timeoutMs = 5e3, fetcher) {
52
52
  //#endregion
53
53
  //#region extensions/zalo/src/channel.runtime.ts
54
54
  async function notifyZaloPairingApproval(params) {
55
- const { resolveZaloAccount } = await import("./setup-core-c-VVz39c.js").then((n) => n.o);
55
+ const { resolveZaloAccount } = await import("./setup-core-BCJZqQ4h.js").then((n) => n.o);
56
56
  const account = resolveZaloAccount({ cfg: params.cfg });
57
57
  if (!account.token) throw new Error("Zalo token not configured");
58
58
  await sendMessageZalo(params.id, PAIRING_APPROVED_MESSAGE, { token: account.token });
@@ -86,7 +86,7 @@ async function startZaloGatewayAccount(ctx) {
86
86
  setStatus: ctx.setStatus
87
87
  });
88
88
  ctx.log?.info(`[${account.accountId}] starting provider${zaloBotLabel} mode=${mode}`);
89
- const { monitorZaloProvider } = await import("./monitor-BMpWuV4T.js");
89
+ const { monitorZaloProvider } = await import("./monitor-js794wj1.js");
90
90
  return monitorZaloProvider({
91
91
  token,
92
92
  account,
@@ -1,6 +1,6 @@
1
1
  import { n as resolveZaloRuntimeGroupPolicy, t as normalizeZaloAllowEntry } from "./group-access-Boqk-JNd.js";
2
2
  import { t as getZaloRuntime } from "./runtime-api-CnYIxmRv.js";
3
- import { c as sendChatAction, d as setWebhook, i as deleteWebhook, l as sendMessage, n as resolveZaloProxyFetch, o as getUpdates, r as ZaloApiError, s as getWebhookInfo, u as sendPhoto } from "./send-DC0JAcxV.js";
3
+ import { c as sendChatAction, d as setWebhook, i as deleteWebhook, l as sendMessage, n as resolveZaloProxyFetch, o as getUpdates, r as ZaloApiError, s as getWebhookInfo, u as sendPhoto } from "./send-CGzQv_0x.js";
4
4
  import { deliverTextOrMediaReply, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
5
5
  import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
@@ -1,4 +1,4 @@
1
- import { d as resolveZaloToken, u as resolveZaloAccount } from "./setup-core-c-VVz39c.js";
1
+ import { d as resolveZaloToken, u as resolveZaloAccount } from "./setup-core-BCJZqQ4h.js";
2
2
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-message";
3
3
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
4
4
  import { resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-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-c-VVz39c.js";
1
+ import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-BCJZqQ4h.js";
2
2
  import { n as resolveZaloRuntimeGroupPolicy } from "./group-access-Boqk-JNd.js";
3
3
  import { loadBundledEntryExportSync } from "openclaw/plugin-sdk/channel-entry-contract";
4
4
  //#region extensions/zalo/setup-api.ts
@@ -4,7 +4,7 @@ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runti
4
4
  import { tryReadSecretFileSync } from "openclaw/plugin-sdk/core";
5
5
  import { resolveAccountEntry } from "openclaw/plugin-sdk/routing";
6
6
  import { buildSecretInputSchema, normalizeResolvedSecretInputString, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
7
- import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, addWildcardAllowFrom, createDelegatedSetupWizardProxy, createPatchedAccountSetupAdapter, createSetupInputPresenceValidator, formatDocsLink, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/setup";
7
+ import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, addWildcardAllowFrom, createDelegatedSetupWizardProxy, createPatchedAccountSetupAdapter, createSetupInputPresenceValidator, createSetupTranslator, formatDocsLink, mergeAllowFromEntries, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/setup";
8
8
  //#region \0rolldown/runtime.js
9
9
  var __defProp = Object.defineProperty;
10
10
  var __exportAll = (all, no_symbols) => {
@@ -117,14 +117,15 @@ function listEnabledZaloAccounts(cfg) {
117
117
  }
118
118
  //#endregion
119
119
  //#region extensions/zalo/src/setup-allow-from.ts
120
+ const t$1 = createSetupTranslator();
120
121
  async function noteZaloTokenHelp(prompter) {
121
122
  await prompter.note([
122
- "1) Open Zalo Bot Platform: https://bot.zaloplatforms.com",
123
- "2) Create a bot and get the token",
124
- "3) Token looks like 12345689:abc-xyz",
125
- "Tip: you can also set ZALO_BOT_TOKEN in your env.",
123
+ t$1("wizard.zalo.helpOpenPlatform"),
124
+ t$1("wizard.zalo.helpCreateBot"),
125
+ t$1("wizard.zalo.helpTokenFormat"),
126
+ t$1("wizard.zalo.helpEnvTip"),
126
127
  `Docs: ${formatDocsLink("/channels/zalo", "zalo")}`
127
- ].join("\n"), "Zalo bot token");
128
+ ].join("\n"), t$1("wizard.zalo.botTokenTitle"));
128
129
  }
129
130
  async function promptZaloAllowFrom(params) {
130
131
  const { cfg, prompter } = params;
@@ -134,13 +135,13 @@ async function promptZaloAllowFrom(params) {
134
135
  accountId
135
136
  }).config.allowFrom ?? [];
136
137
  const unique = mergeAllowFromEntries(existingAllowFrom, [(await prompter.text({
137
- message: "Zalo allowFrom (user id)",
138
+ message: t$1("wizard.zalo.allowFromPrompt"),
138
139
  placeholder: "123456789",
139
140
  initialValue: existingAllowFrom[0] ? String(existingAllowFrom[0]) : void 0,
140
141
  validate: (value) => {
141
142
  const raw = (value ?? "").trim();
142
- if (!raw) return "Required";
143
- if (!/^\d+$/.test(raw)) return "Use a numeric Zalo user id";
143
+ if (!raw) return t$1("common.required");
144
+ if (!/^\d+$/.test(raw)) return t$1("wizard.zalo.allowFromNumeric");
144
145
  }
145
146
  })).trim()]);
146
147
  if (accountId === DEFAULT_ACCOUNT_ID$1) return {
@@ -178,6 +179,7 @@ async function promptZaloAllowFrom(params) {
178
179
  }
179
180
  //#endregion
180
181
  //#region extensions/zalo/src/setup-core.ts
182
+ const t = createSetupTranslator();
181
183
  const channel = "zalo";
182
184
  const zaloSetupAdapter = createPatchedAccountSetupAdapter({
183
185
  channelKey: channel,
@@ -256,10 +258,10 @@ function createZaloSetupWizardProxy(loadWizard) {
256
258
  channel,
257
259
  loadWizard,
258
260
  status: {
259
- configuredLabel: "configured",
260
- unconfiguredLabel: "needs token",
261
- configuredHint: "recommended · configured",
262
- unconfiguredHint: "recommended · newcomer-friendly",
261
+ configuredLabel: t("wizard.channels.statusConfigured"),
262
+ unconfiguredLabel: t("wizard.channels.statusNeedsToken"),
263
+ configuredHint: t("wizard.channels.statusRecommendedConfigured"),
264
+ unconfiguredHint: t("wizard.channels.statusRecommendedNewcomerFriendly"),
263
265
  configuredScore: 1,
264
266
  unconfiguredScore: 10
265
267
  },
@@ -1,6 +1,7 @@
1
- import { a as promptZaloAllowFrom, i as noteZaloTokenHelp, n as zaloDmPolicy, u as resolveZaloAccount } from "./setup-core-c-VVz39c.js";
2
- import { DEFAULT_ACCOUNT_ID, buildSingleChannelSecretPromptState, createStandardChannelSetupStatus, hasConfiguredSecretInput, promptSingleChannelSecretInput, runSingleChannelSecretStep } from "openclaw/plugin-sdk/setup";
1
+ import { a as promptZaloAllowFrom, i as noteZaloTokenHelp, n as zaloDmPolicy, u as resolveZaloAccount } from "./setup-core-BCJZqQ4h.js";
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
+ const t = createSetupTranslator();
4
5
  const channel = "zalo";
5
6
  function setZaloUpdateMode(cfg, accountId, mode, webhookUrl, webhookSecret, webhookPath) {
6
7
  const isDefault = accountId === DEFAULT_ACCOUNT_ID;
@@ -63,10 +64,10 @@ const zaloSetupWizard = {
63
64
  channel,
64
65
  status: createStandardChannelSetupStatus({
65
66
  channelLabel: "Zalo",
66
- configuredLabel: "configured",
67
- unconfiguredLabel: "needs token",
68
- configuredHint: "recommended · configured",
69
- unconfiguredHint: "recommended · newcomer-friendly",
67
+ configuredLabel: t("wizard.channels.statusConfigured"),
68
+ unconfiguredLabel: t("wizard.channels.statusNeedsToken"),
69
+ configuredHint: t("wizard.channels.statusRecommendedConfigured"),
70
+ unconfiguredHint: t("wizard.channels.statusRecommendedNewcomerFriendly"),
70
71
  configuredScore: 1,
71
72
  unconfiguredScore: 10,
72
73
  includeStatusLine: true,
@@ -94,15 +95,15 @@ const zaloSetupWizard = {
94
95
  cfg: next,
95
96
  prompter,
96
97
  providerHint: "zalo",
97
- credentialLabel: "bot token",
98
+ credentialLabel: t("wizard.zalo.botToken"),
98
99
  secretInputMode: options?.secretInputMode,
99
100
  accountConfigured,
100
101
  hasConfigToken,
101
102
  allowEnv,
102
103
  envValue: process.env.ZALO_BOT_TOKEN,
103
- envPrompt: "ZALO_BOT_TOKEN detected. Use env var?",
104
- keepPrompt: "Zalo token already configured. Keep it?",
105
- inputPrompt: "Enter Zalo bot token",
104
+ envPrompt: t("wizard.zalo.tokenEnvPrompt"),
105
+ keepPrompt: t("wizard.zalo.tokenKeep"),
106
+ inputPrompt: t("wizard.zalo.tokenInput"),
106
107
  preferredEnvVar: "ZALO_BOT_TOKEN",
107
108
  onMissingConfigured: async () => await noteZaloTokenHelp(prompter),
108
109
  applyUseEnv: async (currentCfg) => accountId === DEFAULT_ACCOUNT_ID ? {
@@ -145,11 +146,11 @@ const zaloSetupWizard = {
145
146
  }
146
147
  })).cfg;
147
148
  if (await prompter.confirm({
148
- message: "Use webhook mode for Zalo?",
149
+ message: t("wizard.zalo.webhookModePrompt"),
149
150
  initialValue: Boolean(resolvedAccount.config.webhookUrl)
150
151
  })) {
151
152
  const webhookUrl = (await prompter.text({
152
- message: "Webhook URL (https://...) ",
153
+ message: t("wizard.zalo.webhookUrlPrompt"),
153
154
  initialValue: resolvedAccount.config.webhookUrl,
154
155
  validate: (value) => value?.trim()?.startsWith("https://") ? void 0 : "HTTPS URL required"
155
156
  })).trim();
@@ -164,7 +165,7 @@ const zaloSetupWizard = {
164
165
  cfg: next,
165
166
  prompter,
166
167
  providerHint: "zalo-webhook",
167
- credentialLabel: "webhook secret",
168
+ credentialLabel: t("wizard.zalo.webhookSecret"),
168
169
  secretInputMode: options?.secretInputMode,
169
170
  ...buildSingleChannelSecretPromptState({
170
171
  accountConfigured: hasConfiguredSecretInput(resolvedAccount.config.webhookSecret),
@@ -172,17 +173,17 @@ const zaloSetupWizard = {
172
173
  allowEnv: false
173
174
  }),
174
175
  envPrompt: "",
175
- keepPrompt: "Zalo webhook secret already configured. Keep it?",
176
- inputPrompt: "Webhook secret (8-256 chars)",
176
+ keepPrompt: t("wizard.zalo.webhookSecretKeep"),
177
+ inputPrompt: t("wizard.zalo.webhookSecretInput"),
177
178
  preferredEnvVar: "ZALO_WEBHOOK_SECRET"
178
179
  });
179
180
  while (webhookSecretResult.action === "set" && typeof webhookSecretResult.value === "string" && (webhookSecretResult.value.length < 8 || webhookSecretResult.value.length > 256)) {
180
- await prompter.note("Webhook secret must be between 8 and 256 characters.", "Zalo webhook");
181
+ await prompter.note(t("wizard.zalo.webhookSecretLength"), t("wizard.zalo.webhookTitle"));
181
182
  webhookSecretResult = await promptSingleChannelSecretInput({
182
183
  cfg: next,
183
184
  prompter,
184
185
  providerHint: "zalo-webhook",
185
- credentialLabel: "webhook secret",
186
+ credentialLabel: t("wizard.zalo.webhookSecret"),
186
187
  secretInputMode: options?.secretInputMode,
187
188
  ...buildSingleChannelSecretPromptState({
188
189
  accountConfigured: false,
@@ -190,14 +191,14 @@ const zaloSetupWizard = {
190
191
  allowEnv: false
191
192
  }),
192
193
  envPrompt: "",
193
- keepPrompt: "Zalo webhook secret already configured. Keep it?",
194
- inputPrompt: "Webhook secret (8-256 chars)",
194
+ keepPrompt: t("wizard.zalo.webhookSecretKeep"),
195
+ inputPrompt: t("wizard.zalo.webhookSecretInput"),
195
196
  preferredEnvVar: "ZALO_WEBHOOK_SECRET"
196
197
  });
197
198
  }
198
199
  const webhookSecret = webhookSecretResult.action === "set" ? webhookSecretResult.value : resolvedAccount.config.webhookSecret;
199
200
  const webhookPath = (await prompter.text({
200
- message: "Webhook path (optional)",
201
+ message: t("wizard.zalo.webhookPathPrompt"),
201
202
  initialValue: resolvedAccount.config.webhookPath ?? defaultPath
202
203
  })).trim();
203
204
  next = setZaloUpdateMode(next, accountId, "webhook", webhookUrl, webhookSecret, webhookPath || void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/zalo",
3
- "version": "2026.5.14-beta.2",
3
+ "version": "2026.5.16-beta.2",
4
4
  "description": "OpenClaw Zalo channel plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  "openclaw": "workspace:*"
13
13
  },
14
14
  "peerDependencies": {
15
- "openclaw": ">=2026.5.14-beta.2"
15
+ "openclaw": ">=2026.5.16-beta.2"
16
16
  },
17
17
  "peerDependenciesMeta": {
18
18
  "openclaw": {
@@ -43,10 +43,10 @@
43
43
  "minHostVersion": ">=2026.4.10"
44
44
  },
45
45
  "compat": {
46
- "pluginApi": ">=2026.5.14-beta.2"
46
+ "pluginApi": ">=2026.5.16-beta.2"
47
47
  },
48
48
  "build": {
49
- "openclawVersion": "2026.5.14-beta.2"
49
+ "openclawVersion": "2026.5.16-beta.2"
50
50
  },
51
51
  "release": {
52
52
  "publishToClawHub": true,