mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 09:01:19 +00:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user