import type { JudgmentRequest, JudgmentResult } from "../judgment/types.js"; export interface SystemOneParsedRequest { modelId: string; request: JudgmentRequest; } /** `POST /v1/systemone` response body; `cost` (USD) appears only when the route billed one. */ export interface SystemOneResponseBody { model: string; answers: JudgmentResult["answers"]; usage: { input_tokens: number; output_tokens: number; cost?: number; }; } /** * Validate the routing-relevant parts of a System One request body. * * @throws {AIError.ValidationError} naming the offending field when `model`, * `state`, or `questions` is missing or malformed. */ export declare function parseRequest(body: unknown): SystemOneParsedRequest; /** Re-encode a judgment result in TypeSafe's response shape. */ export declare function encodeResponse(result: JudgmentResult): SystemOneResponseBody; /** TypeSafe answers errors with a status code and a JSON body; the envelope mirrors the other gateway routes. */ export declare function formatError(status: number, type: string, message: string): Response;