/** * PromptResolver handles hierarchical file resolution for prompt templates * This is a stub implementation following TDD principles */ import { type PromptContext } from './types.js'; /** * Result of resolving a single file */ export interface ResolveFileResult { found: boolean; path: string | null; source: 'model' | 'provider' | 'base' | null; } /** * Resolved file information with metadata */ export interface ResolvedFile { type: 'core' | 'env' | 'tool'; path: string; source: 'model' | 'provider' | 'base'; toolName?: string; } /** * Available file information */ export interface AvailableFile { path: string; type: 'core' | 'env' | 'tool'; source: 'model' | 'provider' | 'base'; } /** * File structure validation result */ export interface ValidationResult { isValid: boolean; errors: string[]; warnings: string[]; } /** * PromptResolver handles hierarchical file resolution */ export declare class PromptResolver { /** * Find the most specific version of a file */ resolveFile(baseDir: string, relativePath: string, context: Partial): ResolveFileResult; /** * Resolve all files for a given context */ resolveAllFiles(baseDir: string, context: PromptContext): ResolvedFile[]; /** * Make names filesystem-safe */ sanitizePathComponent(component: string): string; /** * Convert tool names to kebab-case */ convertToKebabCase(toolName: string): string; /** * List all available prompt files */ listAvailableFiles(baseDir: string, fileType: 'core' | 'env' | 'tool' | 'all'): AvailableFile[]; /** * Validate the file structure */ validateFileStructure(baseDir: string): ValidationResult; private fileExists; private isDirectory; private isRegularFile; private readDirectory; private scanProviderDirectory; private scanModelDirectory; private walkDirectory; }