/**
 * Bounded serving projection over validated project-learnings entries.
 *
 * The ledger lives cold on disk at `.lisa/PROJECT_LEARNINGS.md` and is never
 * raw-injected into any agent session. Consumers request a *projection* — the
 * highest-priority slice that fits inside the shared token/entry budget — so a
 * ledger that grows past what any session should carry still yields a bounded,
 * deterministic view. This module is pure: it never touches disk and never
 * mutates the caller's array.
 * @module learnings-projection
 */
import { type LearningEntry } from "./learnings-contract.js";
/** The bounded slice the contract serves, plus how many entries it dropped. */
export interface LearningsProjection {
    /** Highest-priority entries that fit the budget, in serving order. */
    readonly entries: readonly LearningEntry[];
    /** How many validated entries were left out of the served slice. */
    readonly omittedCount: number;
}
/**
 * Compute the bounded serving projection: the top entries by
 * {@link compareForProjection} accumulated in priority order until the next
 * entry would exceed either the entry-count or the token budget, at which point
 * accumulation stops (a greedy priority prefix, never skipping a high-priority
 * entry to fit a lower-priority one).
 *
 * Token accounting mirrors the on-disk document exactly: the fixed document
 * wrapper ({@link DOCUMENT_WRAPPER_TOKENS} — header + JSONL fences) is subtracted
 * from `maxTokens` once, and each entry costs the byte length of its canonical
 * `JSON.stringify` rendering plus, for every entry after the first, the single
 * `\n` that joins it to the previous line. So `kept.tokens + wrapper` equals the
 * byte length of `renderLearningsFile(projection.entries)`, the same quantity the
 * budget gate measures.
 * @param entries - Validated learning entries (any order)
 * @returns The served slice and the count of entries it omitted
 */
export declare function projectLearnings(entries: readonly LearningEntry[]): LearningsProjection;
//# sourceMappingURL=learnings-projection.d.ts.map