/**
 * RootRegistry - Track known roots and their endpoints
 *
 * Sources:
 * 1. Static config: .matrix/roots.json
 * 2. Runtime registration
 * 3. DNS discovery (future)
 */
export type EndpointType = 'ws' | 'wss' | 'memory';
export interface RootEndpoint {
    type: EndpointType;
    url: string;
    priority: number;
    shard?: string;
}
/** @deprecated Use RootEndpoint */
export type RealmEndpoint = RootEndpoint;
export interface RootConfig {
    roots: Record<string, {
        endpoints: RootEndpoint[];
    }>;
}
/** @deprecated Use RootConfig */
export type RealmConfig = RootConfig;
type WatchCallback = (endpoints: RootEndpoint[]) => void;
export declare class RootRegistry {
    private _endpoints;
    private _watchers;
    private _cache;
    private _cacheTtlMs;
    /**
     * Register endpoints for a root.
     * Merges with existing endpoints, updates by (type, url) key.
     */
    register(root: string, endpoints: RootEndpoint[]): void;
    /**
     * Deregister a root or specific endpoint.
     */
    deregister(root: string, endpoint?: RootEndpoint): void;
    /**
     * Resolve the highest priority endpoint for a root.
     * Returns null if root not registered.
     */
    resolve(root: string): RootEndpoint | null;
    /**
     * Get all endpoints for a root, sorted by priority.
     */
    resolveAll(root: string): RootEndpoint[];
    /**
     * Watch for endpoint changes on a root.
     * Returns unsubscribe function.
     */
    watch(root: string, callback: WatchCallback): () => void;
    /**
     * Load root configuration from JSON file.
     */
    loadConfig(path: string): Promise<void>;
    /**
     * Check if a root is registered.
     */
    has(root: string): boolean;
    /**
     * Get all registered root names.
     */
    roots(): string[];
    /** @deprecated Use roots() */
    realms(): string[];
    private _notifyWatchers;
}
/** @deprecated Use RootRegistry */
export declare const RealmRegistry: typeof RootRegistry;
/** @deprecated Use RootRegistry */
export type RealmRegistry = RootRegistry;
export declare const globalRootRegistry: RootRegistry;
/** @deprecated Use globalRootRegistry */
export declare const globalRealmRegistry: RootRegistry;
export {};
//# sourceMappingURL=root_registry.d.ts.map