/** * Provider helper functions extracted from ServerStatsProvider. * Handles pino hooking, log stream broadcast, stats interval, * dependency checking, edge plugin, and non-web bridge. * * Dashboard/toolbar setup is in ./toolbar_setup.ts and re-exported here. */ import { LogStreamService } from '../log_stream/log_stream_service.js'; import type { DevToolbarConfig } from '../debug/types.js'; import type { StatsEngine } from '../engine/stats_engine.js'; import type { ResolvedServerStatsConfig } from '../types.js'; import type { ToolbarCoreResult, ProviderFields } from './toolbar_setup.js'; import type { ApplicationService } from '@adonisjs/core/types'; export { initDashboardStore } from './dashboard_init.js'; interface SetupDevToolbarArgs { tc: DevToolbarConfig; config: ResolvedServerStatsConfig; app: ApplicationService; resolve: (binding: string) => Promise; getDiagnostics: () => unknown; } /** Wrapper matching the provider's call signature. */ export declare function setupDevToolbarCore(args: SetupDevToolbarArgs): Promise; /** Wrapper matching the provider's 3-arg call signature. */ export declare function applyToolbarResult(result: ToolbarCoreResult, tc: DevToolbarConfig, provider: ProviderFields): void; /** Hook the AdonisJS Pino logger into the log collector. Returns true if hooked. */ export declare function hookPinoToLogStream(logger: unknown): boolean; /** Restore the original pino `write`, undoing {@link hookPinoToLogStream}. */ export declare function unhookPinoFromLogStream(): void; /** Set up log stream broadcasting via Transmit. Returns LogStreamService if file-based fallback. */ export declare function setupLogStreamBroadcast(transmit: { broadcast(ch: string, d: unknown): void; }, channelName: string, pinoHookActive: boolean, makePath: (...parts: string[]) => string): LogStreamService | null; /** Check if dashboard dependencies are available. Returns true if available, false if missing. */ export declare function checkDashboardDepsHelper(config: ResolvedServerStatsConfig, app: ApplicationService): Promise; /** * Register the `@serverStats()` Edge tag if Edge is available. * * The tag is always registered so the layout never prints it as text. With * `renderBar` it renders the stats bar; without it the tag compiles to nothing. * Returns true only when the bar will render. */ export declare function registerEdgePluginHelper(app: ApplicationService, config: ResolvedServerStatsConfig, renderBar: boolean): Promise; /** Set up the publisher-only email bridge for non-web environments. */ export declare function setupNonWebBridgeHelper(emitter: unknown, channel: string): Promise; interface StatsIntervalResult { intervalId: ReturnType; transmitAvailable: boolean; prometheusActive: boolean; channelName: string | null; } /** Set up the stats collection interval with transmit and prometheus integration. */ export declare function setupStatsIntervalHelper(engine: StatsEngine, config: ResolvedServerStatsConfig, container: { make(b: string): Promise; }): Promise;