import type { EvalSessionExecutionEvidence } from "@velum-labs/routekit-control"; import { type EvalTrialBinding } from "@velum-labs/routekit-eval-service/effect"; import { type FoundryExecutionEvidence, type FoundryTrialGatewayObservation, type FoundryTrialRequestIntent, type FoundryTrialRequestSettlement } from "../protocols/foundry-execution-evidence.js"; /** Only real identities needed for reconciliation, not transport authorization. */ export type EvalTrialReconciliationBinding = Pick & { readonly session: Pick; }; declare const EvalTrialReconciliationError_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: "EvalTrialReconciliationError"; } & Readonly; export declare class EvalTrialReconciliationError extends EvalTrialReconciliationError_base<{ readonly reason: "invalid-evidence" | "grant-mismatch" | "before-not-closed" | "after-not-closed" | "request-identity" | "ambiguous-ingress" | "prior-evidence-changed" | "unresolved-attempt" | "attempt-set-escape"; }> { } /** Canonical schema projection, not a timestamp/count pretending to be a revision. */ export declare const evalTrialEvidenceDigest: (raw: unknown) => string; /** * Strictly serial, exclusively owned session only. Produces actual matched * identifiers, NOT a durable closure proof. The canonical owner must first * persist the snapshot and this association, then acknowledge the adapter. */ export declare const reconcileSerialEvalTrialRequest: (input: { readonly binding: EvalTrialReconciliationBinding; readonly intent: FoundryTrialRequestIntent; readonly observation: FoundryTrialGatewayObservation; readonly before: unknown; readonly after: unknown; readonly previouslyUsedModelCallIds: readonly string[]; }) => { readonly state: "matched-not-persisted"; readonly settlement: FoundryTrialRequestSettlement; }; /** * Final read-side check against real sealed evidence. Reconstruct each exact * open checkpoint from immutable prefixes of the final canonical receipt set; * merely passing the old aggregate model/digest count check is insufficient. * * The caller must first validate the ordinary local/upstream identities and * grant, as foundryUpstreamEvidenceClosed already does. */ export declare const foundryTrialUpstreamEvidenceClosed: (rawLocal: FoundryExecutionEvidence, evidence: EvalSessionExecutionEvidence) => boolean; export {};