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) • 877 B
/** * Analytics storage — in-memory implementation with bounded FIFO capacity. * Designed modularly so Redis or a database can later replace the backend. */ import type { AnalyticsStorage, InMemoryAnalyticsStorageOptions, TelemetryRecord } from "../types/index.js"; /** Default max records retained in memory (FIFO eviction beyond this). */ export declare const DEFAULT_ANALYTICS_STORAGE_MAX_RECORDS = 10000; /** * Lightweight bounded in-memory storage implementation. * Public surface of AnalyticsStorage is unchanged; maxRecords is optional. */ export declare class InMemoryAnalyticsStorage implements AnalyticsStorage { private records; private readonly maxRecords; constructor(options?: InMemoryAnalyticsStorageOptions); saveRecord(record: TelemetryRecord): Promise<void>; getRecords(): Promise<TelemetryRecord[]>; clear(): Promise<void>; }