import { AgentsManageDatabaseClient } from "../db/manage/manage-client.js";

//#region src/dolt/branch.d.ts
type branchScopes = {
  tenantId: string;
  projectId: string;
  branchName: string;
};
/**
 * Create a new branch
 */
declare const doltBranch: (db: AgentsManageDatabaseClient) => (params: {
  name: string;
  startPoint?: string;
}) => Promise<void>;
/**
 * Delete a branch
 */
declare const doltDeleteBranch: (db: AgentsManageDatabaseClient) => (params: {
  name: string;
  force?: boolean;
}) => Promise<void>;
/**
 * Rename a branch
 */
declare const doltRenameBranch: (db: AgentsManageDatabaseClient) => (params: {
  oldName: string;
  newName: string;
}) => Promise<void>;
/**
 * List all branches
 */
declare const doltListBranches: (db: AgentsManageDatabaseClient) => () => Promise<{
  name: string;
  hash: string;
  latest_commit_date: Date;
}[]>;
/**
 * Check if a branch exists
 */
declare const doltBranchExists: (db: AgentsManageDatabaseClient) => (params: {
  name: string;
}) => Promise<boolean>;
/**
 * Checkout a branch or create and checkout a new branch
 */
declare const doltCheckout: (db: AgentsManageDatabaseClient) => (params: {
  branch: string;
  create?: boolean;
}) => Promise<void>;
/**
 * Get the currently active branch
 */
declare const doltActiveBranch: (db: AgentsManageDatabaseClient) => () => Promise<string>;
declare const doltGetBranchNamespace: (scopes: branchScopes) => () => string;
/**
 * Create a branch if it doesn't exist, handling race conditions gracefully.
 * If multiple concurrent requests try to create the same branch, only one will succeed.
 */
declare const ensureBranchExists: (db: AgentsManageDatabaseClient, branchName: string) => Promise<void>;
//#endregion
export { branchScopes, doltActiveBranch, doltBranch, doltBranchExists, doltCheckout, doltDeleteBranch, doltGetBranchNamespace, doltListBranches, doltRenameBranch, ensureBranchExists };