import { ResolvedRef } from "../../validation/dolt-schemas.js";
import { coPilotRuns } from "../../db/runtime/runtime-schema.js";
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";

//#region src/data-access/runtime/improvementRuns.d.ts
type CoPilotRunInsert = typeof coPilotRuns.$inferInsert;
type CoPilotRunSelect = typeof coPilotRuns.$inferSelect;
type CoPilotRunStatus = 'running' | 'suspended' | 'completed' | 'failed';
declare const createCoPilotRun: (db: AgentsRunDatabaseClient) => (params: CoPilotRunInsert) => Promise<CoPilotRunSelect>;
declare const getCoPilotRunByRef: (db: AgentsRunDatabaseClient) => (params: {
  scopes: {
    tenantId: string;
    projectId: string;
  };
  ref: ResolvedRef;
}) => Promise<CoPilotRunSelect | null>;
declare const getCoPilotRunByBranchName: (db: AgentsRunDatabaseClient) => (params: {
  scopes: {
    tenantId: string;
    projectId: string;
  };
  branchName: string;
}) => Promise<CoPilotRunSelect | null>;
declare const listCoPilotRunsByBranchName: (db: AgentsRunDatabaseClient) => (params: {
  scopes: {
    tenantId: string;
    projectId: string;
  };
  branchName: string;
}) => Promise<CoPilotRunSelect[]>;
declare const listCoPilotRuns: (db: AgentsRunDatabaseClient) => (params: {
  scopes: {
    tenantId: string;
    projectId: string;
  };
}) => Promise<CoPilotRunSelect[]>;
declare const updateCoPilotRunStatusByConversationId: (db: AgentsRunDatabaseClient) => (params: {
  conversationId: string;
  status: CoPilotRunStatus;
}) => Promise<CoPilotRunSelect | null>;
declare const deleteCoPilotRunsByBranchName: (db: AgentsRunDatabaseClient) => (params: {
  scopes: {
    tenantId: string;
    projectId: string;
  };
  branchName: string;
}) => Promise<number>;
//#endregion
export { CoPilotRunInsert, CoPilotRunSelect, CoPilotRunStatus, createCoPilotRun, deleteCoPilotRunsByBranchName, getCoPilotRunByBranchName, getCoPilotRunByRef, listCoPilotRuns, listCoPilotRunsByBranchName, updateCoPilotRunStatusByConversationId };