Plugins: internalize imessage SDK imports

This commit is contained in:
Vincent Koc 2026-03-17 21:17:07 -07:00
parent 6710a2be61
commit aa3739167c
6 changed files with 32 additions and 9 deletions

View File

@ -1,3 +1,26 @@
export * from "./src/monitor.js";
export * from "./src/probe.js";
export * from "./src/send.js";
export type { IMessageAccountConfig } from "../../src/config/types.imessage.js";
export type { ChannelPlugin } from "../../src/channels/plugins/types.plugin.js";
export {
DEFAULT_ACCOUNT_ID,
PAIRING_APPROVED_MESSAGE,
buildChannelConfigSchema,
getChatChannelMeta,
} from "../../src/plugin-sdk/channel-plugin-common.js";
export {
formatTrimmedAllowFromEntries,
resolveIMessageConfigAllowFrom,
resolveIMessageConfigDefaultTo,
} from "../../src/plugin-sdk/channel-config-helpers.js";
export { collectStatusIssuesFromLastError } from "../../src/plugin-sdk/status-helpers.js";
export { resolveChannelMediaMaxBytes } from "../../src/channels/plugins/media-limits.js";
export {
looksLikeIMessageTargetId,
normalizeIMessageMessagingTarget,
} from "../../src/channels/plugins/normalize/imessage.js";
export { IMessageConfigSchema } from "../../src/config/zod-schema.providers-core.js";
export { resolveIMessageGroupRequireMention, resolveIMessageGroupToolPolicy } from "./src/group-policy.js";
export { monitorIMessageProvider } from "./src/monitor.js";
export type { MonitorIMessageOpts } from "./src/monitor.js";
export { probeIMessage } from "./src/probe.js";
export { sendMessageIMessage } from "./src/send.js";

View File

@ -4,7 +4,7 @@ import {
resolveAccountEntry,
type OpenClawConfig,
} from "openclaw/plugin-sdk/account-resolution";
import type { IMessageAccountConfig } from "openclaw/plugin-sdk/imessage";
import type { IMessageAccountConfig } from "../runtime-api.js";
export type ResolvedIMessageAccount = {
accountId: string;

View File

@ -2,7 +2,7 @@ import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-runtime";
import {
PAIRING_APPROVED_MESSAGE,
resolveChannelMediaMaxBytes,
} from "openclaw/plugin-sdk/imessage";
} from "../runtime-api.js";
import type { ResolvedIMessageAccount } from "./accounts.js";
import { monitorIMessageProvider } from "./monitor.js";
import { probeIMessage } from "./probe.js";
@ -55,7 +55,7 @@ export async function startIMessageGatewayAccount(
ctx: Parameters<
NonNullable<
NonNullable<
import("openclaw/plugin-sdk/imessage").ChannelPlugin<ResolvedIMessageAccount>["gateway"]
import("../runtime-api.js").ChannelPlugin<ResolvedIMessageAccount>["gateway"]
>["startAccount"]
>
>[0],

View File

@ -1,4 +1,4 @@
import { type ChannelPlugin } from "openclaw/plugin-sdk/imessage";
import { type ChannelPlugin } from "../runtime-api.js";
import { type ResolvedIMessageAccount } from "./accounts.js";
import { imessageSetupAdapter } from "./setup-core.js";
import { createIMessagePluginBase, imessageSetupWizard } from "./shared.js";

View File

@ -7,7 +7,7 @@ import {
formatTrimmedAllowFromEntries,
normalizeIMessageMessagingTarget,
type ChannelPlugin,
} from "openclaw/plugin-sdk/imessage";
} from "../runtime-api.js";
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
import { type RoutePeer } from "openclaw/plugin-sdk/routing";
import { buildPassiveProbedChannelStatusSummary } from "../../shared/channel-status-summary.js";

View File

@ -10,7 +10,7 @@ import {
getChatChannelMeta,
IMessageConfigSchema,
type ChannelPlugin,
} from "openclaw/plugin-sdk/imessage-core";
} from "../runtime-api.js";
import {
listIMessageAccountIds,
resolveDefaultIMessageAccountId,