Skip to content

fix: add contracts.tools to plugin manifest for OpenClaw >= 2026.5.2 - #4

Open
fmfsaisai wants to merge 1 commit into
dashhuang:mainfrom
fmfsaisai:fix/add-contracts-tools
Open

fix: add contracts.tools to plugin manifest for OpenClaw >= 2026.5.2#4
fmfsaisai wants to merge 1 commit into
dashhuang:mainfrom
fmfsaisai:fix/add-contracts-tools

Conversation

@fmfsaisai

Copy link
Copy Markdown

Summary

OpenClaw v2026.5.2 introduced mandatory tool contract enforcement in the plugin registry (changelog entry). Plugins that call api.registerTool() must now declare their tool names in openclaw.plugin.json under contracts.tools. Without this declaration, registerTool() silently skips registration and pushes an error diagnostic — the plugin loads fine and hooks work, but tools are not available to agents.

This PR adds the missing contracts.tools declaration for conversation_archive_search and conversation_archive_health.

Changes

  • openclaw.plugin.json: added contracts.tools array listing both registered tool names

Verification

Tested on OpenClaw 2026.5.2 (openclaw plugins inspect conversation-archive --runtime):

Before (without contracts.tools):

Status: loaded
Typed hooks:
message_received (priority 0)
message_sent (priority 0)

Diagnostics:
ERROR: plugin must declare contracts.tools before registering agent tools

Tools section absent — tools not registered.

After (with contracts.tools):

Status: loaded
Typed hooks:
message_received (priority 0)
message_sent (priority 0)

Tools:
conversation_archive_search, conversation_archive_health

No diagnostics errors. Both tools registered successfully.

Context

The contracts.tools enforcement was added in OpenClaw v2026.5.2 as part of the manifest-first control plane direction. This is a breaking change for plugins that register tools without declaring them in the manifest. The plugin's 0.2.0 release predates this change (April 9 vs May 2), which is why it wasn't caught earlier.

OpenClaw v2026.5.2 introduced mandatory tool contract enforcement in
the plugin registry. Plugins that call api.registerTool() must now
declare their tool names in openclaw.plugin.json under contracts.tools,
otherwise registerTool() silently skips registration and pushes an
error diagnostic.

Without this change, conversation_archive_search and
conversation_archive_health tools are not available to agents on
OpenClaw >= 2026.5.2, even though the plugin loads successfully and
hooks work fine.

Verified on OpenClaw 2026.5.2:
- Before: plugins inspect shows "ERROR: plugin must declare
  contracts.tools before registering agent tools", Tools section empty
- After: Tools section shows both tools, no diagnostics errors
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.

1 participant