Files
quak/test/library
sneak 0b1dc19611
check / check (push) Failing after 25s
Content-similarity search surface over the CLIP index (closes #50)
Add `lib.mldata`, the RAM-only content search over the #49 CLIP index:

- `forFile({ fileID })` — the whole stored ML payload from disk, or undefined
  when uncached (the only method here that touches disk).
- `similar({ fileID, limit? })` — files nearest a file by cosine over their
  CLIP embeddings, excluding the file itself.
- `searchByEmbedding({ embedding, limit? })` — files nearest a caller-supplied
  query vector; quak bundles no text encoder (owner-deferred).

Cosine is one plain loop over the packed Float32Array index, computing each
row's magnitude on the fly rather than caching norms the mutating index would
invalidate. No new dependency. Results are `{ fileID, score }[]` descending,
ties broken by ascending fileID. The private store field was renamed `mlStore`
to free `mldata` for the public API.

Model: opus-4-8
2026-09-22 16:00:57 +00:00
..