#22732: feat(plugin): add embedding-fts extension
size: L
Cluster:
Plugin Fixes and Enhancements
Adds `@openclaw/embedding-fts` — a unified embedding provider system with SQLite FTS5 fallback.
**What it does:**
- Provides switchable embedding providers (noop / hash / transformer) with cascading fallback
- Auto-detects and loads the SQLite FTS5 extension for full-text search
- Handles 429 rate-limit errors with exponential retry-backoff
- Detects embedding dimension mismatches to prevent silent corruption
Disabled by default — set `enabled: true` in plugin config to activate.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds unified embedding system with FTS5 fallback, transformer support via `@xenova/transformers`, hash/noop providers, 429 retry with exponential backoff, and dimension mismatch detection.
**Key findings:**
- Missing exports: `createHashEmbeddingProvider` and `ensureFts5Schema` are documented/tested but not exported from `index.ts`
- Missing dependency: `@xenova/transformers` is used but not declared in `package.json`
- Incorrect test import path uses `"../src/embedding.js"` instead of `"../embedding.js"`
- SQL injection risk in `ensureFts5Schema` where `ftsTable` parameter is unsanitized
<h3>Confidence Score: 2/5</h3>
- This PR has critical issues that will cause runtime failures
- Missing dependency and incorrect exports will cause import failures; incorrect test path will break test execution; SQL injection risk needs addressing
- Pay close attention to `package.json` (missing dependency), `index.ts` (missing exports), test file (incorrect import), and `sqlite-fts5.ts` (SQL injection)
<sub>Last reviewed commit: ae26093</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#22735: feat(plugin): add feishu-media extension
by cintia09 · 2026-02-21
78.2%
#22733: feat(plugin): add runner-extensions extension
by cintia09 · 2026-02-21
74.1%
#19945: memory: gracefully disable hybrid keyword search when fts5 unavailable
by nico-hoff · 2026-02-18
72.7%
#8706: fix(memory): fall back to better-sqlite3 when node:sqlite lacks FTS5
by ElmerProject · 2026-02-04
71.5%
#10550: feat(memory-lancedb): local embeddings via node-llama-cpp
by namick · 2026-02-06
71.1%
#17566: memory-lancedb: support local OpenAI-compatible embeddings
by lumenradley · 2026-02-15
70.7%
#12849: fix(plugins): fallback bundled channel specs when npm install retur...
by vincentkoc · 2026-02-09
69.7%
#18134: feat(discord): add semantic search tool for Discord messages
by zerone0x · 2026-02-16
69.5%
#23154: feat(plugin): add image-strip extension
by cintia09 · 2026-02-22
68.3%
#2556: fix(plugin-install): handle existing plugins and filter workspace deps
by longmaba · 2026-01-27
68.3%