fix(memory-core): declare "local" memoryEmbeddingProviders contract#70873
Conversation
Greptile SummaryThis PR fixes a regression introduced in v2026.4.22 where Confidence Score: 5/5This PR is safe to merge — it is a single-line additive manifest declaration with no source code changes and zero risk of regression. The change is minimal, structurally consistent with 8 sibling plugins, well-tested by the author against a real repro, and carries no source-code modifications. All remaining considerations (Linux/Windows coverage, contract test CI run) are tracked separately and do not affect correctness on the fixed path. No files require special attention. Reviews (1): Last reviewed commit: "fix(memory-core): declare local memoryEm..." | Re-trigger Greptile |
The v2026.4.22 refactor (77e6e4c) moved embedding providers into provider-plugin extensions that declare a `memoryEmbeddingProviders` capability in their plugin manifests. All 7 extensions were migrated, but the built-in "local" adapter in memory-core was missed. Without the contract declaration, the standalone CLI path (openclaw memory status / index / search) cannot resolve the "local" provider via the bundled-plugin capability-compat lookup, even though the adapter is still registered at gateway startup via `registerBuiltInMemoryEmbeddingProviders`. Fixes the CLI regression reported in openclaw#70836. - Gateway in-session memory_search remained functional (goes through the active runtime registry, not the manifest-compat path). - No source or behavior change: the adapter itself, its priority, and its model resolution are unchanged. This only makes the manifest self-describe the capability that memory-core already provides at runtime. Verified locally on macOS 26.2 arm64 / Node 22 / v2026.4.22: - `openclaw memory status --agent main` → Provider: local ✓ - `openclaw memory index --agent main` → reindexed 162/162 files ✓ - `openclaw memory search "<query>"` → returns local-embedding hits ✓ - Gateway restart + status → running, RPC ok, 0 plugin errors ✓
9607f5a to
e2b29bb
Compare
|
Landed via squash onto
Thanks @mattznojassist! |
Summary
openclaw memory status,openclaw memory index, andopenclaw memory searchall fail withUnknown memory embedding provider: local, even with a validlocalmemorySearch config andnode-llama-cppinstalled. Matches [Bug]: openclaw memory index fails with 'Unknown memory embedding provider: local' while gateway memory is vector ready #70836 verbatim.memory_searchvia the gateway keeps working (different registration path), which is why the regression is easy to miss."contracts": { "memoryEmbeddingProviders": ["local"] }toextensions/memory-core/openclaw.plugin.json. Matches the declaration pattern the 7 other embedding provider plugins already use (google,ollama,openai,voyage,lmstudio,mistral,amazon-bedrock,github-copilot).localAdapterdefinition,autoSelectPriority: 10, model resolution, and runtimeregisterBuiltInMemoryEmbeddingProviders(api)call are all untouched. This only makes the plugin manifest self-describe a capability the code already provides at runtime.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause
Commit
77e6e4cf87introduced a capability-manifest registration pathway so bundled plugins can be resolved by provider id without requiring the full pluginregister(api)lifecycle to have run (used by standalone CLI subprocesses, which do not boot the gateway). Each provider-plugin was updated to declare itsmemoryEmbeddingProviderscontract inopenclaw.plugin.json:But
extensions/memory-core/openclaw.plugin.jsonwas not updated, even thoughmemory-coreowns the built-inlocaladapter (registered at runtime viaregisterBuiltInMemoryEmbeddingProviders(api)inextensions/memory-core/index.ts).Gateway startup still registers the adapter in the active runtime registry, so gateway-hosted
memory_searchkeeps working. Standalone CLI invocations fall through toresolveBundledCapabilityCompatPluginIds→loadPluginManifestRegistry(seesrc/plugins/capability-provider-runtime.ts:45-63), which only surfaces plugins whose manifest declares the contract. Withlocalnot declared anywhere, the CLI can't find it and throws.Diagram
Security Impact (required)
localadapter usesnode-llama-cppon-device, no network.Repro + Verification
Environment
localviahf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.ggufSteps
agents.defaults.memorySearch.provider = "local"openclaw memory index --agent main --verboseExpected
Actual (before this fix)
Evidence
Tested on a detached checkout of
v2026.4.22with this one-line manifest change applied andpnpm run buildrun. Before vs after from the same machine, same config:Before:
After:
Human Verification (required)
What I personally verified (not just CI):
openclaw memory status --agent mainreturns Provider: local, Indexed: 162/162openclaw memory index --agent maincompletes with "Memory index updated"openclaw memory searchreturns hits embedded with the local modelprovider: "auto"→ still correctly auto-selectslocal(priority 10) ahead of other providers whenlocal.modelPathis setoxfmt --checkon the manifest passes (pre-commit hook runs clean)vitest run src/plugins/contracts/) — node_modules pnpm install was skipped in the PR worktree to keep the turnaround fast; no source/test changes so no test expectation diffs expected, but worth confirming in CImemory-lancedb-prointeraction if that plugin is enabledCompatibility / Migration
provider: "local"configs start working again.Risks and Mitigations
"local".openclaw.plugin.jsondeclares"memoryEmbeddingProviders": ["local"];getRegisteredMemoryEmbeddingProvider/filterUnregisteredMemoryEmbeddingProviderAdaptersalready handle duplicate-id cases gracefully.Metal GGML_ASSERTcrash mentioned in [Bug]: openclaw memory index fails with 'Unknown memory embedding provider: local' while gateway memory is vector ready #70836 (previously masked because indexing couldn't start).