/** * Metadata system — read/write ghls-id and ghls-stack trailers in commit messages. * * Trailers are appended to the commit message body following the git trailer convention: * ghls-id: * ghls-stack: * ghls-order: */ export declare const TRAILER_ID = "ghls-id"; export declare const TRAILER_STACK = "ghls-stack"; export declare const TRAILER_ORDER = "ghls-order"; export interface StackMetadata { id: string; stackId: string; order: number; } /** * Extract ghls metadata from a commit's trailers. */ export declare function readMetadata(commitHash: string, cwd?: string): Promise; /** * Batch-read metadata for all commits in a range. */ export declare function readAllMetadata(range: string, cwd?: string): Promise>; /** * Generate a new unique id for a commit. */ export declare function generateId(): string; /** * Generate a new stack id. */ export declare function generateStackId(): string; /** * Add ghls trailers to a commit message string. */ export declare function addTrailersToMessage(message: string, meta: StackMetadata): string; /** * Remove all ghls trailers from a commit message. */ export declare function stripTrailers(message: string): string; /** * Amend the HEAD commit's message to include/update ghls trailers. */ export declare function amendHeadWithMetadata(meta: StackMetadata, cwd?: string): Promise; /** * Rewrite trailers for a range of commits using filter-branch alternative (interactive rebase with exec). * This stamps metadata onto commits that don't have it yet. */ export declare function stampMetadataOnRange(range: string, stackId: string, cwd?: string): Promise; //# sourceMappingURL=metadata.d.ts.map