import { type ParsedDiffFile } from './git-diff.js'; /** * @purpose Describe origin remote repository data (host, project, scheme). * @consumer git-core, vcs-client */ export type GitRemoteInfo = { /** @purpose Git host domain (e.g. github.com). */ host: string; /** @purpose Repository path on the host (e.g. owner/repo). */ project: string; /** @purpose URL scheme used for origin remote (http, https, ssh). */ scheme: string; }; /** * @purpose Aggregated diff information: raw text, parsed files, token and commit metrics. * @consumer commit-gen, review-gen, ai-legacy */ export type GitDiffInfo = { /** @purpose Raw git diff text output. */ diff: string; /** @purpose All parsed diff files sorted by token count ascending. */ parsedDiff: ParsedDiffFile[]; /** @purpose Code/config files only, excluding tests, deleted and renamed. */ parsedCodeDiff: ParsedDiffFile[]; /** @purpose Total token count across parsed code diff files. */ parsedCodeTokens: number; /** @purpose Token count of the largest code file chunk. */ parsedCodeChunkMaxTokens: number; /** @purpose Unique programming languages detected across code diff files. */ programmingLanguages: (string | undefined)[]; /** @purpose Number of commits on top of base branch. */ commitCount: number; }; /** * @purpose Determine the base branch (main or master) for diff analysis. * @sideEffect Process: executes git branch. */ export declare const detectGitBaseBranch: () => string; /** * @purpose Get current Git branch name. * @sideEffect Process: executes git rev-parse. */ export declare const getGitCurrentBranch: () => string; /** * @purpose Get origin remote repository info. * @sideEffect Process: executes git config / git remote. */ export declare const getGitRemote: () => GitRemoteInfo | null; /** * @purpose Count commits on top of the base branch. * @sideEffect Process: executes git rev-list. */ export declare const getGitCommitCount: () => number; /** * @purpose Get textual diff of current state against target. * @sideEffect Process: executes git diff. */ export declare const getGitDiff: (targetBranch?: string) => string; /** * @purpose Build aggregated diff info for further analysis/ranking. * @sideEffect Process: calls getGitDiff and getGitCommitCount (git commands). */ export declare const getGitDiffInfo: (branch?: string) => GitDiffInfo;