Skip to content

Releases: Oaklight/weilink

v0.6.1

18 Apr 16:56

Choose a tag to compare

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_message handlers and run_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 metadataImageInfo.mid_size / thumb_size, VideoInfo.thumb_media / video_size / thumb_size parsed 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 transactionMessageStore.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

31 Mar 06:31

Choose a tag to compare

What's New

Features

  • SQLite message persistence — messages are now stored in a local SQLite database with full history query support (history tool / CLI weilink bot history)
  • Admin panel message drawer — click any user row to browse chat history with lazy media download
  • CLI bot commandsweilink bot send, weilink bot recv, weilink bot history with --json support
  • Background auto-polling — admin panel and MCP/OpenAPI server now automatically poll for messages on startup, so users and messages appear without an explicit recv call
  • 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_id precision loss in admin panel API (JS integer overflow)
  • Fixed _get_client() in MCP server missing message_store=True

Breaking Changes

  • Default session data directory changed from base_path/token.json to base_path/default/token.json (auto-migration handles existing installs)

Full Changelog: v0.4.3...v0.5.0

v0.4.3

29 Mar 18:44

Choose a tag to compare

Bug Fixes

  • Fix admin panel login not saving user_id_handle_poll_login now extracts ilink_user_id from the QR confirmation response and stores it in BotInfo, matching the SDK login() 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_id field to the /api/sessions response

Improvements

  • Add debug logging to protocol layer_protocol.py now logs all HTTP requests/responses, get_updates message counts, cursor changes, and error details at DEBUG/INFO level for easier troubleshooting
  • Add debug logging to MCP recv_messagesserver/app.py logs polling start, message counts, and individual message details
  • Add Docker entrypoint with PUID/PGID support — new entrypoint.sh fixes /data/weilink ownership at runtime via su-exec, allowing bind-mounted volumes to match host user permissions

v0.4.2

28 Mar 15:07

Choose a tag to compare

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 via fcntl.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 on token.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

27 Mar 14:48

Choose a tag to compare

Bug Fixes

  • Fix session rename leaving stale directory — add per-session _io_lock to serialize file I/O operations (rename, save, load, logout) on _Session; rename now uses shutil.rmtree instead of rmdir to 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.1

Full changelog: v0.4.0...v0.4.1

v0.4.0

26 Mar 17:17

Choose a tag to compare

What's New

  • Credential migration CLI (experimental)weilink migrate openclaw imports sessions from the OpenClaw weixin plugin (@tencent-weixin/openclaw-weixin) without re-scanning the QR code; supports --dry-run and --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 limit
  • BotInfo.user_id — login captures the authorizing WeChat user ID
  • Additional model fieldsImageInfo.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 dispatcheron_message(), run_forever(), run_background() for event-driven bots

Breaking Changes

  • weilink.mcp module renamed to weilink.server (CLI subcommands unchanged)

Full Changelog: v0.3.0...v0.4.0

PyPI: https://pypi.org/project/weilink/0.4.0/

v0.4.0b1

26 Mar 10:58

Choose a tag to compare

v0.4.0b1 Pre-release
Pre-release

What's New

  • Credential migration CLIweilink migrate openclaw imports sessions from the OpenClaw weixin plugin (@tencent-weixin/openclaw-weixin) without re-scanning the QR code; supports --dry-run and --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 limit
  • BotInfo.user_id — login captures the authorizing WeChat user ID
  • Additional model fieldsImageInfo.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.mcp module renamed to weilink.server (CLI subcommands unchanged)

Full Changelog: v0.3.0...v0.4.0b1

PyPI: https://pypi.org/project/weilink/0.4.0b1/

v0.3.0

25 Mar 17:00

Choose a tag to compare

What's New

  • Multi-session support — register one bot with multiple WeChat accounts; recv() polls all sessions concurrently, send() auto-routes
  • CDN pre-uploadupload() pre-uploads media, send() accepts UploadedMedia to avoid re-uploading
  • auto_recv on send() — refresh context tokens before sending; returns SendResult (bool-compatible) with captured messages
  • Quoted message supportMessage.ref_msg exposes referenced messages when users reply
  • MCP serverstdio, sse, and streamable-http transports
  • 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 weilink command with admin, mcp, and openapi subcommands

Bug Fixes

  • Fix recv() crash on Python 3.10 with multiple sessions

Links

v0.2.0

24 Mar 15:59

Choose a tag to compare

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

23 Mar 11:47

Choose a tag to compare

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 semanticslogin() / send() / recv()
  • Automatic state managementcontext_token and sync cursor handled internally
  • Credential persistence — Token saved after QR login, survives restarts
  • Typing indicatorsend_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