import { z } from 'zod';
import type { AnyType, ApiExecuteAsyncMetricQueryResults, ApiExecuteAsyncSqlQueryResults, ApiSuccess, ApiSuccessEmpty, CacheMetadata, ItemsMap, KnexPaginatedData, ToolDashboardArgs, ToolName, ToolRunQueryArgs, ToolTableVizArgs, ToolTimeSeriesArgs, ToolVerticalBarArgs } from '../..';
import { type AiEvalRunResultAssessment } from './aiEvalAssessment';
import { type AiProjectContextTypedObjectRef } from './projectContext';
import { type AiAgentModelConfig, type AiPromptContext, type AiPromptContextInput, type AiPromptTokenUsage, type AiThreadCreatedFrom } from './requestTypes';
import { type AgentToolOutput } from './schemas';
import { type AiMetricQuery, type AiResultType } from './types';
export * from './adminTypes';
export * from './aiEvalAssessment';
export * from './chartConfig/slack';
export * from './chartConfig/web';
export * from './constants';
export * from './coder';
export * from './dashboardContext';
export * from './aiAgentReviewClassifierTypes';
export * from './documentTypes';
export * from './filterExploreByTags';
export * from './followUpTools';
export * from './projectContext';
export * from './requestTypes';
export * from './schemas';
export * from './schemas/agentReadiness';
export * from './schemas/agentSuggestions';
export * from './types';
export * from './utils';
export * from './validators';
export type AiMcpServerAuthType = 'none' | 'bearer' | 'oauth';
export type AiMcpCredentialScope = 'shared' | 'user';
export type AiMcpServerConnectionStatus = 'not_connected' | 'connecting' | 'connected' | 'error';
export type AiMcpServer = {
    uuid: string;
    projectUuid: string;
    name: string;
    url: string;
    iconUrl: string | null;
    authType: AiMcpServerAuthType;
    allowOAuthCredentialSharing: boolean;
    hasCredentials: boolean;
    credentialScope: AiMcpCredentialScope | null;
    connectionStatus: AiMcpServerConnectionStatus | null;
    error: string | null;
    connectedByUserUuid: string | null;
    createdAt: Date;
    updatedAt: Date;
};
export type AiMcpServerTool = {
    uuid: string;
    mcpServerUuid: string;
    toolName: string;
    title: string | null;
    description: string | null;
    inputSchema: unknown;
    annotations: unknown | null;
    meta: unknown | null;
    createdAt: Date;
    updatedAt: Date;
};
export type AiMcpServerToolInput = Pick<AiMcpServerTool, 'toolName' | 'title' | 'description' | 'inputSchema' | 'annotations' | 'meta'>;
export type AiAgentMcpServerTool = AiMcpServerTool & {
    agentUuid: string;
    enabled: boolean;
};
export type AiAgentMcpServerToolUpdate = Pick<AiAgentMcpServerTool, 'toolName' | 'enabled'>;
export type AiAgentIntegration = {
    type: 'slack';
    channelId: string;
};
export declare const baseAgentSchema: z.ZodObject<{
    uuid: z.ZodString;
    projectUuid: z.ZodString;
    organizationUuid: z.ZodString;
    name: z.ZodString;
    description: z.ZodNullable<z.ZodString>;
    imageUrl: z.ZodNullable<z.ZodString>;
    imageUrlSource: z.ZodNullable<z.ZodEnum<["upload", "url"]>>;
    tags: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
    integrations: z.ZodArray<z.ZodObject<{
        type: z.ZodLiteral<"slack">;
        channelId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        type: "slack";
        channelId: string;
    }, {
        type: "slack";
        channelId: string;
    }>, "many">;
    createdAt: z.ZodDate;
    updatedAt: z.ZodDate;
    instruction: z.ZodNullable<z.ZodString>;
    provider: z.ZodString;
    model: z.ZodString;
    groupAccess: z.ZodArray<z.ZodString, "many">;
    userAccess: z.ZodArray<z.ZodString, "many">;
    spaceAccess: z.ZodArray<z.ZodString, "many">;
    enableDataAccess: z.ZodBoolean;
    enableSelfImprovement: z.ZodBoolean;
    enableContentTools: z.ZodBoolean;
    enableUserContext: z.ZodBoolean;
    adminOnly: z.ZodBoolean;
    modelConfig: z.ZodNullable<z.ZodType<AiAgentModelConfig, z.ZodTypeDef, AiAgentModelConfig>>;
    version: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    projectUuid: string;
    createdAt: Date;
    updatedAt: Date;
    name: string;
    description: string | null;
    tags: string[] | null;
    uuid: string;
    organizationUuid: string;
    version: number;
    model: string;
    userAccess: string[];
    instruction: string | null;
    imageUrl: string | null;
    imageUrlSource: "url" | "upload" | null;
    integrations: {
        type: "slack";
        channelId: string;
    }[];
    provider: string;
    groupAccess: string[];
    spaceAccess: string[];
    enableDataAccess: boolean;
    enableSelfImprovement: boolean;
    enableContentTools: boolean;
    enableUserContext: boolean;
    adminOnly: boolean;
    modelConfig: AiAgentModelConfig | null;
}, {
    projectUuid: string;
    createdAt: Date;
    updatedAt: Date;
    name: string;
    description: string | null;
    tags: string[] | null;
    uuid: string;
    organizationUuid: string;
    version: number;
    model: string;
    userAccess: string[];
    instruction: string | null;
    imageUrl: string | null;
    imageUrlSource: "url" | "upload" | null;
    integrations: {
        type: "slack";
        channelId: string;
    }[];
    provider: string;
    groupAccess: string[];
    spaceAccess: string[];
    enableDataAccess: boolean;
    enableSelfImprovement: boolean;
    enableContentTools: boolean;
    enableUserContext: boolean;
    adminOnly: boolean;
    modelConfig: AiAgentModelConfig | null;
}>;
export type BaseAiAgent = z.infer<typeof baseAgentSchema>;
export type AiAgent = Pick<BaseAiAgent, 'uuid' | 'projectUuid' | 'organizationUuid' | 'integrations' | 'tags' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'instruction' | 'imageUrl' | 'imageUrlSource' | 'groupAccess' | 'userAccess' | 'spaceAccess' | 'enableDataAccess' | 'enableSelfImprovement' | 'enableContentTools' | 'enableUserContext' | 'adminOnly' | 'modelConfig' | 'version'>;
export type AiAgentSummary = Pick<AiAgent, 'uuid' | 'name' | 'description' | 'integrations' | 'tags' | 'projectUuid' | 'organizationUuid' | 'createdAt' | 'updatedAt' | 'instruction' | 'imageUrl' | 'imageUrlSource' | 'groupAccess' | 'userAccess' | 'spaceAccess' | 'enableDataAccess' | 'enableSelfImprovement' | 'enableContentTools' | 'enableUserContext' | 'adminOnly' | 'modelConfig' | 'version'>;
export declare const hasAiAgentAccessToSpace: (agent: Pick<AiAgent, "spaceAccess">, spaceUuid: string) => boolean;
export type AiAgentUser = {
    uuid: string;
    name: string;
};
export type AiThreadCompaction = {
    uuid: string;
    threadUuid: string;
    compactedThroughPromptUuid: string;
    triggeringPromptUuid: string;
    createdAt: string;
};
export type AiAgentMessageUser<TUser extends AiAgentUser = AiAgentUser> = {
    role: 'user';
    uuid: string;
    threadUuid: string;
    message: string;
    createdAt: string;
    user: TUser;
    context: AiPromptContext;
    steers: AiPromptSteer[];
    /**
     * Hidden turn: the agent received and responded to this prompt, but the UI
     * should not render its user bubble (e.g. the post-merge migration prompt
     * injected from the writeback PR card).
     */
    hidden: boolean;
};
export type AiPromptSteer = {
    uuid: string;
    promptUuid: string;
    message: string;
    createdAt: string;
    consumedAt: string | null;
    consumedStep: number | null;
};
export type AiAgentMessageAssistantArtifact = Pick<AiArtifact, 'artifactUuid' | 'versionNumber' | 'versionUuid' | 'title' | 'description' | 'artifactType'>;
export type AiAgentMessageAssistant = {
    role: 'assistant';
    status: 'idle' | 'pending' | 'error';
    uuid: string;
    threadUuid: string;
    message: string | null;
    errorMessage: string | null;
    interrupted: boolean;
    createdAt: string;
    humanScore: number | null;
    humanFeedback?: string | null;
    toolCalls: AiAgentToolCall[];
    toolResults: AiAgentToolResult[];
    reasoning: AiAgentReasoning[];
    savedQueryUuid: string | null;
    artifacts: AiAgentMessageAssistantArtifact[] | null;
    referencedArtifacts: AiAgentMessageAssistantArtifact[] | null;
    modelConfig: AiAgentModelConfig | null;
    tokenUsage: AiPromptTokenUsage | null;
};
export type AiAgentMessage<TUser extends AiAgentUser = AiAgentUser> = AiAgentMessageUser<TUser> | AiAgentMessageAssistant;
export type AiAgentThreadSummary<TUser extends AiAgentUser = AiAgentUser> = {
    uuid: string;
    agentUuid: string;
    createdAt: string;
    createdFrom: AiThreadCreatedFrom;
    title: string | null;
    titleGeneratedAt: string | null;
    firstMessage: {
        uuid: string;
        message: string;
    };
    user: TUser;
};
export type AiAgentThreadShare = {
    uuid: string;
    nanoid: string;
    threadUuid: string;
    agentUuid: string;
    projectUuid: string;
    organizationUuid: string;
    snapshotPromptUuid: string;
    createdByUserUuid: string;
    createdAt: string;
    revokedAt: string | null;
    shareUrl: string;
};
export type AiAgentThread<TUser extends AiAgentUser = AiAgentUser> = AiAgentThreadSummary<TUser> & {
    messages: AiAgentMessage<TUser>[];
    compactions: AiThreadCompaction[];
};
export type ApiAiAgentResponse = {
    status: 'ok';
    results: AiAgent;
};
export type AiAgentMemorySource = {
    slug: string;
} & ({
    hasThreadAccess: false;
} | {
    hasThreadAccess: true;
    agentUuid: string | null;
    threadUuid: string;
    threadTitle: string | null;
    threadSummary: string;
});
export type AiAgentMemory = {
    slug: string;
    title: string;
    rawMemory: string;
    terms: string[];
    objects: AiProjectContextTypedObjectRef[];
    status: 'active' | 'superseded' | 'retired';
    generatedAt: string;
    citedCount: number;
    provenance: {
        type: 'source_thread';
        source: AiAgentMemorySource;
    } | {
        type: 'consolidated';
        sources: AiAgentMemorySource[];
    };
    replacementSlug: string | null;
};
export type ApiAiAgentMemoryResponse = ApiSuccess<AiAgentMemory>;
export type ApiAiAgentAvatarUploadResponse = ApiSuccess<AiAgent>;
export type ApiAiAgentSummaryResponse = {
    status: 'ok';
    results: AiAgentSummary[];
};
export type ApiCreateAiAgent = Pick<AiAgent, 'projectUuid' | 'integrations' | 'tags' | 'name' | 'description' | 'instruction' | 'imageUrl' | 'groupAccess' | 'userAccess' | 'spaceAccess' | 'enableDataAccess' | 'enableSelfImprovement' | 'version'> & {
    enableContentTools?: boolean;
    enableUserContext?: boolean;
    adminOnly?: boolean;
    mcpServerUuids?: string[];
    modelConfig?: AiAgentModelConfig | null;
};
export type ApiUpdateAiAgent = Partial<Pick<AiAgent, 'projectUuid' | 'integrations' | 'tags' | 'name' | 'description' | 'instruction' | 'imageUrl' | 'groupAccess' | 'userAccess' | 'spaceAccess' | 'enableDataAccess' | 'enableSelfImprovement' | 'enableContentTools' | 'enableUserContext' | 'adminOnly' | 'modelConfig' | 'version'>> & {
    uuid: string;
    mcpServerUuids?: string[];
};
export type ApiCreateAiAgentResponse = {
    status: 'ok';
    results: AiAgent;
};
export type ApiCreateAiMcpServer = {
    name: string;
    url: string;
    authType: AiMcpServerAuthType;
    allowOAuthCredentialSharing?: boolean;
    credentialScope?: AiMcpCredentialScope;
    credentials?: {
        bearerToken?: string;
        clientId?: string;
        clientSecret?: string;
    } | null;
};
export type ApiUpdateAiMcpServerCredentialBody = {
    bearerToken: string;
};
export type ApiAiMcpOAuthCredentialRequest = {
    credentialScope?: AiMcpCredentialScope;
};
export type ApiAiMcpServerListResponse = ApiSuccess<AiMcpServer[]>;
export type ApiAiMcpServerResponse = ApiSuccess<AiMcpServer>;
export type ApiAiMcpServerToolListResponse = ApiSuccess<AiMcpServerTool[]>;
export type ApiAiAgentMcpServerToolListResponse = ApiSuccess<AiAgentMcpServerTool[]>;
export type ApiUpdateAiAgentMcpServerToolsRequest = {
    toolSettings: AiAgentMcpServerToolUpdate[];
};
export type ApiStartAiMcpOAuthResponse = ApiSuccess<{
    authorizationUrl: string;
}>;
export declare const GITHUB_MCP_SERVER_URL = "https://api.githubcopilot.com/mcp/";
export declare const GITHUB_MCP_SERVER_NAME = "GitHub";
export type ApiConnectGithubMcpServerBody = {
    personalAccessToken: string;
    credentialScope: AiMcpCredentialScope;
};
export type AiMcpGithubAvailability = {
    available: boolean;
    alreadyConnected: boolean;
};
export type ApiAiMcpGithubAvailabilityResponse = ApiSuccess<AiMcpGithubAvailability>;
export type ApiAiAgentThreadSummaryListResponse = {
    status: 'ok';
    results: AiAgentThreadSummary[];
};
export type AiAgentThreadFilters = {
    agentUuid?: string;
    createdFrom?: AiThreadCreatedFrom;
    search?: string;
};
export type AiAgentProjectThreadSummary<TUser extends AiAgentUser = AiAgentUser> = AiAgentThreadSummary<TUser> & {
    agentName: string;
    agentImageUrl: string | null;
};
export type ApiAiAgentProjectThreadSummaryListResponse = ApiSuccess<KnexPaginatedData<AiAgentProjectThreadSummary[]>>;
export type ApiAiAgentThreadResponse = {
    status: 'ok';
    results: AiAgentThread;
};
/**
 * Overview of the writeback PR a thread is associated with — either the PR the
 * agent opened in this thread, or the PR a remediation verification thread is
 * verifying. Live GitHub fields (state, counts) are null when the fetch fails;
 * `summary` falls back to the PR title when no stored summary exists.
 */
export type AiAgentThreadPullRequest = {
    prUrl: string;
    repo: string | null;
    prNumber: number | null;
    title: string | null;
    summary: string | null;
    state: 'open' | 'merged' | 'closed' | null;
    additions: number | null;
    deletions: number | null;
    changedFiles: number | null;
    commitSha: string | null;
};
export type ApiAiAgentThreadPullRequestResponse = ApiSuccess<AiAgentThreadPullRequest | null>;
/**
 * One pull request a chat thread has opened with the coding agent (a
 * "workstream" — one sandbox + one PR). A thread can hold several, across one or
 * more repos. `state` is resolved live from the git host where possible (null
 * when it couldn't be fetched, e.g. GitLab or a transient error).
 */
export type AiAgentThreadWorkstream = {
    prUrl: string;
    repository: string;
    prNumber: number;
    title: string | null;
    summary: string | null;
    state: 'open' | 'merged' | 'closed' | null;
};
export type ApiAiAgentThreadWorkstreamsResponse = ApiSuccess<AiAgentThreadWorkstream[]>;
export type ApiAiAgentThreadCreateRequest = {
    prompt?: string;
    context?: AiPromptContextInput;
    modelConfig?: AiAgentModelConfig;
};
export type ApiAiAgentThreadCreateResponse = ApiSuccess<AiAgentThreadSummary>;
export type ApiAiAgentThreadMessageCreateRequest = {
    prompt: string;
    context?: AiPromptContextInput;
    modelConfig?: AiAgentModelConfig;
    /**
     * Inject the prompt as a hidden turn — the agent responds to it, but the UI
     * does not render the user bubble. Used by the post-merge content-migration
     * prompt sent from the writeback PR card.
     */
    hidden?: boolean;
};
export type ApiAiAgentSqlApprovalRequest = {
    decision: 'approved' | 'rejected';
};
export type ApiAiAgentThreadStreamRequest = {
    /**
     * Per-thread toggle that decides whether the agent gets access to the
     * runSql / listWarehouseTables / describeWarehouseTable tools for this
     * stream. Frontend tracks the toggle in its slice; passed in on every
     * stream call. Falls back to `false` when omitted (e.g. older clients,
     * API callers) so the safer "semantic layer only" mode is the default.
     */
    enableSqlMode?: boolean;
    /**
     * Skips the SQL human-approval gate for this stream. Used by the review
     * remediation workspace so Continue PR turns run frictionlessly. Defaults
     * to false — normal chat still asks the user to approve SQL.
     */
    autoApproveSql?: boolean;
    /**
     * Tool names hinted by the user when they composed the message (via
     * suggestion chips that carry a tool id). agentV2 appends a soft hint
     * to the user message before sending it to the LLM. Transient — never
     * persisted.
     */
    toolHints?: string[];
};
export type ApiAiAgentSqlApprovalResponse = ApiSuccess<{
    decision: 'approved' | 'rejected';
}>;
export type ApiAiAgentThreadMessageInterruptResponse = ApiSuccess<{
    interrupted: true;
}>;
export type ApiAiAgentThreadMessageSteerResponse = ApiSuccess<{
    steer: AiPromptSteer;
}>;
export type ApiCreateAiAgentThreadMessageSteer = {
    message: string;
};
export type ApiAiAgentThreadMessageCreateResponse = ApiSuccess<AiAgentMessageUser<AiAgentUser>>;
export type ApiAiAgentStartThreadResponse = {
    status: 'ok';
    results: {
        jobId: string;
        threadUuid: string;
    };
};
export type ApiAiAgentThreadGenerateResponse = {
    status: 'ok';
    results: {
        response: string;
    };
};
export type ApiAiAgentThreadGenerateTitleResponse = {
    status: 'ok';
    results: {
        title: string;
    };
};
export type ApiAiAgentThreadMessageViz = {
    type: AiResultType;
    metricQuery: AiMetricQuery;
    chartOptions?: object;
    results: {
        rows: Record<string, AnyType>[];
        cacheMetadata: CacheMetadata;
        fields: ItemsMap;
    };
};
export type ApiAiAgentThreadMessageVizResponse = {
    status: 'ok';
    results: ApiAiAgentThreadMessageViz;
};
export type AiVizMetadata = {
    title: string | null;
    description: string | null;
};
export type ApiAiAgentThreadMessageVizQuery = {
    source: 'semantic';
    type: AiResultType;
    query: ApiExecuteAsyncMetricQueryResults;
    metadata: AiVizMetadata;
};
export type ApiAiAgentThreadMessageVizQueryResponse = {
    status: 'ok';
    results: ApiAiAgentThreadMessageVizQuery;
};
export type ApiAiAgentSqlArtifactVizQuery = {
    source: 'sql';
    type: AiResultType.TABLE_RESULT;
    query: ApiExecuteAsyncSqlQueryResults;
    sql: string;
    limit: number;
    metadata: AiVizMetadata;
};
export type ApiAiAgentArtifactVizQuery = ApiAiAgentThreadMessageVizQuery | ApiAiAgentSqlArtifactVizQuery;
export declare const isAiAgentSqlArtifactVizQuery: (query: ApiAiAgentArtifactVizQuery) => query is ApiAiAgentSqlArtifactVizQuery;
export type ApiAiAgentArtifactVizQueryResponse = {
    status: 'ok';
    results: ApiAiAgentArtifactVizQuery;
};
export type AiAgentUserPreferences = {
    defaultAgentUuid: AiAgent['uuid'];
};
export type ApiGetUserAgentPreferencesResponse = ApiSuccess<AiAgentUserPreferences> | ApiSuccessEmpty;
export type ApiUpdateUserAgentPreferences = AiAgentUserPreferences;
export type ApiUpdateUserAgentPreferencesResponse = ApiSuccessEmpty;
export type AiAgentMcpToolName = string;
export type AiAgentToolType = 'built-in' | 'mcp';
export type AiAgentToolName = ToolName | AiAgentMcpToolName;
export type AiAgentToolCallMcpServer = Pick<AiMcpServer, 'uuid' | 'name' | 'iconUrl'>;
export declare const isAiAgentMcpToolName: (toolName: string) => toolName is AiAgentMcpToolName;
export declare const isAiAgentToolName: (toolName: string) => toolName is AiAgentToolName;
type AiAgentBaseToolCall = {
    uuid: string;
    promptUuid: string;
    toolCallId: string;
    parentToolCallId: string | null;
    createdAt: Date;
    toolArgs: object;
};
export type AiAgentToolCall = AiAgentBaseToolCall & ({
    toolType: 'built-in';
    toolName: string;
} | {
    toolType: 'mcp';
    toolName: AiAgentMcpToolName;
    mcpServer: AiAgentToolCallMcpServer | null;
});
type AiAgentBaseToolResult = {
    uuid: string;
    promptUuid: string;
    result: string;
    createdAt: Date;
    toolCallId: string;
};
export type AiAgentToolResult = AiAgentBaseToolResult & ({
    toolType: 'built-in';
    toolName: Exclude<ToolName, never>;
    metadata: AgentToolOutput['metadata'];
} | {
    toolType: 'mcp';
    toolName: AiAgentMcpToolName;
    metadata: Record<string, unknown> | null;
});
export type AiAgentReasoning = {
    uuid: string;
    promptUuid: string;
    reasoningId: string;
    text: string;
    createdAt: Date;
};
export type AiAgentExploreAccessSummary = {
    exploreName: string;
    joinedTables: string[];
    dimensions: string[];
    metrics: string[];
};
export type ApiAiAgentExploreAccessSummaryResponse = ApiSuccess<AiAgentExploreAccessSummary[]>;
export type AiSqlChartArtifactConfig = {
    source: 'sql';
    sql: string;
    limit: number;
};
export type AiLegacySemanticChartArtifactConfig = ToolTableVizArgs | ToolTimeSeriesArgs | ToolVerticalBarArgs | ToolRunQueryArgs;
export type AiSemanticChartArtifactConfig = {
    source: 'semantic';
    config: AiLegacySemanticChartArtifactConfig;
};
export type AiChartArtifactConfig = AiSemanticChartArtifactConfig | AiSqlChartArtifactConfig;
export type AiArtifact = {
    artifactUuid: string;
    threadUuid: string;
    promptUuid: string | null;
    artifactType: 'chart' | 'dashboard';
    savedQueryUuid: string | null;
    savedSqlUuid: string | null;
    savedDashboardUuid: string | null;
    createdAt: Date;
    versionNumber: number;
    versionUuid: string;
    title: string | null;
    description: string | null;
    chartConfig: AiChartArtifactConfig | null;
    dashboardConfig: ToolDashboardArgs | null;
    versionCreatedAt: Date;
    verifiedByUserUuid: string | null;
    verifiedAt: Date | null;
};
export declare const isAiSqlChartArtifactConfig: (config: unknown) => config is AiSqlChartArtifactConfig;
export type AiArtifactTSOACompat = Omit<AiArtifact, 'chartConfig' | 'dashboardConfig'> & {
    chartConfig: Record<string, unknown> | null;
    dashboardConfig: Record<string, unknown> | null;
};
export type ApiAiAgentArtifactResponse = ApiSuccess<AiArtifact>;
export type ApiAiAgentArtifactResponseTSOACompat = ApiSuccess<AiArtifactTSOACompat>;
export type AiAgentVerifiedArtifact = {
    artifactUuid: string;
    versionUuid: string;
    artifactType: 'chart' | 'dashboard';
    title: string | null;
    description: string | null;
    verifiedAt: Date;
    verifiedBy: {
        userUuid: string;
        firstName: string;
        lastName: string;
    };
    referenceCount: number;
    threadUuid: string;
    promptUuid: string | null;
};
export type ApiAiAgentVerifiedArtifactsResponse = ApiSuccess<KnexPaginatedData<AiAgentVerifiedArtifact[]>>;
export type ApiAiAgentVerifiedQuestionsResponse = ApiSuccess<{
    question: string;
    uuid: string;
}[]>;
export type AiAgentEvaluationPrompt = {
    evalPromptUuid: string;
    createdAt: Date;
} & ({
    type: 'string';
    prompt: string;
    expectedResponse: string | null;
} | {
    type: 'thread';
    promptUuid: string;
    threadUuid: string;
    expectedResponse: string | null;
});
export type AiAgentEvaluation = {
    evalUuid: string;
    agentUuid: string;
    title: string;
    description: string | null;
    createdAt: Date;
    updatedAt: Date;
    prompts: AiAgentEvaluationPrompt[];
};
export type AiAgentEvaluationSummary = Pick<AiAgentEvaluation, 'evalUuid' | 'agentUuid' | 'title' | 'description' | 'createdAt' | 'updatedAt'>;
export type AiAgentEvaluationRunSummary = {
    runUuid: string;
    evalUuid: string;
    status: 'pending' | 'running' | 'completed' | 'failed';
    completedAt: Date | null;
    createdAt: Date;
    passedAssessments: number;
    failedAssessments: number;
};
export type AiAgentEvaluationRun = AiAgentEvaluationRunSummary & {
    results: AiAgentEvaluationRunResult[];
};
export type AiAgentEvaluationRunResult = {
    resultUuid: string;
    evalPromptUuid: string | null;
    threadUuid: string | null;
    status: 'pending' | 'running' | 'completed' | 'assessing' | 'failed';
    errorMessage: string | null;
    completedAt: Date | null;
    createdAt: Date;
    assessment: AiEvalRunResultAssessment | null;
    prompt: string | null;
    expectedResponse: string | null;
};
/**
 * Represents a prompt for evaluation that can be either:
 * - An object with a prompt string for new prompts
 * - An object referencing an existing prompt and thread by their UUIDs
 */
export type CreateEvaluationPrompt = {
    prompt: string;
    expectedResponse: string | null;
} | {
    promptUuid: string;
    threadUuid: string;
    expectedResponse: string | null;
};
/**
 * Type guard to check if a CreateEvaluationPrompt is a string prompt
 */
export declare const isStringPrompt: (prompt: CreateEvaluationPrompt) => prompt is {
    prompt: string;
    expectedResponse: string | null;
};
/**
 * Type guard to check if a CreateEvaluationPrompt is a thread reference
 */
export declare const isThreadPrompt: (prompt: CreateEvaluationPrompt) => prompt is {
    promptUuid: string;
    threadUuid: string;
    expectedResponse: string | null;
};
export type ApiCreateEvaluationRequest = {
    title: string;
    description?: string;
    prompts: CreateEvaluationPrompt[];
};
export type ApiUpdateEvaluationRequest = {
    title?: string;
    description?: string;
    prompts?: CreateEvaluationPrompt[];
};
export type ApiAppendEvaluationRequest = {
    prompts: CreateEvaluationPrompt[];
};
export type ApiAiAgentEvaluationSummaryListResponse = ApiSuccess<AiAgentEvaluationSummary[]>;
export type ApiAiAgentEvaluationResponse = ApiSuccess<AiAgentEvaluation>;
export type ApiAiAgentEvaluationRunResponse = ApiSuccess<AiAgentEvaluationRunSummary>;
export type ApiAiAgentEvaluationRunSummaryListResponse = ApiSuccess<KnexPaginatedData<{
    runs: AiAgentEvaluationRunSummary[];
}>>;
export type ApiAiAgentEvaluationRunResultsResponse = ApiSuccess<AiAgentEvaluationRun>;
export type ApiCreateEvaluationResponse = ApiSuccess<Pick<AiAgentEvaluation, 'evalUuid'>>;
export type ApiUpdateEvaluationResponse = ApiSuccess<AiAgentEvaluation>;
export type ApiCloneThreadResponse = ApiSuccess<AiAgentThreadSummary>;
export type ApiCreateAiAgentThreadShareRequest = Record<string, never>;
export type ApiAiAgentThreadShareResponse = ApiSuccess<AiAgentThreadShare>;
export type ApiCloneAiAgentThreadShareResponse = ApiSuccess<AiAgentThreadSummary>;
export type ApiAppendInstructionRequest = {
    instruction: string;
};
export type ApiAppendInstructionResponse = ApiSuccess<{
    updatedInstruction: string;
}>;
export type AgentSummaryContext = {
    uuid: string;
    projectUuid: string;
    name: string;
    description: string | null;
    explores: string[];
    verifiedQuestions: string[];
    instruction: string | null;
};
export type AiAgentWithContext = AiAgentSummary & {
    context: AgentSummaryContext;
};
export type AiModelOption = {
    name: string;
    displayName: string;
    description: string;
    provider: string;
    default: boolean;
    supportsReasoning: boolean;
};
export type ApiAiAgentModelOptionsResponse = ApiSuccess<AiModelOption[]>;
//# sourceMappingURL=index.d.ts.map