import type { ImportanceResult, JournalEntry } from '../../../types/index.js'; import { type EntriesSharedContext } from './shared.js'; export declare const IMPORTANCE_WEIGHTS: { readonly significance: 0.3; readonly relationships: 0.35; readonly causal: 0.2; readonly recency: 0.15; }; /** Relationship count at which the relationships component reaches its maximum score (1.0) */ export declare const MAX_RELATIONSHIP_SCORE_AT = 5; /** Causal relationship count at which the causal component reaches its maximum score (1.0) */ export declare const MAX_CAUSAL_SCORE_AT = 3; /** Number of days after which the recency component decays to zero */ export declare const RECENCY_WINDOW_DAYS = 90; /** Baseline significance value when significance_type is set without a higher impact_score */ export declare const SIGNIFICANCE_TYPE_BASELINE = 0.5; /** * Build a Common Table Expression (CTE) which aggregates a relationship * count (rel_count) and a causal_count for every entry_id present in the relationships table. * Used with buildImportanceSqlExpression. */ export declare function buildImportanceCte(): string; /** * Build an inline SQL expression that computes importance score per row. * Expects the entry table aliased as `e` and a LEFT JOIN on `rel_stats` aliased as `rs`. */ export declare function buildImportanceSqlExpression(): string; export declare function calculateImportance(context: EntriesSharedContext, entryId: number): ImportanceResult; /** * Batch-attaches rounded importanceScore values directly onto an array of hydrated JournalEntry objects. * Uses only 2 batched SQL queries (relationships + entry_anchors) for all entries. */ export declare function attachImportanceScoresToEntries(context: EntriesSharedContext, entries: JournalEntry[]): void; export declare function getEntriesByIdsWithImportance(context: EntriesSharedContext, entryIds: number[]): Map; //# sourceMappingURL=importance.d.ts.map