import { type GithubWorkBridge } from './github.ts';
import type { WorkConfig, WorkItem } from './schema.ts';
export declare const resolveGithubBridge: (config: WorkConfig, cwd: string, bridge?: GithubWorkBridge) => GithubWorkBridge | undefined;
export declare const linkedGithubNumbers: (items: readonly WorkItem[]) => Set<number>;
/**
 * Normalize open GitHub issues that were not created by `xy work` into WorkItem shape.
 * Issues already linked from local items (or marked with the xy-work label/marker) are skipped.
 */
export declare const listExternalGithubWorkItems: (cwd: string, localItems: readonly WorkItem[], bridge: GithubWorkBridge) => WorkItem[];
export interface WorkSyncSummary {
    closedGithub: string[];
    createdGithub: string[];
    importedLocal: string[];
    reopenedGithub: string[];
    updatedGithub: string[];
    updatedLocal: string[];
}
export interface WorkSyncOptions {
    cwd?: string;
    /** Injectable GitHub bridge for tests; production uses the default `gh` CLI bridge. */
    github?: GithubWorkBridge;
    now?: Date;
}
/**
 * Bidirectional sync between repo-local work items and GitHub Issues when available.
 *
 * - Local active items without a GitHub link → create a marked GitHub issue
 * - Open/closed GitHub issues not present locally → import as local items
 * - Linked pairs: reconcile title (newer wins) and status (done/wontfix ↔ closed)
 */
export declare const workSync: (options?: WorkSyncOptions) => import("./result.ts").WorkActionResult<{
    summary: WorkSyncSummary;
}>;
//# sourceMappingURL=sync.d.ts.map