import type { TrendsCollectionResult, Platform } from "./schema.js";
import type { RawTrendItem } from "./sources/types.js";
export interface EnrichDeps {
    runCli: (prompt: string) => Promise<string>;
    maxRetries?: number;
}
/**
 * Attach each agent-produced analysis back onto its raw item.
 *
 * Normal path: align by id (a Map), which tolerates the agent reordering items.
 * Defense in depth for #41: if the raws carry duplicate ids (e.g. a source that
 * hashed a shared placeholder sourceUrl), a by-id Map collapses to one entry and
 * `get(id)` smears that single analysis across every trend. When we detect a
 * duplicate id we warn and fall back to positional alignment — the prompt sends
 * items in order and asks the agent to preserve it, so index i lines up.
 */
export declare function mergeAnalysisIntoRaws(raws: RawTrendItem[], agentItems: Array<{
    id?: string;
    analysis?: unknown;
}>, platform: Platform): Array<RawTrendItem & {
    analysis: unknown;
}>;
export declare function enrichWithAnalysis(raws: RawTrendItem[], platform: Platform, deps: EnrichDeps): Promise<TrendsCollectionResult>;
//# sourceMappingURL=enrichment.d.ts.map