/**
 * GitHub Pull Sync — GitHub Issues → Spec
 *
 * Fetches GitHub issue state and compares with spec acceptance criteria
 * to detect changes, conflicts, and apply updates.
 *
 * @module github-pull-sync
 */
import type { GitHubUserStoryLink } from '../../../../../src/core/types/sync-profile.js';
export interface PullSyncOptions {
    owner: string;
    repo: string;
    token?: string;
    dryRun?: boolean;
}
export interface PullSyncChange {
    userStoryId: string;
    field: string;
    specValue: string;
    githubValue: string;
    applied: boolean;
}
export interface PullSyncConflict {
    userStoryId: string;
    field: string;
    specValue: string;
    githubValue: string;
}
export interface PullSyncResult {
    changes: PullSyncChange[];
    conflicts: PullSyncConflict[];
    errors: Array<{
        userStoryId: string;
        error: string;
    }>;
}
/**
 * Pull sync from GitHub — fetch issue state and compare with spec ACs.
 *
 * For each linked user story:
 * 1. Fetch issue via `gh issue view`
 * 2. Parse body to extract AC checkbox states
 * 3. Compare with spec AC states
 * 4. Report changes and conflicts
 */
export declare function pullSyncFromGitHub(userStoryLinks: Record<string, GitHubUserStoryLink>, specAcceptanceCriteria: Record<string, Array<{
    id: string;
    completed: boolean;
}>>, options: PullSyncOptions): Promise<PullSyncResult>;
export interface MultiRepoPullSyncOptions extends PullSyncOptions {
}
export interface MultiRepoDisagreement {
    userStoryId: string;
    field: string;
    repoStates: Record<string, boolean>;
}
export interface MultiRepoPullSyncResult {
    changes: PullSyncChange[];
    conflicts: PullSyncConflict[];
    disagreements: MultiRepoDisagreement[];
    errors: Array<{
        userStoryId?: string;
        repo?: string;
        error: string;
    }>;
}
interface RepoConfig {
    owner: string;
    repo: string;
    relevantStories: string[];
}
interface MultiRepoUserStoryLinks {
    [usId: string]: Record<string, {
        issueNumber: number;
    }>;
}
/**
 * Pull sync from multiple repos with all-repos-must-agree consensus.
 *
 * For shared user stories (appearing in 2+ repos):
 * - AC is marked done ONLY if ALL repos agree it is done
 * - Disagreements are recorded separately
 *
 * For repo-specific user stories (1 repo):
 * - Standard single-repo logic applies
 *
 * Repo errors are non-blocking: erroring repos are excluded from consensus.
 */
export declare function pullSyncMultiRepo(repos: RepoConfig[], userStoryLinks: MultiRepoUserStoryLinks, specAcceptanceCriteria: Record<string, Array<{
    id: string;
    completed: boolean;
}>>, options: MultiRepoPullSyncOptions): Promise<MultiRepoPullSyncResult>;
export {};
//# sourceMappingURL=github-pull-sync.d.ts.map