/** * FORGE Template Client * Wrapper for TEMPLATES integration with CLI-ENGINE */ import { type TemplateContext, type RenderResult, type XmlTaskSpec } from '../generators/index.js'; import { type RequiredFieldSet } from '../generators/index.js'; /** * Template Client Configuration */ export interface TemplateClientConfig { projectRoot: string; templatesDir?: string; outputDir?: string; interactive?: boolean; } /** * Template Client for FORGE CLI */ export declare class TemplateClient { private engine; private projectRoot; private interactive; private outputDir; constructor(config: TemplateClientConfig); /** * Validate that context has all required fields for a template */ validateContext(context: Partial, fieldSet: RequiredFieldSet): { valid: boolean; missing: string[]; }; /** * Get required fields for a specific template */ getRequiredFields(fieldSet: RequiredFieldSet): string[]; /** * Render a template with the given context */ renderTemplate(templateName: string, context: Partial): Promise; /** * Render and write a template to disk */ generateArtifact(templateName: string, context: Partial, outputFilename: string): Promise; /** * Generate XML task specs */ generateXmlTasks(tasks: XmlTaskSpec[]): string; /** * Handle token limit warnings */ private handleTokenLimitWarning; /** * Get token limit for a template */ private getTemplateLimit; /** * Check if file exists */ private fileExists; /** * Backup existing file */ private backupFile; /** * Prompt user to proceed despite warnings */ private shouldProceed; } /** * Create a template client instance */ export declare function createTemplateClient(config: TemplateClientConfig): TemplateClient; //# sourceMappingURL=template-client.d.ts.map