export type { RetrospectiveType, RetrospectiveOutcome, RetrospectiveEntry } from './retrospective-index.js'; import type { RetrospectiveType, RetrospectiveOutcome } from './retrospective-index.js'; /** * Input to `searchRetrospective`. `projectRoot` defaults to `process.cwd()`. * `query` is required and non-empty. `type` and `outcome` are optional * structured filters that compose with AND. */ export interface RetrospectiveSearchInput { query: string; projectRoot?: string; limit?: number; type?: RetrospectiveType; outcome?: RetrospectiveOutcome; } /** * One hit returned by `searchRetrospective`. The `artifactPaths` are * preserved so the LLM can follow up with `peaks retrospective show * ` (or read the artifact directly). */ export interface RetrospectiveSearchResult { id: string; sessionId: string; type: RetrospectiveType; title: string; summary: string; outcome: RetrospectiveOutcome; artifactPaths: string[]; score: number; positions: number[]; } /** * Run the generic fuzzy kernel against the on-disk retrospective index. * Searchable text is `title + " " + summary` per spec §Component Details. * `--type` and `--outcome` filters compose with AND before the kernel * runs (cheaper to filter, then fuzzy on a smaller set). */ export declare function searchRetrospective(input: RetrospectiveSearchInput): RetrospectiveSearchResult[]; export interface CompressedRetrospectiveResultsEnvelope { readonly mode: 'balanced' | 'aggressive' | 'conservative'; readonly originalSize: number; readonly compressedSize: number; readonly compressionRatio: number; readonly compressedText: string; readonly warning: string | null; } export interface RetrospectiveSearchWithResults { readonly matches: RetrospectiveSearchResult[]; readonly compressedResults: CompressedRetrospectiveResultsEnvelope | null; } export interface RetrospectiveSearchOptions { /** When true, compress joined match text via headroom-ai. Falls back * silently to the structured `matches` array on failure. */ readonly compressResults?: boolean; } export declare function searchRetrospectiveWithResults(input: RetrospectiveSearchInput, options?: RetrospectiveSearchOptions): Promise;