/** * Mission aggregation — C2 * * Computes verified-outcome and cost metrics from a mission's linked runs. * Does not hit the filesystem — operates on already-loaded MissionRecord. */ import type { MissionCost, MissionRecord, MissionRunLink } from "../../contracts/index.js"; export interface MissionMetrics { totalActualUsd: number; verifiedOutcomeCount: number; totalRunCount: number; /** USD per verified outcome. Infinity when verifiedOutcomeCount === 0. */ costPerVerifiedOutcome: number; /** Fraction of runs with verified outcomes (0–1). */ verifiedRate: number; } /** * Re-derive mission cost metrics from the run links. * Use this to rebuild the cost object from ledger-authoritative data * rather than trusting the cached mission.json cost field. */ export declare function aggregateMissionMetrics(runLinks: MissionRunLink[]): MissionMetrics; /** * Rebuild the MissionCost record from the authoritative run links. * Call after loading from ledger to ensure the cached cost field is consistent. */ export declare function rebuildMissionCost(mission: MissionRecord): MissionCost;