@o-lang/semantic-doc-search 1.0.29 → 1.0.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": "@o-lang/semantic-doc-search",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "description": "O-lang Semantic Document Search Resolver with hybrid search, embeddings, rerank, and streaming.",
5
5
  "main": "src/index.js",
6
6
  "type": "commonjs",
@@ -6,6 +6,7 @@
6
6
  * - No silent failures
7
7
  * - No zero vectors
8
8
  * - Deterministic behavior
9
+ * - DEFENSIVE against method detaching
9
10
  */
10
11
 
11
12
  class LocalEmbedding {
@@ -13,6 +14,12 @@ class LocalEmbedding {
13
14
  this.dim = 384;
14
15
  this.model = null;
15
16
  this.loading = null;
17
+
18
+ // 🔒 CRITICAL: bind methods to prevent resolver breakage
19
+ this.loadModel = this.loadModel.bind(this);
20
+ this.embed = this.embed.bind(this);
21
+ this.embedBatch = this.embedBatch.bind(this);
22
+ this.getDimension = this.getDimension.bind(this);
16
23
  }
17
24
 
18
25
  /* ---------------- INTERNAL ---------------- */