@claude-flow/cli 3.10.28 → 3.10.30

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.30",
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,30 @@ 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
+ },
77
+ scidocs: {
78
+ 'BM25 (Lucene)': 0.158,
79
+ 'DocT5query': 0.162,
80
+ 'TAS-B': 0.149,
81
+ 'GenQ': 0.143,
82
+ 'ColBERT': 0.145,
83
+ 'Contriever': 0.165,
84
+ 'GTR-XL': 0.174,
85
+ 'SPLADE++': 0.159,
86
+ 'BGE-large-v1.5 (pub)': 0.225,
87
+ 'SBERT msmarco': 0.122,
88
+ },
65
89
  };
66
90
 
67
91
  // Auto-detect dataset from DATA_DIR path; default to nfcorpus baselines.
@@ -219,7 +243,9 @@ async function main() {
219
243
  ? [...qrels.keys()].slice(0, MAX_QUERIES)
220
244
  : [...qrels.keys()];
221
245
 
222
- console.log(`\nRunning ${evalQueryIds.length} queries...`);
246
+ // ADR-090: BGE_QUERY_PREFIX=1 enables BAAI's recommended query prefix.
247
+ const USE_QUERY_PREFIX = process.env.BGE_QUERY_PREFIX === '1';
248
+ console.log(`\nRunning ${evalQueryIds.length} queries${USE_QUERY_PREFIX ? ' (with BGE query prefix, ADR-090)' : ''}...`);
223
249
  let nSum = 0, mSum = 0, r10Sum = 0, r100Sum = 0, n = 0;
224
250
  // ADR-086 — save per-query metrics for paired bootstrap significance testing.
225
251
  const perQuery = [];
@@ -227,8 +253,9 @@ async function main() {
227
253
  for (const qid of evalQueryIds) {
228
254
  const qtext = queriesById.get(qid);
229
255
  if (!qtext) continue;
230
- // BGE v1.5 non-icl works without the query prefix.
231
- const qEmb = await emb.embed(qtext);
256
+ // ADR-090: opt-in BGE query prefix per BAAI's docs (+0.009 nDCG@10 on
257
+ // NFCorpus dense-alone). Falls back to plain embed() if not enabled.
258
+ const qEmb = USE_QUERY_PREFIX && emb.embedQuery ? await emb.embedQuery(qtext) : await emb.embed(qtext);
232
259
  const scores = new Array(docEmbeds.length);
233
260
  for (let i = 0; i < docEmbeds.length; i++) scores[i] = { id: docIds[i], score: cosine(qEmb, docEmbeds[i]) };
234
261
  scores.sort((a, b) => b.score - a.score);
@@ -41,6 +41,8 @@ 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 },
45
+ scidocs: { 'BM25 (Lucene)': 0.158, 'DocT5query': 0.162, 'TAS-B': 0.149, 'GenQ': 0.143, 'ColBERT': 0.145, 'Contriever': 0.165, 'GTR-XL': 0.174, 'SPLADE++': 0.159, 'BGE-large-v1.5 (pub)': 0.225, 'SBERT msmarco': 0.122 },
44
46
  };
45
47
  function detectDataset(path) {
46
48
  const p = path.toLowerCase();
@@ -144,8 +146,10 @@ async function main() {
144
146
  const qtext = queriesById.get(qid);
145
147
  if (!qtext) continue;
146
148
 
147
- // §1 — dense BGE retrieval
148
- const qEmb = await emb.embed(qtext);
149
+ // §1 — dense BGE retrieval (ADR-090: opt-in query prefix when BGE_QUERY_PREFIX=1)
150
+ const qEmb = (process.env.BGE_QUERY_PREFIX === '1' && emb.embedQuery)
151
+ ? await emb.embedQuery(qtext)
152
+ : await emb.embed(qtext);
149
153
  const denseScored = new Array(docEmbeds.length);
150
154
  for (let i = 0; i < docEmbeds.length; i++) denseScored[i] = { id: docIds[i], score: cosine(qEmb, docEmbeds[i]) };
151
155
  denseScored.sort((a, b) => b.score - a.score);