Adds lib.mldata search over the CLIP index (#49): forFile returns a
file's stored payload; similar ranks nearest files by cosine on the CLIP
embedding; searchByEmbedding ranks the index against a caller-supplied
query vector. All RAM-only, reusing the packed Float32Array index and id
list. No text encoder is bundled — the caller provides the query vector.
Redo of the reverted first cut: under noUncheckedIndexedAccess the cosine
loops read query[k]/embeddings[base+k]/fileIDs[i] as number|undefined, so
tsc (make build) failed though make check passed. Every such read is now
in range by the surrounding bounds check (query length, packed layout),
so the reads are asserted non-null rather than paying a per-element guard
in the hot ~50k×512 loop. Gated on both make check and make build.
Model: opus-4-8