/**
 * WorkingSet — the lingua franca that lets the WorkingMemoryAssembler rank items
 * from different stores (topic-intent, Playbook, …) in one list (rung 2 of
 * continuous-working-awareness).
 *
 * Each store adapts its native model into a `WorkingSetItem`; `rankWorkingSet`
 * blends relevance with a recency-decay factor so a single ranked reading list
 * draws from all sources consistently. Decay is demotion, not deletion — a faded
 * item sinks in the ranking but stays in its backing store and re-warms on
 * reference. Pure functions + read-only adapters; degrade-safe (a missing/empty
 * source contributes nothing). Spec: docs/specs/cwa-unify-stores.md.
 */
import type { TopicIntentStore } from '../core/TopicIntent.js';
export interface WorkingSetItem {
    /** Which store the item came from. */
    source: 'topic-intent' | 'playbook';
    /** Stable id within the source. */
    id: string;
    /** Short human-readable descriptor (the line shown in assembled context). */
    text: string;
    /** Native relevance, normalized to 0–1 (confidence, usefulness, match score). */
    relevance: number;
    /** ISO8601 of the item's last reinforcement / freshness (drives recency decay). */
    recencyAt: string;
    /** Item kind/category (for labelling). */
    kind: string;
}
/** Recency half-life (days) for the blended score's decay factor. Tunable. */
export declare const RECENCY_HALF_LIFE_DAYS = 30;
/**
 * Blended score = relevance × recency-decay-factor. The recency factor is
 * exp(-ln2 · ageDays / halfLife): 1.0 today, 0.5 at one half-life, etc. Items
 * with no parseable recency are treated as "now" (factor 1) so a source that
 * doesn't track recency isn't unfairly sunk.
 */
export declare function blendedScore(item: WorkingSetItem, nowMs?: number): number;
/** Rank a mixed working set by blended score (descending). Stable, pure. */
export declare function rankWorkingSet(items: WorkingSetItem[], nowMs?: number): WorkingSetItem[];
/**
 * Map a topic's established refs (at/above tentative) to WorkingSetItems.
 * Relevance = the confidence projection; recency = lastReinforcedAt. Read-only,
 * degrade-safe (no store / no topic / error → []).
 */
export declare function topicIntentToWorkingSet(store: TopicIntentStore | null | undefined, topicId: number | undefined, nowMs?: number): WorkingSetItem[];
/**
 * Read Playbook manifest JSONs under {stateDir}/playbook and map matching items
 * to WorkingSetItems. Relevance blends trigger/tag overlap with the query and the
 * item's usefulness signal; recency = freshness. Read-only (never invokes the
 * Python scripts) and degrade-safe (no dir / parse error → []). When no query
 * terms are given, returns [] (Playbook items are trigger-gated, not always-on).
 */
export declare function playbookManifestToWorkingSet(stateDir: string | undefined, queryTerms: string[], nowMs?: number): WorkingSetItem[];
//# sourceMappingURL=WorkingSet.d.ts.map