/** * ATIF adapter — convert ATIF documents to the internal Trajectory format. * * The conversion maps ATIF steps (user messages, agent turns with tool calls, * system events) into the flat TrajectoryEvent array that graders consume. */ import type { AtifTrajectory } from "./atif-types.js"; import type { Trajectory } from "./types.js"; export interface FromAtifOptions { stimulusName: string; stimulusPrompt: string; workDir: string; } /** * Convert an already-validated ATIF document to the internal Trajectory format. * * Callers must validate with {@link validateAtifTrajectory} first (this avoids * double validation when the caller already holds an `AtifTrajectory`). */ export declare function fromAtif(atif: AtifTrajectory, options: FromAtifOptions): Trajectory; /** * Loose discriminator: returns `true` if `obj` *looks like* an ATIF document * (right schema_version prefix, has session_id/steps/agent at the top level). * * This is NOT a full validator — it is used by the CLI to distinguish ATIF * payloads from other JSON shapes on stdin. Use `validateAtifTrajectory()` * for authoritative validation; it throws a descriptive error on any * malformed field. */ export declare function isAtifTrajectory(obj: unknown): boolean; /** * Validate that `input` is a well-formed ATIF document. Throws `Error` with a * path-qualified message on the first failure. Returns the input typed as * `AtifTrajectory` on success. Validates the fields the adapter reads, * including required inner fields of tool calls, observation results, * step-level `metrics`, top-level `final_metrics`, and inlined * `subagent_trajectories`. Fields it already tolerates as optional/null * (e.g. `timestamp`) are not inspected here. */ export declare function validateAtifTrajectory(input: unknown): AtifTrajectory; //# sourceMappingURL=atif-adapter.d.ts.map