1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// GitHub v3 REST API MCP server — generated by mcpify. Do not hand-edit.
//
// Single source of truth for embedding computation. bin/populate_embeddings.rs
// (indexing time) and tools/search_tool.rs (live query time) both call
// `embed()` from here, so the two are structurally guaranteed to share the
// same model and vector space — see the plan's embeddings decision.
// `all-MiniLM-L6-v2` at its native 384 dimensions, matching
// `mcp_store.db`'s `semantic_endpoints` schema exactly (`FLOAT[384]`).
// Switched from `all-mpnet-base-v2` (768-dim) so the packaged crate's
// embedded stores fit under crates.io's 10MiB upload limit even at max
// zstd compression — see the "switch to all-MiniLM-L6-v2" fix.
//
// This intentionally diverges from `targets::typescript`'s
// `@xenova/transformers`-based embedding-service.ts, which still uses
// `all-mpnet-base-v2`/768 dims — `-l rust` and `-l typescript` output are
// no longer search-behavior equivalent for the same spec as a result of
// this crate-size-driven change.
use ;
use ;
/// Computes a 384-dim embedding vector for `text`, mean-pooled and
/// normalized (fastembed's default behavior for this model, replicating
/// the sentence-transformers reference implementation).