feat(automation): add daily briefing preset and cron backup scheduling

This commit is contained in:
William Valentin
2026-02-16 13:42:18 -08:00
parent 52231b7a93
commit ce621d1b72
13 changed files with 350 additions and 45 deletions
+40
View File
@@ -22,8 +22,10 @@ Self-hosted personal AI assistant with Telegram and Terminal interfaces.
- **CLI**: Full command-line interface (`flynn start`, `send`, `doctor`, `completion`, etc.)
- **Shell Completion**: Auto-generated completions for bash, zsh, and fish with `--install` flag
- **Cron Scheduling**: Automated messages on cron schedules with output routing
- **Daily Briefing Automation**: Optional built-in morning briefing preset (calendar + inbox + tasks summary prompt)
- **Inbound Webhooks**: HTTP endpoints that trigger agent processing with HMAC auth and template rendering
- **Heartbeat Monitor**: Periodic health checks (gateway, model, channels, memory, disk) with failure notifications
- **Scheduled Backups**: Interval- or cron-based snapshot backups with optional startup run
- **Gmail Pub/Sub Watcher**: Monitor Gmail inbox via Google Cloud Pub/Sub push notifications with polling fallback
- **Vector Memory Search**: Hybrid keyword + semantic search with embeddings (OpenAI, Gemini, Ollama, llama.cpp, Voyage AI)
- **Docker Deployment**: Multi-stage Dockerfile and docker-compose.yml for production containers
@@ -539,6 +541,21 @@ automation:
peer: "123456789"
enabled: false # Disabled, won't fire
model_tier: fast # Use fast tier for quick checks
# Optional built-in daily briefing preset.
# This automatically registers a cron job; you only set schedule/output/prompt.
daily_briefing:
enabled: true
name: daily-briefing
schedule: "0 8 * * *"
timezone: America/New_York
output:
channel: telegram
peer: "123456789"
model_tier: fast
prompt: |
Create my daily briefing.
Summarize today's calendar, unread/important email, and top pending tasks.
```
### Cron Config Fields
@@ -554,6 +571,29 @@ automation:
| `timezone` | no | IANA timezone (defaults to system timezone) |
| `enabled` | no | Whether the job is active (default: `true`) |
| `model_tier` | no | Model tier for this job: `fast`, `default`, `complex`, or `local` |
| `automation.daily_briefing.*` | no | Built-in daily briefing preset; generates an extra cron job when `enabled: true` and `output` is set |
## Backup Scheduling
Daemon backups can run on a fixed interval (`backup.interval`) or a cron schedule (`backup.schedule`). If both are set, `backup.schedule` takes precedence.
```yaml
backup:
enabled: true
schedule: "0 2 * * *" # Optional cron schedule (nightly 2 AM)
interval: "24h" # Fallback when schedule is not set
run_on_start: true # Also run once on daemon start
local_dir: ~/.local/share/flynn/backups
include_vectors: true
minio:
enabled: true
endpoint: localhost:9000
access_key: "${MINIO_ACCESS_KEY}"
secret_key: "${MINIO_SECRET_KEY}"
bucket: flynn-backups
prefix: flynn
secure: true
```
## Inbound Webhooks