Plugins/zalouser: migrate to scoped plugin-sdk imports

This commit is contained in:
Gustavo Madeira Santana
2026-03-04 02:33:19 -05:00
parent e9c7bb6e15
commit 5c4ab999b0
14 changed files with 18 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
import type { AnyAgentTool, OpenClawPluginApi } from "openclaw/plugin-sdk/core";
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/core";
import type { AnyAgentTool, OpenClawPluginApi } from "openclaw/plugin-sdk/zalouser";
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/zalouser";
import { zalouserDock, zalouserPlugin } from "./src/channel.js";
import { setZalouserRuntime } from "./src/runtime.js";
import { ZalouserToolSchema, executeZalouserTool } from "./src/tool.js";

View File

@@ -1,5 +1,5 @@
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
import type { OpenClawConfig } from "openclaw/plugin-sdk/compat";
import type { OpenClawConfig } from "openclaw/plugin-sdk/zalouser";
import { beforeEach, describe, expect, it, vi } from "vitest";
import {
getZcaUserInfo,

View File

@@ -3,7 +3,7 @@ import {
normalizeAccountId,
normalizeOptionalAccountId,
} from "openclaw/plugin-sdk/account-id";
import type { OpenClawConfig } from "openclaw/plugin-sdk/compat";
import type { OpenClawConfig } from "openclaw/plugin-sdk/zalouser";
import type { ResolvedZalouserAccount, ZalouserAccountConfig, ZalouserConfig } from "./types.js";
import { checkZaloAuthenticated, getZaloUserInfo } from "./zalo-js.js";

View File

@@ -1,4 +1,4 @@
import type { ReplyPayload } from "openclaw/plugin-sdk/compat";
import type { ReplyPayload } from "openclaw/plugin-sdk/zalouser";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { zalouserPlugin } from "./channel.js";

View File

@@ -9,7 +9,7 @@ import type {
ChannelPlugin,
OpenClawConfig,
GroupToolPolicyConfig,
} from "openclaw/plugin-sdk/compat";
} from "openclaw/plugin-sdk/zalouser";
import {
applyAccountNameToChannelSection,
buildChannelConfigSchema,
@@ -23,7 +23,7 @@ import {
resolvePreferredOpenClawTmpDir,
resolveChannelAccountConfigBasePath,
setAccountEnabledInConfigSection,
} from "openclaw/plugin-sdk/compat";
} from "openclaw/plugin-sdk/zalouser";
import {
listZalouserAccountIds,
resolveDefaultZalouserAccountId,

View File

@@ -1,4 +1,4 @@
import { MarkdownConfigSchema, ToolPolicySchema } from "openclaw/plugin-sdk/compat";
import { MarkdownConfigSchema, ToolPolicySchema } from "openclaw/plugin-sdk/zalouser";
import { z } from "zod";
const allowFromEntry = z.union([z.string(), z.number()]);

View File

@@ -1,4 +1,4 @@
import type { OpenClawConfig, PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/compat";
import type { OpenClawConfig, PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/zalouser";
import { describe, expect, it, vi } from "vitest";
import { __testing } from "./monitor.js";
import { setZalouserRuntime } from "./runtime.js";

View File

@@ -1,4 +1,4 @@
import type { OpenClawConfig, PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/compat";
import type { OpenClawConfig, PluginRuntime, RuntimeEnv } from "openclaw/plugin-sdk/zalouser";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { __testing } from "./monitor.js";
import { setZalouserRuntime } from "./runtime.js";

View File

@@ -3,7 +3,7 @@ import type {
OpenClawConfig,
OutboundReplyPayload,
RuntimeEnv,
} from "openclaw/plugin-sdk/compat";
} from "openclaw/plugin-sdk/zalouser";
import {
createTypingCallbacks,
createScopedPairingAccess,
@@ -17,7 +17,7 @@ import {
sendMediaWithLeadingCaption,
summarizeMapping,
warnMissingProviderGroupPolicyFallbackOnce,
} from "openclaw/plugin-sdk/compat";
} from "openclaw/plugin-sdk/zalouser";
import {
buildZalouserGroupCandidates,
findZalouserGroupEntry,

View File

@@ -5,7 +5,7 @@ import type {
ChannelOnboardingDmPolicy,
OpenClawConfig,
WizardPrompter,
} from "openclaw/plugin-sdk/compat";
} from "openclaw/plugin-sdk/zalouser";
import {
addWildcardAllowFrom,
DEFAULT_ACCOUNT_ID,
@@ -15,7 +15,7 @@ import {
promptAccountId,
promptChannelAccessConfig,
resolvePreferredOpenClawTmpDir,
} from "openclaw/plugin-sdk/compat";
} from "openclaw/plugin-sdk/zalouser";
import {
listZalouserAccountIds,
resolveDefaultZalouserAccountId,

View File

@@ -1,4 +1,4 @@
import type { BaseProbeResult } from "openclaw/plugin-sdk/compat";
import type { BaseProbeResult } from "openclaw/plugin-sdk/zalouser";
import type { ZcaUserInfo } from "./types.js";
import { getZaloUserInfo } from "./zalo-js.js";

View File

@@ -1,4 +1,4 @@
import type { PluginRuntime } from "openclaw/plugin-sdk/compat";
import type { PluginRuntime } from "openclaw/plugin-sdk/zalouser";
let runtime: PluginRuntime | null = null;

View File

@@ -1,4 +1,4 @@
import type { ChannelAccountSnapshot, ChannelStatusIssue } from "openclaw/plugin-sdk/compat";
import type { ChannelAccountSnapshot, ChannelStatusIssue } from "openclaw/plugin-sdk/zalouser";
type ZalouserAccountStatus = {
accountId?: unknown;

View File

@@ -3,7 +3,7 @@ import fs from "node:fs";
import fsp from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/compat";
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/zalouser";
import { normalizeZaloReactionIcon } from "./reaction.js";
import { getZalouserRuntime } from "./runtime.js";
import type {