feat(channels): add mattermost adapter and wiring

This commit is contained in:
William Valentin
2026-02-16 12:09:44 -08:00
parent 813a0dc5c5
commit de0c1f41b3
16 changed files with 645 additions and 6 deletions
+32
View File
@@ -438,6 +438,38 @@ describe('configSchema — audio talk mode', () => {
});
});
describe('configSchema — mattermost', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
models: { default: { provider: 'anthropic', model: 'claude-3' } },
};
it('accepts mattermost config and defaults optional fields', () => {
const result = configSchema.parse({
...minimalConfig,
mattermost: {
server_url: 'https://mattermost.example.com',
bot_token: 'mm-token',
},
});
expect(result.mattermost).toBeDefined();
if (!result.mattermost) {
throw new Error('Expected mattermost config');
}
expect(result.mattermost.server_url).toBe('https://mattermost.example.com');
expect(result.mattermost.allowed_channel_ids).toEqual([]);
expect(result.mattermost.require_mention).toBe(true);
expect(result.mattermost.mention_name).toBe('flynn');
expect(result.mattermost.poll_interval_ms).toBe(3000);
});
it('mattermost config is optional', () => {
const result = configSchema.parse(minimalConfig);
expect(result.mattermost).toBeUndefined();
});
});
describe('configSchema — teams', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },