import { type CatalogItem } from './jev.js'; import { type EvalTask } from './pick-eval.js'; /** Only the newest part of a large log is read. */ export declare const MAX_LOG_BYTES: number; /** Spawns before doctor reports a real-use agreement rate. */ export declare const REAL_USE_MIN_SPAWNS = 10; type Rec = Record; /** Parsed JSONL records of a hook log (newest MAX_LOG_BYTES), [] when missing. */ export declare function readHookLog(file: string, maxBytes?: number): Rec[]; /** A notification or harness message, not something a person asked for. */ export declare function isSystemPreview(text: string): boolean; /** A record's prompt as a redacted, one-line preview of at most 120 chars. * Older records carry `task` (up to 500 chars, not redacted by the hook). */ export declare function previewOf(rec: Rec): string; export interface RealExample { routeId: string; preview: string; /** subagent_type of the spawn. */ actual: string; /** The recorded pick at spawn time (null: none). */ recommended: string | null; followed: boolean | null; /** The route printed a [PICK] line (null: older record without the field). */ shown: boolean | null; method: string | null; /** Spawns of `actual` for this prompt. */ spawns: number; } export interface RouteStats { routes: number; shown: number; /** Routes whose prompt was a notification or harness message. */ system: number; methods: Record; /** Most recommended agents over the non-system routes. */ topRecommended: { name: string; count: number; }[]; } export interface RealUseLogs { hasAdherence: boolean; routes: RouteStats; /** Spawns on record (adherence lines with an agent, plus older joined routes). */ spawns: number; /** Spawns made while a pick was recorded, and of those how many followed it. */ recommendedSpawns: number; followed: number; /** The same, for spawns whose pick was shown as a [PICK] line. */ shownSpawns: number; shownFollowed: number; examples: RealExample[]; /** Spawns left out: notification prompt, too short, no prompt on record. */ skipped: { system: number; short: number; noPrompt: number; }; } /** `dir` is a .monomind directory, or a project root holding one. */ export declare function logsDir(dir: string): string; /** Labelled real-use examples and route stats from the hook logs in `dir`. */ export declare function readRealUse(dir: string): RealUseLogs; /** The catalog id `name` refers to (by id or display name), or null. */ export declare function catalogId(name: string, agents: CatalogItem[]): string | null; export interface RealUseScore { /** Examples whose spawned agent is in the catalog (the scored ones). */ n: number; top1: number; top3: number; /** Examples that spawned an agent outside the catalog (e.g. general-purpose). */ outOfCatalog: { name: string; count: number; }[]; /** In-catalog examples whose agent is not in the top 3, most spawns first. */ disagreements: { preview: string; actual: string; got: string[]; spawns: number; }[]; } /** Score ranked agent ids (one list per example) against the spawned agents. */ export declare function scoreRealUse(examples: RealExample[], agents: CatalogItem[], picks: string[][]): RealUseScore; /** Keyword-ranked agent ids for each example (in-process, no network). */ export declare function keywordRealPicks(examples: RealExample[], agents: CatalogItem[]): string[][]; /** In-catalog examples in the tests/pick-eval dataset shape, ids from `firstId`. */ export declare function realUseEvalTasks(examples: RealExample[], agents: CatalogItem[], firstId?: number): EvalTask[]; /** The `doctor -c pick` line for the project at `root`. */ export declare function realUseLine(root: string, agents: CatalogItem[]): string; export {}; //# sourceMappingURL=pick-real.d.ts.map