Add LINE channel adapter with webhook ingress and gating

This commit is contained in:
William Valentin
2026-02-16 13:02:26 -08:00
parent a954d7e136
commit 76d44a74bf
15 changed files with 584 additions and 5 deletions
+27
View File
@@ -581,6 +581,33 @@ describe('configSchema — bluebubbles', () => {
});
});
describe('configSchema — line', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
models: { default: { provider: 'anthropic', model: 'claude-3' } },
};
it('accepts line config and defaults optional fields', () => {
const result = configSchema.parse({
...minimalConfig,
line: {
channel_access_token: 'line-token',
channel_secret: 'line-secret',
},
});
expect(result.line).toBeDefined();
if (!result.line) {
throw new Error('Expected line config');
}
expect(result.line.channel_access_token).toBe('line-token');
expect(result.line.channel_secret).toBe('line-secret');
expect(result.line.allowed_source_ids).toEqual([]);
expect(result.line.require_mention).toBe(true);
expect(result.line.mention_name).toBe('flynn');
});
});
describe('configSchema — whatsapp', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },