import type { InternalResource, InternalUrl, ProtocolHandler, UrlCompletion } from "./types.js";
/**
 * Snapshot of memory roots for every registered session, deduped.
 * Each session has its own cwd (possibly a worktree), so subagents and main
 * may see different roots.
 */
export declare function memoryRootsFromRegistry(): string[];
/**
 * Resolve a memory:// URL to an absolute filesystem path under memory root.
 */
export declare function resolveMemoryUrlToPath(url: InternalUrl, memoryRoot: string): string;
/**
 * Protocol handler for memory:// URLs.
 *
 * Walks every active session's memory root. Worktree-based subagents have
 * their own root; first one containing the file wins. Parent and subagent
 * sharing a cwd see the same file regardless of order.
 */
export declare class MemoryProtocolHandler implements ProtocolHandler {
    readonly scheme = "memory";
    readonly immutable = true;
    resolve(url: InternalUrl): Promise<InternalResource>;
    complete(): Promise<UrlCompletion[]>;
}
