feat: add automation reactions event-trigger layer
This commit is contained in:
@@ -677,6 +677,15 @@ Set `automation.delivery_mode` to control automation session behavior:
|
||||
```yaml
|
||||
automation:
|
||||
delivery_mode: shared_session
|
||||
reactions:
|
||||
- name: boss-email
|
||||
on: [gmail]
|
||||
filter:
|
||||
contains: "boss@company.com"
|
||||
run: |
|
||||
Summarize this email and propose next actions.
|
||||
|
||||
{{text}}
|
||||
cron:
|
||||
- name: daily-summary
|
||||
schedule: "0 9 * * *" # 9 AM daily
|
||||
@@ -734,6 +743,7 @@ automation:
|
||||
| Field | Required | Description |
|
||||
|-------|----------|-------------|
|
||||
| `automation.delivery_mode` | no | Automation session strategy: `shared_session`, `isolated_job`, or `announce` (default: `shared_session`) |
|
||||
| `automation.reactions.*` | no | Event-triggered prompt rewrite rules for inbound automation/chat events (supports channel matching + text/metadata filters) |
|
||||
| `name` | yes | Unique job identifier |
|
||||
| `schedule` | yes | Cron expression (standard 5-field) |
|
||||
| `message` | yes | Text sent to the agent when the job fires |
|
||||
@@ -746,6 +756,19 @@ automation:
|
||||
| `automation.daily_briefing.*` | no | Built-in daily briefing preset; generates an extra cron job when `enabled: true` and `output` is set |
|
||||
| `automation.minio_sync.*` | no | Scheduled MinIO prefix ingestion into memory namespaces (direct daemon automation) |
|
||||
|
||||
### Reactions (Event -> Action Prompting)
|
||||
|
||||
Reactions let you convert inbound events into deterministic agent prompts without adding new webhook endpoints or cron jobs.
|
||||
|
||||
- Matchers support:
|
||||
- channel list (`on`)
|
||||
- text filters (`contains`, `regex`)
|
||||
- metadata path filters (`metadata` with dot paths)
|
||||
- Templates support:
|
||||
- `{{text}}`, `{{channel}}`, `{{sender_id}}`
|
||||
- `{{metadata.some.path}}`
|
||||
- First matching rule wins.
|
||||
|
||||
## 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.
|
||||
|
||||
Reference in New Issue
Block a user