/** * Agent measurement core (Spec 25 Phase D / Q2) — shipped so `openlore prove` * can run a WITH/WITHOUT pass on the user's own repo and print a personal * token-value scorecard. The live agent call is behind an injectable runner so * the deterministic parts (JSON parsing, aggregation) are unit-tested without * spending API budget; the default runner shells out to `claude -p`, mirroring * the Spec 14 benchmark harness exactly. */ export type Condition = 'with' | 'without'; export interface Metrics { /** input_tokens + cache_creation — what the model processed fresh. */ freshInputTokens: number; /** cache_read_input_tokens — ~10× cheaper amortized reads. */ cacheReadTokens: number; outputTokens: number; costUsd: number; /** num_turns — round-trips, the most consistent WITH/WITHOUT signal. */ numTurns: number; durationMs: number; answer: string; correct: boolean; error?: string; } /** Parse a `claude -p --output-format json` result blob into raw metrics (no scoring). */ export declare function parseAgentJson(raw: string): Omit; export interface AgentRunInput { prompt: string; mcpConfigPath: string; cwd: string; model: string; maxBudgetUsd: number; /** Appended only on the WITH arm — the shipped orient nudge. */ systemPrompt?: string; } /** Pluggable agent invoker — returns the raw stdout JSON. Default = `claude -p`. */ export type AgentRunner = (input: AgentRunInput) => string; /** Default runner: shell out to the `claude` CLI (mirrors the Spec 14 harness). */ export declare const claudeRunner: AgentRunner; /** Write the WITH (openlore navigation) + WITHOUT (empty) strict-mcp configs. */ export declare function writeProveMcpConfigs(workDir: string, cliEntry: string): { withPath: string; withoutPath: string; systemPrompt: string; }; export declare const median: (xs: number[]) => number; export interface Cell { costUsd: number; freshInputTokens: number; cacheReadTokens: number; numTurns: number; durationMs: number; correctRate: number; runs: number; } /** Median-aggregate N runs of one arm into a comparable cell. */ export declare function summarize(runs: Metrics[]): Cell; //# sourceMappingURL=measure.d.ts.map