ConstTransformers.js embedder — lazy-loads the model on first ingest/query call. Defaults to Xenova/all-MiniLM-L6-v2 (English, ~23 MB, dim 384). Throws TRAGarError("EmbedderLoadFailed") if the module or model fails to load.
File store — persists corpus data in a local filesystem directory. Node.js environments only. Throws InvalidConfig immediately when called in a browser or service worker.
Files are written to {dirPath}/tragar/{namespace}/ and are byte-identical to stores.opfs() output, so they can be served as static assets and opened by a browser TRAGar instance using stores.opfs().
In-memory store — no persistence, ideal for tests and the tracer bullet.
OPFS store — persists corpus data in the browser's Origin Private File System. Falls back to IndexedDB when OPFS is unavailable (Safari < 16, locked-down WebViews) and emits onWarn("StoreFallback") when it does.
Optionalopts: {
Custom embedder — wraps a caller-supplied embed function. Use for tests, examples, and offline development.