import { type LanguageModel } from 'ai'; import { z } from 'zod'; import { type PredicateContext } from '../flows/definition/predicate.js'; import type { FlowGateSpec, FlowGateVerdict, FlowVerificationRecord } from '../flows/definition/types.js'; import type { FlowState } from '../types/flow.js'; export declare const FLOW_GATE_JUDGE_SYSTEM: string; export declare const flowGateJudgeResultSchema: z.ZodObject<{ pass: z.ZodBoolean; reason: z.ZodOptional; }, z.core.$strict>; export interface FlowGateJudgeProvider { readonly modelId: string; judge(args: { schema: typeof flowGateJudgeResultSchema; system: string; prompt: string; payload: Record; }): Promise; } export declare function isFlowGateJudgeProvider(value: unknown): value is FlowGateJudgeProvider; export declare function asFlowGateJudgeProvider(provider: FlowGateJudgeProvider | LanguageModel): FlowGateJudgeProvider; export declare function gateScopeFromState(state: FlowState, requestContext?: unknown): PredicateContext; /** * A check that fails to execute is always blocking, regardless of declared severity. * Advisory failures record and do not change the outcome. */ export declare function gateFailureIsBlocking(verdict: FlowGateVerdict): boolean; export declare function evaluateFlowGates(args: { gates: readonly FlowGateSpec[] | undefined; state: FlowState; requestContext?: unknown; judge?: FlowGateJudgeProvider | LanguageModel; }): Promise;