Skip to content

v2.0.2

Choose a tag to compare

@yincongcyincong yincongcyincong released this 05 Nov 02:33
· 17 commits to main since this release

Released: 2026-11-05

This release ships a webhook-driven automation system, LLM provider failover registration, a unified logging pipeline that captures every platform SDK, and a full correctness pass over the robot/ core and platform adapters — the result of a complete audit of the message-handling layer. It includes 8 community PRs and more than 20 bug fixes.

Highlights

  • Webhook triggers — any external system (CI, monitoring, scripts) can now drive MuseBot with a single HTTP POST; the rendered prompt runs through the same command pipeline as cron jobs and delivers the answer to any configured platform.
  • LLM failover — register fallback providers so a provider outage degrades gracefully instead of failing the request; fallbacks can be pinned per provider:model.
  • Every SDK now logs through MuseBot's logger — Lark, Slack socket mode, gRPC, DingTalk, Discord, WeChat, Gemini, Milvus, DashScope and LangChain output no longer bypasses the unified log file.
  • robot/ stability audit — 20+ fixes across Telegram, WeChat, DingTalk, Discord, QQ, Slack, cron and the core robot, including several crashes and one bug that broke WeChat passive replies entirely.

New Features

Webhook event triggers (@yincongcyincong)

POST /webhook/{token} accepts an external event, renders its payload into a prompt template, and asynchronously executes it against the webhook's configured target (any supported platform, group or user). Requests are acknowledged with 202 immediately; execution reuses the same synthetic-robot path as scheduled cron jobs, so all commands, LLM routing and reply delivery behave identically.

  • Token-based URLs — no shared secret in the query string
  • Full CRUD via the admin API
  • Bilingual docs: static/doc/webhook.md / webhook_ZH.md

LLM failover registration (@yincongcyincong)

Requests can now declare a failover chain of LLM providers. When the primary provider errors, the request transparently retries down the chain. Fallback entries support provider:model pinning (e.g. openai:glm-5.3-flash) or per-provider default models.

Outcrawl as a task web search provider (#75, @heydryft)

Tasks can now use Outcrawl as their web search engine alongside the existing providers.

Static stickers read as images (#67, @MaizioO123)

Telegram static (non-animated) stickers are now sent to the LLM as images instead of being skipped, so vision models can see them.

Gemini video model refresh (@yincongcyincong)

Updated Gemini video generation support to the latest models.

Bug Fixes

Telegram

  • Update polling client had no timeout (#68, @MaizioO123) — a stalled connection could block update processing indefinitely; the polling client now has a proper timeout.
  • Replies to ordinary bot messages were mishandled (#69, @MaizioO123).
  • Race on the global bot client (@yincongcyincong) — the shared TelegramBot instance is now guarded by a read/write mutex; concurrent sends from cron, webhooks and the update loop no longer race.
  • Crash when the bot client is not ready (@yincongcyincong) — scheduled and webhook-triggered sends now check for a nil bot client instead of panicking.
  • "Thinking…" placeholder stuck forever after an image failure (@yincongcyincong) — failed image generations now edit the placeholder with the error (and fall back to a plain message if editing fails).
  • Wrong message for empty MCP output (@yincongcyincong) — the MCP empty-content branch sent the task message instead of the MCP one.

WeChat

  • Passive-mode replies were never delivered (@yincongcyincong) — the finished answer is now always stored for the callback to pick up; previously every passive answer returned HTTP 500 to WeChat.
  • Duplicate-callback race (@yincongcyincong) — when a duplicate message arrived while the first was still processing, the handler logged with a Robot that had not been assigned yet.

DingTalk

  • Inverted expiry check in the access-token cache (@yincongcyincong) — valid cached tokens were discarded; the cache now actually hits.

Discord

  • Panic on interactions without a direct user object (@yincongcyincong) — the username lookup now falls back from interaction.User to interaction.Member.User, fixing a nil dereference on member-scoped interactions.

QQ (OneBot)

  • Nil robot from an unparseable payload took down the handler (@yincongcyincong) — the HTTP handler now checks the parsed robot before dispatching instead of letting recover() swallow it into a generic panic log.

Slack

  • Mention check in public channels (@yincongcyincong) — the bot now requires an explicit @bot mention in public/group channels (C*/G*) before responding.

Cron & scheduling

  • Return an error instead of panicking when the scheduler is not up yet (#76, @djs-91).
  • Nil-scheduler startup window (@yincongcyincong) — the scheduler is now created and started before the DB load (with retries), so chat-side cron commands never see a nil Cron; a failed load leaves an empty-but-working scheduler.

Core robot

  • URLs mangled by prefix stripping (@yincongcyincong) — https:// was stripped after http://, turning https://… into s://…; both schemes are now removed in the correct order.
  • CreatePhoto errors reported the wrong media type (@yincongcyincong) — the configured type was shown instead of the unsupported one actually received.
  • Voice transcripts: DB errors leaked to users (@yincongcyincong) — transcription succeeds, persistence is now best-effort; users get the transcript instead of a database error message.
  • Default command handlers were silently dropped (@yincongcyincong) — ExecCmd now invokes the registered default handler.

Video generation

  • Handle Gemini video operation results safely (#72, @Danche23).
  • Close Aliyun video responses between polls (#74, @Danche23) — fixes connection/file-descriptor exhaustion during long video generations.

Logging

A full audit of SDK logging, landed by @yincongcyincong:

  • Lark and Slack socket mode clients are now wired into the logger (previously the Lark client wrote to its own private stdout logger, and the Slack option was a no-op).
  • gRPC output is captured through a LoggerV2 adapter (info demoted to debug, fatal exits after logging); grpc moved to a direct dependency.
  • The context-aware logger methods were rebuilt on the real logger instance — they previously routed to zerolog.Ctx(ctx), which silently dropped events. Every log line now carries bot_name and log_id, and one log id covers a whole cron fire / webhook run end to end.

Documentation & Build

Contributors

Many thanks to everyone who contributed to this release:

Upgrade Notes

  • Restart required — all fixes take effect on restart.
  • WeChat passive mode (wechat_active=false): replies now actually reach users; no config change needed.
  • Slack public channels: the bot now only responds when explicitly @mentioned — verify your workflows if they relied on the old behavior.
  • Webhooks: create your first webhook via the admin API; see static/doc/webhook.md (EN) / webhook_ZH.md (中文).
  • Failover: optionally set -failover_providers (e.g. openai:glm-5.3-flash) to keep chats working through provider outages.