feat(openclaw): migrate plugin to openclaw 2026.5 contracts - #162
Merged
Conversation
- Add channelConfigs metadata to openclaw.plugin.json so the gateway can validate config and load setup surfaces before the plugin runtime imports (silences "channel plugin manifest declares wechat without channelConfigs metadata" warning). - Replace deprecated runtime.config.loadConfig() with config.current(). - Add a message adapter via createChannelMessageAdapterFromOutbound from openclaw/plugin-sdk/channel-message; keep the legacy outbound adapter for older openclaw versions. - Update access-control test scenario to match openclaw 2026.5's intentional new semantics (pairing-store allowFrom is consulted only for non-"open"/"allowlist" DM policies). - Bump openclaw devDep floor to ^2026.5.12. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
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
channel plugin manifest declares wechat without channelConfigs metadataby addingchannelConfigstoopenclaw.plugin.json.runtime.config.loadConfig()withruntime.config.current().messageadapter viacreateChannelMessageAdapterFromOutboundfromopenclaw/plugin-sdk/channel-message; keeps the legacyoutboundadapter for older openclaw versions.openclawdevDep floor to^2026.5.12.allowFromis consulted only for non-open/allowlistDM policies).Why
OpenClaw 2026.5.12 introduced new contracts and marked the previous helpers (
loadConfig,dispatchReplyWithBufferedBlockDispatcher+recordInboundSession,resolveSenderCommandAuthorization) as deprecated. The compat shims still execute but their semantics have shifted in subtle ways (e.g., the store-backed allowlist is no longer consulted for command auth underdmPolicy: "open"). The missing manifestchannelConfigswas preventing the gateway from validating config / loading setup surfaces before the runtime imports, which appears to be the root cause of the reported "messages dispatched but not reaching the agent" symptom.Deferred (follow-up release)
Migrating the inbound dispatch path in
monitor.ts(dispatchReplyWithBufferedBlockDispatcher+recordInboundSession→core.channel.turn.runPrepared(...)). The deprecated path still works in 5.12 via compat shims; rewriting the dispatch flow needs end-to-end gateway testing and is a larger change.Test plan
pnpm typecheckinpackages/openclaw-extensionpnpm test(14/14 passing)pnpm build(227.1kb bundle)openclaw plugins install ./packages/openclaw-extension && openclaw gateway restartand verify the warning is gone and DMs reach the agent🤖 Generated with Claude Code