import type { ArtifactRef, CursorRunRequestV1, CursorRunResultV1, HarnessRunRequestV1, HarnessRunResultV1, JsonValue, ModelFusionCapabilityStatus, ModelFusionStatus } from "../fixtures/modelFusion.js";
export type CursorCapabilityPolicy = "record-and-degrade" | "fail-closed";
export type CursorHarnessModel = {
    id: string;
    model: string;
    endpointId?: string;
};
export type CursorAdapterMode = "fixture" | "real";
export type CursorEvidenceTier = "smoke" | "real";
export type CursorRouteInventorySummary = {
    observedRoutes: number;
    passThroughRoutes: number;
    interceptedRoutes: number;
    degradedRoutes?: number;
    observedPaths?: string[];
    failedRouteCount?: number;
    diagnosis?: string[];
};
export type CursorCandidateEvidence = {
    transcript?: string;
    diff?: string;
    log?: string;
    outputSummary?: string;
    rawPayload?: string;
    observedModel?: string;
    modelResolutionStatus?: CursorModelResolutionStatus;
    modelResolutionReason?: string;
    routeInventory?: CursorRouteInventorySummary;
    routeInventoryArtifact?: ArtifactRef;
    artifacts?: CursorArtifactEvidence[];
    toolEvidence?: Record<string, JsonValue>[];
};
export type CursorArtifactEvidence = {
    artifactId?: string;
    kind: ArtifactRef["kind"];
    uri?: string;
    content?: string;
    hash?: string;
    redactionStatus?: ArtifactRef["redaction_status"];
};
export type CursorHarnessBaseOptions = {
    capabilityPolicy?: CursorCapabilityPolicy;
    artifactBaseUri?: string;
    producer?: string;
    producerVersion?: string;
    producerGitSha?: string;
    now?: () => Date;
};
export type CursorFixtureHarnessOptions = CursorHarnessBaseOptions & {
    adapterMode?: "fixture";
};
export type CursorRealHarnessOptions = CursorHarnessBaseOptions & {
    adapterMode: "real";
    cursorRunClient: CursorRunClient;
    capabilities?: Record<string, ModelFusionCapabilityStatus>;
};
export type CursorHarnessOptions = CursorFixtureHarnessOptions | CursorRealHarnessOptions;
export type RunCursorCandidateInput = {
    request: HarnessRunRequestV1;
    candidateId: string;
    model: CursorHarnessModel;
    workspacePath?: string;
    worktreePath?: string;
    timeoutMs?: number;
    requestedModel?: string;
    requiredCapabilities?: string[];
    evidence?: CursorCandidateEvidence;
    metadata?: Record<string, JsonValue>;
};
export type CursorCapabilityIssue = {
    capability: string;
    status: ModelFusionCapabilityStatus;
    requestedStatus?: ModelFusionCapabilityStatus;
    reason: string;
};
export type CursorModelResolutionStatus = "matched" | "unknown" | "blocked_override";
export type CursorModelEvidence = {
    requestedModel: string;
    observedModel: string;
    modelId: string;
    endpointId: string;
    status: CursorModelResolutionStatus;
    reason: string;
};
export type RunCursorCandidateOutput = {
    cursorRequest: CursorRunRequestV1;
    cursorResult: CursorRunResultV1;
    harnessResult: HarnessRunResultV1;
    missingCapabilities: CursorCapabilityIssue[];
    metadata: Record<string, JsonValue>;
};
export type CursorRunClientRequest = {
    cursorRequest: CursorRunRequestV1;
    candidateId: string;
    model: CursorHarnessModel;
    workspacePath: string;
    timeoutMs?: number;
    capabilities: Record<string, ModelFusionCapabilityStatus>;
};
export type CursorRunClientResult = {
    status?: ModelFusionStatus;
    outputSummary?: string;
    transcript?: string;
    rawPayload?: string;
    observedModel?: string;
    modelId?: string;
    endpointId?: string;
    routeInventory?: CursorRouteInventorySummary;
    routeInventoryArtifact?: ArtifactRef;
    artifacts?: CursorArtifactEvidence[];
    capabilities?: Record<string, ModelFusionCapabilityStatus>;
    toolEvidence?: Record<string, JsonValue>[];
};
export type CursorRunClient = {
    capabilities?: () => Record<string, ModelFusionCapabilityStatus>;
    run(input: CursorRunClientRequest): Promise<CursorRunClientResult>;
};
export type CursorBridgeRunClientOptions = {
    bridgeBaseUrl: string;
    authToken?: string;
    headers?: Record<string, string>;
    fetch?: typeof fetch;
};
export type CursorFixtureHarness = {
    id: "cursor";
    adapterMode: "fixture";
    capabilities(): Record<string, ModelFusionCapabilityStatus>;
    runCursorCandidate(input: RunCursorCandidateInput): RunCursorCandidateOutput;
};
export type CursorRealHarness = {
    id: "cursor";
    adapterMode: "real";
    capabilities(): Record<string, ModelFusionCapabilityStatus>;
    runCursorCandidate(input: RunCursorCandidateInput): Promise<RunCursorCandidateOutput>;
};
export type CursorHarness = CursorFixtureHarness | CursorRealHarness;
export declare class CursorCapabilityError extends Error {
    readonly issues: CursorCapabilityIssue[];
    constructor(issues: CursorCapabilityIssue[]);
}
export declare function cursorHarness(options: CursorRealHarnessOptions): CursorRealHarness;
export declare function cursorHarness(options?: CursorFixtureHarnessOptions): CursorFixtureHarness;
export declare function runCursorCandidate(input: RunCursorCandidateInput, options?: CursorFixtureHarnessOptions): RunCursorCandidateOutput;
export declare function runRealCursorCandidate(input: RunCursorCandidateInput, options: CursorRealHarnessOptions): Promise<RunCursorCandidateOutput>;
export declare function cursorCapabilities(): Record<string, ModelFusionCapabilityStatus>;
export declare function createCursorBridgeRunClient(options: CursorBridgeRunClientOptions): CursorRunClient;
