REPOSITORY / ScuroNeko/Laniakea

Releases

RELEASES REPOSITORY
  • v1.2.0 24040fe164

    1.2.0
    Golang lint / lint (push) Successful in 58s
    Golang lint / lint (pull_request) Successful in 13m10s
    Stable

    ScuroNeko released this 2026-08-20 11:08:45 +03:00 | 4 commits to main since this release

    v1.2.0

    Added

    • Added cancelable background runners through ContextRunnerFn and NewContextRunner; existing RunnerFn and NewRunner remain available for compatibility.
    • Added validated inline-keyboard APIs: InlineKeyboardButtonBuilder.Validate/Build, InlineKeyboard.Validate/GetValidated, and CallbackData.EncodeValidated, with typed errors for invalid actions, callback-data length, and oversized rows.
    • Added bounded file-download helpers GetFileByLinkLimit and GetFileByLinkLimitWithContext with ErrFileTooLarge; existing unbounded and streaming helpers remain available.
    • Added strict root rich-message parsing through UnmarshalRichMessageStrict and structural rich JSON depth/node limits with ErrRichJSONDepth and ErrRichJSONNodes.
    • Added APIOpts.SetMaxRetries for Telegram 429 responses. Automatic JSON and multipart retries now default to at most three attempts after the initial request and return ErrRetryLimit when exhausted.
    • Added SetChatPhotoWithContext and the correctly pluralized DeleteAllMessageReactionsWithContext; the old singular compatibility alias remains deprecated until v2.
    • Added PollAnswer.VoterUser and PollAnswer.VoterChatInfo presence helpers without changing the v1 value-field layout.
    • Added typed runtime errors for invalid scene actions, nil handlers, recovered handler panics, oversized Telegram responses, and recovered worker-pool task panics.
    • Added CommandScopeUpdateError and command-generation validation errors so callers can inspect invalid commands, duplicate names, invalid descriptions, and partially updated Telegram scopes.
    • Added rich-message editing helpers MessageContext.EditCallbackRich, MessageContext.UpsertKeyboardRich, AnswerMessage.EditRich, and AnswerMessage.EditRichKeyboard, plus AnswerMessage.RichHTML for rendered rich content.
    • Added NewBotWithAPI for constructing a bot with a preconfigured, injectable Telegram API client.

    Changed

    • Runtime observer callbacks now execute asynchronously in enqueue order on one bounded dispatcher instead of blocking update handlers and scene locks. Queue overflow drops events with sampled warnings, observer panics remain isolated, and shutdown cancels callback contexts, drains queued events, and reports callbacks that ignore cancellation.
    • Scene routing now holds a lock only for the active session key; updates without an active scene and unrelated user sessions in the same chat remain concurrent.
    • Multipart uploads now encode request bodies as streams instead of building a second complete in-memory copy for every attempt.
    • Logger replacement and app-data logger writer registration now follow the bot configuration freeze, reject nil values safely, and install bot-token redaction before publishing replacement loggers.
    • README and README_RU now document context runners, injectable API clients, bounded retries and downloads, streaming multipart uploads, keyboard validation, and asynchronous observer delivery.
    • Version metadata now reports v1.2.0.

    Fixed

    • Fixed HTTP transport errors exposing the bot token through Bot API request and file-download URLs while preserving error-chain inspection.
    • Fixed per-chat rate-limiter lifecycle races with concurrent cleanup, cooldown waits ignoring a later extension, shorter 429 locks replacing longer locks, and busy chats consuming global capacity before obtaining chat capacity.
    • Fixed scene AsUserError values not reaching users and producing duplicate observer errors; scene step, command, payload, and message-fallback errors now follow one consistent error path.
    • Fixed nil and panicking command, payload, update, message-fallback, scene, and middleware callbacks breaking handler/observer lifecycles. Panics are recovered per invocation and matching finish/error events are emitted.
    • Fixed asynchronous middleware error events and policy events bypassing the runtime observer dispatcher.
    • Fixed Telegram MarkdownV2 custom emoji syntax, multiline expandable blockquotes, code/pre escaping, and unsafe code-fence language strings.
    • Fixed MessageContext.BindArgs accepting values outside the destination integer or floating-point width.
    • Fixed empty successful draft flushes leaving stale drafts in DraftProvider.
    • Fixed generated command descriptions outside Telegram's 1–256-character range, duplicate command names across plugins, trailing usage whitespace, and silent partial multi-scope updates.
    • Fixed inline keyboard auto-wrap after reducing maxRow; legacy non-positive unlimited rows remain compatible for v1.
    • Fixed Telegram API responses larger than 10 MiB being silently truncated before JSON parsing; they now return ErrResponseTooLarge.
    • Fixed unknown SceneAction values being treated as a normal unhandled result.
    • Fixed worker-pool task panics terminating a worker and leaving the caller without a result.
    • Fixed zero or negative Telegram retry_after values causing a tight retry loop.
    • Fixed Telegram JSON wire names for provider_payment_charge_id, owned_gift_id, others_can_add_tasks, others_can_mark_tasks_as_done, available_reactions, and quote_parse_mode.
    • Fixed MessageContext text, photo, caption, rich-message, and chat-action helpers omitting business connection identifiers; message-backed helpers now also reject missing chats instead of panicking, while inline edits remain supported without a chat-backed message.
    • Fixed chat-admin, chat-creator, and bot-admin policies ignoring cancellation and deadlines from the active MessageContext.
    • Fixed command parsing treating tabs and newlines as part of command names and matching addressed bot usernames case-sensitively.
    • Fixed nested RichTextArray values bypassing rich-message depth validation and renderer limits.
    • Fixed polling panics being reported only through telemetry while RunWithContext returned success.
    • Fixed asynchronous middleware outliving the bot runtime and normal middleware denials being reported as internal handler errors.
    • Fixed caller-owned or aliased bot loggers being closed by the framework, bot-owned aliases being closed more than once, and replaced internal loggers leaking resources.
    • Fixed configuration codecs and JSON option encoding panicking on nil inputs.

    Documentation

    • Added field-level Godoc for the complete exported API surface, including official Telegram Bot API optionality, ranges, formats, and field semantics. The repository-wide AST audit now reports no undocumented exported declarations or struct fields.
    • Corrected draft-provider Godoc to avoid promising cryptographic unpredictability from math/rand/v2 IDs.
    • Marked v1 compatibility surfaces that may change in v2: PollAnswer voter pointers, context-required runners, error-returning keyboard builders, strict rich-message parsing, lossless unknown rich types, bounded downloads, compatibility aliases, and corrected public field names.
    • Clarified that drop-overflow mode rejects outgoing API requests, one-shot asynchronous runners are awaited during shutdown, and pending uploads are drained by the shared API client.

    CI

    • Pinned the lint workflow to Go 1.26.6, golangci/golangci-lint-action@v9.0.0, and golangci-lint v2.12.2 for reproducible analysis.

    Tests

    • Added regression coverage for limiter concurrency and cooldown behavior, scene lock scope, all scene handler error paths, polling, handler, and worker panics, asynchronous observer delivery, cancellation, and bounded shutdown, asynchronous middleware lifecycle, logger ownership, runner and policy cancellation, nil configuration inputs, draft cleanup, command parsing, command validation and partial scopes, keyboard byte boundaries and rows, MarkdownV2 vectors, numeric binding boundaries, rich JSON and renderer depth limits, strict rich roots, rich-message editing, business-message helpers and photo replacement, bounded file downloads, retry caps, streaming multipart replay, and corrected Telegram wire keys.

    Full Changelog: v1.1.0...v1.2.0

    Downloads
  • v1.1.0 f03a081ed6

    1.1.0
    Golang lint / lint (pull_request) Successful in 1m20s
    Golang lint / lint (push) Successful in 4m8s
    Stable

    ScuroNeko released this 2026-08-12 16:34:44 +03:00 | 6 commits to main since this release

    v1.1.0

    Breaking Changes

    • Fixed Uploader.SendLivePhoto and Uploader.SendLivePhotoWithContext to require both the live-photo video and its static image. The previous one-file signatures could not produce a valid sendLivePhoto request.

    Bot API 10.1

    • Added rich message receiving support: tgapi.RichMessage on Message.RichMessage (rich_message), the full set of RichText*/RichBlock* wire types with official API names, and UnmarshalRichText/UnmarshalRichBlock/UnmarshalRichMessage parsers. Unknown text-bearing types retain their nested text through fallback wrappers while unmodeled fields are discarded.
    • Added rich message sending support: tgapi.InputRichMessage, tgapi.SendRichMessage params, and API.SendRichMessage/API.SendRichMessageWithContext.
    • Added rich message draft streaming: API.SendRichMessageDraft/API.SendRichMessageDraftWithContext for ephemeral ~30-second previews of partially generated messages.
    • Added rich message editing: EditMessageText.RichMessage (InputRichMessage); Text is now omitted from the request when empty so rich-only edits are valid.
    • Added tgapi.InputRichMessageContent for rich content in inline query results.
    • Added join request query support: User.SupportsJoinRequestQueries, ChatFullInfo.GuardBot, ChatJoinRequest.QueryID, API.AnswerChatJoinRequestQuery with ChatJoinRequestQueryResult constants (JoinRequestApprove/JoinRequestDecline/JoinRequestQueue), and API.SendChatJoinRequestWebApp (plus WithContext variants).
    • Added poll link media: the tgapi.Link type, PollMedia.Link, and the "link" type with URL on InputPollOptionMedia.

    Bot API 10.2

    • Added block-based rich-message sending with InputRichMessage.Blocks, including animation, audio, photo, video, and voice-note input blocks. The tgrich package provides matching media constructors with optional block captions.
    • Added InputRichMessage.Media for media embedded in rich-message HTML or Markdown, with multipart attach:// upload support.
    • Added multipart rich-message uploads through Uploader.SendRichMessage. Use UploaderFile.SetAttachName to match an attach:// media reference; rich-message draft helpers reject direct uploads as required by Telegram.
    • Added ephemeral-message support: outgoing receiver and callback parameters, reply targets, message fields, edit and delete methods, and ephemeral bot commands. Added community service-message types and subscription update handling.

    Added

    • Added documented tgrich constructors and block types for building input rich messages.
    • Added tgrich.BuildHTML and tgrich.ToHTML to validate input block trees, convert them to HTML rich messages, and collect URL, file_id, or multipart media references.
    • Added MessageContext.RichAnswer(...) and MessageContext.RichAnswerKeyboard(...) for validating and sending tgrich input blocks.
    • Added UpdateTypeSubscription routing and normalized message, user, and chat context for guest messages, deleted business messages, anonymous poll answers, reaction counts, managed bots, chat boosts, and subscription updates.
    • Added webhook secret-format validation and the exported ErrBotWebhookOptsSecretTokenInvalid sentinel.

    Changed

    • AutoGenerateCommandsForScope(nil) now atomically replaces commands in Telegram's default scope without deleting the previous list first.
    • API debug logging now records redacted request JSON and response metadata instead of complete response bodies.
    • Scene updates sharing a user or chat session key are serialized, and duplicate scene names from later plugins are skipped with a warning.
    • Inline keyboard button builders now keep URL and callback actions mutually exclusive, and InlineKeyboard.Get returns independent markup data.
    • NewBot no longer aliases BotOpts.Prefixes or mutates BotOpts.LoggerBasePath.
    • README requirements now match the module's Go 1.26 directive.
    • Migrated the golangci-lint configuration to its v2 schema so the repository lint workflow runs again.
    • Added missing Godoc for exported error methods, enum constants, and all public Bot API 10.1/10.2 fields introduced in this release.

    Fixed

    • Fixed JSON BotOpts environment placeholders corrupting or injecting JSON when values contain quotes, backslashes, or control characters.
    • Preserved checkbox state when converting list items to ordered lists and made generated HTML attribute ordering deterministic.
    • Added validation for rich-block type discriminators, heading sizes, list fields, table cells, map parameters, and media values.
    • Fixed generated webhook secrets using padded Base64 characters that Telegram rejects, stopped logging generated secrets, and added HTTP read and idle timeouts to the webhook server.
    • Fixed negative group and channel IDs receiving global rather than per-chat retry_after cooldowns.
    • Fixed rejected per-chat requests consuming global rate-limit capacity and draft construction consuming an extra rate-limit token before the API request.
    • Fixed subscription updates being decoded as UpdateTypeUnknown.
    • Fixed rich-text and rich-block decoding silently accepting malformed typed fields or a top-level null rich-text value.
    • Fixed tgrich.BuildHTML disabling Telegram entity detection and accepting the draft-only thinking block; BuildDraftHTML now provides the explicit draft path.
    • Fixed tgrich.BuildHTML silently losing explicit bank-card, mention, hashtag, cashtag, and bot-command values when their visible text differs.
    • Fixed API debug logs exposing webhook, payment, callback, passport, and managed-bot secrets.
    • Fixed panics and nil callbacks in asynchronous middleware terminating the process; failures now reach the logger and observer error stream.
    • Fixed multipart helpers attempting direct file uploads for rich-message drafts, which Telegram does not support; they now return ErrRichMessageDraftUploadUnsupported.
    • Fixed draft ID zero values and collisions overwriting tracked drafts, nil draft APIs panicking, and draft entity slices aliasing caller memory.
    • Fixed scene session payloads and returned inline keyboard markup aliasing mutable internal slices.
    • Recovered panics from runner callbacks so they are reported through normal runner and error observer events instead of terminating the process.

    Tests

    • Added JSON regression coverage for rich-message embedded media and ephemeral send, edit, and delete parameters.
    • Added regression coverage for escaped environment placeholders and both required sendLivePhoto multipart fields.
    • Added regression coverage for API log redaction, same-session scene serialization, duplicate scene registration, async middleware failures, and rich entity preservation.
    • Added rich HTML renderer coverage for all input block and media types, multipart references, field validation, and Telegram's text, block, nesting, media, and table-width limits.
    • Added regression coverage for webhook token syntax, update context normalization, subscription routing, rate-limit capacity, draft ID collisions, runner panics, scene and keyboard aliasing, command replacement, and malformed rich JSON.

    Full Changelog: v1.0.2...v1.1.0

    Downloads
  • v1.0.2 38309e74f6

    1.0.2
    Golang lint / lint (push) Successful in 1m40s
    Stable

    ScuroNeko released this 2026-07-08 12:02:38 +03:00 | 5 commits to dev since this release

    v1.0.2

    Fixed

    • Fixed long-polling stopping permanently when the HTTP client's internal timeout fired. The polling loop was checking errors.Is(err, context.DeadlineExceeded), which matched HTTP client timeout errors (*url.Error wraps context.DeadlineExceeded), causing the goroutine to exit as if the bot context was canceled. The check is now ctx.Err() != nil so only a real context cancellation stops polling.
    • Fixed the HTTP client timeout (45 s) being too close to the long-poll getUpdates timeout (30 s default), leaving insufficient margin for connection setup and response transfer. The client timeout is now derived from the configured PollTimeout plus a 60-second buffer.

    What's Changed

    Full Changelog: v1.0.1...v1.0.2

    Downloads
  • v1.0.1 c2f6406819

    1.0.1
    Golang lint / lint (pull_request) Successful in 2m59s
    Golang lint / lint (push) Successful in 2m56s
    Stable

    ScuroNeko released this 2026-06-11 13:34:48 +03:00 | 6 commits to dev since this release

    Fixed

    • Fixed webhook always accepting unauthenticated requests when SecretToken is not configured. A cryptographically random 32-byte token is now generated automatically when SecretToken is empty, so the webhook endpoint is always authenticated. The generated token is logged as a warning so the operator can record it.
    • Fixed tgapi.NewAPI and tgapi.NewUploader not installing token redaction on their managed loggers. The bot token is now masked as <TOKEN> in debug output even when the tgapi package is used standalone without the laniakea.Bot wrapper.

    What's Changed

    • v0.3.10 in #7
    • v0.3.2 in #3

    Contributors

    New Contributors

    Full Changelog: v1.0.0...v1.0.1

    Downloads
  • 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
  • 1.0.0 RC 16
    Golang lint / lint (push) Successful in 2m15s
    Pre-Release

    ScuroNeko released this 2026-04-29 12:31:41 +03:00 | 29 commits to dev since this release

    Breaking Changes

    • Replaced git.scuroneko.dev/scuroneko/slog with git.scuroneko.dev/scuroneko/sneklog/v2 across public logger APIs, including AppDataLogger, logger getters, and custom logger setters.
    • Renamed exported Json, Url, and Id identifiers to idiomatic JSON, URL, and ID spellings, including BotOpts.APIURL, BotOpts.SetAPIURL(...), tgapi.APIOpts.SetAPIURL(...), BotOptsFileJSONCodec, BotPayloadJSON, and related README examples.
    • Made the request logger field internal; use Bot.SetRequestLogger(...) and Bot.GetRequestLogger() instead of accessing Bot.RequestLogger directly.

    Added

    • Added Bot.UpdatesIter(...) as an iterator wrapper around a single Bot.Updates(...) call, including error delivery through the iterator.
    • Added scene-local callback payload handlers through Scene.OnPayload(...), including observer lifecycle events for scene payload execution.
    • Added configurable logger output through BotOpts.LogFormat, BotOpts.SetLogFormat(...), BotOpts.SetLogFormatter(...), tgapi.APIOpts.SetLogFormat(...), and tgapi.APIOpts.SetLogFormatter(...).
    • Added JSON BotOpts file format versioning through ConfigVersion, ErrConfigVersionMismatch, and BotOpts.FileConfigVersion.
    • Added Bot.SetLogger(...), Bot.SetRequestLogger(...), Bot.SetWebHookLogger(...), Bot.GetRequestLogger(), and Bot.GetWebHookLogger() helpers for explicit logger customization.

    Changed

    • Updated pond/v2 to v2.7.1.
    • Bot.RunWithContext(...) now closes an explicitly set request logger when UseRequestLogger is false and closes webhook loggers before long-polling startup.
    • Bot loggers now apply the configured token replacer consistently across the main bot logger, request logger, internal API and uploader loggers, webhook logger, app-data logger writers, and auto-managed plugin loggers.
    • JSON BotOpts files now write version, reject newer unsupported config versions, keep older unversioned files loadable, and preserve the loaded file version in BotOpts.FileConfigVersion.
    • Bot.RunWithContext(...) treats context.DeadlineExceeded like context.Canceled and exits polling without retry logging.
    • README and README_RU now use the current JSON, URL, and ID public API names.

    Fixed

    • Fixed the go-lint workflow file to end with a newline.

    Tests

    • Added regression coverage for Bot.UpdatesIter(...) error delivery and early iterator stop behavior.
    • Added regression coverage proving Bot.RunWithContext(...) preserves polling retry attempts and backoff delays across repeated getUpdates failures.
    • Added regression coverage proving polling startup preserves an enabled request logger.
    • Updated file logger regression coverage for the current sneklog text prefix format.
    • Added regression coverage proving token masking still applies after initLoggers(...) switches loggers to file-backed writers and that auto-managed plugin loggers inherit token masking.
    • Added regression coverage for JSON config version handling and scene-local payload routing, including observer lifecycle events and callback fallthrough behavior.
    • Updated logger helper tests for the explicit log format and formatter parameters.

    Full Changelog: v1.0.0-rc.15...v1.0.0-rc.16

    Downloads
  • 1.0.0 RC 15
    Golang lint / lint (push) Successful in 2m34s
    Pre-Release

    ScuroNeko released this 2026-04-23 22:24:11 +03:00 | 35 commits to dev since this release

    Changed

    • Added file-based BotOpts loading and saving through LoadBotOptsFile(...), SaveBotOptsFile(...), and the BotOptsFileCodec API, with built-in JSON support.
    • Added plugin-level message fallback handlers for text messages and channel posts that do not match commands.
    • Added godoc for the exported BotOpts file codec and load/save helpers.
    • README, README_RU, and bot-configuration wiki pages now document file-based BotOpts loading, built-in JSON support, env placeholder expansion, and custom codec usage including the TOML example.
    • Active scenes now let unmatched slash-commands continue into normal bot command routing instead of also executing the current scene step or scene message fallback.

    Tests

    • Added regression coverage for JSON BotOpts file codecs, file load/save helpers, decode failures, and env placeholder expansion.
    • Added regression coverage for plugin message fallback routing, observer lifecycle events, command precedence, and middleware blocking.
    • Added regression coverage proving unmatched slash-commands do not trigger active scene step handlers before normal bot command routing.

    Full Changelog: v1.0.0-rc.14...v1.0.0-rc.15

    Downloads
  • 1.0.0 RC 14 Pre-Release

    ScuroNeko released this 2026-04-06 16:14:53 +03:00 | 41 commits to dev since this release

    • Added Bot API 9.6 coverage, including managed bots, prepared keyboard buttons, poll updates, poll option reply targeting, and related DTO/method updates.
    • Renamed exported tgapi request parameter structs from the *P suffix to method-shaped names, for example SendMessageP -> SendMessage and SetWebhookP -> SetWebhook.
    • Added MaybeInaccessibleMessage support for Message.PinnedMessage with accessible/inaccessible decoding helpers.
    • Expanded regression coverage for Bot API 9.6 poll decoding, managed_bot updates, structured setChatMenuButton(...) serialization, and MaybeInaccessibleMessage JSON decoding.
    • Added missing godoc for newly introduced Telegram Bot API exported declarations.
    • Updated wiki and tgapi documentation to match the new request-struct naming and current low-level API usage.

    Full Changelog: v1.0.0-rc.13...v1.0.0-rc.14

    Downloads
  • 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
  • 1.0.0 RC 11 Pre-Release

    ScuroNeko released this 2026-03-25 18:20:20 +03:00 | 56 commits to dev since this release

    Fixed

    • chat_boost update decoding now accepts string boost_id values, matching the current Telegram Bot API schema and preventing polling failures on boosted-chat updates.

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

    Downloads