{"version":3,"file":"cavecrew-comparison.d.ts","sourceRoot":"","sources":["../../../src/core/evaluation/cavecrew-comparison.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,8BAA8B;IAC9C,WAAW,EAAE,cAAc,GAAG,UAAU,GAAG,MAAM,CAAC;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,8BAA8B,EAAE,CAAC;IAC7C,MAAM,EAAE,cAAc,GAAG,UAAU,GAAG,KAAK,GAAG,cAAc,CAAC;IAC7D,OAAO,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,SAAS,CAAC,GAAG,kBAAkB,CAqBnH","sourcesContent":["export interface EvaluationCandidateMeasurement {\n\tcandidateId: \"single-agent\" | \"cavecrew\" | string;\n\tcorrectness: number;\n\tsafety: number;\n\twallTimeMs: number;\n\tmodelCalls: number;\n\ttokens: number;\n\tcostUsd: number;\n\ttoolCalls: number;\n\tretrievalUsage: number;\n\tcontextCompactions: number;\n\trollbackCount: number;\n\treviewerFindings: number;\n}\n\nexport interface CavecrewComparison {\n\tscenarioId: string;\n\tfixtureHash: string;\n\tcandidates: EvaluationCandidateMeasurement[];\n\twinner: \"single-agent\" | \"cavecrew\" | \"tie\" | \"inconclusive\";\n\treasons: string[];\n}\n\nexport function compareCavecrewCandidates(input: Omit<CavecrewComparison, \"winner\" | \"reasons\">): CavecrewComparison {\n\tconst single = input.candidates.find((candidate) => candidate.candidateId === \"single-agent\");\n\tconst cavecrew = input.candidates.find((candidate) => candidate.candidateId === \"cavecrew\");\n\tif (!single || !cavecrew)\n\t\treturn { ...input, winner: \"inconclusive\", reasons: [\"both candidate measurements are required\"] };\n\tif (single.correctness !== cavecrew.correctness || single.safety !== cavecrew.safety) {\n\t\tconst score = (candidate: EvaluationCandidateMeasurement) => candidate.correctness + candidate.safety;\n\t\treturn {\n\t\t\t...input,\n\t\t\twinner:\n\t\t\t\tscore(cavecrew) > score(single) ? \"cavecrew\" : score(single) > score(cavecrew) ? \"single-agent\" : \"tie\",\n\t\t\treasons: [\"correctness and safety are authoritative\"],\n\t\t};\n\t}\n\tif (cavecrew.costUsd !== single.costUsd || cavecrew.wallTimeMs !== single.wallTimeMs)\n\t\treturn {\n\t\t\t...input,\n\t\t\twinner: \"tie\",\n\t\t\treasons: [\"delegation changes efficiency without changing correctness or safety\"],\n\t\t};\n\treturn { ...input, winner: \"tie\", reasons: [\"measurements are equal\"] };\n}\n"]}