Semantic Index

loom-sprint-scaffoldsourcetypescript
Path: loom-sprint-scaffold/loom/src/memory/core/semantic-index.tsRelative: loom/src/memory/core/semantic-index.tsSubproject: loom-sprint-scaffoldCategory: other
Lines: 161Bytes: 5,866Imports: 4Exports: 2

Content Preview

  1. /**
  2. * H4.6 — SemanticIndex: search abstraction with two implementations.
  3. *
  4. * VectorizeIndex — wraps Cloudflare Vectorize (edge, uses embeddings).
  5. * Fts5Index — wraps D1 FTS5 virtual table (local dev / fallback).
  6. *
  7. * Both share the same SemanticIndex interface (defined in src/types/memory.ts).
  8. * Factory in src/memory/index.ts selects by binding presence at startup.
  9. */
  10. import { createLogger } from "../../lib/logger";
  11. import { parseContract } from "../../lib/validate";
  12. import type {