import { IndexedDbStore } from "@vibes.diy/vibe-runtime/indexeddb-store.js"; import { SyncEngine, type EngineEventTarget, type SyncEngineOptions } from "@vibes.diy/vibe-runtime/sync-engine.js"; import type { VibesDiyApiIface } from "@vibes.diy/api-types"; import { type AppIdentity } from "./host-sync-transport.js"; import { WriterElection, type WriterElectionOptions } from "./writer-election.js"; export interface HostReplica { readonly store: IndexedDbStore; readonly engine: SyncEngine; readonly election: WriterElection; } export interface HostReplicaManagerOptions { readonly locks?: WriterElectionOptions["locks"]; readonly events?: EngineEventTarget; readonly schedule?: SyncEngineOptions["schedule"]; } export declare class HostReplicaManager { private readonly locks?; private readonly events?; private readonly schedule?; private readonly attached; private readonly replicas; private readonly interestsByApp; private readonly identityConfirmedApps; constructor(opts?: HostReplicaManagerOptions); attach(app: AppIdentity, vibeApi: VibesDiyApiIface): void; attachLazy(app: AppIdentity, apiFactory: () => VibesDiyApiIface): void; private wireDocChanged; private resolveApi; get(appKey: string, dbName: string): HostReplica; private armOnPendingWrite; private armReplica; peekReplica(appKey: string, dbName: string): HostReplica | undefined; detach(appKey: string): Promise; declareInterests(appKey: string, sourceId: string, interests: readonly string[]): void; declaredInterests(appKey: string): string[]; private interestUnion; requestCatchUp(appKey: string, dbName: string): void; notifyViewerChanged(appKey?: string): void; stopAll(): Promise; private dropReplicasForApp; private stopReplicasForApp; }