Releases: Oaklight/weilink
Releases · Oaklight/weilink
v0.6.1
v0.6.1 (2026-04-19)
New Features
- Store watcher dispatcher fallback (#33) — when another process (e.g. MCP server) holds the poll lock,
on_messagehandlers andrun_background()now automatically fall back to watching the SQLite message store for new messages instead of failing; enables running SDK callback hooks alongside an MCP server without any code changes - Additional media metadata —
ImageInfo.mid_size/thumb_size,VideoInfo.thumb_media/video_size/thumb_sizeparsed from iLink responses - Dispatcher queue overflow protection (#7) — bounded internal queue (default 1,000) drops oldest message on overflow with a warning log; configurable via
WeiLink(queue_maxsize=N) - Admin panel auto-refresh — message drawer polls for new messages while open; idle sessions hidden from the session list
Bug Fixes
- Fix prune leaving implicit write transaction —
MessageStore.prune()now always commits, preventing SQLite lock contention when multiple connections open the same database
Install: pip install weilink==0.6.1
PyPI: https://pypi.org/project/weilink/0.6.1/
v0.5.0
What's New
Features
- SQLite message persistence — messages are now stored in a local SQLite database with full history query support (
historytool / CLIweilink bot history) - Admin panel message drawer — click any user row to browse chat history with lazy media download
- CLI bot commands —
weilink bot send,weilink bot recv,weilink bot historywith--jsonsupport - Background auto-polling — admin panel and MCP/OpenAPI server now automatically poll for messages on startup, so users and messages appear without an explicit
recvcall - Default session subdirectory layout — default session now uses
base_path/default/instead of flat files, unifying layout with named sessions. Legacy flat layouts are auto-migrated on first load.
Improvements
- Atomic file writes and Route C cooperative polling fallback for multi-process safety
- Server tools refactored: renamed to match SDK methods, merged login flow, added session management tools
- Admin panel: improved download button style, fixed i18n on language switch
- Admin panel: screenshot gallery added to README
Fixes
- Fixed
message_idprecision loss in admin panel API (JS integer overflow) - Fixed
_get_client()in MCP server missingmessage_store=True
Breaking Changes
- Default session data directory changed from
base_path/token.jsontobase_path/default/token.json(auto-migration handles existing installs)
Full Changelog: v0.4.3...v0.5.0
v0.4.3
Bug Fixes
- Fix admin panel login not saving
user_id—_handle_poll_loginnow extractsilink_user_idfrom the QR confirmation response and stores it inBotInfo, matching the SDKlogin()behaviour - Consolidate admin panel User ID display — replaced the redundant "Users" column with a unified "User ID" column showing the bot owner's WeChat user ID and active/expired badge; added
user_idfield to the/api/sessionsresponse
Improvements
- Add debug logging to protocol layer —
_protocol.pynow logs all HTTP requests/responses,get_updatesmessage counts, cursor changes, and error details at DEBUG/INFO level for easier troubleshooting - Add debug logging to MCP
recv_messages—server/app.pylogs polling start, message counts, and individual message details - Add Docker entrypoint with PUID/PGID support — new
entrypoint.shfixes/data/weilinkownership at runtime viasu-exec, allowing bind-mounted volumes to match host user permissions
v0.4.2
Changelog
v0.4.2 (2026-03-28)
New Features
- Cross-process profile locking (#5) — multiple WeiLink instances sharing the same data directory (
~/.weilink/) are now coordinated viafcntl.flock()-based file locks; a non-blocking poll lock (.poll.lock) ensures only one process polls iLink at a time, while a short-lived data lock (.data.lock) serializes read-modify-write cycles ontoken.json/contexts.json; prevents cursor divergence, send_count corruption, and file corruption across SDK scripts, stdio MCP, and admin panel processes
Full Changelog: v0.4.1...v0.4.2
v0.4.1
Bug Fixes
- Fix session rename leaving stale directory — add per-session
_io_lockto serialize file I/O operations (rename, save, load, logout) on_Session; rename now usesshutil.rmtreeinstead ofrmdirto force-clean the old directory; prevents race condition where a background thread could recreate the old session directory between file move and path update
Install
pip install weilink==0.4.1
# or
pip install pyilink==0.4.1Full changelog: v0.4.0...v0.4.1
v0.4.0
What's New
- Credential migration CLI (experimental) —
weilink migrate openclawimports sessions from the OpenClaw weixin plugin (@tencent-weixin/openclaw-weixin) without re-scanning the QR code; supports--dry-runand--source - Send quota tracking — per-user send count against 10-message context_token quota;
QuotaExhaustedError+SendResult.remaining TextTooLongError— raised when text exceeds 16 KiB UTF-8 limitBotInfo.user_id— login captures the authorizing WeChat user ID- Additional model fields —
ImageInfo.hd_size,VoiceInfo.encode_type/bits_per_sample/sample_rate - Session expiry recovery — auto-clears cursor and context tokens on
errcode: -14 - Recv robustness — retry backoff on consecutive failures; honors server
longpolling_timeout_ms - Callback dispatcher —
on_message(),run_forever(),run_background()for event-driven bots
Breaking Changes
weilink.mcpmodule renamed toweilink.server(CLI subcommands unchanged)
Full Changelog: v0.3.0...v0.4.0
v0.4.0b1
What's New
- Credential migration CLI —
weilink migrate openclawimports sessions from the OpenClaw weixin plugin (@tencent-weixin/openclaw-weixin) without re-scanning the QR code; supports--dry-runand--source - Send quota tracking — per-user send count against 10-message context_token quota;
QuotaExhaustedError+SendResult.remaining TextTooLongError— raised when text exceeds 16 KiB UTF-8 limitBotInfo.user_id— login captures the authorizing WeChat user ID- Additional model fields —
ImageInfo.hd_size,VoiceInfo.encode_type/bits_per_sample/sample_rate - Session expiry recovery — auto-clears cursor and context tokens on
errcode: -14 - Recv robustness — retry backoff on consecutive failures; honors server
longpolling_timeout_ms
Breaking Changes
weilink.mcpmodule renamed toweilink.server(CLI subcommands unchanged)
Full Changelog: v0.3.0...v0.4.0b1
v0.3.0
What's New
- Multi-session support — register one bot with multiple WeChat accounts;
recv()polls all sessions concurrently,send()auto-routes - CDN pre-upload —
upload()pre-uploads media,send()acceptsUploadedMediato avoid re-uploading auto_recvonsend()— refresh context tokens before sending; returnsSendResult(bool-compatible) with captured messages- Quoted message support —
Message.ref_msgexposes referenced messages when users reply - MCP server —
stdio,sse, andstreamable-httptransports - OpenAPI server — REST API via
weilink openapi - Web admin panel — browser UI for session management and QR login
- Docker deployment — multi-platform image (amd64, arm64, arm/v7) with MCP + admin panel
- Unified CLI — single
weilinkcommand withadmin,mcp, andopenapisubcommands
Bug Fixes
- Fix
recv()crash on Python 3.10 with multiple sessions
Links
v0.2.0
What's New
- Multimodal messaging — send and receive images, voice, files, and videos
- Proactive messaging — context_tokens persist across restarts
- CDN upload reliability — retry on 5xx, correct response header, URL encoding fix
Install: pip install weilink or pip install pyilink
Full changelog: https://weilink.readthedocs.io/en/latest/changelog/
v0.1.0
WeiLink v0.1.0
Initial release of the lightweight Python SDK for WeChat iLink Bot protocol.
Features
- Zero dependencies — Pure Python standard library, no third-party packages
- Message queue semantics —
login()/send()/recv() - Automatic state management —
context_tokenand sync cursor handled internally - Credential persistence — Token saved after QR login, survives restarts
- Typing indicator —
send_typing()/stop_typing() - Built-in terminal QR code rendering — No external QR library needed
Important Limitations
- Cannot initiate conversations — user must message first
- 24-hour inactivity window
- Text only — media support planned for v0.2.0
- Tencent may terminate iLink service at any time