refactor(8.0): rename HNSWIndex class → JsHnswVectorIndex (scaffold step 3)
Step 3 of the brainy 8.0 rename scaffolding. The class name now matches its role: the JS HNSW implementation of the VectorIndexProvider contract. Per planning § 2.3: this is NOT cosmetic — leaving HNSWIndex when the public contract is VectorIndexProvider creates a confusing read at the implementation layer. CHANGES Repo-wide mechanical rename: HNSWIndex → JsHnswVectorIndex across 52 references in src/ + 5 references in tests/ via sed. Class declaration, imports, JSDoc, comments, and identifiers all updated. src/index.ts - Primary public export: JsHnswVectorIndex (the new name). - Backwards-compat alias: `export const HNSWIndex = JsHnswVectorIndex` with @deprecated note. Removed in the final 8.0 cleanup commit. NO-OP scope No behavioural change. The class is exactly the same; only the name moved. Tests + build green. VERIFICATION - npx tsc --noEmit: clean - npm test: 1468 / 1468 unit
This commit is contained in:
parent
8f87b35614
commit
f39d420cb4
11 changed files with 80 additions and 70 deletions
|
|
@ -13,7 +13,7 @@
|
|||
* - Fusion: O(k log k) where k = result count
|
||||
*/
|
||||
|
||||
import { HNSWIndex } from '../hnsw/hnswIndex.js'
|
||||
import { JsHnswVectorIndex } from '../hnsw/hnswIndex.js'
|
||||
import { MetadataIndexManager } from '../utils/metadataIndex.js'
|
||||
import { Vector } from '../coreTypes.js'
|
||||
import { NounType } from '../types/graphTypes.js'
|
||||
|
|
@ -230,7 +230,7 @@ class QueryPlanner {
|
|||
*/
|
||||
export class TripleIntelligenceSystem {
|
||||
private metadataIndex: MetadataIndexManager
|
||||
private hnswIndex: HNSWIndex
|
||||
private hnswIndex: JsHnswVectorIndex
|
||||
private graphIndex: GraphAdjacencyIndex
|
||||
private metrics: PerformanceMetrics
|
||||
private planner: QueryPlanner
|
||||
|
|
@ -239,7 +239,7 @@ export class TripleIntelligenceSystem {
|
|||
|
||||
constructor(
|
||||
metadataIndex: MetadataIndexManager,
|
||||
hnswIndex: HNSWIndex,
|
||||
hnswIndex: JsHnswVectorIndex,
|
||||
graphIndex: GraphAdjacencyIndex,
|
||||
embedder: (text: string) => Promise<Vector>,
|
||||
storage: any
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue