fix(plugin-sdk): remove remaining bundled plugin src imports (openclaw#39638)

Verified:
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Kyle <3477429+kyledh@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
Kyle
2026-03-09 11:32:45 +08:00
committed by GitHub
parent adec8b28bb
commit a438ff4397
11 changed files with 60 additions and 19 deletions

View File

@@ -75,6 +75,7 @@ export {
resolveServicePrefixedTarget,
} from "../imessage/target-parsing-helpers.js";
export { stripMarkdown } from "../line/markdown-to-line.js";
export { parseFiniteNumber } from "../infra/parse-finite-number.js";
export { emptyPluginConfigSchema } from "../plugins/config-schema.js";
export type { PluginRuntime } from "../plugins/runtime/types.js";
export type { OpenClawPluginApi } from "../plugins/types.js";

View File

@@ -77,6 +77,7 @@ export {
requireOpenAllowFrom,
} from "../config/zod-schema.core.js";
export { createDedupeCache } from "../infra/dedupe.js";
export { parseStrictPositiveInteger } from "../infra/parse-finite-number.js";
export { rawDataToString } from "../infra/ws.js";
export { isLoopbackHost, isTrustedProxyAddress, resolveClientIp } from "../gateway/net.js";
export { registerPluginHttpRoute } from "../plugins/http-registry.js";

View File

@@ -73,6 +73,7 @@ export {
readRequestBodyWithLimit,
requestBodyErrorToText,
} from "../infra/http-body.js";
export { waitForAbortSignal } from "../infra/abort-signal.js";
export { fetchWithSsrFGuard } from "../infra/net/fetch-guard.js";
export { emptyPluginConfigSchema } from "../plugins/config-schema.js";
export type { PluginRuntime } from "../plugins/runtime/types.js";

View File

@@ -105,4 +105,19 @@ describe("plugin-sdk subpath exports", () => {
expect(mod, `subpath ${id} should resolve`).toBeTruthy();
}
});
it("keeps the newly added bundled plugin-sdk contracts available", async () => {
const bluebubbles = await import("openclaw/plugin-sdk/bluebubbles");
expect(typeof bluebubbles.parseFiniteNumber).toBe("function");
const mattermost = await import("openclaw/plugin-sdk/mattermost");
expect(typeof mattermost.parseStrictPositiveInteger).toBe("function");
const nextcloudTalk = await import("openclaw/plugin-sdk/nextcloud-talk");
expect(typeof nextcloudTalk.waitForAbortSignal).toBe("function");
const twitch = await import("openclaw/plugin-sdk/twitch");
expect(typeof twitch.DEFAULT_ACCOUNT_ID).toBe("string");
expect(typeof twitch.normalizeAccountId).toBe("function");
});
});

View File

@@ -3,17 +3,38 @@
export type { ReplyPayload } from "../auto-reply/types.js";
export { buildChannelConfigSchema } from "../channels/plugins/config-schema.js";
export type {
ChannelGatewayContext,
ChannelOutboundAdapter,
ChannelOutboundContext,
ChannelResolveKind,
ChannelResolveResult,
ChannelStatusAdapter,
} from "../channels/plugins/types.adapters.js";
export type {
BaseProbeResult,
ChannelAccountSnapshot,
ChannelCapabilities,
ChannelLogSink,
ChannelMessageActionAdapter,
ChannelMessageActionContext,
ChannelMeta,
ChannelStatusIssue,
} from "../channels/plugins/types.js";
export type { ChannelPlugin } from "../channels/plugins/types.plugin.js";
export type {
ChannelOnboardingAdapter,
ChannelOnboardingDmPolicy,
} from "../channels/plugins/onboarding-types.js";
export { promptChannelAccessConfig } from "../channels/plugins/onboarding/channel-access.js";
export type { BaseProbeResult, ChannelStatusIssue } from "../channels/plugins/types.js";
export { createReplyPrefixOptions } from "../channels/reply-prefix.js";
export type { OpenClawConfig } from "../config/config.js";
export { MarkdownConfigSchema } from "../config/zod-schema.core.js";
export type { OutboundDeliveryResult } from "../infra/outbound/deliver.js";
export { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "./account-id.js";
export { emptyPluginConfigSchema } from "../plugins/config-schema.js";
export type { PluginRuntime } from "../plugins/runtime/types.js";
export type { OpenClawPluginApi } from "../plugins/types.js";
export type { RuntimeEnv } from "../runtime.js";
export { formatDocsLink } from "../terminal/links.js";
export type { WizardPrompter } from "../wizard/prompts.js";