fix(manifest): declare memory kind and register memory capability#132
Open
YOMXXX wants to merge 1 commit into
Open
fix(manifest): declare memory kind and register memory capability#132YOMXXX wants to merge 1 commit into
YOMXXX wants to merge 1 commit into
Conversation
OpenClaw `doctor` reports "memory slot plugin not found" because the plugin manifest never declared `"kind": "memory"` and never called the host's `registerMemoryCapability` API. Without those, the host loader skips this plugin when matching the memory slot and the doctor check treats the slot as unfilled. - openclaw.plugin.json: declare `"kind": "memory"` so the loader recognizes this plugin as a memory-kind candidate. - index.ts: feature-detect `api.registerMemoryCapability` and call it with an empty capability to claim the slot. The empty capability is sufficient for slot-occupancy; promptBuilder/runtime can be wired later if we want the host to drive prompt sections through its own memory pipeline. Wrapped in try/catch and feature-detected so older OpenClaw hosts without this API still load the plugin. Fixes TencentCloud#119 Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
Collaborator
|
Thanks for the contribution! We've received your PR fixing the OpenClaw doctor false alarm and will review it internally. We'll get back to you once we have results. Appreciate you tracking down this manifest issue! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #119 —
openclaw doctorreports "memory slot plugin not found" even though memory-tencentdb is loaded and serving four-layer memory.Root cause
The host's slot loader matches memory plugins via
hasKind(record.kind, "memory")and only acceptsregisterMemoryCapability(...)from plugins whose manifest declares that kind. memory-tencentdb's manifest never setkind, and the plugin never calledregisterMemoryCapability. So from the host's view the memory slot is empty — doctor surfaces that as the missing-slot warning.Change
openclaw.plugin.json: add"kind": "memory"so the loader recognizes this plugin as a memory-kind candidate.index.ts: inregister(), feature-detectapi.registerMemoryCapabilityand call it with an empty capability{}to claim the slot. The slot loader requireskind: "memory"before accepting the call (verified against the bundled OpenClaw SDK).try/catchand feature-detected viatypeof === "function"so older OpenClaw hosts (before the API existed) still load the plugin without error.debug(success) /warn(failure) — non-fatal either way.Empty
{}is sufficient for slot-occupancy.promptBuilder/runtime/publicArtifactscan be wired later if we want the host to drive prompt sections or flush plans through its own memory pipeline; that's a follow-up, not part of this fix.Test plan
npm run build)openclaw doctorno longer reports "memory slot plugin not found"registerMemoryCapabilityAPI, the plugin still loads and runtime hooks fire (feature detection skips the call)