mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 04:30:42 +00:00
refactor(extensions): add channel-owned config schema seams
This commit is contained in:
4
extensions/discord/config-api.ts
Normal file
4
extensions/discord/config-api.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
DiscordConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
DiscordConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
import { buildChannelConfigSchema, DiscordConfigSchema } from "../config-api.js";
|
||||
import { discordChannelConfigUiHints } from "./config-ui-hints.js";
|
||||
|
||||
export const DiscordChannelConfigSchema = buildChannelConfigSchema(DiscordConfigSchema, {
|
||||
|
||||
@@ -5,10 +5,7 @@ export {
|
||||
projectCredentialSnapshotFields,
|
||||
resolveConfiguredFromCredentialStatuses,
|
||||
} from "openclaw/plugin-sdk/channel-status";
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
DiscordConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
export { buildChannelConfigSchema, DiscordConfigSchema } from "../config-api.js";
|
||||
export type {
|
||||
ChannelMessageActionAdapter,
|
||||
ChannelMessageActionContext,
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
GoogleChatConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
import { buildChannelConfigSchema, GoogleChatConfigSchema } from "openclaw/plugin-sdk/googlechat";
|
||||
|
||||
export const GoogleChatChannelConfigSchema = buildChannelConfigSchema(GoogleChatConfigSchema);
|
||||
|
||||
4
extensions/imessage/config-api.ts
Normal file
4
extensions/imessage/config-api.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
IMessageConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
@@ -2,11 +2,11 @@ import type { OpenClawConfig as RuntimeApiOpenClawConfig } from "openclaw/plugin
|
||||
|
||||
export {
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
buildChannelConfigSchema,
|
||||
getChatChannelMeta,
|
||||
type ChannelPlugin,
|
||||
type OpenClawConfig,
|
||||
} from "openclaw/plugin-sdk/core";
|
||||
export { buildChannelConfigSchema, IMessageConfigSchema } from "./config-api.js";
|
||||
export { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
||||
export {
|
||||
buildComputedAccountStatusSnapshot,
|
||||
@@ -19,7 +19,6 @@ export {
|
||||
} from "./src/config-accessors.js";
|
||||
export { looksLikeIMessageTargetId, normalizeIMessageMessagingTarget } from "./src/normalize.js";
|
||||
export { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
|
||||
export { IMessageConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
||||
export {
|
||||
resolveIMessageGroupRequireMention,
|
||||
resolveIMessageGroupToolPolicy,
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
IMessageConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
import { buildChannelConfigSchema, IMessageConfigSchema } from "../config-api.js";
|
||||
import { iMessageChannelConfigUiHints } from "./config-ui-hints.js";
|
||||
|
||||
export const IMessageChannelConfigSchema = buildChannelConfigSchema(IMessageConfigSchema, {
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
MSTeamsConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
import { buildChannelConfigSchema, MSTeamsConfigSchema } from "openclaw/plugin-sdk/msteams";
|
||||
import { msTeamsChannelConfigUiHints } from "./config-ui-hints.js";
|
||||
|
||||
export const MSTeamsChannelConfigSchema = buildChannelConfigSchema(MSTeamsConfigSchema, {
|
||||
|
||||
4
extensions/signal/config-api.ts
Normal file
4
extensions/signal/config-api.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
SignalConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
SignalConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
import { buildChannelConfigSchema, SignalConfigSchema } from "../config-api.js";
|
||||
import { signalChannelConfigUiHints } from "./config-ui-hints.js";
|
||||
|
||||
export const SignalChannelConfigSchema = buildChannelConfigSchema(SignalConfigSchema, {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Prefer narrower SDK subpaths plus local extension seams over the legacy signal barrel.
|
||||
|
||||
export type { ChannelMessageActionAdapter } from "openclaw/plugin-sdk/channel-contract";
|
||||
export { SignalConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
||||
export { buildChannelConfigSchema, SignalConfigSchema } from "../config-api.js";
|
||||
export { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
||||
import type { OpenClawConfig as RuntimeOpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
export type { RuntimeOpenClawConfig as OpenClawConfig };
|
||||
@@ -11,7 +11,6 @@ export type { ChannelPlugin } from "openclaw/plugin-sdk/core";
|
||||
export {
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
applyAccountNameToChannelSection,
|
||||
buildChannelConfigSchema,
|
||||
deleteAccountFromConfigSection,
|
||||
emptyPluginConfigSchema,
|
||||
formatPairingApproveHint,
|
||||
|
||||
4
extensions/slack/config-api.ts
Normal file
4
extensions/slack/config-api.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
SlackConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
SlackConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
import { buildChannelConfigSchema, SlackConfigSchema } from "../config-api.js";
|
||||
import { slackChannelConfigUiHints } from "./config-ui-hints.js";
|
||||
|
||||
export const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, {
|
||||
|
||||
@@ -4,10 +4,7 @@ export {
|
||||
projectCredentialSnapshotFields,
|
||||
resolveConfiguredFromRequiredCredentialStatuses,
|
||||
} from "openclaw/plugin-sdk/channel-status";
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
SlackConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
export { buildChannelConfigSchema, SlackConfigSchema } from "../config-api.js";
|
||||
export type { ChannelMessageActionContext } from "openclaw/plugin-sdk/channel-contract";
|
||||
export { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
||||
export type {
|
||||
|
||||
4
extensions/telegram/config-api.ts
Normal file
4
extensions/telegram/config-api.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
TelegramConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
@@ -27,10 +27,7 @@ export {
|
||||
formatPairingApproveHint,
|
||||
getChatChannelMeta,
|
||||
} from "openclaw/plugin-sdk/core";
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
TelegramConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
export { buildChannelConfigSchema, TelegramConfigSchema } from "./config-api.js";
|
||||
export { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
||||
export {
|
||||
PAIRING_APPROVED_MESSAGE,
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
TelegramConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
import { buildChannelConfigSchema, TelegramConfigSchema } from "../config-api.js";
|
||||
import { telegramChannelConfigUiHints } from "./config-ui-hints.js";
|
||||
|
||||
export const TelegramChannelConfigSchema = buildChannelConfigSchema(TelegramConfigSchema, {
|
||||
|
||||
4
extensions/whatsapp/config-api.ts
Normal file
4
extensions/whatsapp/config-api.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
WhatsAppConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
buildChannelConfigSchema,
|
||||
WhatsAppConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
import { buildChannelConfigSchema, WhatsAppConfigSchema } from "../config-api.js";
|
||||
import { whatsAppChannelConfigUiHints } from "./config-ui-hints.js";
|
||||
|
||||
export const WhatsAppChannelConfigSchema = buildChannelConfigSchema(WhatsAppConfigSchema, {
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
export { getChatChannelMeta, type ChannelPlugin } from "openclaw/plugin-sdk/core";
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
WhatsAppConfigSchema,
|
||||
} from "openclaw/plugin-sdk/channel-config-schema";
|
||||
export { buildChannelConfigSchema, WhatsAppConfigSchema } from "../config-api.js";
|
||||
export { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
||||
export {
|
||||
formatWhatsAppConfigAllowFromEntries,
|
||||
|
||||
Reference in New Issue
Block a user