/**
 * Brain Working Memory Eviction Policies — Sprint A (brain-eviction).
 *
 * INTEGRATION SKETCH (for coordinator wave B):
 * ─────────────────────────────────────────────
 * In `src/ports/brain.ts`, extend `WorkingMemoryPort` with:
 *
 *   evict(policy: EvictionPolicy, targetSize: number): Promise<string[]>;
 *
 * And in `InMemoryWorkingMemory`, implement:
 *
 *   async evict(policy: EvictionPolicy, targetSize: number): Promise<string[]> {
 *     const now = Date.now();
 *     const entries: WorkingMemoryEntry[] = [...this.store.entries()]
 *       .filter(([, v]) => v.expiresAt > now)
 *       .map(([compoundKey, v]) => ({
 *         id: compoundKey,
 *         content: v.value,
 *         lastAccessedAt: v.lastAccessedAt ?? v.expiresAt,
 *         importance: v.importance ?? 0.5,
 *         agentTag: v.agentTag,
 *         pinned: v.pinned,
 *         size: v.size,
 *       }));
 *     const toEvict = policy.select(entries, targetSize);
 *     for (const id of toEvict) this.store.delete(id);
 *     return toEvict;
 *   }
 *
 * The `WorkingMemoryEntry` type in this module mirrors the shape callers
 * must provide — no import loop with `brain.ts` is required.
 */
export interface WorkingMemoryEntry {
    /** Compound key (e.g. `runId:key`) — opaque to policies. */
    id: string;
    /** Arbitrary entry payload. */
    content: unknown;
    /** Unix epoch ms of last read or write. */
    lastAccessedAt: number;
    /** Relative importance in [0, 1]. Higher = more important. */
    importance: number;
    /** Optional tag linking entry to an agent. Used by AgentControlled. */
    agentTag?: string;
    /** If true, the entry is never selected for eviction. */
    pinned?: boolean;
    /** Optional byte/token size for budget-aware usage. */
    size?: number;
}
export interface EvictionPolicy {
    /** Human-readable policy name. */
    readonly name: string;
    /**
     * Returns the IDs of entries to evict so that the remaining count
     * satisfies `remaining.length <= targetSize`.
     *
     * Guarantees:
     * - `pinned: true` entries are never included.
     * - Returns `[]` when `entries.length <= targetSize`.
     * - Deterministic: same inputs → same output.
     */
    select(entries: readonly WorkingMemoryEntry[], targetSize: number): string[];
}
/**
 * Evicts entries with the oldest `lastAccessedAt` first.
 * Ties are broken by `id` ASC for determinism.
 */
export declare const lruPolicy: EvictionPolicy;
export interface ImportanceWeightedOptions {
    /** Weight applied to normalized recency score (default 0.5). */
    recencyWeight?: number;
    /** Weight applied to importance score (default 0.5). */
    importanceWeight?: number;
}
/**
 * Scores each entry as:
 *   score = recencyWeight * normalizedRecency + importanceWeight * importance
 *
 * Normalized recency: 1 = most recent, 0 = oldest (linear across range).
 * When all `lastAccessedAt` values are equal, normalizedRecency = 0.5 for all.
 *
 * Evicts entries with the lowest score first.
 * Ties broken by `id` ASC.
 */
export declare function importanceWeightedPolicy(opts?: ImportanceWeightedOptions): EvictionPolicy;
/**
 * Evicts entries whose `agentTag` has the lowest priority in the map first.
 * Entries with no `agentTag` (or a tag not in the map) receive priority 0.
 * Higher priority value = kept longer.
 * Ties broken by `id` ASC.
 */
export declare function agentControlledPolicy(priorities: ReadonlyMap<string, number>): EvictionPolicy;
//# sourceMappingURL=eviction-policy.d.ts.map