import { z } from 'zod';
import type { ApiSuccess } from '../../types/api/success';
import type { MetricQuery } from '../../types/metricQuery';
import type { QueryHistoryStatus } from '../../types/queryHistory';
import type { AiAgentDocumentStructuredSummary } from './documentTypes';
import type { AiAgentReviewClassifierEventType } from './requestTypes';
export type AiAgentReviewClassifierSubject = {
    type: 'turn_review';
    assistantPromptUuid: string;
    threadUuid: string;
    agentUuid: string;
    projectUuid: string;
    organizationUuid: string;
};
export type AiAgentInteractionSource = 'app' | 'slack';
export type AiAgentTurnSignalSourceRef = {
    source: 'app';
    threadUuid: string;
    promptUuid: string;
    appUrl: string | null;
} | {
    source: 'slack';
    channelId: string;
    threadTs: string | null;
    messageTs: string;
    slackPermalink: string | null;
};
export type AiAgentTurnSignal = 'normal_refinement' | 'implicit_correction' | 'explicit_dispute' | 'retry_after_failure' | 'output_shape_correction' | 'new_question' | 'acceptance_or_continuation' | 'product_capability_request' | 'human_intervention' | 'ambiguous';
export type AiAgentImplicitSignalSource = 'next_user_correction' | 'next_user_dispute' | 'next_user_retry' | 'output_shape_correction' | 'tool_error' | 'assistant_no_answer' | 'product_capability_request' | 'human_intervention';
export type AiAgentReviewClassifierConfidence = 'low' | 'medium' | 'high';
export type AiAgentRootCause = 'semantic_layer' | 'project_context' | 'agent_configuration' | 'data_gap' | 'product_capability' | 'runtime_reliability' | 'feedback_quality' | 'not_a_failure' | 'ambiguous';
export type AiAgentFixTarget = 'semantic_yaml_patch' | 'project_context_rule' | 'agent_configuration_change' | 'dbt_modeling_ticket' | 'semantic_layer_ticket' | 'product_capability_ticket' | 'runtime_reliability_ticket' | 'feedback_needed' | 'no_action';
export type AiAgentConfigurationSetting = 'instructions' | 'knowledge_documents' | 'data_access' | 'self_improvement' | 'sql_mode' | 'mcp_servers' | 'explore_tags' | 'space_access' | 'user_or_group_access' | 'unknown';
export type AiAgentAvailableCapability = 'semantic_query' | 'chart_generation' | 'dashboard_generation' | 'data_value_search' | 'chart_data_access' | 'sql_runner' | 'context_improvement' | 'semantic_change_proposals' | 'mcp_tools';
export type AiAgentKnowledgeDocumentSnapshot = {
    uuid: string;
    name: string;
    updatedAt: string;
    summary: AiAgentDocumentStructuredSummary;
};
export type AiAgentConfigSnapshot = {
    capturedAt: string;
    agentUpdatedAt: string | null;
    settings: AiAgentConfigurationSetting[];
    availableCapabilities: AiAgentAvailableCapability[];
    instructionHash: string | null;
    instructionSummary: string | null;
    knowledgeDocuments: AiAgentKnowledgeDocumentSnapshot[];
};
export declare const getAiAgentConfigSnapshotHash: (snapshot: AiAgentConfigSnapshot) => string;
export type AiAgentRuntimeContextSnapshot = {
    userUuid: string | null;
    canRunSql: boolean;
    canManageAgent: boolean;
};
export type AiAgentModelMetadata = {
    provider: string | null;
    model: string | null;
};
export type AiAgentEvidenceWindow = {
    userPromptUuid: string;
    explicitFeedbackUuid: string | null;
    nextUserPromptUuid: string | null;
    previousPromptUuids: string[];
};
export type AiAgentSemanticTargetRef = {
    type: 'model';
    modelName: string;
} | {
    type: 'explore';
    modelName: string;
    exploreName: string;
} | {
    type: 'join';
    modelName: string;
    joinName: string;
    exploreName?: string;
} | {
    type: 'dimension';
    modelName: string;
    dimensionName: string;
} | {
    type: 'metric';
    modelName: string;
    metricName: string;
    dimensionName?: string;
} | {
    type: 'additional_dimension';
    modelName: string;
    parentDimensionName: string;
    dimensionName: string;
} | {
    type: 'required_filter';
    modelName: string;
    exploreName: string;
    fieldName: string;
} | {
    type: 'ai_hint';
    modelName: string;
    targetType: 'model' | 'dimension' | 'metric';
    targetName: string;
};
export type AiAgentTargetRef = AiAgentSemanticTargetRef | {
    type: 'agent';
    agentUuid: string;
} | {
    type: 'agent_config';
    setting: AiAgentConfigurationSetting;
} | {
    type: 'product_capability';
    capabilityKey: string;
} | {
    type: 'runtime';
    key: string;
};
export type AiAgentEvidenceExcerpt = {
    source: 'user_prompt' | 'assistant_answer' | 'next_user_prompt' | 'conversation_context' | 'tool_call' | 'tool_result' | 'agent_config';
    text: string;
    redacted: boolean;
};
export type AiAgentRecommendationAction = 'update_semantic_yaml' | 'update_agent_instructions' | 'add_knowledge_document' | 'enable_data_access' | 'enable_sql_mode' | 'enable_self_improvement' | 'configure_mcp_server' | 'adjust_explore_tags' | 'update_access' | 'route_to_product_work' | 'request_more_evidence' | 'no_action';
export type AiAgentRecommendation = {
    actionType: AiAgentRecommendationAction;
    title: string;
    rationale: string;
    targetRefs: AiAgentTargetRef[];
};
export type AiAgentReviewClassifierTurnSignal = {
    subject: AiAgentReviewClassifierSubject;
    interactionSource: AiAgentInteractionSource;
    sourceRef: AiAgentTurnSignalSourceRef;
    signal: AiAgentTurnSignal;
    implicitSignalSources: AiAgentImplicitSignalSource[];
    confidence: AiAgentReviewClassifierConfidence;
    promotedToFinding: boolean;
    promotionReason: string | null;
    toolEvidenceRefs: string[];
    runtimeContextSnapshot: AiAgentRuntimeContextSnapshot;
    modelMetadata: AiAgentModelMetadata;
};
export type AiAgentFindingReviewStatus = 'unreviewed' | 'accepted' | 'rejected' | 'needs_more_evidence';
export type AiAgentReviewItemStatus = 'open' | 'in_progress' | 'resolved' | 'dismissed' | 'duplicate';
export type AiAgentReviewItemDismissedReason = 'not_actionable' | 'expected_behavior' | 'duplicate' | 'low_confidence' | 'other';
export type AiAgentReviewItemOwnerType = 'semantic_layer_owner' | 'agent_admin' | 'product' | 'support' | 'unknown';
export type AiAgentReviewItemPrState = 'open' | 'merged' | 'closed';
export type AiAgentReviewItemWritebackStatus = 'queued' | 'running' | 'completed' | 'failed';
export declare const aiAgentJudgeProjectContextEntrySchema: z.ZodEffects<z.ZodObject<{
    op: z.ZodEnum<["create", "update"]>;
    id: z.ZodNullable<z.ZodString>;
    kind: z.ZodEnum<["definition", "context"]>;
    content: z.ZodString;
    terms: z.ZodArray<z.ZodString, "many">;
    objects: z.ZodArray<z.ZodString, "many">;
}, "strip", z.ZodTypeAny, {
    id: string | null;
    content: string;
    kind: "definition" | "context";
    op: "create" | "update";
    terms: string[];
    objects: string[];
}, {
    id: string | null;
    content: string;
    kind: "definition" | "context";
    op: "create" | "update";
    terms: string[];
    objects: string[];
}>, {
    id: string | null;
    content: string;
    kind: "definition" | "context";
    op: "create" | "update";
    terms: string[];
    objects: string[];
}, {
    id: string | null;
    content: string;
    kind: "definition" | "context";
    op: "create" | "update";
    terms: string[];
    objects: string[];
}>;
export type AiAgentJudgeProjectContextEntry = {
    op: 'create' | 'update';
    id: string | null;
    kind: 'definition' | 'context';
    content: string;
    terms: string[];
    objects: string[];
};
export declare const aiAgentReviewClassifierJudgeOutputSchema: z.ZodObject<{
    signal: z.ZodEnum<["normal_refinement", "implicit_correction", "explicit_dispute", "retry_after_failure", "output_shape_correction", "new_question", "acceptance_or_continuation", "product_capability_request", "human_intervention", "ambiguous"]>;
    implicitSignalSources: z.ZodArray<z.ZodEnum<["next_user_correction", "next_user_dispute", "next_user_retry", "output_shape_correction", "tool_error", "assistant_no_answer", "product_capability_request", "human_intervention"]>, "many">;
    confidence: z.ZodEnum<["low", "medium", "high"]>;
    promotedToFinding: z.ZodBoolean;
    promotionReason: z.ZodNullable<z.ZodString>;
    primaryRootCause: z.ZodEnum<["semantic_layer", "project_context", "agent_configuration", "data_gap", "product_capability", "runtime_reliability", "feedback_quality", "not_a_failure", "ambiguous"]>;
    secondaryRootCauses: z.ZodArray<z.ZodEnum<["semantic_layer", "project_context", "agent_configuration", "data_gap", "product_capability", "runtime_reliability", "feedback_quality", "not_a_failure", "ambiguous"]>, "many">;
    subcategories: z.ZodArray<z.ZodString, "many">;
    fixTargets: z.ZodArray<z.ZodEnum<["semantic_yaml_patch", "project_context_rule", "agent_configuration_change", "dbt_modeling_ticket", "semantic_layer_ticket", "product_capability_ticket", "runtime_reliability_ticket", "feedback_needed", "no_action"]>, "many">;
    targetRefs: z.ZodArray<z.ZodObject<{
        type: z.ZodEnum<["model", "explore", "join", "dimension", "metric", "additional_dimension", "required_filter", "ai_hint", "agent", "agent_config", "product_capability", "runtime"]>;
        label: z.ZodString;
        modelName: z.ZodNullable<z.ZodString>;
        fieldName: z.ZodNullable<z.ZodString>;
        setting: z.ZodNullable<z.ZodEnum<["instructions", "knowledge_documents", "data_access", "self_improvement", "sql_mode", "mcp_servers", "explore_tags", "space_access", "user_or_group_access", "unknown"]>>;
        key: z.ZodNullable<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        label: string;
        key: string | null;
        type: "join" | "metric" | "dimension" | "agent" | "explore" | "model" | "product_capability" | "additional_dimension" | "required_filter" | "ai_hint" | "agent_config" | "runtime";
        fieldName: string | null;
        modelName: string | null;
        setting: "unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access" | null;
    }, {
        label: string;
        key: string | null;
        type: "join" | "metric" | "dimension" | "agent" | "explore" | "model" | "product_capability" | "additional_dimension" | "required_filter" | "ai_hint" | "agent_config" | "runtime";
        fieldName: string | null;
        modelName: string | null;
        setting: "unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access" | null;
    }>, "many">;
    agentConfigurationSettings: z.ZodArray<z.ZodEnum<["instructions", "knowledge_documents", "data_access", "self_improvement", "sql_mode", "mcp_servers", "explore_tags", "space_access", "user_or_group_access", "unknown"]>, "many">;
    ownerType: z.ZodEnum<["semantic_layer_owner", "agent_admin", "product", "support", "unknown"]>;
    evidenceExcerpts: z.ZodArray<z.ZodObject<{
        source: z.ZodEnum<["user_prompt", "assistant_answer", "next_user_prompt", "conversation_context", "tool_call", "tool_result", "agent_config"]>;
        text: z.ZodString;
        redacted: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        source: "agent_config" | "user_prompt" | "assistant_answer" | "next_user_prompt" | "conversation_context" | "tool_call" | "tool_result";
        text: string;
        redacted: boolean;
    }, {
        source: "agent_config" | "user_prompt" | "assistant_answer" | "next_user_prompt" | "conversation_context" | "tool_call" | "tool_result";
        text: string;
        redacted: boolean;
    }>, "many">;
    recommendation: z.ZodNullable<z.ZodObject<{
        actionType: z.ZodEnum<["update_semantic_yaml", "update_agent_instructions", "add_knowledge_document", "enable_data_access", "enable_sql_mode", "enable_self_improvement", "configure_mcp_server", "adjust_explore_tags", "update_access", "route_to_product_work", "request_more_evidence", "no_action"]>;
        title: z.ZodString;
        rationale: z.ZodString;
        targetRefs: z.ZodArray<z.ZodObject<{
            type: z.ZodEnum<["model", "explore", "join", "dimension", "metric", "additional_dimension", "required_filter", "ai_hint", "agent", "agent_config", "product_capability", "runtime"]>;
            label: z.ZodString;
            modelName: z.ZodNullable<z.ZodString>;
            fieldName: z.ZodNullable<z.ZodString>;
            setting: z.ZodNullable<z.ZodEnum<["instructions", "knowledge_documents", "data_access", "self_improvement", "sql_mode", "mcp_servers", "explore_tags", "space_access", "user_or_group_access", "unknown"]>>;
            key: z.ZodNullable<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            label: string;
            key: string | null;
            type: "join" | "metric" | "dimension" | "agent" | "explore" | "model" | "product_capability" | "additional_dimension" | "required_filter" | "ai_hint" | "agent_config" | "runtime";
            fieldName: string | null;
            modelName: string | null;
            setting: "unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access" | null;
        }, {
            label: string;
            key: string | null;
            type: "join" | "metric" | "dimension" | "agent" | "explore" | "model" | "product_capability" | "additional_dimension" | "required_filter" | "ai_hint" | "agent_config" | "runtime";
            fieldName: string | null;
            modelName: string | null;
            setting: "unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access" | null;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        title: string;
        rationale: string;
        targetRefs: {
            label: string;
            key: string | null;
            type: "join" | "metric" | "dimension" | "agent" | "explore" | "model" | "product_capability" | "additional_dimension" | "required_filter" | "ai_hint" | "agent_config" | "runtime";
            fieldName: string | null;
            modelName: string | null;
            setting: "unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access" | null;
        }[];
        actionType: "no_action" | "update_semantic_yaml" | "update_agent_instructions" | "add_knowledge_document" | "enable_data_access" | "enable_sql_mode" | "enable_self_improvement" | "configure_mcp_server" | "adjust_explore_tags" | "update_access" | "route_to_product_work" | "request_more_evidence";
    }, {
        title: string;
        rationale: string;
        targetRefs: {
            label: string;
            key: string | null;
            type: "join" | "metric" | "dimension" | "agent" | "explore" | "model" | "product_capability" | "additional_dimension" | "required_filter" | "ai_hint" | "agent_config" | "runtime";
            fieldName: string | null;
            modelName: string | null;
            setting: "unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access" | null;
        }[];
        actionType: "no_action" | "update_semantic_yaml" | "update_agent_instructions" | "add_knowledge_document" | "enable_data_access" | "enable_sql_mode" | "enable_self_improvement" | "configure_mcp_server" | "adjust_explore_tags" | "update_access" | "route_to_product_work" | "request_more_evidence";
    }>>;
    reviewItem: z.ZodObject<{
        title: z.ZodString;
        description: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        description: string;
        title: string;
    }, {
        description: string;
        title: string;
    }>;
    projectContextEntry: z.ZodNullable<z.ZodEffects<z.ZodObject<{
        op: z.ZodEnum<["create", "update"]>;
        id: z.ZodNullable<z.ZodString>;
        kind: z.ZodEnum<["definition", "context"]>;
        content: z.ZodString;
        terms: z.ZodArray<z.ZodString, "many">;
        objects: z.ZodArray<z.ZodString, "many">;
    }, "strip", z.ZodTypeAny, {
        id: string | null;
        content: string;
        kind: "definition" | "context";
        op: "create" | "update";
        terms: string[];
        objects: string[];
    }, {
        id: string | null;
        content: string;
        kind: "definition" | "context";
        op: "create" | "update";
        terms: string[];
        objects: string[];
    }>, {
        id: string | null;
        content: string;
        kind: "definition" | "context";
        op: "create" | "update";
        terms: string[];
        objects: string[];
    }, {
        id: string | null;
        content: string;
        kind: "definition" | "context";
        op: "create" | "update";
        terms: string[];
        objects: string[];
    }>>;
}, "strip", z.ZodTypeAny, {
    confidence: "high" | "medium" | "low";
    signal: "ambiguous" | "normal_refinement" | "implicit_correction" | "explicit_dispute" | "retry_after_failure" | "output_shape_correction" | "new_question" | "acceptance_or_continuation" | "product_capability_request" | "human_intervention";
    implicitSignalSources: ("output_shape_correction" | "product_capability_request" | "human_intervention" | "next_user_correction" | "next_user_dispute" | "next_user_retry" | "tool_error" | "assistant_no_answer")[];
    promotedToFinding: boolean;
    promotionReason: string | null;
    primaryRootCause: "ambiguous" | "semantic_layer" | "project_context" | "agent_configuration" | "data_gap" | "product_capability" | "runtime_reliability" | "feedback_quality" | "not_a_failure";
    secondaryRootCauses: ("ambiguous" | "semantic_layer" | "project_context" | "agent_configuration" | "data_gap" | "product_capability" | "runtime_reliability" | "feedback_quality" | "not_a_failure")[];
    subcategories: string[];
    fixTargets: ("semantic_yaml_patch" | "project_context_rule" | "agent_configuration_change" | "dbt_modeling_ticket" | "semantic_layer_ticket" | "product_capability_ticket" | "runtime_reliability_ticket" | "feedback_needed" | "no_action")[];
    targetRefs: {
        label: string;
        key: string | null;
        type: "join" | "metric" | "dimension" | "agent" | "explore" | "model" | "product_capability" | "additional_dimension" | "required_filter" | "ai_hint" | "agent_config" | "runtime";
        fieldName: string | null;
        modelName: string | null;
        setting: "unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access" | null;
    }[];
    agentConfigurationSettings: ("unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access")[];
    ownerType: "unknown" | "semantic_layer_owner" | "agent_admin" | "product" | "support";
    evidenceExcerpts: {
        source: "agent_config" | "user_prompt" | "assistant_answer" | "next_user_prompt" | "conversation_context" | "tool_call" | "tool_result";
        text: string;
        redacted: boolean;
    }[];
    recommendation: {
        title: string;
        rationale: string;
        targetRefs: {
            label: string;
            key: string | null;
            type: "join" | "metric" | "dimension" | "agent" | "explore" | "model" | "product_capability" | "additional_dimension" | "required_filter" | "ai_hint" | "agent_config" | "runtime";
            fieldName: string | null;
            modelName: string | null;
            setting: "unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access" | null;
        }[];
        actionType: "no_action" | "update_semantic_yaml" | "update_agent_instructions" | "add_knowledge_document" | "enable_data_access" | "enable_sql_mode" | "enable_self_improvement" | "configure_mcp_server" | "adjust_explore_tags" | "update_access" | "route_to_product_work" | "request_more_evidence";
    } | null;
    reviewItem: {
        description: string;
        title: string;
    };
    projectContextEntry: {
        id: string | null;
        content: string;
        kind: "definition" | "context";
        op: "create" | "update";
        terms: string[];
        objects: string[];
    } | null;
}, {
    confidence: "high" | "medium" | "low";
    signal: "ambiguous" | "normal_refinement" | "implicit_correction" | "explicit_dispute" | "retry_after_failure" | "output_shape_correction" | "new_question" | "acceptance_or_continuation" | "product_capability_request" | "human_intervention";
    implicitSignalSources: ("output_shape_correction" | "product_capability_request" | "human_intervention" | "next_user_correction" | "next_user_dispute" | "next_user_retry" | "tool_error" | "assistant_no_answer")[];
    promotedToFinding: boolean;
    promotionReason: string | null;
    primaryRootCause: "ambiguous" | "semantic_layer" | "project_context" | "agent_configuration" | "data_gap" | "product_capability" | "runtime_reliability" | "feedback_quality" | "not_a_failure";
    secondaryRootCauses: ("ambiguous" | "semantic_layer" | "project_context" | "agent_configuration" | "data_gap" | "product_capability" | "runtime_reliability" | "feedback_quality" | "not_a_failure")[];
    subcategories: string[];
    fixTargets: ("semantic_yaml_patch" | "project_context_rule" | "agent_configuration_change" | "dbt_modeling_ticket" | "semantic_layer_ticket" | "product_capability_ticket" | "runtime_reliability_ticket" | "feedback_needed" | "no_action")[];
    targetRefs: {
        label: string;
        key: string | null;
        type: "join" | "metric" | "dimension" | "agent" | "explore" | "model" | "product_capability" | "additional_dimension" | "required_filter" | "ai_hint" | "agent_config" | "runtime";
        fieldName: string | null;
        modelName: string | null;
        setting: "unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access" | null;
    }[];
    agentConfigurationSettings: ("unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access")[];
    ownerType: "unknown" | "semantic_layer_owner" | "agent_admin" | "product" | "support";
    evidenceExcerpts: {
        source: "agent_config" | "user_prompt" | "assistant_answer" | "next_user_prompt" | "conversation_context" | "tool_call" | "tool_result";
        text: string;
        redacted: boolean;
    }[];
    recommendation: {
        title: string;
        rationale: string;
        targetRefs: {
            label: string;
            key: string | null;
            type: "join" | "metric" | "dimension" | "agent" | "explore" | "model" | "product_capability" | "additional_dimension" | "required_filter" | "ai_hint" | "agent_config" | "runtime";
            fieldName: string | null;
            modelName: string | null;
            setting: "unknown" | "instructions" | "knowledge_documents" | "data_access" | "self_improvement" | "sql_mode" | "mcp_servers" | "explore_tags" | "space_access" | "user_or_group_access" | null;
        }[];
        actionType: "no_action" | "update_semantic_yaml" | "update_agent_instructions" | "add_knowledge_document" | "enable_data_access" | "enable_sql_mode" | "enable_self_improvement" | "configure_mcp_server" | "adjust_explore_tags" | "update_access" | "route_to_product_work" | "request_more_evidence";
    } | null;
    reviewItem: {
        description: string;
        title: string;
    };
    projectContextEntry: {
        id: string | null;
        content: string;
        kind: "definition" | "context";
        op: "create" | "update";
        terms: string[];
        objects: string[];
    } | null;
}>;
export type AiAgentReviewClassifierJudgeOutput = z.infer<typeof aiAgentReviewClassifierJudgeOutputSchema>;
export type AiAgentReviewItem = {
    uuid: string;
    fingerprint: string;
    organizationUuid: string;
    projectUuid: string | null;
    agentUuid: string | null;
    title: string;
    description: string;
    primaryRootCause: AiAgentRootCause;
    status: AiAgentReviewItemStatus;
    dismissedReason: AiAgentReviewItemDismissedReason | null;
    ownerType: AiAgentReviewItemOwnerType;
    assignedToUserUuid: string | null;
    firstSeenAt: Date;
    lastSeenAt: Date;
    findingCount: number;
    statusUpdatedAt: Date;
    statusUpdatedByUserUuid: string | null;
    linkedIssueUrl: string | null;
    linkedPrUrl: string | null;
    prState: AiAgentReviewItemPrState | null;
    prWritebackStatus: AiAgentReviewItemWritebackStatus | null;
    prWritebackMessage: string | null;
    createdAt: Date;
    updatedAt: Date;
};
export type AiAgentReviewItemSummary = AiAgentReviewItem & {
    /**
     * Server-computed: true only when a writeback PR can actually be opened for
     * this item — semantic-layer root cause, a GitHub-connected project, and
     * both the review-writeback and writeback-engine feature flags enabled.
     * The "Create PR" action is gated on this.
     */
    writebackEligible: boolean;
    latestFinding: {
        uuid: string;
        promptUuid: string;
        threadUuid: string;
        projectUuid: string;
        agentUuid: string;
        subcategories: string[];
        fixTargets: AiAgentFixTarget[];
        targetRefs: AiAgentTargetRef[];
        evidenceExcerpts: AiAgentEvidenceExcerpt[];
        recommendation: AiAgentRecommendation | null;
        projectContextEntry: AiAgentJudgeProjectContextEntry | null;
        createdAt: Date;
    } | null;
};
export type ApiAiAgentReviewItemsResponse = ApiSuccess<AiAgentReviewItemSummary[]>;
export type UpdateAiAgentReviewItemStatus = {
    status: AiAgentReviewItemStatus;
    dismissedReason: AiAgentReviewItemDismissedReason | null;
};
export type ApiAiAgentReviewItemResponse = ApiSuccess<AiAgentReviewItemSummary>;
/**
 * Preview of the file change a writeback PR would make, computed deterministically
 * (no PR opened). Only available for the project_context strategy — semantic_layer
 * runs in a sandbox, so there is no static diff to show before the PR is created.
 */
export type AiAgentReviewItemWritebackPreview = {
    available: true;
    fileName: string;
    before: string;
    after: string;
    op: 'create' | 'update';
    entryId: string;
} | {
    available: false;
};
export type ApiAiAgentReviewItemWritebackPreviewResponse = ApiSuccess<AiAgentReviewItemWritebackPreview>;
export type AiAgentReviewSignalSummary = {
    uuid: string;
    runUuid: string;
    promptUuid: string;
    threadUuid: string;
    projectUuid: string;
    agentUuid: string;
    signal: AiAgentTurnSignal;
    implicitSignalSources: AiAgentImplicitSignalSource[];
    confidence: AiAgentReviewClassifierConfidence;
    promotedToFinding: boolean;
    promotionReason: string | null;
    createdAt: Date;
    runScope: AiAgentReviewClassifierRunScope;
    prompt: string;
    responsePreview: string | null;
    errorMessage: string | null;
    finding: {
        uuid: string;
        reviewItemUuid: string | null;
        primaryRootCause: AiAgentRootCause;
        subcategories: string[];
        fixTargets: AiAgentFixTarget[];
        evidenceExcerpts: AiAgentEvidenceExcerpt[];
        recommendation: AiAgentRecommendation | null;
    } | null;
};
export type ApiAiAgentReviewSignalsResponse = ApiSuccess<AiAgentReviewSignalSummary[]>;
export type AiAgentReviewClassifierRunStatus = 'queued' | 'running' | 'completed' | 'failed';
export type AiAgentReviewClassifierRunScope = {
    type: 'backfill';
    startedAt: string;
    endedAt: string;
    projectUuid?: string;
    agentUuid?: string;
    dryRun?: boolean;
} | {
    type: 'live_event';
    eventType: AiAgentReviewClassifierEventType;
    promptUuid: string;
    threadUuid: string;
    projectUuid: string;
    agentUuid: string;
} | {
    type: 'manual';
    requestedByUserUuid: string;
    filters: Record<string, unknown>;
};
export type AiAgentReviewClassifierRun = {
    uuid: string;
    organizationUuid: string;
    status: AiAgentReviewClassifierRunStatus;
    reviewAgentVersion: string;
    judgePromptHash: string;
    agentConfigSnapshotHash: string | null;
    agentConfigSnapshot: AiAgentConfigSnapshot | null;
    agentConfigSnapshotAgentUpdatedAt: Date | null;
    runScope: AiAgentReviewClassifierRunScope;
    totalTurns: number;
    processedTurns: number;
    signalCount: number;
    findingCount: number;
    reviewItemCount: number;
    errorMessage: string | null;
    completedAt: Date | null;
    createdAt: Date;
    updatedAt: Date;
};
export type AiAgentReviewClassifierTurnSnapshot = {
    promptUuid: string;
    userPrompt: string;
    assistantResponse: string | null;
    errorMessage: string | null;
    createdAt: Date;
    respondedAt: Date | null;
};
export type AiAgentReviewClassifierContextTurn = AiAgentReviewClassifierTurnSnapshot & {
    relation: 'previous' | 'next' | 'referenced';
};
export type AiAgentReviewClassifierTurnCandidate = {
    subject: AiAgentReviewClassifierSubject;
    interactionSource: AiAgentInteractionSource;
    sourceRef: AiAgentTurnSignalSourceRef;
    targetTurn: AiAgentReviewClassifierTurnSnapshot;
    contextTurns: AiAgentReviewClassifierContextTurn[];
    userPrompt: string;
    assistantResponse: string | null;
    errorMessage: string | null;
    humanScore: number | null;
    humanFeedback: string | null;
    createdAt: Date;
    respondedAt: Date | null;
    nextUserPromptUuid: string | null;
    nextUserPrompt: string | null;
    modelMetadata: AiAgentModelMetadata;
    tokenUsageTotal: number | null;
    queryHistory: AiAgentReviewClassifierQueryHistorySummary[];
    supportingEvidence: AiAgentReviewClassifierSupportingEvidence[];
};
export type AiAgentReviewClassifierQueryHistorySummary = {
    queryUuid: string;
    status: QueryHistoryStatus;
    error: string | null;
    createdAt: Date;
    totalRowCount: number | null;
    warehouseExecutionTimeMs: number | null;
    metricQuery: Pick<MetricQuery, 'exploreName' | 'dimensions' | 'metrics' | 'filters' | 'sorts'>;
};
export type AiAgentReviewClassifierSupportingEvidence = {
    source: 'tool_trace';
    toolCallId: string;
    toolName: string;
    parentToolCallId: string | null;
    createdAt: Date;
    relevanceScore: number;
    toolArgsPreview: string | null;
    resultPreview: string | null;
};
export type AiAgentReviewClassifierSignalFinding = {
    primaryRootCause: AiAgentRootCause;
    secondaryRootCauses: AiAgentRootCause[];
    subcategories: string[];
    fixTargets: AiAgentFixTarget[];
    targetRefs: AiAgentTargetRef[];
    evidenceExcerpts: AiAgentEvidenceExcerpt[];
    recommendation: AiAgentRecommendation | null;
    projectContextEntry: AiAgentJudgeProjectContextEntry | null;
    reviewItem: {
        fingerprint: string;
        title: string;
        description: string;
        ownerType: AiAgentReviewItemOwnerType;
    };
};
export type AiAgentReviewItemFingerprintInput = {
    organizationUuid: string;
    projectUuid: string | null;
    agentUuid: string | null;
    primaryRootCause: AiAgentRootCause;
    subcategories: string[];
    fixTargets: AiAgentFixTarget[];
    targetRefs: AiAgentTargetRef[];
    agentConfigurationSettings: AiAgentConfigurationSetting[];
    capabilityKey: string | null;
};
type AiAgentReviewItemFingerprintScope = {
    type: 'organization';
    organizationUuid: string;
} | {
    type: 'project';
    organizationUuid: string;
    projectUuid: string;
} | {
    type: 'agent';
    organizationUuid: string;
    agentUuid: string;
};
export declare const getAiAgentReviewItemFingerprintScope: (input: Pick<AiAgentReviewItemFingerprintInput, "organizationUuid" | "projectUuid" | "agentUuid" | "primaryRootCause">) => AiAgentReviewItemFingerprintScope;
export declare const getAiAgentReviewItemFingerprint: (input: AiAgentReviewItemFingerprintInput) => string;
export {};
//# sourceMappingURL=aiAgentReviewClassifierTypes.d.ts.map