corvix.services¶
Application services orchestrating ingestion, actions, and rendering.
Classes¶
Client capabilities required by the poll cycle orchestration. |
|
Result of one polling cycle. |
|
All inputs required by |
Functions¶
|
Fetch notifications, score/evaluate, optionally execute actions, and persist cache. |
|
Run polling loop suitable for local daemon usage. |
Load persisted records and render dashboards. |
|
|
|
Module Contents¶
- class corvix.services.NotificationsClient[source][source]¶
Bases:
corvix.actions.MarkReadGateway,corvix.enrichment.base.JsonFetchClient,ProtocolClient capabilities required by the poll cycle orchestration.
- fetch_notifications(polling: corvix.config.PollingConfig) list[corvix.domain.Notification][source][source]¶
Fetch notifications with configured polling options.
- class corvix.services.PollingSummary[source][source]¶
Result of one polling cycle.
- dispatch: corvix.notifications.models.DispatchResult | None = None[source][source]¶
- class corvix.services.PollCycleInput[source][source]¶
All inputs required by
run_poll_cycle().- Attributes:
config: Application configuration. clients: GitHub notifications clients. cache: Persistent notification cache. apply_actions: If
False, actions are recorded as dry-run only. now: Override the current time (useful for testing). notification_targets: Optional notification dispatch targets.
- clients: tuple[NotificationsClient, Ellipsis] = ()[source][source]¶
- client: NotificationsClient | None = None[source][source]¶
- now: datetime.datetime | None = None[source][source]¶
- corvix.services.run_poll_cycle(input: PollCycleInput) PollingSummary[source][source]¶
Fetch notifications, score/evaluate, optionally execute actions, and persist cache.
If
input.notification_targetsis provided (andinput.config.notifications.enabledisTrue) the poll cycle will detect newly-arrived unread notifications and fan-out delivery to each target after saving the snapshot.
- corvix.services.run_watch_loop(config: corvix.config.AppConfig, cache: corvix.storage.NotificationCache, apply_actions: bool, clients: tuple[NotificationsClient, Ellipsis] | None = None, client: NotificationsClient | None = None, iterations: int | None = None) list[PollingSummary][source][source]¶
Run polling loop suitable for local daemon usage.
- corvix.services.render_cached_dashboards(config: corvix.config.AppConfig, cache: corvix.storage.NotificationCache, console: rich.console.Console, dashboard_name: str | None = None) list[corvix.presentation.DashboardRenderResult][source][source]¶
Load persisted records and render dashboards.
- corvix.services._select_dashboards(config: corvix.config.AppConfig, dashboard_name: str | None) list[corvix.config.DashboardSpec][source][source]¶
- corvix.services._build_enrichment_providers(config: corvix.config.AppConfig) list[corvix.enrichment.base.EnrichmentProvider][source][source]¶