/** * Local embedding runtime support guard. * * The bundled local embedding stack (`@huggingface/transformers` → * `onnxruntime-node`) only ships native ONNX Runtime bindings for a subset of * platform/arch pairs. On macOS Intel (`darwin`/`x64`), `onnxruntime-node` * ships no `bin/napi-v6/darwin/x64/onnxruntime_binding.node`, so *importing* * transformers.js throws a raw `Cannot find module ...onnxruntime_binding.node` * before any device/backend selection can run (#1515). `ONNX_WEB_BACKEND=wasm` * cannot rescue this — the failure is at native-module import time, not backend * selection (#1516). * * This module is intentionally free of any native or transformers.js import (at * module scope or inside its functions) so it can be consulted *before* the * dynamic import that would crash. HTTP embedding mode never touches the native * runtime, so callers in HTTP mode must skip this guard. */ export interface LocalEmbeddingRuntimeOptions { platform?: NodeJS.Platform; arch?: NodeJS.Architecture; } /** * Return a human-readable explanation when the *local* embedding runtime cannot * load on this platform, or `null` when local embeddings are expected to work. * * Only `darwin`/`x64` is blocked today: it is the one platform/arch pair where * the bundled `onnxruntime-node` ships no native binding (#1515). Every other * platform returns `null` and follows the normal device-probe path, so genuine * ONNX failures on supported platforms are never masked by this message. * * Accepts an explicit `{ platform, arch }` for testing; defaults to the current * process values. */ export declare const getLocalEmbeddingRuntimeBlocker: (options?: LocalEmbeddingRuntimeOptions) => string | null; /** * True when `message` is the macOS-Intel local-embedding blocker produced by * {@link getLocalEmbeddingRuntimeBlocker}. Lets the CLI surface a clean, * actionable message instead of a raw stack trace, without coupling to the * full wording. */ export declare const isLocalEmbeddingRuntimeBlockerMessage: (message: string) => boolean;