feat(telegram): harden channel reliability with retries and error diagnostics
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { configSchema } from './schema.js';
|
||||
|
||||
describe('configSchema — telegram', () => {
|
||||
const minimalConfig = {
|
||||
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
|
||||
models: { default: { provider: 'anthropic', model: 'claude-3' } },
|
||||
};
|
||||
|
||||
it('defaults telegram require_mention to false', () => {
|
||||
const result = configSchema.parse(minimalConfig);
|
||||
expect(result.telegram?.require_mention).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('configSchema — sandbox', () => {
|
||||
const minimalConfig = {
|
||||
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
|
||||
|
||||
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
||||
const telegramSchema = z.object({
|
||||
bot_token: z.string().min(1, 'Bot token is required'),
|
||||
allowed_chat_ids: z.array(z.number()).min(1, 'At least one chat ID required'),
|
||||
require_mention: z.boolean().default(true),
|
||||
require_mention: z.boolean().default(false),
|
||||
});
|
||||
|
||||
const tailscaleSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user