import { type ChatMessage } from "@oscharko-dev/keiko-model-gateway";
import type { TestQualityJudgeVerdict } from "@oscharko-dev/keiko-contracts";
import type { UiHandlerDeps } from "../deps.js";
export declare class QiJudgeError extends Error {
    readonly code: string;
    constructor(code: string, message: string);
}
interface JudgeSourceContext {
    readonly atomId: string;
    readonly text: string;
}
interface JudgePromptInput {
    readonly candidateText: string;
    readonly sourceContext: readonly JudgeSourceContext[];
}
export declare function scrubCandidateText(text: string): string;
export declare function buildJudgePrompt(candidateText: string, sourceContext?: readonly JudgeSourceContext[]): readonly ChatMessage[];
export declare function parseJudgeVerdict(rawText: string): TestQualityJudgeVerdict;
export interface QiJudgePort {
    readonly judge: (input: JudgePromptInput, signal?: AbortSignal) => Promise<TestQualityJudgeVerdict>;
}
/**
 * Build a judge port bound to one model id. Applies the qi:judge-logic capability gate
 * (chat model with text capability). Gateway-only; no direct provider calls.
 */
export declare function createQiJudgePort(deps: UiHandlerDeps, modelId: string): QiJudgePort;
export {};
//# sourceMappingURL=judgePort.d.ts.map