export declare class RingBuffer<T> {
    private capacity;
    private buffer;
    private head;
    private count;
    constructor(capacity: number);
    push(item: T): void;
    toArray(): T[];
    clear(): void;
    get length(): number;
}
export interface DevConsoleErrorInfo {
    name: string;
    message: string;
    stack?: string;
    cause?: DevConsoleErrorInfo;
    [key: string]: any;
}
export interface DevConsoleHttpEntry {
    id: string;
    timestamp: number;
    method: string;
    url: string;
    remoteAddress: string;
    requestHeaders: Record<string, string | string[] | undefined>;
    requestBody: string | null;
    statusCode: number;
    responseHeaders: Record<string, string | string[] | undefined>;
    responseBody: string | null;
    durationMs: number;
    error?: DevConsoleErrorInfo;
}
export interface DevConsoleSrpcMessage {
    id: string;
    timestamp: number;
    streamId: string;
    clientId: string;
    direction: 'inbound' | 'outbound';
    messageType: string;
    isReply: boolean;
    data: Record<string, any>;
    error?: string;
    isUserError?: boolean;
}
export interface DevConsoleSrpcConnection {
    streamId: string;
    clientId: string;
    clientStreamId: string;
    appVersion: string;
    address: string;
    connectedAt: number;
    lastPingAt: number;
    meta: Record<string, any>;
    messageCount: number;
}
export interface DevConsoleSrpcDisconnection {
    streamId: string;
    clientId: string;
    disconnectedAt: number;
    cause: string;
}
export interface DevConsoleDatabaseQueryEntry {
    id: string;
    timestamp: number;
    sql: string;
    params: any[];
    status: 'running' | 'ok' | 'error';
    durationMs?: number;
    error?: string;
}
export interface DevConsoleMutexEntry {
    id: string;
    key: string;
    status: 'pending' | 'acquired' | 'released' | 'error' | 'failed';
    startedAt: number;
    acquiredAt?: number;
    releasedAt?: number;
    durationMs?: number;
    waitDurationMs?: number;
    waited?: boolean;
    error?: string;
}
export declare class DevConsoleStore {
    private static instance;
    readonly httpEntries: RingBuffer<DevConsoleHttpEntry>;
    readonly srpcMessages: RingBuffer<DevConsoleSrpcMessage>;
    readonly srpcConnections: Map<string, DevConsoleSrpcConnection>;
    readonly srpcDisconnected: RingBuffer<DevConsoleSrpcDisconnection>;
    readonly dbQueries: RingBuffer<DevConsoleDatabaseQueryEntry>;
    readonly mutexEntries: RingBuffer<DevConsoleMutexEntry>;
    readonly activeMutexes: Map<string, DevConsoleMutexEntry>;
    readonly startedAt: number;
    onEvent?: (type: string, data: unknown) => void;
    addHttpEntry(entry: DevConsoleHttpEntry): void;
    addSrpcMessage(msg: DevConsoleSrpcMessage): void;
    addSrpcConnection(conn: DevConsoleSrpcConnection): void;
    removeSrpcConnection(streamId: string, clientId: string, cause: string): void;
    clearHttpEntries(): void;
    clearSrpcMessages(): void;
    addDatabaseQuery(entry: DevConsoleDatabaseQueryEntry): void;
    completeDatabaseQuery(entry: DevConsoleDatabaseQueryEntry): void;
    clearDatabaseQueries(): void;
    addMutexPending(entry: DevConsoleMutexEntry): void;
    updateMutexAcquired(id: string, waited: boolean): void;
    updateMutexReleased(id: string): void;
    updateMutexError(id: string, err: unknown): void;
    addMutexFailed(entry: DevConsoleMutexEntry): void;
    static init(): DevConsoleStore;
    static get(): DevConsoleStore | null;
}
export declare type __ΩDevConsoleErrorInfo = any[];
export declare type __ΩDevConsoleHttpEntry = any[];
export declare type __ΩDevConsoleSrpcMessage = any[];
export declare type __ΩDevConsoleSrpcConnection = any[];
export declare type __ΩDevConsoleSrpcDisconnection = any[];
export declare type __ΩDevConsoleDatabaseQueryEntry = any[];
export declare type __ΩDevConsoleMutexEntry = any[];
//# sourceMappingURL=devconsole.store.d.ts.map