import type http from "node:http"; import { type HistoryEntryForWire } from "./history.js"; import type { SessionRouteContext } from "./route-context.js"; import type { AgentSession } from "@kenkaiiii/gg-engine/internal/core/agent-session.js"; /** * The restored worker rows for one delegation call, as the transcript shows * them on reopen (`resultIsError`: null when no result was saved). Async * workers are intentionally non-resumable; restored rows are historical. */ export declare function restoredWorkerRows(call: { readonly name: string; readonly args: Record; }, resultIsError: boolean | null): Array<{ agentName: string | undefined; status: "done" | "error"; toolUseCount: number; }>; /** * An animated preview for a restored generate_image GIF, read from its file: * the session only persists the first frame as a still, which would freeze it. * Null when the result is not a GIF or the file has gone. */ export declare function restoredGifPreview(toolName: string | undefined, imgPath: string | undefined): Promise; /** The base64 preview of an image, from its base64 (`data`) or raw bytes. */ export declare function cachedPreview(source: { data: string; } | { raw: Buffer; }): Promise; export declare function handleHistoryRoutes(ctx: SessionRouteContext, req: http.IncomingMessage, res: http.ServerResponse, url: string, method: string): boolean; /** What a transcript is rebuilt from: a live session, or a saved one read without starting it. */ export type HistorySource = Pick; /** The transcript rows a session reopens with, 1:1 with what the live stream showed. */ export declare function buildHistory(source: HistorySource): Promise;