/** * Git CLI wrapper — safe, robust git operations for vault synchronization. * * Key features: * - Uses execFile (no shell injection) * - All commands scoped to vault working directory * - Configurable timeout per command * - Mutex lock to prevent concurrent git operations * - Structured error handling via VaultError */ import { Config } from "./config.js"; export declare class GitOps { private readonly cwd; private readonly config; private locked; private lockQueue; constructor(config: Config); private acquireLock; private releaseLock; private execGit; /** * Check if git is installed. Does NOT use the lock. */ isGitInstalled(): Promise; /** * Check if the vault is a git repository. */ isGitRepo(): Promise; /** * Assert git is installed and vault is a git repo. Throws on failure. */ assertGitReady(): Promise; /** * Initialize a git repository in the vault. */ init(): Promise; /** * Get the working tree status. */ status(): Promise<{ staged: string[]; modified: string[]; untracked: string[]; clean: boolean; }>; /** * Stage files for commit. */ add(paths?: string[]): Promise; /** * Commit staged changes. */ commit(message: string): Promise<{ hash: string; message: string; }>; /** * Pull changes from remote. */ pull(): Promise<{ success: boolean; message: string; }>; /** * Push changes to remote. Automatically uses -u on first push when * the branch has no upstream tracking branch configured. */ push(): Promise<{ success: boolean; message: string; }>; /** * Get commit log. */ log(limit?: number): Promise<{ hash: string; date: string; message: string; author: string; }[]>; /** * Show diff of working tree changes. */ diff(path?: string): Promise; /** * Add a remote repository. */ remoteAdd(name: string, url: string): Promise; /** * List configured remotes. */ remoteList(): Promise<{ name: string; url: string; type: string; }[]>; /** * Check if a remote is configured (i.e. has at least one remote). */ hasRemote(): Promise; /** * All-in-one sync: add all → commit → pull (if remote) → push (if remote). * Gracefully skips pull/push when no remote is configured. */ sync(message?: string): Promise<{ committed: boolean; pulled: boolean; pushed: boolean; message: string; }>; } //# sourceMappingURL=git.d.ts.map