/** HTTP handler for paging records back from the rotated JSONL files. */ import type { IncomingMessage, ServerResponse } from 'node:http'; import { type JsonlLogHistory } from './jsonl-history.ts'; import type { JsonlLogWriter } from './jsonl-writer.ts'; /** History route dependencies. */ export interface HistoryRouteDeps { writer: JsonlLogWriter; history: JsonlLogHistory; /** Default page size when the query omits `limit`. */ defaultLimit: number; /** Receives a read failure that produced a 500 response. */ onError?: (error: Error) => void; } /** * Build the `/dsh-logger-panel/logs/history` handler. * @param deps - the writer to drain, the pager, and the default page size. * @returns an async request handler owning the full response lifecycle. */ export declare function createHistoryHandler(deps: HistoryRouteDeps): (request: IncomingMessage, response: ServerResponse) => Promise;