UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

20 lines (19 loc) • 915 B
import type { AccountUsageFetchResult, ProxyPassthroughAccount, ProxyQuotaRefreshRunResult, ProxyQuotaRefreshMetrics, ProxyQuotaRefreshRuntimeState } from "../types/index.js"; export declare class AccountQuotaRefreshCoordinator { private readonly inFlight; private readonly states; private metrics; getState(accountKey: string): ProxyQuotaRefreshRuntimeState; /** * Run one refresh per account. `trigger` must identify the quota window or * handoff condition so repeated requests deduplicate without hiding a later * reset window. */ run(account: ProxyPassthroughAccount, trigger: string, fetcher: (candidate: ProxyPassthroughAccount) => Promise<AccountUsageFetchResult>, options?: { force?: boolean; now?: number; }): Promise<ProxyQuotaRefreshRunResult>; clear(): void; getMetrics(): ProxyQuotaRefreshMetrics; private getOrCreateState; }