import type { MicroserviceDefinition } from '../../../lib/runtime-web/types/microservice.types';
/**
 * Error class for microservice loading failures.
 */
export declare class MicroserviceLoadError extends Error {
    readonly cause?: Error | undefined;
    readonly hint?: string | undefined;
    constructor(message: string, cause?: Error | undefined, hint?: string | undefined);
}
/**
 * Configuration for MicroserviceLoader.
 */
export interface MicroserviceLoaderConfig {
    /** Path to the React entry point (e.g., 'src/index.tsx') */
    readonly reactEntry: string;
    /** Project root directory */
    readonly projectRoot: string;
    /** Enable verbose logging */
    readonly verbose?: boolean;
}
/**
 * Result of loading microservices.
 */
export interface MicroserviceLoadResult {
    /** Loaded microservice definitions */
    readonly microservices: Record<string, MicroserviceDefinition>;
    /** Number of microservices loaded */
    readonly count: number;
    /** Names of loaded microservices */
    readonly names: string[];
    /** Source file path */
    readonly sourcePath: string;
}
/**
 * Microservice Loader for Awake Lambda Development.
 *
 * Loads microservice definitions from the user's application entry point
 * by executing the entry file and extracting the `register` configuration
 * from the `runtimeThreads` export.
 *
 * @example
 * ```typescript
 * const loader = new MicroserviceLoader({
 *   reactEntry: 'src/index.tsx',
 *   projectRoot: process.cwd(),
 * });
 *
 * const result = await loader.load();
 * console.log('Loaded microservices:', result.names);
 * ```
 */
export declare class MicroserviceLoader {
    private readonly config;
    constructor(config: MicroserviceLoaderConfig);
    /**
     * Load microservice definitions from the user's entry point.
     *
     * @returns Loaded microservice definitions
     * @throws MicroserviceLoadError if loading fails
     */
    load(): Promise<MicroserviceLoadResult>;
    /**
     * Register TypeScript loader for .ts/.tsx files.
     */
    private registerTsLoader;
    /**
     * Clear require cache for the entry point and related modules.
     * This ensures a fresh load of user's code and the runtime module.
     */
    private clearRequireCache;
    /**
     * Log message if verbose mode is enabled.
     */
    private log;
}
/**
 * Load microservices from the user's entry point.
 *
 * Convenience function for loading microservices without creating a loader instance.
 *
 * @param reactEntry - Path to the React entry point
 * @param projectRoot - Project root directory
 * @param verbose - Enable verbose logging
 * @returns Loaded microservice definitions
 */
export declare function loadMicroservices(reactEntry: string, projectRoot: string, verbose?: boolean): Promise<MicroserviceLoadResult>;
