REPOSITORY / ScuroNeko/Laniakea

Releases

RELEASES REPOSITORY
  • 1.0.0 RC 12 Pre-Release

    ScuroNeko released this 2026-03-30 00:12:36 +03:00 | 48 commits to dev since this release

    Laniakea v1.0.0-rc.12

    rc.12 brings three major pieces of framework work into usable shape: typed handler input binding, request-scoped context plumbing, and the first full scene/session model.

    Highlights

    • Added MsgContext.BindArgs(...) for binding positional command arguments into exported struct fields.
    • Added request-scoped context access through MsgContext.Context(), with handler-side reply/edit/callback/draft paths now using that context consistently.
    • Added scene/session support with plugin scene registration, scoped sessions, scene entry/exit APIs, default in-memory session storage, scene-local routing, and scene state helpers.
    • Added explicit long-reply helpers: AnswerLong(...), AnswerLongf(...), KeyboardLong(...), and SplitMessageText(...).
    • Added optional strict payload decoding via BotOpts.StrictPayloadType / Bot.SetStrictPayloadType(...).

    Changed

    • CommandExecutor now returns error, and command, payload, and non-command update handlers now flow through centralized bot error handling.
    • MsgContext.Context() now safely falls back to context.Background() when no request-scoped context is attached.
    • README and wiki documentation were expanded to cover scenes, session scopes, state helpers, and SceneActionPass behavior.
    • The framework backlog was reorganized into explicit priority 1/2/3 buckets.

    Fixed

    • Message and caption validation now happens before Telegram API calls and returns stable sentinel errors for invalid text.
    • Draft flushing and draft updates now reject oversized messages before sending invalid requests.
    • Positional argument binding now handles missing trailing fields, tail-string binding, and clearer conversion errors.
    • Request-scoped contexts are now created per update handler execution and safely reused through MsgContext.Context().
    • Scene handling gained regression coverage for runtime guards, message fallback, scene-local commands, user-scoped lookup, and custom SessionStore failures.

    Breaking Changes

    • CommandExecutor[T] changed from:
      func(ctx *MsgContext, db T)
      to:
      func(ctx *MsgContext, db T) error
    • Plugin.NewCommand(...), Plugin.NewPayload(...), and Plugin.AddUpdateHandler(...) now require handlers with the new error-returning signature.

    Notes

    This release makes scenes a real, documented framework feature rather than just a work-in-progress skeleton, and it strengthens the handler execution model around typed input, cancellation, and centralized error handling.

    Full Changelog: v1.0.0-rc.11...v1.0.0-rc.12

    Downloads