diff --git a/extensions/zalo/runtime-api.ts b/extensions/zalo/runtime-api.ts new file mode 100644 index 00000000000..666b1c2a59d --- /dev/null +++ b/extensions/zalo/runtime-api.ts @@ -0,0 +1 @@ +export * from "openclaw/plugin-sdk/zalo"; diff --git a/extensions/zalo/src/accounts.ts b/extensions/zalo/src/accounts.ts index 205a6b94474..e12503561f9 100644 --- a/extensions/zalo/src/accounts.ts +++ b/extensions/zalo/src/accounts.ts @@ -1,6 +1,6 @@ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id"; -import { createAccountListHelpers, type OpenClawConfig } from "openclaw/plugin-sdk/zalo"; import { resolveZaloToken } from "./token.js"; +import { createAccountListHelpers, type OpenClawConfig } from "./runtime-api.js"; import type { ResolvedZaloAccount, ZaloAccountConfig, ZaloConfig } from "./types.js"; export type { ResolvedZaloAccount }; diff --git a/extensions/zalo/src/actions.ts b/extensions/zalo/src/actions.ts index b741d358c5a..b6b5c5b95f3 100644 --- a/extensions/zalo/src/actions.ts +++ b/extensions/zalo/src/actions.ts @@ -3,8 +3,8 @@ import type { ChannelMessageActionAdapter, ChannelMessageActionName, OpenClawConfig, -} from "openclaw/plugin-sdk/zalo"; -import { extractToolSend, jsonResult, readStringParam } from "openclaw/plugin-sdk/zalo"; +} from "./runtime-api.js"; +import { extractToolSend, jsonResult, readStringParam } from "./runtime-api.js"; import { listEnabledZaloAccounts } from "./accounts.js"; const loadZaloActionsRuntime = createLazyRuntimeNamedExport( diff --git a/extensions/zalo/src/channel.runtime.ts b/extensions/zalo/src/channel.runtime.ts index 86ddc97dcf3..39702a439fc 100644 --- a/extensions/zalo/src/channel.runtime.ts +++ b/extensions/zalo/src/channel.runtime.ts @@ -1,12 +1,16 @@ import { createAccountStatusSink } from "openclaw/plugin-sdk/channel-lifecycle"; -import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/zalo"; import { probeZalo } from "./probe.js"; import { resolveZaloProxyFetch } from "./proxy.js"; import { normalizeSecretInputString } from "./secret-input.js"; import { sendMessageZalo } from "./send.js"; +import { + PAIRING_APPROVED_MESSAGE, + type ChannelPlugin, + type OpenClawConfig, +} from "./runtime-api.js"; export async function notifyZaloPairingApproval(params: { - cfg: import("openclaw/plugin-sdk/zalo").OpenClawConfig; + cfg: OpenClawConfig; id: string; }) { const { resolveZaloAccount } = await import("./accounts.js"); @@ -42,7 +46,7 @@ export async function probeZaloAccount(params: { export async function startZaloGatewayAccount( ctx: Parameters< NonNullable< - NonNullable["startAccount"] + NonNullable["startAccount"] > >[0], ) { diff --git a/extensions/zalo/src/channel.ts b/extensions/zalo/src/channel.ts index 57f74ca01d2..a9cfea6f9ad 100644 --- a/extensions/zalo/src/channel.ts +++ b/extensions/zalo/src/channel.ts @@ -9,11 +9,6 @@ import { collectOpenProviderGroupPolicyWarnings, } from "openclaw/plugin-sdk/channel-policy"; import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime"; -import type { - ChannelAccountSnapshot, - ChannelPlugin, - OpenClawConfig, -} from "openclaw/plugin-sdk/zalo"; import { buildBaseAccountStatusSnapshot, buildChannelConfigSchema, @@ -25,7 +20,10 @@ import { listDirectoryUserEntriesFromAllowFrom, isNumericTargetId, sendPayloadWithChunkedTextAndMedia, -} from "openclaw/plugin-sdk/zalo"; + type ChannelAccountSnapshot, + type ChannelPlugin, + type OpenClawConfig, +} from "./runtime-api.js"; import { listZaloAccountIds, resolveDefaultZaloAccountId, diff --git a/extensions/zalo/src/config-schema.ts b/extensions/zalo/src/config-schema.ts index d70e1441d9b..70b863779c1 100644 --- a/extensions/zalo/src/config-schema.ts +++ b/extensions/zalo/src/config-schema.ts @@ -4,9 +4,9 @@ import { DmPolicySchema, GroupPolicySchema, } from "openclaw/plugin-sdk/channel-config-schema"; -import { MarkdownConfigSchema } from "openclaw/plugin-sdk/zalo"; import { z } from "zod"; import { buildSecretInputSchema } from "./secret-input.js"; +import { MarkdownConfigSchema } from "./runtime-api.js"; const zaloAccountSchema = z.object({ name: z.string().optional(), diff --git a/extensions/zalo/src/group-access.ts b/extensions/zalo/src/group-access.ts index 56a929cc23a..bde9e205f48 100644 --- a/extensions/zalo/src/group-access.ts +++ b/extensions/zalo/src/group-access.ts @@ -1,9 +1,10 @@ -import type { GroupPolicy, SenderGroupAccessDecision } from "openclaw/plugin-sdk/zalo"; import { evaluateSenderGroupAccess, isNormalizedSenderAllowed, resolveOpenProviderRuntimeGroupPolicy, -} from "openclaw/plugin-sdk/zalo"; + type GroupPolicy, + type SenderGroupAccessDecision, +} from "./runtime-api.js"; const ZALO_ALLOW_FROM_PREFIX_RE = /^(zalo|zl):/i; diff --git a/extensions/zalo/src/monitor.ts b/extensions/zalo/src/monitor.ts index d82c0d96ba4..ee97207cf3b 100644 --- a/extensions/zalo/src/monitor.ts +++ b/extensions/zalo/src/monitor.ts @@ -3,7 +3,7 @@ import type { MarkdownTableMode, OpenClawConfig, OutboundReplyPayload, -} from "openclaw/plugin-sdk/zalo"; +} from "./runtime-api.js"; import { createTypingCallbacks, createScopedPairingAccess, @@ -19,7 +19,7 @@ import { resolveWebhookPath, waitForAbortSignal, warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/zalo"; +} from "./runtime-api.js"; import type { ResolvedZaloAccount } from "./accounts.js"; import { ZaloApiError, diff --git a/extensions/zalo/src/monitor.webhook.ts b/extensions/zalo/src/monitor.webhook.ts index ab218dbd7a6..e058dcc453c 100644 --- a/extensions/zalo/src/monitor.webhook.ts +++ b/extensions/zalo/src/monitor.webhook.ts @@ -1,6 +1,5 @@ import { timingSafeEqual } from "node:crypto"; import type { IncomingMessage, ServerResponse } from "node:http"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/zalo"; import { createDedupeCache, createFixedWindowRateLimiter, @@ -16,7 +15,8 @@ import { WEBHOOK_ANOMALY_COUNTER_DEFAULTS, WEBHOOK_RATE_LIMIT_DEFAULTS, resolveClientIp, -} from "openclaw/plugin-sdk/zalo"; + type OpenClawConfig, +} from "./runtime-api.js"; import type { ResolvedZaloAccount } from "./accounts.js"; import type { ZaloFetch, ZaloUpdate } from "./api.js"; import type { ZaloRuntimeEnv } from "./monitor.js"; diff --git a/extensions/zalo/src/probe.ts b/extensions/zalo/src/probe.ts index 67015ac5f08..544097b9514 100644 --- a/extensions/zalo/src/probe.ts +++ b/extensions/zalo/src/probe.ts @@ -1,5 +1,5 @@ -import type { BaseProbeResult } from "openclaw/plugin-sdk/zalo"; import { getMe, ZaloApiError, type ZaloBotInfo, type ZaloFetch } from "./api.js"; +import type { BaseProbeResult } from "./runtime-api.js"; export type ZaloProbeResult = BaseProbeResult & { bot?: ZaloBotInfo; diff --git a/extensions/zalo/src/runtime-api.ts b/extensions/zalo/src/runtime-api.ts new file mode 100644 index 00000000000..ece735819df --- /dev/null +++ b/extensions/zalo/src/runtime-api.ts @@ -0,0 +1 @@ +export * from "../runtime-api.js"; diff --git a/extensions/zalo/src/runtime.ts b/extensions/zalo/src/runtime.ts index f36309db5c5..f454924991b 100644 --- a/extensions/zalo/src/runtime.ts +++ b/extensions/zalo/src/runtime.ts @@ -1,5 +1,5 @@ import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store"; -import type { PluginRuntime } from "openclaw/plugin-sdk/zalo"; +import type { PluginRuntime } from "./runtime-api.js"; const { setRuntime: setZaloRuntime, getRuntime: getZaloRuntime } = createPluginRuntimeStore("Zalo runtime not initialized"); diff --git a/extensions/zalo/src/secret-input.ts b/extensions/zalo/src/secret-input.ts index bf218d1e48b..b32083456e7 100644 --- a/extensions/zalo/src/secret-input.ts +++ b/extensions/zalo/src/secret-input.ts @@ -3,7 +3,7 @@ import { hasConfiguredSecretInput, normalizeResolvedSecretInputString, normalizeSecretInputString, -} from "openclaw/plugin-sdk/zalo"; +} from "./runtime-api.js"; export { buildSecretInputSchema, diff --git a/extensions/zalo/src/send.ts b/extensions/zalo/src/send.ts index e38427fcb14..d83bd16114d 100644 --- a/extensions/zalo/src/send.ts +++ b/extensions/zalo/src/send.ts @@ -1,9 +1,9 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/zalo"; import { resolveZaloAccount } from "./accounts.js"; import type { ZaloFetch } from "./api.js"; import { sendMessage, sendPhoto } from "./api.js"; import { resolveZaloProxyFetch } from "./proxy.js"; import { resolveZaloToken } from "./token.js"; +import type { OpenClawConfig } from "./runtime-api.js"; export type ZaloSendOptions = { token?: string; diff --git a/extensions/zalo/src/status-issues.ts b/extensions/zalo/src/status-issues.ts index c19992a64ee..28e2f333c80 100644 --- a/extensions/zalo/src/status-issues.ts +++ b/extensions/zalo/src/status-issues.ts @@ -1,5 +1,5 @@ -import type { ChannelAccountSnapshot, ChannelStatusIssue } from "openclaw/plugin-sdk/zalo"; import { coerceStatusIssueAccountId, readStatusIssueFields } from "../../shared/status-issues.js"; +import type { ChannelAccountSnapshot, ChannelStatusIssue } from "./runtime-api.js"; const ZALO_STATUS_FIELDS = ["accountId", "enabled", "configured", "dmPolicy"] as const; diff --git a/extensions/zalo/src/token.ts b/extensions/zalo/src/token.ts index 9e8eec34caa..c593cb5b824 100644 --- a/extensions/zalo/src/token.ts +++ b/extensions/zalo/src/token.ts @@ -1,8 +1,8 @@ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id"; import { tryReadSecretFileSync } from "openclaw/plugin-sdk/infra-runtime"; -import type { BaseTokenResolution } from "openclaw/plugin-sdk/zalo"; import { normalizeResolvedSecretInputString, normalizeSecretInputString } from "./secret-input.js"; import type { ZaloConfig } from "./types.js"; +import type { BaseTokenResolution } from "./runtime-api.js"; export type ZaloTokenResolution = BaseTokenResolution & { source: "env" | "config" | "configFile" | "none"; diff --git a/extensions/zalo/src/types.ts b/extensions/zalo/src/types.ts index f112f5f69b9..9246d9812e6 100644 --- a/extensions/zalo/src/types.ts +++ b/extensions/zalo/src/types.ts @@ -1,4 +1,4 @@ -import type { SecretInput } from "openclaw/plugin-sdk/zalo"; +import type { SecretInput } from "./runtime-api.js"; export type ZaloAccountConfig = { /** Optional display name for this account (used in CLI/UI lists). */