@openclaw/zalo 2026.5.28 → 2026.5.31-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.
- package/dist/{actions.runtime-B7fbqZ70.js → actions.runtime-ylK8EjWZ.js} +1 -1
- package/dist/api.js +2 -2
- package/dist/{channel-CuSMZv6i.js → channel-htLpFgKy.js} +4 -4
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-5jy8uz-2.js → channel.runtime-BqVEGfmL.js} +4 -4
- package/dist/{monitor-De6CIauS.js → monitor-B3PaXxot.js} +13 -4
- package/dist/{send-B30XoXa7.js → send-DBzU5EEc.js} +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/{setup-core-oTTioJT-.js → setup-core-fwCh0QUi.js} +1 -1
- package/dist/{setup-surface-BUaA8o_s.js → setup-surface-8eRimod9.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-
|
|
2
|
-
import { t as zaloPlugin } from "./channel-
|
|
1
|
+
import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-fwCh0QUi.js";
|
|
2
|
+
import { t as zaloPlugin } from "./channel-htLpFgKy.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 listZaloAccountIds, f as buildSecretInputSchema, l as resolveDefaultZaloAccountId, r as zaloSetupAdapter, s as listEnabledZaloAccounts, t as createZaloSetupWizardProxy, u as resolveZaloAccount } from "./setup-core-
|
|
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-fwCh0QUi.js";
|
|
2
2
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-Bno_huZF.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-
|
|
27
|
+
const loadZaloActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-ylK8EjWZ.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-
|
|
177
|
-
const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface-
|
|
176
|
+
const loadZaloChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BqVEGfmL.js"));
|
|
177
|
+
const zaloSetupWizard = createZaloSetupWizardProxy(async () => (await import("./setup-surface-8eRimod9.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-
|
|
1
|
+
import { t as zaloPlugin } from "./channel-htLpFgKy.js";
|
|
2
2
|
export { zaloPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as normalizeSecretInputString } from "./setup-core-
|
|
1
|
+
import { p as normalizeSecretInputString } from "./setup-core-fwCh0QUi.js";
|
|
2
2
|
import { i as PAIRING_APPROVED_MESSAGE } from "./runtime-api-CDwUY_-_.js";
|
|
3
|
-
import { a as getMe, n as resolveZaloProxyFetch, r as ZaloApiError, t as sendMessageZalo } from "./send-
|
|
3
|
+
import { a as getMe, n as resolveZaloProxyFetch, r as ZaloApiError, t as sendMessageZalo } from "./send-DBzU5EEc.js";
|
|
4
4
|
import { createAccountStatusSink } from "openclaw/plugin-sdk/channel-outbound";
|
|
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-
|
|
55
|
+
const { resolveZaloAccount } = await import("./setup-core-fwCh0QUi.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-
|
|
89
|
+
const { monitorZaloProvider } = await import("./monitor-B3PaXxot.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-8qHRzDHx.js";
|
|
2
2
|
import { t as getZaloRuntime } from "./runtime-api-CDwUY_-_.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-
|
|
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-DBzU5EEc.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";
|
|
@@ -8,6 +8,7 @@ import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pair
|
|
|
8
8
|
import { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback";
|
|
9
9
|
import { resolveInboundRouteEnvelopeBuilderWithRuntime } from "openclaw/plugin-sdk/inbound-envelope";
|
|
10
10
|
import { registerPluginHttpRoute, resolveWebhookPath } from "openclaw/plugin-sdk/webhook-ingress";
|
|
11
|
+
import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
11
12
|
import { resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
12
13
|
import { waitForAbortSignal } from "openclaw/plugin-sdk/runtime-env";
|
|
13
14
|
import { randomBytes } from "node:crypto";
|
|
@@ -63,6 +64,8 @@ async function deleteHostedZaloMediaEntry(id) {
|
|
|
63
64
|
await Promise.all([unlink(resolveHostedZaloMediaMetadataPath(id)).catch(() => void 0), unlink(resolveHostedZaloMediaBufferPath(id)).catch(() => void 0)]);
|
|
64
65
|
}
|
|
65
66
|
async function cleanupExpiredHostedZaloMedia(nowMs = Date.now()) {
|
|
67
|
+
const now = asDateTimestampMs(nowMs);
|
|
68
|
+
if (now === void 0) return;
|
|
66
69
|
let fileNames;
|
|
67
70
|
try {
|
|
68
71
|
fileNames = await readdir(ZALO_OUTBOUND_MEDIA_DIR);
|
|
@@ -73,7 +76,8 @@ async function cleanupExpiredHostedZaloMedia(nowMs = Date.now()) {
|
|
|
73
76
|
const id = fileName.slice(0, -5);
|
|
74
77
|
try {
|
|
75
78
|
const metadataRaw = await readFile(resolveHostedZaloMediaMetadataPath(id), "utf8");
|
|
76
|
-
|
|
79
|
+
const expiresAt = asDateTimestampMs(JSON.parse(metadataRaw).expiresAt);
|
|
80
|
+
if (expiresAt === void 0 || expiresAt <= now) await deleteHostedZaloMediaEntry(id);
|
|
77
81
|
} catch {
|
|
78
82
|
await deleteHostedZaloMediaEntry(id);
|
|
79
83
|
}
|
|
@@ -105,6 +109,9 @@ function resolveHostedZaloMediaRoutePath(params) {
|
|
|
105
109
|
async function prepareHostedZaloMediaUrl(params) {
|
|
106
110
|
await ensureHostedZaloMediaDir();
|
|
107
111
|
await cleanupExpiredHostedZaloMedia();
|
|
112
|
+
const now = asDateTimestampMs(Date.now());
|
|
113
|
+
const expiresAt = now === void 0 ? void 0 : resolveExpiresAtMsFromDurationMs(ZALO_OUTBOUND_MEDIA_TTL_MS, { nowMs: now });
|
|
114
|
+
if (expiresAt === void 0) throw new Error("Zalo outbound media expiry could not be resolved");
|
|
108
115
|
const media = await loadOutboundMediaFromUrl(params.mediaUrl, {
|
|
109
116
|
maxBytes: params.maxBytes,
|
|
110
117
|
...params.proxyUrl ? { proxyUrl: params.proxyUrl } : {}
|
|
@@ -123,7 +130,7 @@ async function prepareHostedZaloMediaUrl(params) {
|
|
|
123
130
|
routePath,
|
|
124
131
|
token,
|
|
125
132
|
contentType: media.contentType,
|
|
126
|
-
expiresAt
|
|
133
|
+
expiresAt
|
|
127
134
|
});
|
|
128
135
|
} catch (error) {
|
|
129
136
|
await deleteHostedZaloMediaEntry(id);
|
|
@@ -157,7 +164,9 @@ async function tryHandleHostedZaloMediaRequest(req, res) {
|
|
|
157
164
|
res.end("Not Found");
|
|
158
165
|
return true;
|
|
159
166
|
}
|
|
160
|
-
|
|
167
|
+
const now = asDateTimestampMs(Date.now());
|
|
168
|
+
const expiresAt = asDateTimestampMs(entry.metadata.expiresAt);
|
|
169
|
+
if (now === void 0 || expiresAt === void 0 || expiresAt <= now) {
|
|
161
170
|
await deleteHostedZaloMediaEntry(id);
|
|
162
171
|
res.statusCode = 410;
|
|
163
172
|
res.end("Expired");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as resolveZaloToken, u as resolveZaloAccount } from "./setup-core-
|
|
1
|
+
import { d as resolveZaloToken, u as resolveZaloAccount } from "./setup-core-fwCh0QUi.js";
|
|
2
2
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
3
3
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
4
4
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-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-
|
|
1
|
+
import { n as zaloDmPolicy, r as zaloSetupAdapter, t as createZaloSetupWizardProxy } from "./setup-core-fwCh0QUi.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
|
|
@@ -26,7 +26,7 @@ function resolveZaloToken(config, accountId, options) {
|
|
|
26
26
|
const isDefaultAccount = resolvedAccountId === DEFAULT_ACCOUNT_ID;
|
|
27
27
|
const baseConfig = config;
|
|
28
28
|
const accountConfig = resolveAccountEntry(baseConfig?.accounts, normalizeAccountId(resolvedAccountId));
|
|
29
|
-
const accountHasBotToken = Boolean(accountConfig && Object.
|
|
29
|
+
const accountHasBotToken = Boolean(accountConfig && Object.hasOwn(accountConfig, "botToken"));
|
|
30
30
|
if (accountConfig && accountHasBotToken) {
|
|
31
31
|
const token = options?.allowUnresolvedSecretRef ? normalizeSecretInputString(accountConfig.botToken) : normalizeResolvedSecretInputString({
|
|
32
32
|
value: accountConfig.botToken,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as promptZaloAllowFrom, i as noteZaloTokenHelp, n as zaloDmPolicy, u as resolveZaloAccount } from "./setup-core-
|
|
1
|
+
import { a as promptZaloAllowFrom, i as noteZaloTokenHelp, n as zaloDmPolicy, u as resolveZaloAccount } from "./setup-core-fwCh0QUi.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
|
const t = createSetupTranslator();
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/zalo",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.31-beta.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/zalo",
|
|
9
|
-
"version": "2026.5.
|
|
9
|
+
"version": "2026.5.31-beta.1",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"zod": "4.4.3"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"openclaw": ">=2026.5.
|
|
14
|
+
"openclaw": ">=2026.5.31-beta.1"
|
|
15
15
|
},
|
|
16
16
|
"peerDependenciesMeta": {
|
|
17
17
|
"openclaw": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/zalo",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.31-beta.1",
|
|
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.5.
|
|
11
|
+
"openclaw": ">=2026.5.31-beta.1"
|
|
12
12
|
},
|
|
13
13
|
"peerDependenciesMeta": {
|
|
14
14
|
"openclaw": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"minHostVersion": ">=2026.4.10"
|
|
40
40
|
},
|
|
41
41
|
"compat": {
|
|
42
|
-
"pluginApi": ">=2026.5.
|
|
42
|
+
"pluginApi": ">=2026.5.31-beta.1"
|
|
43
43
|
},
|
|
44
44
|
"build": {
|
|
45
|
-
"openclawVersion": "2026.5.
|
|
45
|
+
"openclawVersion": "2026.5.31-beta.1"
|
|
46
46
|
},
|
|
47
47
|
"release": {
|
|
48
48
|
"publishToClawHub": true,
|