feat: load channel plugins

This commit is contained in:
Peter Steinberger
2026-01-15 02:42:41 +00:00
parent b1e3d79eaa
commit 2b4a68e276
49 changed files with 494 additions and 159 deletions

View File

@@ -2,17 +2,17 @@ import { listChannelPlugins } from "../../channels/plugins/index.js";
import type { ChannelPlugin } from "../../channels/plugins/types.js";
import type { ClawdbotConfig } from "../../config/config.js";
import {
DELIVERABLE_MESSAGE_CHANNELS,
listDeliverableMessageChannels,
type DeliverableMessageChannel,
normalizeMessageChannel,
} from "../../utils/message-channel.js";
export type MessageChannelId = DeliverableMessageChannel;
const MESSAGE_CHANNELS = [...DELIVERABLE_MESSAGE_CHANNELS];
const getMessageChannels = () => listDeliverableMessageChannels();
function isKnownChannel(value: string): value is MessageChannelId {
return (MESSAGE_CHANNELS as readonly string[]).includes(value);
return getMessageChannels().includes(value as MessageChannelId);
}
function isAccountEnabled(account: unknown): boolean {