feat(telegram): harden channel reliability with retries and error diagnostics

This commit is contained in:
William Valentin
2026-02-18 13:12:11 -08:00
parent 0ccbe65d3f
commit 42ae4a75df
11 changed files with 323 additions and 44 deletions
+12
View File
@@ -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] },
+1 -1
View File
@@ -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({