corvix.actions¶
Action execution for matched rules.
Classes¶
Gateway interface for marking notification threads as read. |
|
Gateway interface for dismissing (deleting) notification threads. |
|
Summary of actions taken on one notification. |
|
Bundles all execution dependencies for |
|
Strategy interface for a single action type. |
|
Handles the |
|
Handles the |
Functions¶
|
Execute configured actions against a notification. |
Module Contents¶
- class corvix.actions.MarkReadGateway[source][source]¶
Bases:
ProtocolGateway interface for marking notification threads as read.
- class corvix.actions.DismissGateway[source][source]¶
Bases:
ProtocolGateway interface for dismissing (deleting) notification threads.
- class corvix.actions.ActionExecutionResult[source][source]¶
Summary of actions taken on one notification.
- class corvix.actions.ActionExecutionContext[source][source]¶
Bundles all execution dependencies for
execute_actions().- Attributes:
gateway: Must implement
MarkReadGateway. apply_actions: IfFalseactions are recorded as dry-run only. dismiss_gateway: Must implementDismissGateway; required for dismiss actions. record: The associatedNotificationRecordused for dismiss state tracking.
- gateway: MarkReadGateway[source][source]¶
- dismiss_gateway: DismissGateway | None = None[source][source]¶
- record: corvix.domain.NotificationRecord | None = None[source][source]¶
- class corvix.actions._ActionHandler[source][source]¶
Bases:
ProtocolStrategy interface for a single action type.
- execute(notification: corvix.domain.Notification, result: ActionExecutionResult) None[source][source]¶
Execute the action, mutating result in place.
- class corvix.actions._MarkReadHandler(gateway: MarkReadGateway, apply_actions: bool)[source][source]¶
Handles the
mark_readaction.- execute(notification: corvix.domain.Notification, result: ActionExecutionResult) None[source][source]¶
- class corvix.actions._DismissHandler(gateway: DismissGateway | None, apply_actions: bool, record: corvix.domain.NotificationRecord | None)[source][source]¶
Handles the
dismissaction.- execute(notification: corvix.domain.Notification, result: ActionExecutionResult) None[source][source]¶
- corvix.actions.execute_actions(notification: corvix.domain.Notification, actions: list[corvix.config.RuleAction], context: ActionExecutionContext) ActionExecutionResult[source][source]¶
Execute configured actions against a notification.
- Args:
notification: The notification to act on. actions: The list of rule actions to execute. context: Execution context carrying gateways and flags.