fix(manifest): declare contracts, providers, and onStartup so the plugin loads at gateway boot#171
Conversation
OpenClaw 2026.5.x's gateway-boot plugin loader requires plugins to declare their capabilities upfront in openclaw.plugin.json. Without these declarations, the loader skips the plugin at boot (CLI tools like `openclaw plugins enable/inspect/doctor` are lenient and still load it, masking the issue). Symptoms on OpenClaw 2026.5.19+: - `openclaw plugins inspect clawrouter` reports `Status: loaded` - `openclaw plugins doctor` warns 26x: "plugin must declare contracts.tools before registering agent tools" - After `openclaw gateway restart`, port 8402 is not listening - /wallet, /stats, /blockrun, /partners commands are not registered - BlockRun provider is not registered with the gateway Fix: declare what the plugin actually provides: - `activation.onStartup: true` so the plugin loads at gateway boot (it must run to serve the x402 proxy on :8402) - `enabledByDefault: true` to opt into the trusted-by-default path - `providers: ["blockrun"]` to declare the LLM provider - `contracts.tools` listing all 26 partner tools the plugin registers - `contracts.webSearchProviders: ["blockrun-exa"]` to declare the web-search provider Verified on OpenClaw 2026.5.19 + ClawRouter 0.12.196: after this patch, gateway boot logs show: [plugins] BlockRun provider registered (55+ models via x402) [plugins] Commands registered: /wallet, /blockrun, /stats, ... [plugins] BlockRun x402 proxy listening on port 8402 [plugins] ClawRouter ready — smart routing enabled http server listening (13 plugins: ..., clawrouter, ...) And /wallet works inside the OpenClaw TUI.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR updates the ChangesPlugin Activation and Tool Contracts Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The
openclaw.plugin.jsonmanifest is missing the capability declarations that OpenClaw 2026.5.x's gateway-boot plugin loader requires. Without them the plugin is skipped at boot —/wallet,/stats,/blockrun, the BlockRun provider, and the x402 proxy on :8402 silently never come up after a gateway restart.This PR adds the four manifest fields that fix it.
Repro (before this PR)
OpenClaw 2026.5.19 (also reproduces on 2026.5.22) + ClawRouter 0.12.196, fresh install per the official one-liner:
Then run
openclaw gateway restart. Symptoms:openclaw plugins inspect clawrouterreportsStatus: loaded(the CLI tools are lenient and still load the plugin, which masks the issue)openclaw plugins doctorrepeats the warning 26 times:openclaw gateway restart:BlockRun provider registered (55+ models via x402)log line is absentCommands registered: /wallet, /blockrun, /stats, ...linehttp server listening (12 plugins: ...)—clawrouternot in the list/walletreturns "no/walletcommand exists"What's happening: at install time the plugin loads via a hot-reload path that's lenient; once you restart the gateway the strict boot loader runs the contract check and skips the plugin because the manifest doesn't declare what it provides.
Fix
Add the four declarations the gateway boot loader needs in
openclaw.plugin.json:activation.onStartup: true— the plugin must run at boot to serve the x402 proxy on :8402; without it the plugin lazy-loads and the proxy never comes upenabledByDefault: true— opt into the trusted-by-default load path (matchesacpx,document-extract, and other in-tree plugins)providers: ["blockrun"]— declare the LLM provider so the gateway knows this plugin owns theblockrun/*model IDs (same pattern asanthropic,openai)contracts.tools: [...26 tools...]— list the partner tools registered at runtime (blockrun_predexon_*,blockrun_stock_*,blockrun_crypto_*,blockrun_phone_*,blockrun_voice_*,blockrun_image_*,blockrun_video_*). This is what makes the 26x doctor warning go awaycontracts.webSearchProviders: ["blockrun-exa"]— declare the Exa-backed web search providerThe tools list was derived from the plugin's own runtime registration log (
[plugins] Registered 26 partner tool(s): ...), so the manifest now matches what the code actually registers.Verification
On the same host, after applying this patch and running
openclaw gateway restart, the gateway log shows:And inside the OpenClaw TUI,
/walletreturns the wallet status (address, balance, fund URLs) as expected.openclaw plugins inspect clawrouterafter the patch also shows the new shape:(Was
Shape: non-capability/Capability mode: nonebefore.)Test plan
openclaw gateway restartopenclaw plugins doctorno longer prints theplugin must declare contracts.toolswarningss -tlnp | grep 8402shows a listener/walletand confirm the wallet panel renderscontracts.toolsin sync with the runtime registration indist/index.js🤖 Generated with Claude Code
Summary by CodeRabbit