/** * Reasons a git name field can fail safety validation. * * - `leading-dash`: starts with `-` (would be parsed as a git flag). * - `traversal`: equals `..`, `.`, or contains a `..` segment. * - `invalid-characters`: outside the allow-list `[a-zA-Z0-9][a-zA-Z0-9._-]*`. */ export type GitNameSafetyReason = "leading-dash" | "traversal" | "invalid-characters"; export type GitNameSafetyField = "owner" | "repo" | "ref"; export declare class GitNameSafetyError extends Error { readonly field: GitNameSafetyField; readonly reason: GitNameSafetyReason; constructor(field: GitNameSafetyField, reason: GitNameSafetyReason, message: string); } /** * Validate that owner/repo/ref values are safe to splice into a git command * and into filesystem paths. Throws `GitNameSafetyError` on the first violation. * * `parseSource` does not call this automatically — parse and validate stay * separable so callers that need the looser parse (e.g. `normalizeSource` * for dedup comparisons) aren't forced through the strict gate. * * `owner` is validated segment-by-segment so GitLab nested groups * (`group/subgroup`) pass when each segment is independently safe. */ export declare function validateGitNameSafety(input: { owner?: string; repo?: string; ref?: string; }): void; //# sourceMappingURL=name-safety.d.ts.map