feat(automation): add daily briefing preset and cron backup scheduling
This commit is contained in:
@@ -60,6 +60,7 @@ describe('discoverServices', () => {
|
||||
expect.objectContaining({ name: 'feishu', status: 'not_configured' }),
|
||||
expect.objectContaining({ name: 'zalo', status: 'not_configured' }),
|
||||
expect.objectContaining({ name: 'cron', status: 'not_configured' }),
|
||||
expect.objectContaining({ name: 'daily_briefing', status: 'not_configured' }),
|
||||
expect.objectContaining({ name: 'mcp', status: 'not_configured' }),
|
||||
expect.objectContaining({ name: 'web_search', status: 'configured' }),
|
||||
expect.objectContaining({ name: 'audio_transcription', status: 'not_configured' }),
|
||||
@@ -99,13 +100,18 @@ describe('discoverServices', () => {
|
||||
cfg.automation.cron = [
|
||||
{ name: 'job', schedule: '0 0 * * *', message: 'hi', output: { channel: 'webchat', peer: 'x' }, enabled: true },
|
||||
] as CronJobConfig[];
|
||||
(cfg.automation as Record<string, unknown>).daily_briefing = {
|
||||
enabled: true,
|
||||
output: { channel: 'webchat', peer: 'x' },
|
||||
};
|
||||
cfg.mcp.servers = [{ name: 'srv', command: 'x', args: [] }];
|
||||
|
||||
const reg = new ChannelRegistry();
|
||||
const services = discoverServices(cfg, reg);
|
||||
|
||||
expect(services.find(s => s.name === 'cron')?.status).toBe('configured');
|
||||
expect(services.find(s => s.name === 'cron')?.itemCount).toBe(1);
|
||||
expect(services.find(s => s.name === 'cron')?.itemCount).toBe(2);
|
||||
expect(services.find(s => s.name === 'daily_briefing')?.status).toBe('configured');
|
||||
expect(services.find(s => s.name === 'mcp')?.metadata).toEqual({ serverCount: 1 });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user