Rename OpenClaw plugin to agent-wechat (id + npm package) for openclaw 2026.8.x - #174
Merged
Conversation
…w 2026.8.x OpenClaw's official plugin catalog (now compiled into its JS bundle) reserves "wechat"/"weixin" as aliases of @tencent-weixin/openclaw-weixin, hijacking this plugin's id: installs get written as plugins.entries.openclaw-weixin and channels add --channel wechat tries to install the Tencent plugin. Renaming the id is the only robust fix — patching dist/channel-catalog.json no longer works since the bundled JS entries take precedence. Also: - switch bare openclaw/plugin-sdk imports to openclaw/plugin-sdk/core (bare export removed in 2026.8.x; core exists since 2026.5.12) - add channelConfigs to package.json#openclaw (new manifest read path) - local .d.ts shim for plugin-sdk/channel-targets (ships without types) - keep accepting wechat:-prefixed targets/allowlist entries for back-compat Migration: rename channels.wechat -> channels.agent-wechat and plugins.entries.wechat/openclaw-weixin -> plugins.entries.agent-wechat. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
OpenClaw derives/validates plugin ids from the unscoped npm package basename: - packageNameMatchesId() flags @agent-wechat/wechat (basename "wechat") vs plugin id "agent-wechat" as a mismatch on every install - update/config-driven installs pass expectedPluginId and hard-fail with PLUGIN_ID_MISMATCH across the rename Publishing as @agent-wechat/agent-wechat makes basename == plugin id, so all id derivation and ownership checks line up. Also declare legacyPluginIds: ["wechat"] in openclaw.plugin.json to hook openclaw's plugin-rename mechanism. First release under the new name must be published manually before OIDC trusted publishing can be configured (see dev-notes/release.md); then deprecate @agent-wechat/wechat. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0.11.15 was published manually with a one-off token (OIDC trusted publishing requires the package to exist first); the trusted publisher is configured on npmjs.com so CI keeps publishing via OIDC — no workflow changes needed. Co-Authored-By: Claude Opus 5 (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.
Why
OpenClaw 2026.8.x broke the plugin two ways:
dist/channel-catalog.json, so the old image patch became a no-op) and reserveswechat/weixin/微信as aliases of Tencent's@tencent-weixin/openclaw-weixin.plugins installwroteplugins.entries.openclaw-weixinandchannels add --channel wechattried to install the Tencent plugin.openclaw/plugin-sdkexport was removed (subpaths only).What
wechat→agent-wechat; config moves tochannels.agent-wechat;legacyPluginIds: ["wechat"]declared@agent-wechat/wechat→@agent-wechat/agent-wechat(openclaw validates plugin ids against the unscoped npm basename; update flows hard-fail on mismatch)openclaw/plugin-sdk/core(exists since 2026.5.12);.d.tsshim forplugin-sdk/channel-targetswhich ships without typeschannelConfigsadded topackage.json#openclaw;wechat:-prefixed targets/allowlist entries still accepted0.11.15already published manually; trusted publisher configured, so CI publishes via OIDC as beforeTested
Full E2E in Docker against
ghcr.io/openclaw/openclaw:2026.8.1: npm install (no warnings, no hijack),channels add --channel agent-wechat, gateway boot with plugin loaded, and live handshake against a real agent-wechat server container (reportslogged_outuntil QR login). 14/14 unit tests, typecheck, build.Migration
Rename
channels.wechat→channels.agent-wechatand dropplugins.entries.wechat/openclaw-weixin; reinstall the plugin under the new package name. Sessions reset (routing keys include the channel id).🤖 Generated with Claude Code