Notification policy for the Bamboo agent framework.
This crate owns the decision of whether a given AgentEvent should
surface to the user as a notification. It is deliberately a self-contained
infra crate with no I/O beyond reading/writing a small preferences file and
no async runtime: it classifies events, gates them against user
[NotificationPreferences], and coalesces duplicates within a short window.
The pipeline is three layers:
- [
preferences] — the user's opt-in/opt-out flags, persisted as JSON. - [
policy] — a pureclassifyfunction mapping anAgentEvent+ preferences into an optionalClassifiedNotification. - [
service] — aSend + Sync[NotificationService] that wraps policy with a dedup window, preference persistence, and per-session relay idempotency for the server to hang off anArc.
The server constructs the user-facing
AgentEvent::Notification;
the client merely delivers it after its own presence checks.