#22735: feat(plugin): add feishu-media extension
size: XL
Cluster:
Plugin Fixes and Enhancements
Adds `@openclaw/feishu-media` — Feishu audio STT and media payload utilities.
**What it does:**
- Feishu native `speech_to_text` API integration with tenant token caching and rate-limit retry
- Whisper STT fallback via remote HTTP service or local CLI
- `buildFeishuMediaPayload()` with `Transcript` field support for audio messages
- Media understanding debug logger for diagnostics
Disabled by default — set `enabled: true` in plugin config to activate.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR adds two new extensions: `@openclaw/feishu-media` (Feishu audio STT and media payload utilities) and `@openclaw/embedding-fts` (unified embedding system with FTS5 fallback). Both are disabled by default and require `enabled: true` in plugin config.
- **Runtime crash in `feishu-media`**: `api.lifecycle.onHealthCheck()` is called in `index.ts`, but `OpenClawPluginApi` has no `lifecycle` property — this will throw a `TypeError` when the plugin is enabled.
- **TypeScript error in `embedding-fts`**: `api.on("health", ...)` uses `"health"` as a hook name, but it is not in the `PluginHookName` union type — this will not compile.
- **Broken test imports in `embedding-fts`**: The test file imports from `"../src/embedding.js"` but the correct path from `__tests__/` is `"../embedding.js"` — tests will fail to run.
- **Missing `devDependencies` in `feishu-media`**: `openclaw` is not listed in `devDependencies` (only `peerDependencies`), diverging from the standard extension pattern and potentially breaking dev-time module resolution. Also declares `vitest ^3.0.0` while the workspace root uses `^4.0.18`.
- The `feishu-media` and `embedding-fts` core logic (STT integration, embedding providers, FTS5 loader, media payload builder) is well-structured with reasonable error handling and test coverage.
<h3>Confidence Score: 2/5</h3>
- This PR has multiple issues that will cause runtime errors and test failures when the plugins are enabled — it should not be merged as-is.
- Score of 2 reflects three distinct bugs: (1) `api.lifecycle.onHealthCheck()` in feishu-media will throw a TypeError at runtime since `lifecycle` doesn't exist on the plugin API, (2) `api.on("health", ...)` in embedding-fts uses an invalid hook name that won't pass TypeScript compilation, and (3) embedding-fts test imports use a wrong relative path (`../src/embedding.js` instead of `../embedding.js`) so tests won't run. The plugins are disabled by default which limits blast radius, but these must be fixed before merging.
- Pay close attention to `extensions/feishu-media/index.ts` (runtime crash on `api.lifecycle`), `extensions/embedding-fts/index.ts` (invalid hook name), and `extensions/embedding-fts/src/__tests__/embedding.test.ts` (broken import path).
<sub>Last reviewed commit: 844d50d</sub>
<!-- greptile_other_comments_section -->
**Context used:**
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#22732: feat(plugin): add embedding-fts extension
by cintia09 · 2026-02-21
78.2%
#22733: feat(plugin): add runner-extensions extension
by cintia09 · 2026-02-21
76.0%
#10675: feat(feishu): add audio message support and fix file upload
by YumoeZhung · 2026-02-06
75.8%
#16337: feat(feishu): sync community plugin updates from clawdbot-feishu v0...
by graydawnc · 2026-02-14
74.5%
#9268: Fix: Register feishu as official channel in CHAT_CHANNEL_ORDER
by vishaltandale00 · 2026-02-05
73.5%
#15351: feat(feishu): Add native audio message support (voice bubble)
by lovejing0306 · 2026-02-13
72.2%
#12849: fix(plugins): fallback bundled channel specs when npm install retur...
by vincentkoc · 2026-02-09
72.0%
#17007: fixed stacy voice
by tashen247 · 2026-02-15
71.8%
#20973: Fix: Feishu duplicate plugin ID, Docker pairing docs, broken formal...
by neipor · 2026-02-19
71.7%
#20424: Fix plugin extension path traversal in discovery/install
by markmusson · 2026-02-18
71.6%