import 'reflect-metadata'; import { type ChannelContext } from '../interfaces'; import { type ChannelMetadata, type ChannelNotification } from '../metadata'; /** * Decorator that marks a class as a Channel and provides metadata. * * @example * ```typescript * @Channel({ * name: 'deploy-alerts', * description: 'CI/CD deployment notifications', * source: { type: 'webhook', path: '/hooks/deploy' }, * twoWay: true, * }) * class DeployChannel extends ChannelContext { * async onEvent(payload: unknown): Promise { * return { content: `Deploy event received` }; * } * } * ``` */ declare function FrontMcpChannel(providedMetadata: ChannelMetadata): ClassDecorator; /** * Handler type for function-based channels. */ export type ChannelMessageHandler = (payload: unknown, ctx?: ChannelContext) => ChannelNotification | Promise; /** * Function builder for channels (alternative to class-based @Channel decorator). * * @example * ```typescript * const ErrorChannel = channel({ * name: 'error-alerts', * source: { type: 'app-event', event: 'error' }, * })((payload) => ({ * content: `Error: ${(payload as any).message}`, * meta: { severity: (payload as any).level }, * })); * ``` */ declare function frontMcpChannel(providedMetadata: ChannelMetadata): (handler: ChannelMessageHandler) => () => void; /** * Channel decorator and function builder. * * - As a class decorator: `@Channel({ name: '...', source: {...} })` * - As a function builder: `channel({ name: '...', source: {...} })(handler)` */ export declare const Channel: typeof FrontMcpChannel; export declare const channel: typeof frontMcpChannel; /** * Type guard to check if a value is a class decorated with @Channel. */ export declare function isChannelClass(target: unknown): boolean; /** * Type guard to check if a value is a function-based channel. */ export declare function isChannelFunction(target: unknown): boolean; export {}; //# sourceMappingURL=channel.decorator.d.ts.map