Add Feishu channel adapter with webhook and send path

This commit is contained in:
William Valentin
2026-02-16 13:07:45 -08:00
parent 376f74550e
commit 891ccb696e
16 changed files with 644 additions and 6 deletions
+27
View File
@@ -608,6 +608,33 @@ describe('configSchema — line', () => {
});
});
describe('configSchema — feishu', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
models: { default: { provider: 'anthropic', model: 'claude-3' } },
};
it('accepts feishu config and defaults optional fields', () => {
const result = configSchema.parse({
...minimalConfig,
feishu: {
app_id: 'cli_a1b2c3',
app_secret: 'secret',
},
});
expect(result.feishu).toBeDefined();
if (!result.feishu) {
throw new Error('Expected feishu config');
}
expect(result.feishu.app_id).toBe('cli_a1b2c3');
expect(result.feishu.app_secret).toBe('secret');
expect(result.feishu.allowed_chat_ids).toEqual([]);
expect(result.feishu.require_mention).toBe(true);
expect(result.feishu.mention_name).toBe('flynn');
});
});
describe('configSchema — whatsapp', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },