import type { GitService } from "./git.js";
import type { RepoRow, RepositoryService } from "./repositories.js";
import { type WorkspaceService } from "./workspaces.js";
import type { WsControlPlane } from "../ws.js";
type WorkspaceRow = ReturnType<WorkspaceService["getById"]>;
export interface WorkspaceRepositoryAssignment {
    workspace: NonNullable<WorkspaceRow>;
    repo: RepoRow;
    assigned: boolean;
    skipped: boolean;
    created: boolean;
}
export declare class WorkspaceRepositoryAssignmentError extends Error {
    readonly code: "WORKSPACE_NOT_FOUND" | "REPOSITORY_NOT_FOUND" | "WORKSPACE_HAS_NO_ROOT" | "WORKSPACE_NOT_GIT";
    constructor(code: "WORKSPACE_NOT_FOUND" | "REPOSITORY_NOT_FOUND" | "WORKSPACE_HAS_NO_ROOT" | "WORKSPACE_NOT_GIT", message: string);
}
export declare function workspaceHasGitMetadata(rootPath: string | null | undefined): boolean;
export declare function assignRepositoryToWorkspace(params: {
    workspaceService: WorkspaceService;
    repoService: RepositoryService;
    gitService: GitService;
    workspaceId: string;
    userId?: string;
    repoId?: string | null;
    ws?: WsControlPlane;
}): Promise<WorkspaceRepositoryAssignment>;
export declare function autoAssignWorkspaceRepositories(params: {
    workspaceService: WorkspaceService;
    repoService: RepositoryService;
    gitService: GitService;
    userId?: string;
    ws?: WsControlPlane;
}): Promise<WorkspaceRepositoryAssignment[]>;
export {};
//# sourceMappingURL=workspace-repositories.d.ts.map