corvix.enrichment¶
Notification enrichment package.
Submodules¶
Classes¶
Per-cycle provider context with request budget and URL cache. |
|
Protocol implemented by enrichment providers. |
|
Client capability required by enrichment providers. |
|
Runs configured enrichment providers over notifications. |
|
Result of enriching one poll cycle. |
|
Enriches comment notifications with the latest comment metadata. |
|
Enriches pull-request notifications with state metadata. |
Package Contents¶
- class corvix.enrichment.EnrichmentContext[source][source]¶
Per-cycle provider context with request budget and URL cache.
- url_cache: dict[str, corvix.types.JsonValue][source]¶
- get_json(client: JsonFetchClient, url: str, timeout_seconds: float) corvix.types.JsonValue[source][source]¶
Fetch and cache a JSON payload for this cycle.
- class corvix.enrichment.EnrichmentProvider[source][source]¶
Bases:
ProtocolProtocol implemented by enrichment providers.
- enrich(notification: corvix.domain.Notification, client: JsonFetchClient, ctx: EnrichmentContext) dict[str, object][source][source]¶
- class corvix.enrichment.JsonFetchClient[source][source]¶
Bases:
ProtocolClient capability required by enrichment providers.
- class corvix.enrichment.EnrichmentEngine[source][source]¶
Runs configured enrichment providers over notifications.
- run(notifications: list[corvix.domain.Notification], client: corvix.enrichment.base.JsonFetchClient, clients_by_account: dict[str, corvix.enrichment.base.JsonFetchClient] | None = None) EnrichmentRunResult[source][source]¶
Run enabled providers for all notifications in one cycle.
- class corvix.enrichment.GitHubLatestCommentProvider[source][source]¶
Enriches comment notifications with the latest comment metadata.
- enrich(notification: corvix.domain.Notification, client: corvix.enrichment.base.JsonFetchClient, ctx: corvix.enrichment.base.EnrichmentContext) dict[str, object][source][source]¶
Return latest comment metadata under the provider namespace.
- class corvix.enrichment.GitHubPRStateProvider[source][source]¶
Enriches pull-request notifications with state metadata.
- enrich(notification: corvix.domain.Notification, client: corvix.enrichment.base.JsonFetchClient, ctx: corvix.enrichment.base.EnrichmentContext) dict[str, object][source][source]¶
Return pull-request state metadata under the provider namespace.