/** * User_Input polling supervisor assembly for the internal sync service bootstrap. * * Builds the adaptive mapped polling pass over the shared SQLite adapter and * the coordinated remote provider, owns the metadata-preserving safety full * scan cadence (including the reported safety-scan lag), and wraps the pass * in the liveness loop. Polling interval, report/error hooks, the injectable * clock, and the safety-scan deadline semantics are unchanged from the * single-module bootstrap. */ import type { SyncServiceStorage } from "./compositionPorts.js"; import type { TypedSheetsEntityMappingRegistry } from "../../orm/mapping/contracts.js"; import type { TypedSheetsEntityWriterOptions } from "../../../contracts/sync-orm/writer.js"; import type { InternalSyncProvider, InternalSyncServiceOptions } from "./serviceOptions.js"; import type { SyncEngineCompositionPorts } from "./compositionPorts.js"; import type { MappedUserInputPollingReport } from "../../../contracts/sheets/userInputPolling.js"; import { SyncPollingSupervisor } from "./SyncPollingSupervisor.js"; /** Inputs shared with the composition root's runtime and remote provider. */ export interface CreatePollingSupervisorInput { readonly storage: SyncServiceStorage; readonly provider: InternalSyncProvider; readonly mappings: TypedSheetsEntityMappingRegistry; readonly writer: TypedSheetsEntityWriterOptions; readonly options: InternalSyncServiceOptions; /** * P8-C: the concrete MikroORM polling pass is composition-owned wiring; * the supervisor invokes it through this port (behavior byte-identical). */ readonly pollMappedUserInput: SyncEngineCompositionPorts["pollMappedUserInput"]; } export declare function createPollingSupervisor(input: CreatePollingSupervisorInput): SyncPollingSupervisor; /** * Waits (SQLite-only) until no claimable System_State drain work remains. * * Polls the kernel's System_State drain classification through the shared * storage adapter — never the remote provider — until it reports `ready` * or until `isStopping()` turns true (the loop's stop() is honored within * one poll tick, so shutdown never waits for the drain). Only genuinely * claimable System_State work (processing/delivery_uncertain effects and * pending claimable heads) defers; terminal failed/conflict rows and the * pending followers they block never defer, so a permanently stuck stream * cannot stall the first polling pass forever. */ export declare function waitForSystemStateDrainReadiness(options: { readonly storage: SyncServiceStorage; readonly isStopping: () => boolean; readonly pollIntervalMs?: number; }): Promise; //# sourceMappingURL=pollingSupervisor.d.ts.map