mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 09:32:42 +00:00
Plugins/zalouser: migrate to scoped plugin-sdk imports
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import type { AnyAgentTool, OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
import type { AnyAgentTool, OpenClawPluginApi } from "openclaw/plugin-sdk/zalouser";
|
||||||
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/core";
|
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/zalouser";
|
||||||
import { zalouserDock, zalouserPlugin } from "./src/channel.js";
|
import { zalouserDock, zalouserPlugin } from "./src/channel.js";
|
||||||
import { setZalouserRuntime } from "./src/runtime.js";
|
import { setZalouserRuntime } from "./src/runtime.js";
|
||||||
import { ZalouserToolSchema, executeZalouserTool } from "./src/tool.js";
|
import { ZalouserToolSchema, executeZalouserTool } from "./src/tool.js";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
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 { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import {
|
import {
|
||||||
getZcaUserInfo,
|
getZcaUserInfo,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
normalizeAccountId,
|
normalizeAccountId,
|
||||||
normalizeOptionalAccountId,
|
normalizeOptionalAccountId,
|
||||||
} from "openclaw/plugin-sdk/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 type { ResolvedZalouserAccount, ZalouserAccountConfig, ZalouserConfig } from "./types.js";
|
import type { ResolvedZalouserAccount, ZalouserAccountConfig, ZalouserConfig } from "./types.js";
|
||||||
import { checkZaloAuthenticated, getZaloUserInfo } from "./zalo-js.js";
|
import { checkZaloAuthenticated, getZaloUserInfo } from "./zalo-js.js";
|
||||||
|
|
||||||
|
|||||||
@@ -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 { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import { zalouserPlugin } from "./channel.js";
|
import { zalouserPlugin } from "./channel.js";
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import type {
|
|||||||
ChannelPlugin,
|
ChannelPlugin,
|
||||||
OpenClawConfig,
|
OpenClawConfig,
|
||||||
GroupToolPolicyConfig,
|
GroupToolPolicyConfig,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/zalouser";
|
||||||
import {
|
import {
|
||||||
applyAccountNameToChannelSection,
|
applyAccountNameToChannelSection,
|
||||||
buildChannelConfigSchema,
|
buildChannelConfigSchema,
|
||||||
@@ -23,7 +23,7 @@ import {
|
|||||||
resolvePreferredOpenClawTmpDir,
|
resolvePreferredOpenClawTmpDir,
|
||||||
resolveChannelAccountConfigBasePath,
|
resolveChannelAccountConfigBasePath,
|
||||||
setAccountEnabledInConfigSection,
|
setAccountEnabledInConfigSection,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/zalouser";
|
||||||
import {
|
import {
|
||||||
listZalouserAccountIds,
|
listZalouserAccountIds,
|
||||||
resolveDefaultZalouserAccountId,
|
resolveDefaultZalouserAccountId,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MarkdownConfigSchema, ToolPolicySchema } from "openclaw/plugin-sdk/compat";
|
import { MarkdownConfigSchema, ToolPolicySchema } from "openclaw/plugin-sdk/zalouser";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
const allowFromEntry = z.union([z.string(), z.number()]);
|
const allowFromEntry = z.union([z.string(), z.number()]);
|
||||||
|
|||||||
@@ -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 { describe, expect, it, vi } from "vitest";
|
||||||
import { __testing } from "./monitor.js";
|
import { __testing } from "./monitor.js";
|
||||||
import { setZalouserRuntime } from "./runtime.js";
|
import { setZalouserRuntime } from "./runtime.js";
|
||||||
|
|||||||
@@ -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 { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import { __testing } from "./monitor.js";
|
import { __testing } from "./monitor.js";
|
||||||
import { setZalouserRuntime } from "./runtime.js";
|
import { setZalouserRuntime } from "./runtime.js";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type {
|
|||||||
OpenClawConfig,
|
OpenClawConfig,
|
||||||
OutboundReplyPayload,
|
OutboundReplyPayload,
|
||||||
RuntimeEnv,
|
RuntimeEnv,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/zalouser";
|
||||||
import {
|
import {
|
||||||
createTypingCallbacks,
|
createTypingCallbacks,
|
||||||
createScopedPairingAccess,
|
createScopedPairingAccess,
|
||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
sendMediaWithLeadingCaption,
|
sendMediaWithLeadingCaption,
|
||||||
summarizeMapping,
|
summarizeMapping,
|
||||||
warnMissingProviderGroupPolicyFallbackOnce,
|
warnMissingProviderGroupPolicyFallbackOnce,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/zalouser";
|
||||||
import {
|
import {
|
||||||
buildZalouserGroupCandidates,
|
buildZalouserGroupCandidates,
|
||||||
findZalouserGroupEntry,
|
findZalouserGroupEntry,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type {
|
|||||||
ChannelOnboardingDmPolicy,
|
ChannelOnboardingDmPolicy,
|
||||||
OpenClawConfig,
|
OpenClawConfig,
|
||||||
WizardPrompter,
|
WizardPrompter,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/zalouser";
|
||||||
import {
|
import {
|
||||||
addWildcardAllowFrom,
|
addWildcardAllowFrom,
|
||||||
DEFAULT_ACCOUNT_ID,
|
DEFAULT_ACCOUNT_ID,
|
||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
promptAccountId,
|
promptAccountId,
|
||||||
promptChannelAccessConfig,
|
promptChannelAccessConfig,
|
||||||
resolvePreferredOpenClawTmpDir,
|
resolvePreferredOpenClawTmpDir,
|
||||||
} from "openclaw/plugin-sdk/compat";
|
} from "openclaw/plugin-sdk/zalouser";
|
||||||
import {
|
import {
|
||||||
listZalouserAccountIds,
|
listZalouserAccountIds,
|
||||||
resolveDefaultZalouserAccountId,
|
resolveDefaultZalouserAccountId,
|
||||||
|
|||||||
@@ -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 type { ZcaUserInfo } from "./types.js";
|
||||||
import { getZaloUserInfo } from "./zalo-js.js";
|
import { getZaloUserInfo } from "./zalo-js.js";
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
let runtime: PluginRuntime | null = null;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { ChannelAccountSnapshot, ChannelStatusIssue } from "openclaw/plugin-sdk/compat";
|
import type { ChannelAccountSnapshot, ChannelStatusIssue } from "openclaw/plugin-sdk/zalouser";
|
||||||
|
|
||||||
type ZalouserAccountStatus = {
|
type ZalouserAccountStatus = {
|
||||||
accountId?: unknown;
|
accountId?: unknown;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import fs from "node:fs";
|
|||||||
import fsp from "node:fs/promises";
|
import fsp from "node:fs/promises";
|
||||||
import os from "node:os";
|
import os from "node:os";
|
||||||
import path from "node:path";
|
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 { normalizeZaloReactionIcon } from "./reaction.js";
|
||||||
import { getZalouserRuntime } from "./runtime.js";
|
import { getZalouserRuntime } from "./runtime.js";
|
||||||
import type {
|
import type {
|
||||||
|
|||||||
Reference in New Issue
Block a user