@claude-flow/cli 3.10.19 → 3.10.20
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/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +51 -4
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/memory/cross-encoder-rerank.d.ts +33 -0
- package/dist/src/memory/cross-encoder-rerank.d.ts.map +1 -0
- package/dist/src/memory/cross-encoder-rerank.js +123 -0
- package/dist/src/memory/cross-encoder-rerank.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/scripts/benchmark-pretrained-retrieval.mjs +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.20",
|
|
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",
|
|
@@ -56,6 +56,8 @@ async function main() {
|
|
|
56
56
|
// Default runs hybrid (cosine + BM25 + MMR per ADR-078).
|
|
57
57
|
const listTool = neural.neuralTools.find((t) => t.name === 'neural_patterns');
|
|
58
58
|
const mode = process.env.HYBRID === '0' ? 'cosine' : 'hybrid';
|
|
59
|
+
// ADR-080 opt-in cross-encoder rerank — set RERANK=1 to enable.
|
|
60
|
+
const useRerank = process.env.RERANK === '1';
|
|
59
61
|
|
|
60
62
|
// top-1-uniqueness — fraction of queries whose top-1 result is NOT the
|
|
61
63
|
// same pattern ID as another query's top-1. Catches the "everyone gets
|
|
@@ -65,7 +67,7 @@ async function main() {
|
|
|
65
67
|
const tQuery0 = performance.now();
|
|
66
68
|
const results = [];
|
|
67
69
|
for (const { q, expect } of QUERIES) {
|
|
68
|
-
const r = await listTool.handler({ action: 'search', query: q, mode, limit: TOP_K });
|
|
70
|
+
const r = await listTool.handler({ action: 'search', query: q, mode, limit: TOP_K, rerank: useRerank });
|
|
69
71
|
const matches = (r.patterns || r.results || r.matches || []).slice(0, TOP_K);
|
|
70
72
|
if (matches.length > 0) {
|
|
71
73
|
const top1 = matches[0].id;
|
|
@@ -134,6 +136,7 @@ async function main() {
|
|
|
134
136
|
runAt: new Date().toISOString(),
|
|
135
137
|
benchmark: 'pretrained-retrieval',
|
|
136
138
|
mode, // ADR-078: which retrieval path was used
|
|
139
|
+
rerank: useRerank, // ADR-080: cross-encoder rerank on/off
|
|
137
140
|
storeSize: total,
|
|
138
141
|
queries: QUERIES.length,
|
|
139
142
|
matchedQueries,
|
|
@@ -153,7 +156,7 @@ async function main() {
|
|
|
153
156
|
console.log(JSON.stringify(summary, null, 2));
|
|
154
157
|
} else {
|
|
155
158
|
console.log(`# Pretrained-retrieval benchmark — proof of learning`);
|
|
156
|
-
console.log(`Mode: ${mode}${mode === 'hybrid' ? ' (cosine + BM25 + MMR, ADR-078)' : ' (cosine-only, pre-3.10.18)'}`);
|
|
159
|
+
console.log(`Mode: ${mode}${mode === 'hybrid' ? ' (cosine + BM25 + MMR, ADR-078)' : ' (cosine-only, pre-3.10.18)'}${useRerank ? ' + cross-encoder rerank (ADR-080)' : ''}`);
|
|
157
160
|
console.log(`Store size: ${total} patterns`);
|
|
158
161
|
console.log(`Queries: ${QUERIES.length}`);
|
|
159
162
|
console.log(`Match rate: ${(summary.matchRate * 100).toFixed(0)}% (${matchedQueries}/${QUERIES.length})`);
|