/** * Workspace Context Validator - Enforces strict safety limits * * CRITICAL: Prevents context explosion by validating all workspace context * before it's sent to the LLM. Multiple safety layers ensure we never * exceed token limits. */ export interface ValidationResult { valid: boolean; errors: string[]; warnings: string[]; stats: ContextStats; } export interface ContextStats { totalChars: number; totalLines: number; estimatedTokens: number; fileEntries: number; docChars: number; } export interface WorkspaceContextSafe { content: string; stats: ContextStats; } /** * Validate workspace context options BEFORE building context */ export declare function validateWorkspaceOptions(options: { treeDepth?: number; maxEntries?: number; docExcerptLimit?: number; }): ValidationResult; /** * Validate workspace context AFTER building - CRITICAL SAFETY CHECK * This is the final line of defense against context explosion */ export declare function validateWorkspaceContext(content: string): ValidationResult; /** * Safe truncation - if content exceeds limits, truncate intelligently */ export declare function truncateWorkspaceContext(content: string): WorkspaceContextSafe; /** * Validate and enforce limits in a single call - RECOMMENDED USAGE */ export declare function safeWorkspaceContext(content: string | null, options?: { truncate?: boolean; throwOnError?: boolean; }): WorkspaceContextSafe; //# sourceMappingURL=workspace.validator.d.ts.map