Plugins: internalize medium extension SDK imports

This commit is contained in:
Vincent Koc 2026-03-17 23:07:58 -07:00
parent df79113593
commit 6e723dfd69
13 changed files with 30 additions and 27 deletions

View File

@ -1,9 +1,9 @@
import type { OpenClawConfig } from "openclaw/plugin-sdk/bluebubbles";
import {
resolveChannelGroupRequireMention,
resolveChannelGroupToolsPolicy,
type GroupToolPolicyConfig,
} from "openclaw/plugin-sdk/channel-policy";
import type { OpenClawConfig } from "./runtime-api.js";
type BlueBubblesGroupContext = {
cfg: OpenClawConfig;

View File

@ -5,7 +5,7 @@ import {
} from "openclaw/plugin-sdk/channel-policy";
import { type ChannelGroupContext } from "openclaw/plugin-sdk/channel-runtime";
import { normalizeAtHashSlug } from "openclaw/plugin-sdk/core";
import type { DiscordConfig } from "openclaw/plugin-sdk/discord";
import type { DiscordConfig } from "./runtime-api.js";
function normalizeDiscordSlug(value?: string | null) {
return normalizeAtHashSlug(value);

View File

@ -1,4 +1,3 @@
import { normalizeGoogleModelId, parseGeminiAuth } from "openclaw/plugin-sdk/google";
import {
assertOkOrThrowHttpError,
describeImageWithModel,
@ -11,6 +10,7 @@ import {
type VideoDescriptionRequest,
type VideoDescriptionResult,
} from "openclaw/plugin-sdk/media-understanding";
import { normalizeGoogleModelId, parseGeminiAuth } from "../runtime-api.js";
export const DEFAULT_GOOGLE_AUDIO_BASE_URL = "https://generativelanguage.googleapis.com/v1beta";
export const DEFAULT_GOOGLE_VIDEO_BASE_URL = "https://generativelanguage.googleapis.com/v1beta";

View File

@ -0,0 +1 @@
export { normalizeGoogleModelId, parseGeminiAuth } from "openclaw/plugin-sdk/google";

View File

@ -7,16 +7,6 @@ import {
buildOpenGroupPolicyWarning,
collectAllowlistProviderGroupPolicyWarnings,
} from "openclaw/plugin-sdk/channel-policy";
import {
buildBaseAccountStatusSnapshot,
buildBaseChannelStatusSummary,
buildChannelConfigSchema,
createAccountStatusSink,
DEFAULT_ACCOUNT_ID,
getChatChannelMeta,
PAIRING_APPROVED_MESSAGE,
type ChannelPlugin,
} from "openclaw/plugin-sdk/irc";
import { runStoppablePassiveMonitor } from "../../shared/passive-monitor.js";
import {
listIrcAccountIds,
@ -34,6 +24,16 @@ import {
} from "./normalize.js";
import { resolveIrcGroupMatch, resolveIrcRequireMention } from "./policy.js";
import { probeIrc } from "./probe.js";
import {
buildBaseAccountStatusSnapshot,
buildBaseChannelStatusSummary,
buildChannelConfigSchema,
createAccountStatusSink,
DEFAULT_ACCOUNT_ID,
getChatChannelMeta,
PAIRING_APPROVED_MESSAGE,
type ChannelPlugin,
} from "./runtime-api.js";
import { getIrcRuntime } from "./runtime.js";
import { sendMessageIrc } from "./send.js";
import { ircSetupAdapter } from "./setup-core.js";

View File

@ -1,3 +1,5 @@
import { z } from "zod";
import { requireChannelOpenAllowFrom } from "../../shared/config-schema-helpers.js";
import {
BlockStreamingCoalesceSchema,
DmConfigSchema,
@ -7,9 +9,7 @@ import {
ReplyRuntimeConfigSchemaShape,
ToolPolicySchema,
requireOpenAllowFrom,
} from "openclaw/plugin-sdk/irc";
import { z } from "zod";
import { requireChannelOpenAllowFrom } from "../../shared/config-schema-helpers.js";
} from "./runtime-api.js";
const IrcGroupSchema = z
.object({

View File

@ -0,0 +1 @@
export * from "openclaw/plugin-sdk/line-core";

View File

@ -1,5 +1,5 @@
import { resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
import { resolveExactLineGroupConfigKey, type OpenClawConfig } from "openclaw/plugin-sdk/line-core";
import { resolveExactLineGroupConfigKey, type OpenClawConfig } from "../runtime-api.js";
type LineGroupContext = {
cfg: OpenClawConfig;

View File

@ -1,11 +1,11 @@
import type { ChannelSetupAdapter, OpenClawConfig } from "openclaw/plugin-sdk/setup";
import {
DEFAULT_ACCOUNT_ID,
listLineAccountIds,
normalizeAccountId,
resolveLineAccount,
type LineConfig,
} from "openclaw/plugin-sdk/line-core";
import type { ChannelSetupAdapter, OpenClawConfig } from "openclaw/plugin-sdk/setup";
} from "../runtime-api.js";
const channel = "line" as const;

View File

@ -1,3 +1,4 @@
import { createAllowFromSection, createTopLevelChannelDmPolicy } from "openclaw/plugin-sdk/setup";
import {
DEFAULT_ACCOUNT_ID,
formatDocsLink,
@ -6,8 +7,7 @@ import {
splitSetupEntries,
type ChannelSetupDmPolicy,
type ChannelSetupWizard,
} from "openclaw/plugin-sdk/line-core";
import { createAllowFromSection, createTopLevelChannelDmPolicy } from "openclaw/plugin-sdk/setup";
} from "../runtime-api.js";
import {
isLineConfigured,
listLineAccountIds,

View File

@ -0,0 +1 @@
export * from "openclaw/plugin-sdk/nostr";

View File

@ -2,6 +2,10 @@ import {
createScopedDmSecurityResolver,
createTopLevelChannelConfigAdapter,
} from "openclaw/plugin-sdk/channel-config-helpers";
import {
buildPassiveChannelStatusSummary,
buildTrafficStatusSummary,
} from "../../shared/channel-status-summary.js";
import {
buildChannelConfigSchema,
collectStatusIssuesFromLastError,
@ -9,11 +13,7 @@ import {
DEFAULT_ACCOUNT_ID,
formatPairingApproveHint,
type ChannelPlugin,
} from "openclaw/plugin-sdk/nostr";
import {
buildPassiveChannelStatusSummary,
buildTrafficStatusSummary,
} from "../../shared/channel-status-summary.js";
} from "../runtime-api.js";
import type { NostrProfile } from "./config-schema.js";
import { NostrConfigSchema } from "./config-schema.js";
import type { MetricEvent, MetricsSnapshot } from "./metrics.js";

View File

@ -1,6 +1,6 @@
import { AllowFromListSchema, DmPolicySchema } from "openclaw/plugin-sdk/channel-config-schema";
import { MarkdownConfigSchema, buildChannelConfigSchema } from "openclaw/plugin-sdk/nostr";
import { z } from "zod";
import { MarkdownConfigSchema, buildChannelConfigSchema } from "../runtime-api.js";
/**
* Validates https:// URLs only (no javascript:, data:, file:, etc.)