import { type LocalFlatSqlStandardStats, type LocalFlatSqlStore, type LocalFlatSqlStoreOptions } from './local-flatsql'; import type { DataScanResult, DataSummary, RawDataQuery, RawDataRecord } from './sdn-backend'; import type { EngineEpochQueryRequest } from '../../epoch-query-sql'; import type { QueryParam } from 'flatsql/wasm'; export interface WorkerFlatSqlSyncBackendConfig { targetPeerId: string; candidateAddrs: string[]; datastoreKey?: string | null; providerId?: string | null; sourceName?: string | null; displayName?: string | null; publicKey?: string | null; measuredWireSpeedBytesPerSecond?: number | null; publishedShardSources?: WorkerFlatSqlSyncBackendConfig[] | null; } export interface WorkerSchemaSyncProgress { status: 'idle' | 'syncing' | 'synced' | 'capped' | 'error'; syncedRows: number; totalRows: number; localRows: number; pinnedRows: number; missingRows: number; cachedBytes: number; pinnedBytes: number; downloadedBytes: number; downloadSpeedBytesPerSecond: number; measuredWireSpeedBytesPerSecond: number; wireSpeedUtilization: number | null; wireSpeedTarget: number; wireSpeedTargetMet: boolean | null; manifestDiscoveryMs: number; networkTransferMs: number; verificationMs: number; flatSqlMaterializationMs: number; providerPeerId: string | null; providerPublicKey: string | null; snapshotId: string | null; head: string | null; cursor: string | null; nextCursor: string | null; highWaterMark: string | null; queryProfile: string | null; chunkHash: string | null; syncProtocol: string | null; syncFilter: string | null; verifiedChunks: string[]; lastSyncedAt: string | null; error: string | null; } export interface WorkerSchemaSyncRequest { standardId: string; schema: string; backendConfig: WorkerFlatSqlSyncBackendConfig; initialProgress: WorkerSchemaSyncProgress; totalRows: number; capBytes: number; pageSize: number; persistRecordInterval: number; source: string | null; syncFilter?: string; queryProfile?: string; retentionPolicy?: string; } export interface WorkerSchemaSyncUpdate { progress: WorkerSchemaSyncProgress; stats: LocalFlatSqlStandardStats[]; } export interface WorkerRemotePageRequest { standardId: string; query: RawDataQuery; backendConfig: WorkerFlatSqlSyncBackendConfig; source: string | null; } export interface WorkerRemotePageResult { scan: DataScanResult | null; records: RawDataRecord[]; stats: LocalFlatSqlStandardStats[]; } export interface WorkerLocalFlatSqlStore extends LocalFlatSqlStore { getRemoteDataSummary(backendConfig: WorkerFlatSqlSyncBackendConfig): Promise; queryRemotePage(request: WorkerRemotePageRequest): Promise; syncSchema(request: WorkerSchemaSyncRequest, onProgress?: (update: WorkerSchemaSyncUpdate) => void): Promise; /** Registered source partitions (`@` shadows) — REQUIRED on the worker store (loop D.5). */ listSources(standardId: string): string[] | Promise; /** * PRIMARY query path (loop D.2, proxied in D.5): engine-native epoch * profile over the unified per-standard view, ALIGNED size-prefixed * FlatBuffer frame stream out. */ queryEpochRawStream(standardId: string, request?: EngineEpochQueryRequest | null): Uint8Array | Promise; /** Generic aligned-raw-stream query (server mirror), proxied in D.5. */ queryRawFlatBufferStream(standardId: string, sql: string, params?: QueryParam[]): Uint8Array | Promise; } export declare function createWorkerLocalFlatSqlStore(options: LocalFlatSqlStoreOptions): Promise; //# sourceMappingURL=local-flatsql-worker-client.d.ts.map