Expand description
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 + SyncNotificationServicethat 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.
Re-exports§
pub use policy::NotificationCategory;pub use policy::NotificationPriority;pub use preferences::NotificationPreferences;pub use service::NotificationService;
Modules§
- policy
- Pure classification of agent events into candidate notifications.
- preferences
- User preferences gating which agent events become notifications.
- service
- Stateful notification service wrapping the pure
crate::policy.