import type { PiAutocommitConfig } from "./config.js"; /** * Returns `true` when the config carries a usable path-to-scope mapping * (a `scope` object with at least one entry). An empty or absent mapping * means "let the LLM/heuristic infer the scope as before". */ export declare function hasScopeMapping(config: PiAutocommitConfig): boolean; /** * Resolve the Conventional Commits scope for a set of changed file paths. * * Cascade (see ADR 0003): * * 1. **User mapping** — when `config.scope` is set, each path is matched * against the mapping's picomatch globs. When multiple globs match the * same path, the one with the **longest literal** (most non-wildcard * characters) wins. * - When every path matches and they all resolve to the **same** scope, * that scope is returned. * - When every path matches but the scopes **differ**, the commit spans * multiple scopes → `null` (scope omitted). * - When **any** path has no matching glob, fall through to tier 2. * 2. **Heuristic** — the original `determineScope` path-based heuristic * (top-level dir → two-level dir → single-file stem). Preserved verbatim * so unmapped repos and partial mappings keep their existing behaviour. * 3. `null` — neither tier could decide; the scope is omitted * (`type: summary`). * * @param paths Changed file paths (relative, POSIX-style). * @param config Loaded pi-autocommit config. * @returns The resolved scope, or `null` to omit it. */ export declare function resolveScope(paths: string[], config: PiAutocommitConfig): string | null; /** * Inject the deterministic scope into the subject line of a commit message. * * The subject (first line) is normalised to `type: summary` first — stripping * any LLM-emitted `type(scope):` — then reassembled as `type(scope): summary` * when `resolveScope` returns a non-null scope, or left as `type: summary` * otherwise. Body and footer lines are left untouched. * * Used only when a scope mapping is configured (ADR 0003), so the LLM is * told to omit scope and we reattach it deterministically. */ export declare function injectScopeIntoMessage(message: string, paths: string[], config: PiAutocommitConfig): string; //# sourceMappingURL=scope-resolver.d.ts.map