@claude-flow/cli 3.10.28 → 3.10.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.10.28",
3
+ "version": "3.10.29",
4
4
  "type": "module",
5
5
  "description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",
@@ -121,7 +121,8 @@
121
121
  "@ruvector/rvagent-wasm": "^0.1.0",
122
122
  "@ruvector/sona": "^0.1.6",
123
123
  "agentdb": "^3.0.0-alpha.16",
124
- "agentic-flow": "^3.0.0-alpha.1"
124
+ "agentic-flow": "^3.0.0-alpha.1",
125
+ "ruvector": "^0.2.27"
125
126
  },
126
127
  "publishConfig": {
127
128
  "access": "public",
@@ -62,6 +62,18 @@ const BASELINES_BY_DATASET = {
62
62
  'BGE-large-v1.5 (pub)': 0.722,
63
63
  'SBERT msmarco': 0.555,
64
64
  },
65
+ arguana: {
66
+ 'BM25 (Lucene)': 0.397,
67
+ 'DocT5query': 0.349,
68
+ 'TAS-B': 0.429,
69
+ 'GenQ': 0.493,
70
+ 'ColBERT': 0.233,
71
+ 'Contriever': 0.379,
72
+ 'GTR-XL': 0.439,
73
+ 'SPLADE++': 0.521,
74
+ 'BGE-large-v1.5 (pub)': 0.636,
75
+ 'SBERT msmarco': 0.371,
76
+ },
65
77
  };
66
78
 
67
79
  // Auto-detect dataset from DATA_DIR path; default to nfcorpus baselines.
@@ -219,7 +231,9 @@ async function main() {
219
231
  ? [...qrels.keys()].slice(0, MAX_QUERIES)
220
232
  : [...qrels.keys()];
221
233
 
222
- console.log(`\nRunning ${evalQueryIds.length} queries...`);
234
+ // ADR-090: BGE_QUERY_PREFIX=1 enables BAAI's recommended query prefix.
235
+ const USE_QUERY_PREFIX = process.env.BGE_QUERY_PREFIX === '1';
236
+ console.log(`\nRunning ${evalQueryIds.length} queries${USE_QUERY_PREFIX ? ' (with BGE query prefix, ADR-090)' : ''}...`);
223
237
  let nSum = 0, mSum = 0, r10Sum = 0, r100Sum = 0, n = 0;
224
238
  // ADR-086 — save per-query metrics for paired bootstrap significance testing.
225
239
  const perQuery = [];
@@ -227,8 +241,9 @@ async function main() {
227
241
  for (const qid of evalQueryIds) {
228
242
  const qtext = queriesById.get(qid);
229
243
  if (!qtext) continue;
230
- // BGE v1.5 non-icl works without the query prefix.
231
- const qEmb = await emb.embed(qtext);
244
+ // ADR-090: opt-in BGE query prefix per BAAI's docs (+0.009 nDCG@10 on
245
+ // NFCorpus dense-alone). Falls back to plain embed() if not enabled.
246
+ const qEmb = USE_QUERY_PREFIX && emb.embedQuery ? await emb.embedQuery(qtext) : await emb.embed(qtext);
232
247
  const scores = new Array(docEmbeds.length);
233
248
  for (let i = 0; i < docEmbeds.length; i++) scores[i] = { id: docIds[i], score: cosine(qEmb, docEmbeds[i]) };
234
249
  scores.sort((a, b) => b.score - a.score);
@@ -41,6 +41,7 @@ const MAX_QUERIES = Number(process.env.MAX_QUERIES) || 0;
41
41
  const BASELINES_BY_DATASET = {
42
42
  nfcorpus: { 'BM25 (Lucene)': 0.325, 'DocT5query': 0.328, 'TAS-B': 0.319, 'GenQ': 0.319, 'ColBERT': 0.305, 'Contriever': 0.328, 'GTR-XL': 0.343, 'SPLADE++': 0.347, 'BGE-large-v1.5 (pub)': 0.380, 'SBERT msmarco': 0.272 },
43
43
  scifact: { 'BM25 (Lucene)': 0.679, 'DocT5query': 0.675, 'TAS-B': 0.643, 'GenQ': 0.644, 'ColBERT': 0.671, 'Contriever': 0.677, 'GTR-XL': 0.662, 'SPLADE++': 0.704, 'BGE-large-v1.5 (pub)': 0.722, 'SBERT msmarco': 0.555 },
44
+ arguana: { 'BM25 (Lucene)': 0.397, 'DocT5query': 0.349, 'TAS-B': 0.429, 'GenQ': 0.493, 'ColBERT': 0.233, 'Contriever': 0.379, 'GTR-XL': 0.439, 'SPLADE++': 0.521, 'BGE-large-v1.5 (pub)': 0.636, 'SBERT msmarco': 0.371 },
44
45
  };
45
46
  function detectDataset(path) {
46
47
  const p = path.toLowerCase();
@@ -144,8 +145,10 @@ async function main() {
144
145
  const qtext = queriesById.get(qid);
145
146
  if (!qtext) continue;
146
147
 
147
- // §1 — dense BGE retrieval
148
- const qEmb = await emb.embed(qtext);
148
+ // §1 — dense BGE retrieval (ADR-090: opt-in query prefix when BGE_QUERY_PREFIX=1)
149
+ const qEmb = (process.env.BGE_QUERY_PREFIX === '1' && emb.embedQuery)
150
+ ? await emb.embedQuery(qtext)
151
+ : await emb.embed(qtext);
149
152
  const denseScored = new Array(docEmbeds.length);
150
153
  for (let i = 0; i < docEmbeds.length; i++) denseScored[i] = { id: docIds[i], score: cosine(qEmb, docEmbeds[i]) };
151
154
  denseScored.sort((a, b) => b.score - a.score);