import { EmailCollector } from './email_collector.js'; import { EventCollector } from './event_collector.js'; import { QueryCollector } from './query_collector.js'; import { RouteInspector } from './route_inspector.js'; import { TraceCollector } from './trace_collector.js'; import type { DevToolbarConfig, ResolvedCapture } from './types.js'; /** * Singleton store holding all debug data collectors. * Bound to the AdonisJS container as `debug.store`. */ export declare class DebugStore { readonly queries: QueryCollector; readonly events: EventCollector; readonly emails: EmailCollector; readonly routes: RouteInspector; readonly traces: TraceCollector | null; /** Which collectors are allowed to subscribe in {@link start}. */ readonly capture: ResolvedCapture; constructor(config: DevToolbarConfig); /** * Register a callback that fires whenever any collector records a new item. * The callback receives the item type ('query' | 'event' | 'email' | 'trace'). */ onNewItem(cb: ((type: string) => void) | null): void; /** Return buffer utilization stats for all debug collectors. */ getBufferStats(): { queries: { current: number; max: number; }; events: { current: number; max: number; }; emails: { current: number; max: number; }; traces: { current: number; max: number; }; }; /** * Subscribe the enabled collectors. * * A disabled collector is left constructed but never subscribed, so its * dashboard pane renders empty instead of erroring, and it costs nothing at * runtime. This also keeps two process-wide side effects off in production: * the event collector patches the emitter's `emit()`, and the trace collector * patches `console.warn`. * * Route inspection is not gated — it reads the router table once at boot and * captures no request data. */ start(emitter: unknown, router: unknown): Promise; stop(): void; /** Serialize all collector data to a JSON file (atomic write). */ saveToDisk(filePath: string): Promise; /** Restore collector data from a JSON file on disk. */ loadFromDisk(filePath: string): Promise; }