Skip to content

Commit 2ef28a7

Browse files
committed
Plugins: internalize zalouser SDK imports
1 parent 7b27f8a commit 2ef28a7

File tree

14 files changed

+19
-18
lines changed

14 files changed

+19
-18
lines changed

extensions/zalouser/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
2-
import type { AnyAgentTool } from "openclaw/plugin-sdk/zalouser";
2+
import type { AnyAgentTool } from "./runtime-api.js";
33
import { zalouserPlugin } from "./src/channel.js";
44
import { setZalouserRuntime } from "./src/runtime.js";
55
import { ZalouserToolSchema, executeZalouserTool } from "./src/tool.js";

extensions/zalouser/runtime-api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "openclaw/plugin-sdk/zalouser";

extensions/zalouser/src/accounts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
2-
import { createAccountListHelpers, type OpenClawConfig } from "openclaw/plugin-sdk/zalouser";
2+
import { createAccountListHelpers, type OpenClawConfig } from "../runtime-api.js";
33
import type { ResolvedZalouserAccount, ZalouserAccountConfig, ZalouserConfig } from "./types.js";
44
import { checkZaloAuthenticated, getZaloUserInfo } from "./zalo-js.js";
55

extensions/zalouser/src/channel.setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ChannelPlugin } from "openclaw/plugin-sdk/zalouser";
1+
import type { ChannelPlugin } from "../runtime-api.js";
22
import type { ResolvedZalouserAccount } from "./accounts.js";
33
import { zalouserSetupAdapter } from "./setup-core.js";
44
import { zalouserSetupWizard } from "./setup-surface.js";

extensions/zalouser/src/channel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
22
import { createAccountStatusSink } from "openclaw/plugin-sdk/channel-lifecycle";
3+
import { buildPassiveProbedChannelStatusSummary } from "../../shared/channel-status-summary.js";
34
import type {
45
ChannelAccountSnapshot,
56
ChannelDirectoryEntry,
@@ -8,7 +9,7 @@ import type {
89
ChannelPlugin,
910
OpenClawConfig,
1011
GroupToolPolicyConfig,
11-
} from "openclaw/plugin-sdk/zalouser";
12+
} from "../runtime-api.js";
1213
import {
1314
buildChannelSendResult,
1415
buildBaseAccountStatusSnapshot,
@@ -17,8 +18,7 @@ import {
1718
isNumericTargetId,
1819
normalizeAccountId,
1920
sendPayloadWithChunkedTextAndMedia,
20-
} from "openclaw/plugin-sdk/zalouser";
21-
import { buildPassiveProbedChannelStatusSummary } from "../../shared/channel-status-summary.js";
21+
} from "../runtime-api.js";
2222
import {
2323
listZalouserAccountIds,
2424
resolveDefaultZalouserAccountId,

extensions/zalouser/src/config-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import {
44
DmPolicySchema,
55
GroupPolicySchema,
66
} from "openclaw/plugin-sdk/channel-config-schema";
7-
import { MarkdownConfigSchema, ToolPolicySchema } from "openclaw/plugin-sdk/zalouser";
87
import { z } from "zod";
8+
import { MarkdownConfigSchema, ToolPolicySchema } from "../runtime-api.js";
99

1010
const groupConfigSchema = z.object({
1111
allow: z.boolean().optional(),

extensions/zalouser/src/monitor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ import {
1010
clearHistoryEntriesIfEnabled,
1111
recordPendingHistoryEntryIfEnabled,
1212
} from "openclaw/plugin-sdk/reply-history";
13+
import { createDeferred } from "../../shared/deferred.js";
1314
import type {
1415
MarkdownTableMode,
1516
OpenClawConfig,
1617
OutboundReplyPayload,
1718
RuntimeEnv,
18-
} from "openclaw/plugin-sdk/zalouser";
19+
} from "../runtime-api.js";
1920
import {
2021
createTypingCallbacks,
2122
createScopedPairingAccess,
@@ -33,8 +34,7 @@ import {
3334
sendMediaWithLeadingCaption,
3435
summarizeMapping,
3536
warnMissingProviderGroupPolicyFallbackOnce,
36-
} from "openclaw/plugin-sdk/zalouser";
37-
import { createDeferred } from "../../shared/deferred.js";
37+
} from "../runtime-api.js";
3838
import {
3939
buildZalouserGroupCandidates,
4040
findZalouserGroupEntry,

extensions/zalouser/src/probe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { BaseProbeResult } from "openclaw/plugin-sdk/zalouser";
1+
import type { BaseProbeResult } from "../runtime-api.js";
22
import type { ZcaUserInfo } from "./types.js";
33
import { getZaloUserInfo } from "./zalo-js.js";
44

extensions/zalouser/src/qr-temp-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fsp from "node:fs/promises";
22
import path from "node:path";
3-
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/zalouser";
3+
import { resolvePreferredOpenClawTmpDir } from "../runtime-api.js";
44

55
export async function writeQrDataUrlToTempFile(
66
qrDataUrl: string,

extensions/zalouser/src/runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
2-
import type { PluginRuntime } from "openclaw/plugin-sdk/zalouser";
2+
import type { PluginRuntime } from "../runtime-api.js";
33

44
const { setRuntime: setZalouserRuntime, getRuntime: getZalouserRuntime } =
55
createPluginRuntimeStore<PluginRuntime>("Zalouser runtime not initialized");

0 commit comments

Comments
 (0)