import type { TraceSummary } from "./traceSummaries.js"; import type { TreeNode } from "./types.js"; export type TraceText = { traceId: string; text: string; lowered: string; }; export type TraceHit = { traceId: string; count: number; snippet: string; }; export type TraceFilter = { id: string; label: string; accepts: (summary: TraceSummary) => boolean; }; export declare function stringsIn(value: unknown): string[]; export declare function traceTexts(roots: TreeNode[]): TraceText[]; export declare function searchTraces(texts: TraceText[], query: string): TraceHit[]; export declare function textFilter(query: string, hits: TraceHit[]): TraceFilter; /** The picker's query split in two: an `agent:` prefix at the start names * a recorded agent name to match, up to the first space; the rest is text. */ export type PickerQuery = { agentPrefix: string | undefined; text: string; }; export declare function parsePickerQuery(query: string): PickerQuery; /** Keeps traces whose recorded name starts with `prefix`, case-sensitively. * A trace with no name never passes, so a prompt that mentions a name * does not count. */ export declare function agentFilter(prefix: string): TraceFilter; export declare function applyFilters(summaries: TraceSummary[], filters: TraceFilter[]): TraceSummary[];