import { Notification } from '../core/index.ts'; interface FeishuConfig { webhook: string; } export class FeishuNotifier implements Notification { private webhook: string; constructor(config: FeishuConfig) { this.webhook = config.webhook; } async notify(message: string): Promise { const payload = { msg_type: 'text', content: { text: message, }, }; const response = await fetch(this.webhook, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(payload), }); if (!response.ok) { console.error(`飞书推送失败: ${response.statusText}`); return false; } return true; } }