export interface SubmoduleInfo { name: string; path: string; declaredBranch?: string; currentBranch?: string; } /** One brand: display name + submodule → target branch mapping. */ export interface BrandDef { display?: string; submodules: Record; } /** Parsed aiws/brands.yml. `active` is optional; absent → default resolution rules. */ export interface BrandsFile { active?: string; brands: Record; } export declare const DEFAULT_BRAND = "default"; /** * List git submodules from .gitmodules. Returns [] if .gitmodules missing or no entries. * Populates declaredBranch and currentBranch where available. */ export declare function listSubmodules(workspaceRoot: string): Promise; /** * Resolve branch for a submodule: declared > current > "main" */ export declare function resolveSubmoduleBranch(workspaceRoot: string, sub: SubmoduleInfo): Promise; export declare function brandsYamlExists(workspaceRoot: string): boolean; /** * Parse aiws/brands.yml into BrandsFile. Returns null if missing or unparseable. * Accepts both the legacy single-default format (brands: { default: ... }) and * the active+brands format. */ export declare function loadBrandsYaml(workspaceRoot: string): BrandsFile | null; /** * Resolve the effective active brand name: * 1. explicit `active` that exists in brands * 2. a `default` brand if present * 3. single-brand files (legacy writeBrandsYaml output) * 4. otherwise "default" (caller handles missing brand) */ export declare function resolveActiveBrandName(spec: BrandsFile): string; /** Effective active brand name from aiws/brands.yml, or null when the file is absent. */ export declare function getActiveBrand(workspaceRoot: string): string | null; /** * Submodule → branch mapping of the effective active brand, or null when * brands.yml is absent or the active brand has no definition. */ export declare function getActiveBrandSubmodules(workspaceRoot: string): Record | null; /** * Write aiws/brands.yml with active + brands schema. Backs up existing file first. * `active` defaults to "default". Returns the written file path. */ export declare function writeBrandsYaml(workspaceRoot: string, branches: Record, active?: string): string; export declare function shouldInteract(opts?: { yes?: boolean; noInteract?: boolean; }): boolean; /** * Configure aiws/brands.yml for the workspace. * Interactive path uses readline prompts; non-interactive auto-detects branches. */ export declare function configureBrands(workspaceRoot: string, opts?: { yes?: boolean; noInteract?: boolean; dryRun?: boolean; log?: (msg: string) => void; }): Promise;