import { Router } from 'express';
/** Default cooldown between git fetch calls per repo (ms). */
export declare const GIT_FETCH_COOLDOWN_MS = 60000;
export interface DirtyFile {
    status: string;
    path: string;
}
export interface GitInfo {
    branch: string;
    clean: boolean;
    ahead: number | null;
    behind: number | null;
    dirtyFiles: DirtyFile[];
    /** Commits that origin/develop has that local branch doesn't (needs pull/rebase) */
    developBehind: number | null;
}
export interface RepoGitInfo extends GitInfo {
    name: string;
    path: string;
}
interface RepoConfig {
    name: string;
    path: string;
}
/**
 * Get repos from repos.yaml
 * Checks project root first, then .claude/project/ fallback.
 * Returns array of repo configs, falls back to single repo (current dir) if none configured.
 */
export declare function getReposFromConfig(projectDir: string): RepoConfig[];
/**
 * Get git status for all configured repos (sync - blocks event loop, use getAllReposGitInfoAsync when possible)
 */
export declare function getAllReposGitInfo(projectDir: string): RepoGitInfo[];
/**
 * Get git status for all configured repos (async - does not block event loop)
 */
export declare function getAllReposGitInfoAsync(projectDir: string): Promise<RepoGitInfo[]>;
export declare function getGitInfo(projectDir: string): GitInfo | null;
/**
 * Get git status for project (async - does not block event loop)
 * This should be preferred over getGitInfo for WebSocket broadcasts and polling
 * Uses --no-optional-locks so reads never conflict with concurrent git operations.
 * Does NOT fetch from remote — use fetchRepoAsync() separately for that.
 */
export declare function getGitInfoAsync(projectDir: string): Promise<GitInfo | null>;
/**
 * Fetch latest refs from remote for a single repo.
 * Uses per-repo mutex to prevent concurrent fetch operations.
 * Throttled: only fetches once per GIT_FETCH_COOLDOWN_MS per repo (Story 103-21).
 * Returns true if fetch was performed, false if skipped (cooldown) or failed.
 */
export declare function fetchRepoAsync(projectDir: string): Promise<boolean>;
/**
 * Fetch all configured repos. Returns true if any repo was fetched.
 */
export declare function fetchAllReposAsync(projectDir: string): Promise<boolean>;
/**
 * Reset the fetch cooldown for a repo, allowing the next getGitInfoAsync call
 * to perform a git fetch immediately. Used by force-refresh paths.
 * Story 103-21
 */
export declare function resetFetchCooldown(projectDir?: string): void;
export declare function setForceRefreshCallback(callback: (projectDir: string) => Promise<void>): void;
export declare function createGitRouter(getProjectDir: () => string): Router;
export {};
//# sourceMappingURL=git.d.ts.map