fix(memos-local-openclaw): declare contracts.tools in plugin manifest#1757
Open
Richard-JC-Yan wants to merge 1 commit into
Open
fix(memos-local-openclaw): declare contracts.tools in plugin manifest#1757Richard-JC-Yan wants to merge 1 commit into
Richard-JC-Yan wants to merge 1 commit into
Conversation
OpenClaw runtime requires every plugin to declare contracts.tools
before registering agent tools. Without it, the gateway logs the
following warning on every registration:
[plugins] plugin must declare contracts.tools before registering
agent tools (plugin=memos-local-openclaw-plugin, source=index.js)
In a production OpenClaw deployment with active memos plugin, this
warning flooded gateway.err.log at ~1300 lines/day, masking real
errors and bloating logs by ~33MB/day.
This commit declares all 20 tools the plugin actually registers
(grep'd via `api.registerTool(...)` calls in index.ts):
- memory_*: get, search, share, timeline, unshare, viewer, write_public
- network_*: memory_detail, skill_pull, team_info
- skill_*: file_get, files, get, install, publish, search, unpublish
- task_*: share, summary, unshare
Verified: post-deploy gateway.err.log warning count = 0.
Refs: contracts.tools field per OpenClaw plugin spec (see
openclaw-lark and similar plugins as reference).
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
OpenClaw runtime requires every plugin to declare
contracts.toolsbefore registering agent tools. Thememos-local-openclaw-plugin(apps/memos-local-openclaw) currently does not declare this field, causing OpenClaw to emit a warning every time the plugin registers a tool:In a production OpenClaw deployment with active memos plugin, this warning flooded
gateway.err.logat ~1300 lines/day (~33MB/day), masking real errors.Fix
Add
contracts.toolsfield listing all 20 tools the plugin actually registers (grep'd fromapi.registerTool({ name: "X", ... })calls inindex.ts):memory_*: get, search, share, timeline, unshare, viewer, write_publicnetwork_*: memory_detail, skill_pull, team_infoskill_*: file_get, files, get, install, publish, search, unpublishtask_*: share, summary, unshareVerification
Post-deploy in production OpenClaw 2026.5.7 host:
tail -200 gateway.err.log | grep -c 'plugin must declare contracts.tools'= 1372 (1 day window)No functional change —
contracts.toolsis a declaration field per OpenClaw plugin spec, not a runtime gate. Used as reference by other plugins likeopenclaw-lark(see their manifest for similar format).Test plan
api.registerTool(...)calls inindex.ts🤖 Generated with Claude Code