mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-21 01:21:17 +00:00
Rename all references across the codebase: package names, imports, source IDs, directory names, docs, and configs. Co-authored-by: Ona <no-reply@ona.com>
27 lines
843 B
TypeScript
27 lines
843 B
TypeScript
import type { Context } from "./context"
|
|
import type { FeedItem } from "./feed"
|
|
|
|
export interface ItemGroup {
|
|
/** IDs of items to present together */
|
|
itemIds: string[]
|
|
/** Summary text for the group */
|
|
summary: string
|
|
}
|
|
|
|
export interface FeedEnhancement {
|
|
/** New items to inject into the feed */
|
|
additionalItems?: FeedItem[]
|
|
/** Groups of items to present together with a summary */
|
|
groupedItems?: ItemGroup[]
|
|
/** Item IDs to remove from the feed */
|
|
suppress?: string[]
|
|
/** Map of item ID to boost score (-1 to 1). Positive promotes, negative demotes. */
|
|
boost?: Record<string, number>
|
|
}
|
|
|
|
/**
|
|
* A function that transforms feed items and produces enhancement directives.
|
|
* Use named functions for meaningful error attribution.
|
|
*/
|
|
export type FeedPostProcessor = (items: FeedItem[], context: Context) => Promise<FeedEnhancement>
|