From c04ad4a73161286ba7a03a1a2f3d43c12bdf44f1 Mon Sep 17 00:00:00 2001 From: Richard-JC-Yan <150349207+Richard-JC-Yan@users.noreply.github.com> Date: Tue, 19 May 2026 02:06:01 +0800 Subject: [PATCH] fix(memos-local-openclaw): declare contracts.tools in plugin manifest 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). --- .../memos-local-openclaw/openclaw.plugin.json | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/apps/memos-local-openclaw/openclaw.plugin.json b/apps/memos-local-openclaw/openclaw.plugin.json index bb828c19f..66b4f40a8 100644 --- a/apps/memos-local-openclaw/openclaw.plugin.json +++ b/apps/memos-local-openclaw/openclaw.plugin.json @@ -33,5 +33,31 @@ "If better-sqlite3 fails to build, ensure you have C++ build tools: xcode-select --install (macOS) or build-essential (Linux)" ] }, - "extensions": ["./index.ts"] + "extensions": [ + "./index.ts" + ], + "contracts": { + "tools": [ + "memory_get", + "memory_search", + "memory_share", + "memory_timeline", + "memory_unshare", + "memory_viewer", + "memory_write_public", + "network_memory_detail", + "network_skill_pull", + "network_team_info", + "skill_file_get", + "skill_files", + "skill_get", + "skill_install", + "skill_publish", + "skill_search", + "skill_unpublish", + "task_share", + "task_summary", + "task_unshare" + ] + } }