import type { CacheState } from "../cache.js";
import type { MediaCache } from "../content/index.js";
import type { SummaryStreamHandler } from "../engine/events.js";
import type { ModelExecutorDeps } from "../engine/model-executor.js";
import type { ExecFileFn } from "../markitdown.js";
import type { AssetSummaryContext } from "../run/flows/asset/types.js";
import type { UrlFlowContext, UrlFlowEventHooks, UrlFlowFlags, UrlFlowRuntimeHooks } from "../run/flows/url/types.js";
import type { PerfTrace } from "../run/perf-trace.js";
import { createRunFlowContexts } from "./flow-contexts.js";
import { type ExecutableRunModel, type ModelExecutorRequestOptions, type RunModelRuntime } from "./model-runtime.js";
import type { ResolvedSummarizeRun, ResolvedSummarizeSpec } from "./run-spec.js";
import type { SummarizeEventSink } from "./summarize-contracts.js";
export type SummarizeModelResources = {
    context: ResolvedSummarizeRun["bindings"]["context"];
    envForRun: Record<string, string | undefined>;
    runtime: RunModelRuntime;
    model: ExecutableRunModel;
};
type SummarizeFlowAdapterHooks = Pick<UrlFlowRuntimeHooks, "writeViaFooter" | "clearProgressForStdout" | "restoreProgressAfterStdout" | "setClearProgressBeforeStdout" | "clearProgressIfCurrent">;
export type SummarizeFlowOptions = Pick<UrlFlowFlags, "runStartedAtMs" | "streamingEnabled" | "extractMode"> & Partial<Pick<UrlFlowFlags, "maxExtractCharacters" | "transcriptTimestamps" | "speakerIdentification" | "summaryCacheBypass" | "json" | "metricsEnabled" | "metricsDetailed" | "shouldComputeReport" | "verbose" | "verboseColor" | "progressEnabled" | "streamMode" | "plain" | "slides" | "slidesDebug" | "slidesOutput" | "throwOnAssetLikeHtmlError">>;
export type SummarizeExecutionResources = ReturnType<typeof createRunFlowContexts> & {
    cacheState: CacheState;
    modelResources: SummarizeModelResources;
};
export type PreparedSummarizeExecution = {
    urlFlowContext: UrlFlowContext;
    assetSummaryContext?: AssetSummaryContext | null;
    isYoutubeUrl?: boolean;
};
export declare function bindSummarizeExecutionEvents(prepared: PreparedSummarizeExecution, emit: SummarizeEventSink): PreparedSummarizeExecution;
export declare function createSummarizeFlowFlags(spec: ResolvedSummarizeSpec, flow: SummarizeFlowOptions): UrlFlowFlags;
export declare function createSummarizeModelResources(options: {
    resolvedRun: ResolvedSummarizeRun;
    env: Record<string, string | undefined>;
    metricsEnv?: Record<string, string | undefined>;
    fetchImpl: typeof fetch;
    execFileImpl: ExecFileFn;
    streamingEnabled: boolean;
    summaryStream: SummaryStreamHandler | null;
    requestOptions?: ModelExecutorRequestOptions;
    log?: ModelExecutorDeps["log"];
    trace?: ModelExecutorDeps["trace"];
}): SummarizeModelResources;
export declare function createSummarizeExecutionResources(options: {
    resolvedRun: ResolvedSummarizeRun;
    env: Record<string, string | undefined>;
    metricsEnv?: Record<string, string | undefined>;
    fetchImpl: typeof fetch;
    execFileImpl: ExecFileFn;
    cacheState: CacheState;
    mediaCache: MediaCache | null;
    stdout: NodeJS.WritableStream;
    stderr: NodeJS.WritableStream;
    urlFetch?: typeof fetch | null;
    summaryStream: SummaryStreamHandler | null;
    requestOptions?: ModelExecutorRequestOptions;
    log?: ModelExecutorDeps["log"];
    trace?: ModelExecutorDeps["trace"];
    flow: SummarizeFlowOptions;
    adapterHooks: SummarizeFlowAdapterHooks;
    eventHooks?: Partial<UrlFlowEventHooks>;
    assetSummaryOverrides?: Parameters<typeof createRunFlowContexts>[0]["assetSummaryOverrides"];
    perfTrace?: PerfTrace | null;
}): SummarizeExecutionResources;
export {};
