//#region src/keys.d.ts declare const RedisKVMarker: unique symbol; /** Heartbeat lease granted to workers: the worker record's expiry horizon and * the re-place deadline, surfaced in acks as expiresInMs. */ declare const DEFAULT_LEASE_TTL_MS = 15000; declare const DEFAULT_KEY_PREFIX = "pinboard:"; /** Hostname and env in single-hostname mode; never a valid registered value. */ declare const SINGLE_WORLD = "*"; type Takeover = "wind_down" | "deny"; interface WorkerRecord { sessionId: string; clientId: string; /** Passport account that registered this client, when registered through HTTP. */ account?: string; advertiseUrl: string; secret: string; namespaces: string[]; hostname: string; /** Per-namespace data identity: every registered namespace has an env. */ envs: Record; takeover: Takeover; headroom: number; draining: boolean; /** Epoch ms the reverse challenge probe started failing; present = degraded: * leased and routable, no new placements. */ degradedSince?: number; /** Epoch ms liveness horizon; the record counts as dead past it. */ expiry: number; } interface PlacementRow { sessionId: string; /** Placement epoch, decimal string: routing generation, release CAS value, * and lease fencing token. Absent only on ownerless placeholder rows. */ epoch?: string; /** Epoch ms wind-down deadline; the row counts as free past it. */ expiry?: number; /** Resurrection target on ownerless placeholder rows. */ hostname?: string; } interface ClientConfig { /** null = cordon (drain without deadline); number = forced release at T. */ drainDeadline: number | null; } interface ClientMetadata { account: string; hostname: string; namespaces: string[]; envs: Record; } interface Keys { shards: number; bucket(id: string): number; /** Per-bucket cold-start stamp: SET NX inside the resolve script. */ bootTime(bucket: number): string; /** Re-claimed-with-a-dead-owner ids awaiting a proven-alive 200. */ overwritten(bucket: number): string; /** Bucket-wide high-water mark of every minted placement epoch. */ epochFloor(bucket: number): string; /** Serving license: JSON {schema, shards, hostnameAware} of the fleet allowed to serve. */ config: string; /** Cluster members: nodeId -> JSON {c: config, expiry}; joiners must match every live member. */ members: string; /** Single-sweeper lease: the sweeping node's random token. */ sweeper: string; placements(bucket: number, env: string, ns: string): string; workers(bucket: number): string; nsWorkers(bucket: number): string; /** World agreement: field `h:${hostname}${ns}` -> env, `e:${env}` -> takeover. */ bindings(bucket: number): string; /** Binding epochs sidecar: fields mirror `bindings`, value JSON * {epoch, quarantineUntil?}; a missing field is epoch 0. */ bindepochs(bucket: number): string; client(clientId: string): string; /** Durable account and scope for a client, independent of drain expiry. */ clientMeta(clientId: string): string; /** Pending control messages, delivered in heartbeat acks and trimmed once * the worker acks their msgIds. */ controlQueue(sessionId: string): string; } declare const createKeys: (prefix?: string, shards?: number) => Keys; declare const nsWorkersField: (hostname: string, ns: string) => string; declare const parseNsWorkersField: (field: string) => { hostname: string; ns: string; } | null; declare const parseWorkerRecord: (raw: string) => WorkerRecord; declare const parsePlacementRow: (raw: string) => PlacementRow; declare const parseClientConfig: (raw: string) => ClientConfig; declare const parseClientMetadata: (raw: string) => ClientMetadata; interface BindingEpoch { epoch: number; /** Epoch ms: new placements in the displaced (hostname, ns) refuse until then. */ quarantineUntil?: number; } declare const parseBindingEpoch: (raw: string) => BindingEpoch; declare const overwrittenField: (env: string, hostname: string, ns: string, id: string) => string; declare const parseOverwrittenField: (field: string) => { env: string; hostname: string; ns: string; id: string; } | null; declare const parseSessionIds: (raw: string) => string[]; //#endregion export { BindingEpoch, ClientConfig, DEFAULT_KEY_PREFIX, DEFAULT_LEASE_TTL_MS, Keys, PlacementRow, RedisKVMarker, SINGLE_WORLD, Takeover, WorkerRecord, createKeys, nsWorkersField, overwrittenField, parseBindingEpoch, parseClientConfig, parseClientMetadata, parseNsWorkersField, parseOverwrittenField, parsePlacementRow, parseSessionIds, parseWorkerRecord }; //# sourceMappingURL=keys.d.ts.map