Completes brainy's #35 side. When the at-gen vector gate serves a filtered semantic read, Brainy now ships the historically-correct candidate vectors so the native provider reranks against them with zero per-vector FFI crossing — the provider need not duplicate the per-generation retention Brainy already does. - New `AtGenerationVectors { ids: BigInt64Array; vectors: Float32Array; dim }` on the VectorIndexProvider.search options bag (row-major: vectors[i*dim..] == ids[i]; invariant vectors.length === ids.length*dim; ids = the candidate set; dim must match the index dim). The built-in JS index ignores it. - buildAtGenerationVectors resolves each universe id's vector AS OF the generation (the record before-image, or live getNoun when untouched since the pin — not readNounRaw, whose canonical path is empty under lazy-vector eviction), interns the id via the shared mapper, and packs row-major. Absent/vectorless/wrong-dim ids are dropped (not vector-rankable). Bounded by the filtered universe. Shape + the four clarifications (row-major, ids-are-the-candidate-set, dim-asserted, filtered-path-only) confirmed with cor in the handoff #35 thread. Inert until cor's native at-gen rerank advertises isGenerationVisible (honesty guard). Tested: the mock versioned provider now asserts it receives atGenerationVectors with the row-major invariant, correct dim, and ids resolving back to the at-gen universe. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| aggregation | ||
| cli | ||
| db | ||
| embeddings | ||
| errors | ||
| graph | ||
| hnsw | ||
| import | ||
| importers | ||
| indexes/columnStore | ||
| integrations | ||
| mcp | ||
| migration | ||
| neural | ||
| patterns | ||
| storage | ||
| streaming | ||
| transaction | ||
| triple | ||
| types | ||
| universal | ||
| utils | ||
| vfs | ||
| brainy.ts | ||
| coreTypes.ts | ||
| index.ts | ||
| internals.ts | ||
| plugin.ts | ||
| setup.ts | ||
| unified.ts | ||