REPOSITORY / ScuroNeko/Laniakea
Releases
-
1.0.0
Stablereleased this
2026-05-20 13:23:31 +03:00 | 18 commits to main since this releaseLaniakea v1.0.0
First stable release. The public API is now frozen under semantic versioning — future breaking changes will increment the major version.
Highlights
- Telegram Bot API 10.0 — full support for new types, methods, and update kinds.
- Webhook runtime —
RunWebhookWithContext(...)owns the HTTP server, update queue, worker pool, and runners, matching the polling runtime model exactly. - Scenes — multi-step conversation flows with scoped sessions, step handlers, scene-local commands and payloads, and pluggable session storage.
- Authorization —
Policy[T],RequirePolicy(...), built-in chat-type and admin checks, andAllPolicies/AnyPolicy/NotPolicycombinators. - Observability — typed
Observerevents covering update receipt, handler start/finish, scene transitions, policy checks, runner completion, polling retries, and centralized errors (including panics). - tgfmt — new package with typed MarkdownV2, HTML, and legacy Markdown formatting helpers.
- Compact payload encoding —
BotPayloadCompact/BotPayloadCompactBase64for shorter callback data. RateLimiter.Cleanup— evict idle per-chat state to bound memory in long-running bots.
Breaking changes
This release consolidates all RC-era API renames into a stable surface. If you are upgrading from an RC, see the Migration guide.
The most impactful changes:
What changed Before After Context type MsgContextMessageContextPlugin builder NewCommand(...),NewScene(...)Command(...),Scene(...)Runner builders Onetime(bool),Timeout(d)Async(bool),Every(d)Observer methods OnReceiveUpdate,OnHandledUpdateOnUpdateReceived,OnUpdateHandledPayload sentinels var BotPayloadType*const BotPayloadType*Scene ownership Scene.PluginName(public field)unexported, set by framework Session data SceneSession.Data []byteunexported, use accessor helpers Error visibility unclassified errors → user reply unclassified errors → internal only; use AsUserError(...)to surfaceWebhook API names RunWebHookWithContext,CloseWebHookRunWebhookWithContext,CloseWebhookNotable fixes
- Webhook secret comparison now uses
subtle.ConstantTimeCompare(timing side-channel removed). /statusendpoint returns HTTP 404 (not 403) for wrong secret to hide endpoint existence.tgapi.Uploadernow returns*tgapi.ResponseErroron Telegram API failures, consistent with the JSON API client.- Worker pool now waits for in-flight handlers before runtime exit (
StopAndWait). RateLimiterlock upgrade could deadlock under contention — fixed.- Panics in
Bot.handleand the polling goroutine now emitErrorEventthrough the observer. BotOptsFileJSONwas silently droppingPollTimeouton round-trip — fixed.
Links
What's Changed
Full Changelog: v0.7.1...v1.0.0
Downloads