import { C as ContrailConfig, D as Database } from '../types-CmjW-xL4.js'; import { a as BackfillAllOptions } from '../backfill-Bmp9TtLS.js'; import { B as BackfillStatus } from '../status-BRg9Abty.js'; import { S as SourcePosition } from '../sources-DKyp_dDd.js'; import { AlluviumTransportOptions } from '../adapters/alluvium.js'; import '@atcute/identity-resolver'; import '@atcute/lexicons/syntax'; import '@atcute/client'; import '../jetstream-source-a396D7Z4.js'; import '@atcute/jetstream'; interface WranglerCommon { config: ContrailConfig; /** Exact generated/pinned bundle for collections with `validate: true`. */ lexicons?: object[]; /** Use production D1 bindings. Equivalent to * `getPlatformProxy({ environment: "production" })`. */ remote?: boolean; /** Name of the D1 binding in wrangler.jsonc. Default: `"DB"`. */ binding?: string; } interface BackfillAllViaWranglerOptions extends WranglerCommon { /** Concurrent identity resolutions. Default: 100. */ concurrency?: number; /** PDS hosts fetched concurrently. Default: 20. */ pdsConcurrency?: number; /** Accounts fetched concurrently from each PDS. Default: 3. */ didsPerPds?: number; /** Immediate attempts before scheduled retries take over. Default: 1. */ maxAttempts?: number; /** Override the built-in progress logging. */ onProgress?: BackfillAllOptions["onProgress"]; } declare function backfillAll(opts: BackfillAllViaWranglerOptions): Promise<{ discovered: number; backfilled: number; status: BackfillStatus; }>; declare const DEFAULT_ALLUVIUM_SOURCE_URL = "wss://jetstream1.us-east.bsky.network"; interface AlluviumBootstrapOptions { /** Alluvium HTTP origin. */ endpoint: string | URL; /** Logical source ID advertised by the selected manifests. */ sourceId: string; /** Exact legacy Jetstream v1 URL advertised by the manifests. This is * independent of `config.jetstreams`, which selects the v2 live service. * Default: {@link DEFAULT_ALLUVIUM_SOURCE_URL}. */ sourceUrl?: string; /** Operator-owned continuity epoch. Alluvium protocol v1 does not publish it. */ sourceEpoch: string; /** Explicitly accept manifests that report historical omissions. */ allowPartial?: boolean; /** Direct-source retention asserted by the operator. Default: 72 hours. */ retentionUs?: number; /** Busy collections used only to obtain the preliminary source mark. */ watermarkCollections?: string[]; transport?: AlluviumTransportOptions; } interface AlluviumBootstrapViaWranglerOptions extends WranglerCommon, AlluviumBootstrapOptions { } interface AlluviumBootstrapDatabaseOptions extends AlluviumBootstrapOptions { config: ContrailConfig; db: Database; /** Exact generated/pinned bundle for collections with `validate: true`. */ lexicons?: object[]; } interface AlluviumBootstrapResult { elapsedMs: number; archiveBoundary: SourcePosition; liveCursor: number; resumed: boolean; } /** @deprecated Use {@link AlluviumBootstrapResult}. */ type AlluviumBootstrapViaWranglerResult = AlluviumBootstrapResult; /** Load a fresh database from Alluvium base/archive data and seed the ordinary * scheduled-ingestion cursor at the exact archive boundary. */ declare function bootstrapAlluviumDatabase(opts: AlluviumBootstrapDatabaseOptions): Promise; /** Wrangler/D1 counterpart to {@link bootstrapAlluviumDatabase}. */ declare function bootstrapAlluvium(opts: AlluviumBootstrapViaWranglerOptions): Promise; interface LabelsBackfillOptions { /** Per-cycle subscribe timeout passed to `contrail.ingestLabels()`. Default: 60s. */ cycleTimeoutMs?: number; /** Called after each cycle with whether any cursor advanced. */ onCycle?: (info: { cycle: number; advanced: boolean; }) => void; } interface LabelsBackfillAllViaWranglerOptions extends WranglerCommon, LabelsBackfillOptions { } interface LabelsBackfillDatabaseOptions extends LabelsBackfillOptions { config: ContrailConfig; db: Database; /** Exact generated/pinned bundle for collections with `validate: true`. */ lexicons?: object[]; } interface LabelsBackfillAllResult { /** Total ingest cycles run before any labeler stopped advancing twice in a row. */ cycles: number; /** Whether labels were configured at all — false means we no-op'd. */ ran: boolean; } declare function labelsBackfillDatabase(opts: LabelsBackfillDatabaseOptions): Promise; declare function labelsBackfillAll(opts: LabelsBackfillAllViaWranglerOptions): Promise; export { type AlluviumBootstrapDatabaseOptions, type AlluviumBootstrapOptions, type AlluviumBootstrapResult, type AlluviumBootstrapViaWranglerOptions, type AlluviumBootstrapViaWranglerResult, type BackfillAllViaWranglerOptions, DEFAULT_ALLUVIUM_SOURCE_URL, type LabelsBackfillAllResult, type LabelsBackfillAllViaWranglerOptions, type LabelsBackfillDatabaseOptions, type LabelsBackfillOptions, backfillAll, bootstrapAlluvium, bootstrapAlluviumDatabase, labelsBackfillAll, labelsBackfillDatabase };