REPOSITORY / ScuroNeko/Laniakea

Releases

RELEASES REPOSITORY
  • v1.0.0 5514665625

    1.0.0
    Golang lint / lint (pull_request) Successful in 2m42s
    Golang lint / lint (push) Successful in 1m20s
    Stable

    ScuroNeko released this 2026-05-20 13:23:31 +03:00 | 18 commits to main since this release

    Laniakea 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 runtimeRunWebhookWithContext(...) 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.
    • AuthorizationPolicy[T], RequirePolicy(...), built-in chat-type and admin checks, and AllPolicies / AnyPolicy / NotPolicy combinators.
    • Observability — typed Observer events 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 encodingBotPayloadCompact / BotPayloadCompactBase64 for 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 MsgContext MessageContext
    Plugin builder NewCommand(...), NewScene(...) Command(...), Scene(...)
    Runner builders Onetime(bool), Timeout(d) Async(bool), Every(d)
    Observer methods OnReceiveUpdate, OnHandledUpdate OnUpdateReceived, OnUpdateHandled
    Payload sentinels var BotPayloadType* const BotPayloadType*
    Scene ownership Scene.PluginName (public field) unexported, set by framework
    Session data SceneSession.Data []byte unexported, use accessor helpers
    Error visibility unclassified errors → user reply unclassified errors → internal only; use AsUserError(...) to surface
    Webhook API names RunWebHookWithContext, CloseWebHook RunWebhookWithContext, CloseWebhook

    Notable fixes

    • Webhook secret comparison now uses subtle.ConstantTimeCompare (timing side-channel removed).
    • /status endpoint returns HTTP 404 (not 403) for wrong secret to hide endpoint existence.
    • tgapi.Uploader now returns *tgapi.ResponseError on Telegram API failures, consistent with the JSON API client.
    • Worker pool now waits for in-flight handlers before runtime exit (StopAndWait).
    • RateLimiter lock upgrade could deadlock under contention — fixed.
    • Panics in Bot.handle and the polling goroutine now emit ErrorEvent through the observer.
    • BotOptsFileJSON was silently dropping PollTimeout on round-trip — fixed.

    Links

    What's Changed

    Full Changelog: v0.7.1...v1.0.0

    Downloads