import { executeSummarize } from "../application/execute-summarize.js";
import type { CacheState } from "../cache.js";
import type { MediaCache } from "../content/index.js";
import type { SlideExtractionResult } from "../slides/index.js";
import { type Session, type SessionEvent } from "./server-session.js";
import { type SlidesLogShape } from "./server-summarize-events.js";
import type { ParsedSummarizeRequest } from "./server-summarize-request.js";
type LoggerLike = {
    info?: (payload: Record<string, unknown>) => void;
    error?: (payload: Record<string, unknown>) => void;
};
type ExecuteSummarizeSessionArgs = {
    session: Session;
    request: ParsedSummarizeRequest;
    env: Record<string, string | undefined>;
    fetchImpl: typeof fetch;
    urlFetchImpl?: typeof fetch | null;
    cacheState: CacheState;
    mediaCache: MediaCache | null;
    port: number;
    onSessionEvent?: ((event: SessionEvent, sessionId: string) => void) | null;
    requestLogger?: LoggerLike | null;
    includeContentLog: boolean;
    logStartedAt: number;
    logInput: {
        url: string;
        title: string | null;
        text: string | null;
        truncated: boolean | null;
    } | null;
    logSlidesSettings: SlidesLogShape | null;
    sessions: Map<string, Session>;
    refreshSessions: Map<string, Session>;
};
export declare function handleExtractOnlySummarizeRequest({ request, env, fetchImpl, urlFetchImpl, cacheState, mediaCache, }: {
    request: ParsedSummarizeRequest;
    env: Record<string, string | undefined>;
    fetchImpl: typeof fetch;
    urlFetchImpl?: typeof fetch | null;
    cacheState: CacheState;
    mediaCache: MediaCache | null;
}): Promise<{
    extracted: Extract<Awaited<ReturnType<typeof executeSummarize>>, {
        kind: "extraction";
    }>["extracted"];
    slides: Extract<Awaited<ReturnType<typeof executeSummarize>>, {
        kind: "extraction";
    }>["slides"];
}>;
export declare function toExtractOnlySlidesPayload(slides: SlideExtractionResult | null): {
    sourceUrl: string;
    sourceId: string;
    sourceKind: string;
    ocrAvailable: boolean;
    slides: Array<{
        index: number;
        timestamp: number;
        ocrText?: string | null;
        ocrConfidence?: number | null;
    }>;
} | null;
export declare function executeSummarizeSession({ session, request, env, fetchImpl, urlFetchImpl, cacheState, mediaCache, port, onSessionEvent, requestLogger, includeContentLog, logStartedAt, logInput, logSlidesSettings, sessions, refreshSessions, }: ExecuteSummarizeSessionArgs): Promise<void>;
export {};
