Skip to content

Your lightweight open-source personal agent.

chore(WeiXin): version migration and compatibility update

xcosmosbox0dad6124a2f9
diff --git a/nanobot/channels/weixin.py b/nanobot/channels/weixin.py
index 5ea887f02..2e25b3569 100644
--- a/nanobot/channels/weixin.py
+++ b/nanobot/channels/weixin.py
@@ -53,7 +53,8 @@ MESSAGE_TYPE_BOT = 2
MESSAGE_STATE_FINISH = 2
WEIXIN_MAX_MESSAGE_LEN = 4000
-BASE_INFO: dict[str, str] = {"channel_version": "1.0.2"}
+WEIXIN_CHANNEL_VERSION = "1.0.3"
+BASE_INFO: dict[str, str] = {"channel_version": WEIXIN_CHANNEL_VERSION}
# Session-expired error code
ERRCODE_SESSION_EXPIRED = -14
diff --git a/tests/channels/test_weixin_channel.py b/tests/channels/test_weixin_channel.py
index 818e45d98..54d9bd93f 100644
--- a/tests/channels/test_weixin_channel.py
+++ b/tests/channels/test_weixin_channel.py
@@ -11,6 +11,7 @@ from nanobot.channels.weixin import (
ITEM_IMAGE,
ITEM_TEXT,
MESSAGE_TYPE_BOT,
+ WEIXIN_CHANNEL_VERSION,
WeixinChannel,
WeixinConfig,
)
@@ -43,6 +44,10 @@ def test_make_headers_includes_route_tag_when_configured() -> None:
assert headers["SKRouteTag"] == "123"
+def test_channel_version_matches_reference_plugin_version() -> None:
+ assert WEIXIN_CHANNEL_VERSION == "1.0.3"
+
+
def test_save_and_load_state_persists_context_tokens(tmp_path) -> None:
bus = MessageBus()
channel = WeixinChannel(