export interface TemplateVars { security_key?: string; [key: string]: unknown; } export interface PropSchema { type: 'string' | 'number' | 'bool' | 'array' | 'arrayOf' | 'object' | 'shape' | 'oneOfType' | 'func' | 'node'; isRequired?: boolean; defaultValue?: any; oneOf?: any[]; min?: number; max?: number; minLength?: number; maxLength?: number; itemType?: string; itemOneOf?: any[]; shape?: Record; types?: string[]; pattern?: string; description?: string; } export interface LayoutDefinition { id: string; version: string; description: string; template: string; propsSchema: Record; defaultProps: Record; } export interface CustomLayoutDefinition { template: string; description?: string; version?: string; propsSchema?: Record; defaultProps?: Record; } export type InlineLayoutSpec = string | { id: string; props?: Record; }; export interface ValidationResult { valid: boolean; props: Record; errors: ValidationError[]; } export interface ValidationError { path: string; message: string; value?: any; } export interface LoaderOptions { templatesPath: string; validationMode?: 'strict' | 'lenient'; fallbackLayoutId?: string; } export interface RenderContext { user_input?: string; messages?: Array<{ text: string; isAssistant: boolean; metadata?: Record; }>; mode?: 'query' | 'execute'; platform?: string; metadata?: Record; env?: Record; tools?: { list?: Array>; json?: string; count?: number; [key: string]: any; } | null; vars: TemplateVars; agent: { id: string; name: string; provider?: string; model?: string; workingDirectory?: string; inline: { prompt: string; [key: string]: any; }; specialties?: string[]; capabilities?: string[]; description?: string; [key: string]: any; }; documents: Record; props: Record; session?: { options?: string[]; [key: string]: any; }; context?: Record; contextOptions?: { goals: boolean | string | string[]; daily: boolean; }; [key: string]: unknown; } export interface RawLayoutYaml { id?: string; version?: string; description?: string; propsSchema?: Record; template?: string; layouts?: Record; } export declare class LayoutLoadError extends Error { readonly layoutId?: string | undefined; readonly cause?: Error | undefined; constructor(message: string, layoutId?: string | undefined, cause?: Error | undefined); } export declare class PropsValidationError extends Error { readonly errors: ValidationError[]; readonly cause?: Error | undefined; constructor(message: string, errors?: ValidationError[], cause?: Error | undefined); }