/** * @octomil/browser — Browser runtime resolver * * Connects the planner-driven attempt runner to the actual in-browser * inference infrastructure (ONNX Runtime Web / Transformers.js). * * Implements RuntimeChecker and ArtifactChecker for the attempt runner, * probing WebGPU/WASM availability and model cache state. */ import type { ModelCache } from "../cache.js"; import type { RuntimeChecker, ArtifactChecker, ArtifactCacheStatus, CandidatePlan } from "./attempt-runner.js"; /** * Probes the current browser environment for WebGPU and WASM support. * Results are cached after first probe since capabilities don't change * within a page session. */ export declare class BrowserRuntimeChecker implements RuntimeChecker { private webgpuResult; private wasmResult; private engineAvailable; checkProvider(provider: "webgpu" | "wasm"): Promise<{ available: boolean; reasonCode?: string; }>; checkEngineAvailable(engine?: string): Promise<{ available: boolean; reasonCode?: string; }>; private probeWebGPU; private probeWasm; private checkWasmSimd; private probeEngine; } /** * Checks model artifact availability using the browser's model cache * (Cache API or IndexedDB). Does NOT trigger downloads — only reports * current cache state. * * Downloads are handled separately by the execution layer after routing * selects a candidate. */ export declare class BrowserArtifactChecker implements ArtifactChecker { private static readonly BROWSER_SAFE_FORMATS; private readonly cache; private readonly serverUrl; /** Maximum artifact size to consider downloadable in-browser (default 2GB) */ private readonly maxSizeBytes; constructor(opts: { cache: ModelCache; serverUrl?: string; maxSizeBytes?: number; }); check(artifact: CandidatePlan["artifact"]): Promise<{ available: boolean; cacheStatus: ArtifactCacheStatus; reasonCode?: string; }>; private resolveArtifactFormat; } //# sourceMappingURL=browser-runtime-resolver.d.ts.map