feat: add boost directive to FeedEnhancement

Post-processors can now return a boost map (item ID -> score)
to promote or demote items in the feed ordering. Scores from
multiple processors are summed and clamped to [-1, 1].

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-03-01 17:20:36 +00:00
parent 40ad90aa2d
commit 65ca50bf36
3 changed files with 213 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ export interface FeedEnhancement {
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>
}
/**