feat(channels): add signal-cli channel adapter
This commit is contained in:
@@ -319,6 +319,37 @@ describe('configSchema — matrix', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('configSchema — signal', () => {
|
||||
const minimalConfig = {
|
||||
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
|
||||
models: { default: { provider: 'anthropic', model: 'claude-3' } },
|
||||
};
|
||||
|
||||
it('accepts signal config and defaults polling fields', () => {
|
||||
const result = configSchema.parse({
|
||||
...minimalConfig,
|
||||
signal: {
|
||||
account: '+15551234567',
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.signal).toBeDefined();
|
||||
if (!result.signal) {
|
||||
throw new Error('Expected signal config');
|
||||
}
|
||||
expect(result.signal.account).toBe('+15551234567');
|
||||
expect(result.signal.signal_cli_path).toBe('signal-cli');
|
||||
expect(result.signal.poll_interval_ms).toBe(5000);
|
||||
expect(result.signal.send_timeout_ms).toBe(15000);
|
||||
expect(result.signal.require_mention).toBe(true);
|
||||
});
|
||||
|
||||
it('signal config is optional', () => {
|
||||
const result = configSchema.parse(minimalConfig);
|
||||
expect(result.signal).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('configSchema — whatsapp', () => {
|
||||
const minimalConfig = {
|
||||
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
|
||||
|
||||
Reference in New Issue
Block a user