/** * A conduit provider resolves session+project info for non-file-based conduits * (e.g., TUI in-memory conduit state). Returns null for unrecognized conduitIds * so the file-based lookup is used as fallback. */ export type ConduitProvider = (conduitId: string, backend: string) => { sessionId: string; projectId: string; } | null; /** * Register a conduit provider callback. Called by adapters (e.g., TuiGatewayAdapter) * during start() so session lookup can resolve in-memory conduit state. */ export declare function registerConduitProvider(provider: ConduitProvider): void; /** Shape of sessions.json: `{"backend:channel": sessionId, "legacyChannel": sessionId, ...}` */ export type SessionsData = Record; declare class SessionRepo { private _repo; getSessionAsync(channel: string, backend: string): Promise; setSessionAsync(channel: string, sessionId: string, backend: string): Promise; deleteSessionAsync(channel: string, backend: string): Promise; /** Drop the in-memory cache so the next read() fetches from disk. Test hook. */ invalidate(): void; /** Wait for any in-flight mutate() to complete. For graceful SIGTERM drain. */ flush(): Promise; } export declare const sessionRepo: SessionRepo; export {};