/**
 * Import Resolver for SpecVerse v3.1
 *
 * Resolves imports from:
 * 1. Local files (relative or absolute paths)
 * 2. NPM packages (using Node.js resolution)
 * 3. URLs (with local caching)
 */
import { ImportSpec, ResolvedImport, ImportResolverOptions } from './types.js';
export declare class ImportResolver {
    private cache;
    private options;
    private debug;
    /** Lazily-constructed shared registry client (DP2 — one registry path). */
    private registryClient?;
    constructor(options?: ImportResolverOptions);
    /**
     * Resolve an import specification
     */
    resolve(importSpec: ImportSpec, basePath?: string): Promise<ResolvedImport>;
    /**
     * Resolve a local file
     */
    private resolveFile;
    /**
     * Check if a file exists
     */
    private fileExists;
    /**
     * Resolve a SpecVerse built-in library
     */
    private resolveSpecVerseLibrary;
    /**
     * Resolve a SpecVerse library from local files
     */
    private resolveLocalSpecVerseLibrary;
    /**
     * Resolve an NPM package
     */
    private resolveNpmPackage;
    /**
     * Resolve a URL
     */
    private resolveUrl;
    /**
     * Find package root directory
     */
    private findPackageRoot;
    /**
     * Find SpecVerse main file in package
     */
    private findSpecverseMain;
    /**
     * Resolve a library from the SpecVerse Registry via the shared RegistryClient.
     *
     * Unified on RegistryClient (DP2): previously a bespoke `fetch` + JSON-unwrap
     * that tried a stale `['3.1.0','3.0.0','latest']` version list. Now hits the
     * same `GET /api/libraries/<name>/versions/<ver>/content` endpoint the
     * realize-time resolver uses, with retry/timeout owned by the client. The
     * parser-time LocalCache still wraps the call so imports stay cache-first.
     */
    private resolveFromRegistry;
    /**
     * Lazily construct the shared RegistryClient from this resolver's endpoint +
     * timeout options.
     */
    private getRegistryClient;
    /**
     * Map a spec-author version range to what the content endpoint understands:
     * an exact version or the literal `latest`. Ranges (`^ ~ >= * x`) collapse to
     * `latest`; exact pins pass through. Mirrors the realize-time resolver.
     */
    private toRegistryVersion;
    /**
     * Normalise a library `from:` value to its registry record name.
     *
     * The legacy `@specverse/<cat>/<sub>` → `domains-<cat>-<sub>-yaml-<sub>library`
     * fabrication is retired — it only matched the pre-5.x corpus, which is being
     * re-seeded under canonical names (Phase 1). We now fetch by the name the
     * author wrote (an alias seam remains for known canonical exceptions), which
     * matches the realize-time resolver's by-canonical-name lookup.
     */
    private toRegistryLibraryName;
    /**
     * Check if string is a URL
     */
    private isUrl;
    /**
     * Check if string looks like an NPM package
     */
    private isNpmPackage;
    /**
     * Detect content type from path or content
     */
    private detectContentType;
    /**
     * Clear cache
     */
    clearCache(): Promise<void>;
    /**
     * Get cache statistics
     */
    getCacheStats(): Promise<{
        size: number;
        count: number;
        oldestEntry: number | null;
        newestEntry: number | null;
    }>;
    /**
     * List cached URLs
     */
    listCached(): Promise<{
        url: string;
        cached: number;
        expires: number;
        size: number;
    }[]>;
    /**
     * Get the cache directory path
     */
    getCacheDir(): string;
}
//# sourceMappingURL=resolver.d.ts.map