/** * Git Sync — mirror Trellis integration state to the primary git worktree. * * Trellis owns semantics; git on `main` is a downstream artifact updated at * promote/close boundaries (ADR 0014 git adapter). */ import type { BlobResolver } from '../vcs/blob-resolver.js'; import type { LaneMeta } from '../vcs/lane.js'; import type { VcsOp } from '../vcs/types.js'; export interface GitSyncOptions { rootPath: string; blobResolver: BlobResolver; integrationOps: VcsOp[]; /** Integration branch head op hash to materialize. */ headOpHash: string; branch?: string; remote?: string; authorName?: string; authorEmail?: string; /** Commit message body (first line becomes subject). */ message: string; /** Push after commit when true and remote configured. */ push?: boolean; /** Skip commit when working tree matches HEAD (default true). */ skipIfClean?: boolean; } export interface GitSyncResult { committed: boolean; commitHash?: string; pushed: boolean; filesMaterialized: number; } export interface PromoteCommitMessageParams { lane: LaneMeta; laneOps: VcsOp[]; issueTitle?: string; } /** Build a git commit message from lane promote context + op log summary. */ export declare function buildPromoteCommitMessage(params: PromoteCommitMessageParams): string; /** * Materialize integration file state at `headOpHash` onto `rootPath`, commit, * and optionally push to `remote`. */ export declare function syncIntegrationToGit(opts: GitSyncOptions): GitSyncResult; /** Resolve integration branch head from ops. */ export declare function resolveIntegrationHead(ops: VcsOp[], branchName: string): string | undefined; export interface GitSyncConfig { syncOnPromote?: boolean; pushOnClose?: boolean; remote?: string; branch?: string; } export declare function readGitSyncConfig(rootPath: string): GitSyncConfig | undefined; //# sourceMappingURL=git-sync.d.ts.map