/** * `openlore prove` (Spec 25 Q2) — measure OpenLore's token value on the user's * OWN repo and print a personal scorecard. Runs a WITH/WITHOUT agent pass over * a few graph-derived orientation tasks, isolated with --strict-mcp-config, and * reports cost / round-trips / correctness deltas + an honest verdict. * * The substrate needs no API key; this command's agent arm does (it shells out * to `claude`). When `claude` is absent it fails fast with guidance; `--dry-run` * exercises the whole pipeline with clearly-labelled synthetic numbers. * * Output + sharing (add-prove-shareable-scorecard): * --json stable, CI-consumable scorecard (decision 581a90bf) * --markdown paste-ready block + shields.io badge for a README * --save persist a dated scorecard under .openlore/prove/ (decision 670b5f0b) * --estimate deterministic, no-API graph projection of the orientation tax (decision 66feae62) */ import { Command } from 'commander'; import { type AgentRunner, type Metrics, type Cell } from '../../core/agent-eval/measure.js'; import { type Scorecard, type ScorecardMeta } from '../../core/agent-eval/scorecard.js'; /** * Parse a numeric CLI flag, clamping a valid value to `min` but REJECTING a * non-numeric one (e.g. `--runs abc`) instead of silently letting NaN through — * NaN would skip every agent run and emit a degenerate all-zero scorecard. */ export declare function parseNumericFlag(raw: string | undefined, name: string, integer: boolean, min: number, dflt: number): number | { error: string; }; /** Raw metrics carried alongside a scorecard, for persistence (`--save`). */ export interface ProveRaw { withoutCell: Cell; withCell: Cell; /** Per-run metrics (measured / dry-run only; absent for an estimate). */ withoutRuns?: Metrics[]; withRuns?: Metrics[]; } export interface ProveResult { ok: boolean; message: string; scorecard?: Scorecard; meta?: ScorecardMeta; raw?: ProveRaw; } /** * Summarize the two measured arms into comparable cells — but only over * SUCCESSFUL runs. An errored run (agent threw / unparseable output) is not a * valid cost/turn sample: including its zeros pollutes the medians, and if EVERY * run failed the all-zero cells would emit a confident-looking but meaningless * "break-even" verdict through the JSON contract. So errored runs are dropped, * and if either arm has no successful sample we fail loudly rather than report a * verdict over no data. Pure + exported for unit testing without a graph. */ export declare function summarizeArms(withoutRuns: Metrics[], withRuns: Metrics[]): { ok: true; withoutCell: Cell; withCell: Cell; } | { ok: false; message: string; }; /** * Core (testable) prove run: derive tasks, then either run both agent arms N * times (measured / dry-run) or compute the deterministic estimate. Returns the * scorecard + provenance so the command can render any output form. `runner` is * injectable so tests never call a real agent; `generatedAt`/`repoSha` are passed * in so the core stays deterministic. */ export declare function runProve(opts: { directory: string; runs: number; model: string; maxBudgetUsd: number; dryRun: boolean; estimate?: boolean; generatedAt: string; repoSha: string | null; runner?: AgentRunner; }): Promise; export declare function saveScorecard(absDir: string, result: ProveResult): string; export declare const proveCommand: Command; //# sourceMappingURL=prove.d.ts.map