update_digest_state
Records email digest run results by merging processed UIDs, updating lastRun, refreshing pending actions, and accumulating per-sender skip counts for future runs.
Instructions
Update the digest state after a run. Merges new processed UIDs into the existing list, updates lastRun, replaces pendingActions, and accumulates per-sender skip counts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lastRun | No | ISO timestamp of this run | |
| skipCounts | No | Map of sender address to skip count increment for this run, e.g. { "news@example.com": 3 }. Accumulated across runs for smart unsubscribe. | |
| processedUids | No | Email UIDs processed in this run — merged with existing and capped at 5000 | |
| seenReminders | No | Snapshot of all active reminders in the "claude" list at end of this run — used next run to detect which ones the user deleted. Each: { id, title, notes? }. | |
| pendingActions | No | Full replacement list of pending action items to track across runs (deadlines, waiting-for-reply, etc.). Each item: { type, subject, to/from, dueDate?, notes? } | |
| dismissedReminders | No | Full replacement list of reminders the user has deleted from the "claude" list (treated as "not interested"). Each: { title, notes?, dismissedAt (ISO) }. Entries older than 30 days are pruned automatically. Capped at 500. |