import type { McpPageEntry } from './existing-flow.js'; export interface BackendAdvert { pid: number; browserUrl: string; port: number; sessionId: string; startedAt: string; } export declare function backendAdvertPathFor(profileDir: string): string; export declare function newSessionId(): string; export declare function advertiseBackend(profileDir: string, advert: BackendAdvert): void; export declare function readLiveAdvert(profileDir: string): BackendAdvert | undefined; export declare function withdrawAdvert(profileDir: string, sessionId: string): void; export interface PageOwner { sessionId: string; pid: number; } export interface OwnedPage { pageId: number; url?: string; title?: string; owner: PageOwner; openedAt: string; } export declare function pageRegistryPathFor(profileDir: string): string; export declare function pruneDeadOwners(profileDir: string): OwnedPage[]; export declare function claimPage(profileDir: string, page: McpPageEntry, owner: PageOwner, at?: string): void; export declare function releasePages(profileDir: string, filter: { pageId?: number; sessionId?: string; }): void; export declare function livePeerSessions(profileDir: string): PageOwner[]; export type CloseVerdict = { ok: true; } | { ok: false; reason: string; }; export declare function checkSharedCloseAllowed(entries: McpPageEntry[], pageId: number, profileDir: string, self: PageOwner, ownedUrls: ReadonlySet): CloseVerdict; //# sourceMappingURL=shared-backend.d.ts.map