export interface TemplateIO { out: (message: string) => void; err: (message: string) => void; } export interface TemplateProvenance { template?: string; frameworkSkills?: string; templateRef?: string; templateSource?: "github" | "bundled" | "local-checkout"; coreVersion?: string; shape?: "workspace" | "standalone"; } export interface AppTarget { appDir: string; appName: string; shape: "workspace" | "standalone"; workspaceRoot?: string; workspaceCoreName?: string; provenance: TemplateProvenance; } export interface MaterializeOptions { appName: string; template: string; ref: string | null; shape: "workspace" | "standalone"; workspaceRoot?: string; workspaceCoreName?: string; destDir?: string; } export interface MaterializeResult { dir: string; ref: string; source: "github" | "bundled" | "local-checkout"; } export interface TemplateMergeResult { added: string[]; updated: string[]; deleted: string[]; conflicted: string[]; manual: string[]; keptLocal: string[]; } export declare function materializeTemplate(opts: MaterializeOptions): Promise; type SubdirDownloader = (subdir: string, dest: string, refs: string[]) => Promise; /** * A bundled layer lives in core's own template folder, not `templates/`, so a * ref fetches the layer from there and its base from `templates/` at the * same ref. */ export declare function downloadTemplateLayer(template: string, ref: string, dest: string, download?: SubdirDownloader): Promise; export declare function isMergeExcluded(rel: string): boolean; export declare function listMergeableFiles(root: string): Set; export declare function mergeTemplateTrees(appDir: string, baseDir: string, theirsDir: string, options?: { dryRun?: boolean; }): TemplateMergeResult; export declare function readProvenance(appDir: string): TemplateProvenance; export declare function resolveTargets(cwd: string, appArg?: string): AppTarget[]; export declare function runTemplate(args: string[], io?: TemplateIO): Promise; declare function useLocalTemplate(target: AppTarget, ref: string | null): boolean; export { useLocalTemplate as _useLocalTemplate };