Merge pull request #2628 from QwenLM/feat/channels-telegram

feat(channels): add extensible Channels platform with plugin system and Telegram/WeChat/DingTalk channels
This commit is contained in:
tanzhenxin 2026-04-01 16:19:08 +08:00 committed by GitHub
commit b2f04418fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
97 changed files with 9624 additions and 19 deletions

View file

@ -88,6 +88,15 @@ export enum SettingScope {
SystemDefaults = 'SystemDefaults',
}
export interface ExtensionChannelConfig {
/** Relative path to JS entry point (must export `plugin: ChannelPlugin`) */
entry: string;
/** Human-readable name for CLI output */
displayName?: string;
/** Extra config fields required beyond the shared ChannelConfig fields */
requiredConfigFields?: string[];
}
export interface Extension {
id: string;
name: string;
@ -105,6 +114,7 @@ export interface Extension {
skills?: SkillConfig[];
agents?: SubagentConfig[];
hooks?: { [K in HookEventName]?: HookDefinition[] };
channels?: Record<string, ExtensionChannelConfig>;
}
export interface ExtensionConfig {
@ -118,6 +128,7 @@ export interface ExtensionConfig {
agents?: string | string[];
settings?: ExtensionSetting[];
hooks?: { [K in HookEventName]?: HookDefinition[] };
channels?: Record<string, ExtensionChannelConfig>;
}
export interface ExtensionUpdateInfo {
@ -651,6 +662,10 @@ export class ExtensionManager {
);
}
if (config.channels) {
extension.channels = config.channels;
}
extension.commands = await loadCommandsFromDir(
`${effectiveExtensionPath}/commands`,
);