feat: add boost directive to FeedEnhancement (#45)

* 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>

* fix: correct misleading sort order comments

Co-authored-by: Ona <no-reply@ona.com>

---------

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-03-01 17:26:25 +00:00
committed by GitHub
parent 9dc0cc3d2f
commit 2d7544500d
3 changed files with 213 additions and 0 deletions

View File

@@ -15,6 +15,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>
}
/**