feat: pass context to feed post-processors (#43)

Post-processors now receive Context as their 2nd parameter,
allowing them to use contextual data (time, location, etc.)
when producing enhancements.

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-03-01 17:10:55 +00:00
committed by GitHub
parent 40ad90aa2d
commit fe1d261f56
3 changed files with 14 additions and 16 deletions

View File

@@ -1,3 +1,4 @@
import type { Context } from "./context"
import type { FeedItem } from "./feed"
export interface ItemGroup {
@@ -20,4 +21,4 @@ export interface FeedEnhancement {
* A function that transforms feed items and produces enhancement directives.
* Use named functions for meaningful error attribution.
*/
export type FeedPostProcessor = (items: FeedItem[]) => Promise<FeedEnhancement>
export type FeedPostProcessor = (items: FeedItem[], context: Context) => Promise<FeedEnhancement>