/** Identité git du dépôt courant. Champs `""` si indéterminés (hors dépôt). */ export interface GitInfo { /** Branche courante, ou sha court si HEAD détaché. */ branch: string; /** Commit HEAD court (7 caractères). */ commit: string; } /** * Introspection git du dépôt — **sans spawn `git` ni dépendance** (lecture directe * de `.git/`). Résultat caché pour la vie du process. Best-effort : champs `""` * hors d'un dépôt (ex. container sans `.git`). Consommé par le data plane kernel * (`/nodefony/kernel/api/info` → `git`) et la barre de debug (bloc `app`). */ export default class GitService { /** * Lit branche + commit court (une fois, puis cache process). * * @param cwd - racine où chercher `.git` (défaut `process.cwd()`) * @returns `{ branch, commit }` — champs `""` si indéterminés */ static read(cwd?: string): GitInfo; /** Branche seule (raccourci). */ static branch(cwd?: string): string; }