/** * Polls User_Input projections and applies accepted edits to the local entity * table through the observation writer. * * The provider is treated as an untrusted observation source: only rows with a * known SQLite business key and literal/blank cells are promoted. Canonical * state, field revisions, conflict candidates, and the System_State outbox * remain the durable source of truth. */ import type { SyncSheetsObservationProvider } from "../../../../contracts/sheets/syncSheets.js"; import { type SyncTimingSink } from "../../../../contracts/shared/observability/syncTiming.js"; import type { TypedSheetsEntityMapping, TypedSheetsEntityMappingRegistry } from "../../../../contracts/sync-orm/mapping/contracts.js"; import type { TypedSheetsEntityWriterOptions } from "../../../../orm/persistence/support/contracts.js"; import type { MikroOrmSqliteAdapter } from "../storage/MikroOrmSqliteAdapter.js"; export { MAPPED_USER_INPUT_POLL_MODES, MAPPED_USER_INPUT_INVALID_REASONS, } from "../../../../contracts/sheets/userInputPolling.js"; export type { MappedUserInputPollingMode, MappedUserInputPollingSheetReport, MappedUserInputPollingReport, MappedUserInputInvalidReason, } from "../../../../contracts/sheets/userInputPolling.js"; import type { MappedUserInputPollingMode, MappedUserInputPollingReport } from "../../../../contracts/sheets/userInputPolling.js"; /** Options for the provider-specific first inbound worker slice. */ export interface PollMappedUserInputWithMikroOrmOptions { readonly storage: MikroOrmSqliteAdapter; readonly provider: SyncSheetsObservationProvider; readonly mappings: TypedSheetsEntityMappingRegistry | readonly TypedSheetsEntityMapping[]; readonly writer: TypedSheetsEntityWriterOptions; readonly physicalSheetIds?: readonly string[]; /** Full preserves the historical path; adaptive uses the values-only preflight. */ readonly mode?: MappedUserInputPollingMode; /** Forces all selected mappings through the metadata-preserving path. */ readonly forceFull?: boolean; /** * Safety-scan cadence lag supplied by the adaptive coordinator. Defaults to * zero so non-safety, adaptive, and direct calls report a safe no-lag value. */ readonly safetyScanLagMs?: number; /** Optional diagnostics sink for inbound polling phases; never root-facing. */ readonly onTiming?: SyncTimingSink; } /** * Inbound polling phases reported through {@link SyncTimingSink}. * * Polling observes Sheets without append/update/delete work, so every phase * reports empty operation kinds and zeroed counts. Phase names are stable so * traces and benchmarks can be compared across builds. */ export declare const POLLING_TIMING_PHASES: { readonly CANONICAL_STATE_READ: "canonical_state_read"; readonly VALUES_ONLY_READ: "values_only_read"; /** Narrow identity + anchor + check-column band read (the check-column gate). */ readonly ROW_CHECKS_READ: "row_checks_read"; readonly FAST_COMPARISON: "fast_comparison"; readonly FULL_METADATA_OBSERVATION: "full_metadata_observation"; readonly PERSISTENCE: "persistence"; readonly POLLING_TOTAL: "polling_total"; /** * Safety-scan cadence lag, reported once per forced full scan. Unlike the * other phases, durationMs carries the overdue lag (not an elapsed span). */ readonly SAFETY_SCAN_LAG: "safety_scan_lag"; }; /** * Observes mapped User_Input tabs and applies each established row * independently. New rows are intentionally left for the insert workflow. * Adaptive passes only use values-only reads to find candidates; every * candidate still enters the existing full metadata inspector before writes. */ export declare function pollMappedUserInputWithMikroOrm(options: PollMappedUserInputWithMikroOrmOptions): Promise; //# sourceMappingURL=MikroOrmUserInputPolling.d.ts.map