entroly-wasm 0.19.5 → 0.19.8
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/js/server.js +3 -1
- package/package.json +1 -1
- package/pkg/entroly_wasm.d.ts +16 -0
- package/pkg/entroly_wasm.js +32 -0
- package/pkg/entroly_wasm_bg.wasm +0 -0
package/js/server.js
CHANGED
|
@@ -157,7 +157,9 @@ class EntrolyMCPServer {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
case 'recall_relevant':
|
|
160
|
-
|
|
160
|
+
// Use BM25-backed relevance recall, not SimHash near-duplicate recall.
|
|
161
|
+
// This mirrors the Python MCP server's recall_relevant path.
|
|
162
|
+
return this.engine.recall_auto(args.query, args.top_k || 5);
|
|
161
163
|
|
|
162
164
|
case 'record_outcome': {
|
|
163
165
|
const ids = (args.fragment_ids || '').split(',').map(s => s.trim()).filter(Boolean);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "entroly-wasm",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.8",
|
|
4
4
|
"description": "Information-theoretic context optimization for AI coding agents. Zero-friction, pure WebAssembly - no Python dependency.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "pkg/entroly_wasm.d.ts",
|
package/pkg/entroly_wasm.d.ts
CHANGED
|
@@ -93,6 +93,22 @@ export class WasmEntrolyEngine {
|
|
|
93
93
|
* Semantic recall of relevant fragments.
|
|
94
94
|
*/
|
|
95
95
|
recall(query: string, top_k: number): any;
|
|
96
|
+
/**
|
|
97
|
+
* AUTO retrieval — zero-config: relevance recall is *always* a
|
|
98
|
+
* relevance need, so route to BM25, never the SimHash `recall()`.
|
|
99
|
+
* Mirrors entroly-core's `recall_auto` exactly so every surface
|
|
100
|
+
* (pip / Python-MCP / npm-wasm) ships ONE behaviour.
|
|
101
|
+
*/
|
|
102
|
+
recall_auto(query: string, top_k: number): any;
|
|
103
|
+
/**
|
|
104
|
+
* BM25 relevance retrieval — byte-identical behaviour to
|
|
105
|
+
* entroly-core's `recall_bm25` (same ported `bm25.rs`, same schema
|
|
106
|
+
* incl. the auditable score breakdown). This is the npm/wasm half
|
|
107
|
+
* of the cross-runtime parity fix: SimHash `recall()` is a
|
|
108
|
+
* near-duplicate metric (~0.44 R@1); a real BM25 is the correct
|
|
109
|
+
* tool (~1.0). pip / Python-MCP / npm now behave the same.
|
|
110
|
+
*/
|
|
111
|
+
recall_bm25(query: string, top_k: number): any;
|
|
96
112
|
/**
|
|
97
113
|
* Record failed outcome for specific fragment IDs.
|
|
98
114
|
*/
|
package/pkg/entroly_wasm.js
CHANGED
|
@@ -209,6 +209,38 @@ class WasmEntrolyEngine {
|
|
|
209
209
|
const ret = wasm.wasmentrolyengine_recall(this.__wbg_ptr, ptr0, len0, top_k);
|
|
210
210
|
return ret;
|
|
211
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* AUTO retrieval — zero-config: relevance recall is *always* a
|
|
214
|
+
* relevance need, so route to BM25, never the SimHash `recall()`.
|
|
215
|
+
* Mirrors entroly-core's `recall_auto` exactly so every surface
|
|
216
|
+
* (pip / Python-MCP / npm-wasm) ships ONE behaviour.
|
|
217
|
+
* @param {string} query
|
|
218
|
+
* @param {number} top_k
|
|
219
|
+
* @returns {any}
|
|
220
|
+
*/
|
|
221
|
+
recall_auto(query, top_k) {
|
|
222
|
+
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
223
|
+
const len0 = WASM_VECTOR_LEN;
|
|
224
|
+
const ret = wasm.wasmentrolyengine_recall_auto(this.__wbg_ptr, ptr0, len0, top_k);
|
|
225
|
+
return ret;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* BM25 relevance retrieval — byte-identical behaviour to
|
|
229
|
+
* entroly-core's `recall_bm25` (same ported `bm25.rs`, same schema
|
|
230
|
+
* incl. the auditable score breakdown). This is the npm/wasm half
|
|
231
|
+
* of the cross-runtime parity fix: SimHash `recall()` is a
|
|
232
|
+
* near-duplicate metric (~0.44 R@1); a real BM25 is the correct
|
|
233
|
+
* tool (~1.0). pip / Python-MCP / npm now behave the same.
|
|
234
|
+
* @param {string} query
|
|
235
|
+
* @param {number} top_k
|
|
236
|
+
* @returns {any}
|
|
237
|
+
*/
|
|
238
|
+
recall_bm25(query, top_k) {
|
|
239
|
+
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
240
|
+
const len0 = WASM_VECTOR_LEN;
|
|
241
|
+
const ret = wasm.wasmentrolyengine_recall_bm25(this.__wbg_ptr, ptr0, len0, top_k);
|
|
242
|
+
return ret;
|
|
243
|
+
}
|
|
212
244
|
/**
|
|
213
245
|
* Record failed outcome for specific fragment IDs.
|
|
214
246
|
* @param {string} fragment_ids_json
|
package/pkg/entroly_wasm_bg.wasm
CHANGED
|
Binary file
|