export type ManagedWorktreeState = 'active' | 'paused' | 'kept' | 'discard' | 'cleanup-pending';
export type ManagedWorktreeKind = 'agent' | 'orchestrator' | 'manual';
export interface ManagedWorktreeMeta {
    readonly path: string;
    readonly kind: ManagedWorktreeKind;
    readonly state: ManagedWorktreeState;
    readonly ownerId?: string;
    readonly sessionId?: string;
    readonly taskId?: string;
    readonly updatedAt: number;
}
export interface WorktreeStatusRecord extends ManagedWorktreeMeta {
    readonly branch: string;
    readonly head: string;
}
export interface WorktreeOwnershipSummary {
    readonly total: number;
    readonly active: number;
    readonly paused: number;
    readonly kept: number;
    readonly discard: number;
    readonly cleanupPending: number;
    readonly sessionAttached: number;
    readonly taskAttached: number;
    readonly agentOwned: number;
    readonly orchestratorOwned: number;
    readonly manualOwned: number;
}
export interface WorktreeAttachmentReview {
    readonly targetKind: 'session' | 'task';
    readonly targetId: string;
    readonly total: number;
    readonly active: number;
    readonly paused: number;
    readonly kept: number;
    readonly discard: number;
    readonly cleanupPending: number;
    readonly records: readonly ManagedWorktreeMeta[];
}
export interface WorktreeRegistryPaths {
    readonly workingDirectory: string;
    readonly surfaceRoot?: string;
}
export declare function listPersistedWorktreeMeta(options: WorktreeRegistryPaths): ManagedWorktreeMeta[];
export declare function getPersistedWorktreeMeta(path: string, options: WorktreeRegistryPaths): ManagedWorktreeMeta | null;
export declare function reviewWorktreeAttachments(targetKind: 'session' | 'task', targetId: string, options: WorktreeRegistryPaths): WorktreeAttachmentReview;
export declare function summarizeWorktreeOwnership(records: readonly ManagedWorktreeMeta[]): WorktreeOwnershipSummary;
export declare class WorktreeRegistry {
    private readonly git;
    private readonly workingDirectory;
    private readonly surfaceRoot?;
    constructor(workingDirectory: string, options?: {
        readonly surfaceRoot?: string;
    });
    list(): Promise<WorktreeStatusRecord[]>;
    attach(path: string, target: {
        sessionId?: string;
        taskId?: string;
    }): void;
    setState(path: string, state: ManagedWorktreeState): void;
    cleanup(path: string): Promise<void>;
}
//# sourceMappingURL=registry.d.ts.map