import type { AbortSignal } from "bare-abort-controller"; import type { ModelProgressUpdate, ResolveContext } from "../../../../schemas/index"; import type { DownloadRequestBinding, ResolveResult } from "./types"; export interface ResolveSessionOptions { progressCallback?: ((update: ModelProgressUpdate) => void) | undefined; seed?: boolean | undefined; profilingEnabled: boolean; /** * Optional cancel signal — typically `ctx.signal` from the surrounding * `await using ctx = await registry.begin(...)` block. When provided, * `resolveModelPath` short-circuits with `InferenceCancelledError` if the * signal is already aborted on entry; the same signal also propagates * to in-progress transfers via the request binding below so cancel * tears them down end-to-end. */ signal?: AbortSignal | undefined; /** * Optional per-request binding threaded into every `startOrJoinDownload` * call. The download manager wires a per-subscriber abort listener * against `binding.signal`, registers a scope-defer cleanup, and stamps * the subscriber with `binding.requestId` so the legacy * `cancelTransfer(downloadKey)` path can route through * `registry.cancel({ requestId })`. */ requestBinding?: DownloadRequestBinding | undefined; } export interface ResolveSession { resolvePrimaryModelPath(modelSrc: unknown): Promise; createResolveContext(modelSrc: string, modelType: string, modelName?: string): ResolveContext; getAggregateResult(): ResolveResult | undefined; cancelAll(): void; } export declare function createResolveSession(options: ResolveSessionOptions): ResolveSession; //# sourceMappingURL=resolve-session.d.ts.map