import { Effect, type FileSystem } from "effect"; export declare const EVAL_CANDIDATE_TRIAL_RESULT_MAXIMUM_BYTES: number; declare const EvalCandidateTrialResultRetentionError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "EvalCandidateTrialResultRetentionError"; } & Readonly; export declare class EvalCandidateTrialResultRetentionError extends EvalCandidateTrialResultRetentionError_base<{ readonly reason: "capacity-refused" | "invalid-summary" | "unsafe-output" | "size-limit" | "serialization" | "retention-failed"; }> { get message(): string; } /** Public measurement metadata only; this store never owns a trial or a grade. */ export type EvalCandidateTrialRetainedSummary = { readonly version: 1; readonly kind: "candidate-trial-result"; readonly status: "measured" | "inconclusive"; readonly lane: "repository-agent" | "request"; readonly caseId: string; readonly candidateModel: string; readonly planDigest: string; readonly executionDigest: string; readonly resultPath: string; readonly executionEvidencePath: string; readonly requestExposure: "closed" | "unknown"; readonly gatewayRequests?: number; readonly providerAttempts?: number; readonly durationMs: number; readonly hardPassed?: boolean; readonly trajectoryPassed?: boolean; readonly passed?: boolean; readonly reason?: string; readonly evidenceCredit: "none"; }; export type EvalCandidateTrialResultCapacityInput = { readonly maximumRequestBytes: number; readonly maximumRequestHeaderBytes: number; readonly maximumResponseBytes: number; readonly maximumResponseHeaderBytes: number; readonly maximumResponseEvents: number; readonly stream: boolean; readonly matcherCount: number; readonly orderedEventsClauseCount: number; /** UTF-8 size of JSON.stringify(hidden.clauses), not the private clauses. */ readonly matcherMetadataBytes: number; }; /** * Prospective capacity for the existing serving result representation, with * one retained response (not a second observedServing copy on success). * * Six bytes cover JSON escaping of one UTF-8 input byte. SSE additionally * retains decoded data and a copied type/id, with fixed per-event structure. * Every failed ordered-events matcher can repeat the entire event-type list. * The current decoder resets event/id each frame; this bound does not assume * unbounded inherited SSE fields. Headers and private matcher metadata have * their own terms. Fixed headroom covers the bounded public summary/envelope. * * This is deliberately conservative. It is not a repository-harness memory * bound, a bound on already materialized host objects, or a disk-space promise. * Runtime bounded encoding and summary-only recovery remain necessary. */ export declare const assertEvalCandidateTrialResultCapacity: (input: EvalCandidateTrialResultCapacityInput) => Effect.Effect; type Output = Pick; export type EvalCandidateTrialResultRetention = { readonly retention: "complete" | "summary-only"; readonly summary: EvalCandidateTrialRetainedSummary; }; /** * Retain through the workflow's existing fresh wx/0600 file handle. The caller * owns acquisition/release and has already reconciled execution. This function * neither opens a path nor retries a trial. It does not promise crash-atomic * publication or recovery if the filesystem cannot persist even the fallback. */ export declare const retainEvalCandidateTrialResult: (input: { readonly output: Output; readonly result: { readonly summary: EvalCandidateTrialRetainedSummary; } & Readonly>; readonly fallbackSummary: EvalCandidateTrialRetainedSummary; }) => Effect.Effect<{ retention: "complete"; summary: EvalCandidateTrialRetainedSummary; } | { retention: "summary-only"; summary: EvalCandidateTrialRetainedSummary; }, EvalCandidateTrialResultRetentionError, never>; export {};