/** * Searching everything KONECK has ever done in a workspace. * * The transcripts hold every question asked, every reply, every command run and every file read — * which makes them the most useful record on the machine and, until now, the least reachable. The * question people actually have is "when did I deal with this before, and what did it turn out to * be", and answering it meant grepping JSONL by hand. * * Streamed line by line rather than parsed whole: a workspace can hold hundreds of sessions and a * long transcript is megabytes, so nothing is held that is not a hit. Bounded on files, matches per * file, and total matches, and it says when it stopped early — a search that silently truncates is * worse than one that admits it. */ export interface SearchHit { /** The workspace it was found in, so a hit from elsewhere can be opened. */ workspace: string; workspaceName: string; /** The transcript this came from. */ file: string; task: string; at: number; /** Where in the conversation: what the user asked, what was replied, a tool call. */ role: 'user' | 'assistant' | 'tool' | 'other'; /** The tool's name, when the hit is in a tool call. */ tool?: string; /** The matching text, trimmed around the match. */ snippet: string; /** Character offset of the match inside the snippet, for highlighting. */ offset: number; } export interface SearchResult { hits: SearchHit[]; filesSearched: number; /** True when a limit stopped the search before the end. */ capped: boolean; ms: number; } export declare const MAX_FILES = 300; export declare const MAX_HITS = 200; export declare const MAX_HITS_PER_FILE = 8; /** * Every transcript in a workspace that mentions the query. * * Case-insensitive plain text, not a regex: a search box that accepts patterns is a search box that * hangs on a bad one, and nobody typing into a sidebar means `(a+)+b`. */ export declare function searchSessions(cwd: string, query: string): Promise; /** * The same search, over more than one workspace. * * Scoping search to the directory KONECK happens to be pointed at was the wrong default: the * question is "when did I deal with this before", and before was often somewhere else. Each * workspace keeps its own budget so one enormous history cannot starve the rest, and every hit * says which workspace it came from because opening it means going there. */ export declare function searchAllWorkspaces(workspaces: readonly string[], query: string): Promise; //# sourceMappingURL=search.d.ts.map