feat(automation): add daily briefing preset and cron backup scheduling
This commit is contained in:
@@ -341,6 +341,36 @@ const gtasksSchema = z.object({
|
||||
token_file: z.string().default('~/.config/flynn/gtasks-token.json'),
|
||||
}).optional();
|
||||
|
||||
const dailyBriefingSchema = z.object({
|
||||
enabled: z.boolean().default(false),
|
||||
name: z.string().min(1).default('daily-briefing'),
|
||||
schedule: z.string().min(1).default('0 8 * * *'),
|
||||
timezone: z.string().optional(),
|
||||
output: z.object({
|
||||
channel: z.string().min(1),
|
||||
peer: z.string().min(1),
|
||||
}).optional(),
|
||||
prompt: z.string().min(1).default(
|
||||
[
|
||||
'Create my daily briefing.',
|
||||
'',
|
||||
'Use available tools to gather:',
|
||||
'- Today\'s calendar events (calendar.today or calendar.list)',
|
||||
'- Unread or recent important email (gmail.search/gmail.list)',
|
||||
'- Top pending tasks (tasks.list/tasks.lists)',
|
||||
'',
|
||||
'Output format:',
|
||||
'1) Schedule',
|
||||
'2) Priorities',
|
||||
'3) Risks/Follow-ups',
|
||||
'4) Suggested first actions',
|
||||
'',
|
||||
'Keep it concise and actionable.',
|
||||
].join('\n'),
|
||||
),
|
||||
model_tier: modelTierEnum.optional(),
|
||||
}).default({});
|
||||
|
||||
const automationDeliveryModeSchema = z.enum(['shared_session', 'isolated_job']);
|
||||
|
||||
const automationSchema = z.object({
|
||||
@@ -353,6 +383,7 @@ const automationSchema = z.object({
|
||||
gdocs: gdocsSchema,
|
||||
gdrive: gdriveSchema,
|
||||
gtasks: gtasksSchema,
|
||||
daily_briefing: dailyBriefingSchema,
|
||||
heartbeat: heartbeatSchema,
|
||||
}).default({});
|
||||
|
||||
@@ -683,7 +714,9 @@ const sessionsSchema = z.object({
|
||||
|
||||
const backupSchema = z.object({
|
||||
enabled: z.boolean().default(false),
|
||||
schedule: z.string().optional(),
|
||||
interval: z.string().default('24h'),
|
||||
run_on_start: z.boolean().default(false),
|
||||
local_dir: z.string().default('~/.local/share/flynn/backups'),
|
||||
include_vectors: z.boolean().default(true),
|
||||
minio: z.object({
|
||||
@@ -814,6 +847,7 @@ export type GcalConfig = z.infer<typeof gcalSchema>;
|
||||
export type GdocsConfig = z.infer<typeof gdocsSchema>;
|
||||
export type GdriveConfig = z.infer<typeof gdriveSchema>;
|
||||
export type GtasksConfig = z.infer<typeof gtasksSchema>;
|
||||
export type DailyBriefingConfig = z.infer<typeof dailyBriefingSchema>;
|
||||
export type AutomationDeliveryMode = z.infer<typeof automationDeliveryModeSchema>;
|
||||
export type PairingCodeConfig = z.infer<typeof pairingSchema>;
|
||||
export type LogLevel = z.infer<typeof logLevelSchema>;
|
||||
|
||||
Reference in New Issue
Block a user