/**
 * Module metadata interface
 */
export interface ModuleMetadata {
    name: string;
    version: string;
    displayName: string;
    description: string;
    type: 'coding-standards' | 'domain-rules' | 'workflows' | 'examples' | 'marketing-standards' | 'writing-standards' | 'themes';
    tags?: string[];
    augment?: {
        characterCount?: number;
        priority?: 'high' | 'medium' | 'low';
        category?: string;
    };
    installation?: 'required' | 'optional';
    dependencies?: string[];
}
/**
 * Module structure interface
 */
export interface Module {
    metadata: ModuleMetadata;
    path: string;
    fullName: string;
    rules: string[];
    examples: string[];
}
/**
 * Validation result interface
 */
export interface ValidationResult {
    valid: boolean;
    errors: string[];
    warnings: string[];
}
/**
 * Get the modules directory path
 */
export declare function getModulesDir(): string;
/**
 * Validate module.json structure
 */
export declare function validateModuleMetadata(metadata: any): ValidationResult;
/**
 * Validate semantic version format
 * Supports: MAJOR.MINOR.PATCH[-prerelease][+build]
 * Examples: 1.0.0, 1.0.0-alpha, 1.0.0-beta.1, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85
 */
export declare function isValidSemanticVersion(version: string): boolean;
/**
 * Parse semantic version into components
 */
export interface SemanticVersion {
    major: number;
    minor: number;
    patch: number;
    prerelease?: string;
    build?: string;
}
export declare function parseSemanticVersion(version: string): SemanticVersion | null;
/**
 * Compare two semantic versions
 * Returns: -1 if v1 < v2, 0 if v1 === v2, 1 if v1 > v2
 */
export declare function compareSemanticVersions(v1: string, v2: string): number;
/**
 * Check if version satisfies a range (simple implementation)
 * Supports: ^1.0.0 (compatible), ~1.0.0 (patch), >=1.0.0, >1.0.0, <=1.0.0, <1.0.0, 1.0.0 (exact)
 */
export declare function satisfiesVersionRange(version: string, range: string): boolean;
/**
 * Load module from path
 */
export declare function loadModule(modulePath: string): Module | null;
/**
 * Extended module metadata with file information
 */
export interface ExtendedModuleMetadata extends ModuleMetadata {
    files?: {
        total: number;
        rules: number;
        examples: number;
        other: number;
    };
    size?: {
        totalBytes: number;
        totalCharacters: number;
    };
    lastModified?: Date;
}
/**
 * Extract comprehensive metadata from a module
 * Includes file counts, sizes, and last modified dates
 */
export declare function extractModuleMetadata(modulePath: string): ExtendedModuleMetadata | null;
/**
 * Generate default metadata for modules without module.json
 */
export declare function generateDefaultMetadata(modulePath: string): ModuleMetadata;
/**
 * File information interface
 */
export interface FileInfo {
    name: string;
    path: string;
    relativePath: string;
    size: number;
    modified: Date;
    type: 'rule' | 'example' | 'config' | 'documentation' | 'other';
    extension: string;
    directory: string;
}
/**
 * List all files in a module with metadata
 */
export declare function listModuleFiles(modulePath: string, options?: {
    recursive?: boolean;
    filter?: string;
    groupByDirectory?: boolean;
}): FileInfo[];
/**
 * Group files by directory
 */
export declare function groupFilesByDirectory(files: FileInfo[]): Map<string, FileInfo[]>;
/**
 * Get file statistics for a list of files
 */
export declare function getFileStatistics(files: FileInfo[]): {
    totalFiles: number;
    totalSize: number;
    byType: Record<FileInfo['type'], number>;
    byExtension: Record<string, number>;
};
/**
 * Discover all modules in the modules directory
 */
export declare function discoverModules(): Module[];
/**
 * Collection metadata interface
 */
export interface CollectionMetadata {
    name: string;
    version: string;
    displayName: string;
    description: string;
    type: 'collection';
    tags?: string[];
    modules: Array<{
        id: string;
        version: string;
        required: boolean;
    }>;
    augment?: {
        priority?: 'high' | 'medium' | 'low';
        category?: string;
    };
}
/**
 * Collection structure interface
 */
export interface Collection {
    metadata: CollectionMetadata;
    path: string;
    fullName: string;
}
/**
 * Discover all collections in the collections directory
 */
export declare function discoverCollections(): Collection[];
/**
 * Find module by name (supports both "category/module" and "module" formats)
 */
export declare function findModule(moduleName: string): Module | null;
/**
 * Search for modules by name with fuzzy matching
 * Supports exact, partial, and case-insensitive matching
 */
export interface ModuleSearchOptions {
    caseSensitive?: boolean;
    exactMatch?: boolean;
    category?: string;
}
export declare function searchModules(searchTerm: string, options?: ModuleSearchOptions): Module[];
/**
 * Find module with enhanced discovery
 * Tries exact match first, then falls back to fuzzy search
 */
export declare function findModuleEnhanced(moduleName: string): Module | null;
/**
 * Get module suggestions for a search term
 * Returns up to maxSuggestions similar modules
 */
export declare function getModuleSuggestions(searchTerm: string, maxSuggestions?: number): Module[];
/**
 * Find collection by name (supports both "collections/name" and "name" formats)
 */
export declare function findCollection(collectionName: string): Collection | null;
/**
 * Resolve collection to its constituent modules
 * Returns array of module IDs that are part of the collection
 */
export declare function resolveCollection(collection: Collection): string[];
/**
 * Resolve collection by name to its constituent modules
 */
export declare function resolveCollectionByName(collectionName: string): string[] | null;
/**
 * Check if a name refers to a collection
 */
export declare function isCollection(name: string): boolean;
/**
 * Check if a name refers to a module
 */
export declare function isModule(name: string): boolean;
/**
 * Validate module structure
 */
export declare function validateModuleStructure(modulePath: string): ValidationResult;
/**
 * Validate module category matches directory structure
 */
export declare function validateModuleCategory(module: Module): ValidationResult;
/**
 * Calculate character count for a module
 */
export declare function calculateModuleCharacterCount(modulePath: string): number;
/**
 * Validate module is project-agnostic (no hardcoded paths or URLs)
 */
export declare function validateProjectAgnostic(modulePath: string): ValidationResult;
//# sourceMappingURL=module-system.d.ts.map