import type { EventEnvelope } from "../statelog/wireTypes.js"; import type { EvalRecord } from "./types.js"; export type ExtractOptions = { /** Max characters for tool argsPreview / outputPreview. Default 200. * Pass 0 for "no truncation". */ previewChars?: number; /** How to infer the agent output when `evalOutput()` was not called: * - "llm" (default): the last LLM completion on the top-level thread, with a warning. * - "returnValue": the entry node's return value (from `agentEnd`), with no warning. * Explicit `evalOutput()` calls always take precedence. The optimizer uses * "returnValue" because it grades what the node returns, not its last LLM reply. */ outputFallback?: "llm" | "returnValue"; /** Emit the "no evalValue()" warning when `evalValue()` was not called. Default true. * The optimizer sets this false: inputs come from the input spec, not evalValue(). */ warnMissingValue?: boolean; }; /** Top-level extractor. Composes pure helpers over the Normalized * form produced by `normalize()`; no shared mutable state, no * threading of `t0` through helpers, no direct wire-format reads * outside the accessor layer. */ export declare function extractEvalRecord(events: EventEnvelope[], source: string, opts?: ExtractOptions): EvalRecord;