/** * Setup Mergiraf Runner — Programmatic API for configuring mergiraf as git merge driver. * * Exports `setupMergiraf()` so mergiraf configuration can be invoked from code * without going through process.argv / process.env / process.exit. */ export interface SetupMergirafConfig { /** Show what would be done without making changes (default: false) */ dryRun?: boolean; /** Only configure for agent worktrees, not the whole repo (default: false) */ worktreeOnly?: boolean; /** Skip mergiraf binary check (default: false) */ skipCheck?: boolean; /** Git root directory (default: auto-detect) */ gitRoot?: string; /** Worktree path for per-worktree configuration (used with worktreeOnly) */ worktreePath?: string; } export interface SetupMergirafResult { mergirafFound: boolean; mergirafVersion: string; configuredFileTypes: string[]; gitattributesWritten: boolean; mergeDriverConfigured: boolean; worktreeMode: boolean; repoConfigUpdated: boolean; errors: string[]; /** Process exit code: 0 = success, 1 = error, 2 = mergiraf not found */ exitCode: number; } export declare function getGitRoot(): string; /** * Detect mergiraf binary and return version info. * Uses `which` to find the binary and `mergiraf --version` for the version string. */ export declare function detectMergiraf(): { found: boolean; version: string; }; /** * Configure .gitattributes with mergiraf merge driver entries. * Idempotent — skips entries that already exist. */ export declare function configureGitattributes(gitRoot: string, config: SetupMergirafConfig): { written: boolean; fileTypes: string[]; }; /** * Configure git merge driver for mergiraf via `git config`. * In worktree-only mode, uses `--worktree` flag for worktree-local config. */ export declare function configureMergeDriver(targetPath: string, config: SetupMergirafConfig): boolean; /** * Update .agentfactory/config.yaml with mergeDriver: mergiraf. */ export declare function updateRepoConfig(gitRoot: string, config: SetupMergirafConfig): boolean; export declare function setupMergiraf(config?: SetupMergirafConfig): SetupMergirafResult; //# sourceMappingURL=setup-mergiraf-runner.d.ts.map