Skip to content

fix(memos-local-openclaw): declare contracts.tools in plugin manifest#1757

Open
Richard-JC-Yan wants to merge 1 commit into
MemTensor:mainfrom
Richard-JC-Yan:fix/declare-contracts-tools
Open

fix(memos-local-openclaw): declare contracts.tools in plugin manifest#1757
Richard-JC-Yan wants to merge 1 commit into
MemTensor:mainfrom
Richard-JC-Yan:fix/declare-contracts-tools

Conversation

@Richard-JC-Yan
Copy link
Copy Markdown

Summary

OpenClaw runtime requires every plugin to declare contracts.tools before registering agent tools. The memos-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:

[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 (~33MB/day), masking real errors.

Fix

Add contracts.tools field listing all 20 tools the plugin actually registers (grep'd from api.registerTool({ name: "X", ... }) 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

Verification

Post-deploy in production OpenClaw 2026.5.7 host:

  • Pre-fix: tail -200 gateway.err.log | grep -c 'plugin must declare contracts.tools' = 1372 (1 day window)
  • Post-fix + gateway restart: same grep = 0

No functional change — contracts.tools is a declaration field per OpenClaw plugin spec, not a runtime gate. Used as reference by other plugins like openclaw-lark (see their manifest for similar format).

Test plan

  • Reviewer confirms 20 tools list matches actual api.registerTool(...) calls in index.ts
  • If memos-cloud-openclaw-plugin (apps/MemOS-Cloud-OpenClaw-Plugin) has same gap, follow-up PR can apply same fix there (currently out of scope)

🤖 Generated with Claude Code

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants