Automatic nightly build of main. It can include breaking changes at any time
Major Changes
Align the SDK with Fluxer commit 75781bf9. Breaking changes, each with the code it affects and how to migrate:
OAuthAuthorization["application"]removesflagsbecause Fluxer removedapplication.flagsfromGET /oauth2/@meand now populatesiconanddescriptionfrom the application's bot profile Affected: Code that readsauthorization.application.flagsor constructsOAuthAuthorizationfixtures withflagsMigration: Remove reads and fixture fields forapplication.flagsOAuthIdentitymakesavatarColor,isBotandisSystemrequired (avatarColor: number | null,isBot: boolean,isSystem: boolean), and OAuth response decoding now requiresavatar_color,botandsystemfromGET /oauth2/userinfoandGET /oauth2/@meAffected: Code or test fixtures constructingOAuthIdentityvalues or mock OAuth responses withoutavatar_color,botorsystemMigration: IncludeavatarColor,isBotandisSystemon fixtures andavatar_color,botandsystemin mock responses- The
presenceUpdateBulkevent,PresenceUpdateBulktype andGatewayDispatchPayloads["PRESENCE_UPDATE_BULK"]are removed because Fluxer removedPRESENCE_UPDATE_BULKfrom its gateway and documentation Affected: Code that subscribes topresenceUpdateBulk, importsPresenceUpdateBulkor narrows raw dispatches onPRESENCE_UPDATE_BULKMigration: Subscribe topresenceUpdateinstead and removePresenceUpdateBulkimports and handlers GatewayDispatchPayloadsandRawDispatchEventadd"OPERATOR_PASS_UPDATE"and makeGatewayDispatchPayloads["GUILD_MEMBER_LIST_UPDATE"]["channel_id"]required (stringinstead ofstring | undefined) to match Fluxer's updated gateway documentation Affected: Exhaustiveswitchstatements over documentedrawdispatch types and typed fixtures constructingGUILD_MEMBER_LIST_UPDATEpayloads withoutchannel_idMigration: Handle"OPERATOR_PASS_UPDATE"(or a default branch) in exhaustive raw dispatch switches and supplychannel_idin typedGUILD_MEMBER_LIST_UPDATEfixturesRestRoutes["POST /channels/{channel_id}/typing"]widens its response type fromundefinedtoTypingCooldownResponse | undefinedto match Fluxer's controller and OpenAPI description Affected: Code callingPOST /channels/{channel_id}/typingthroughclient.rest.callthat assignsresponse.bodytoundefinedwithout narrowing Migration: Narrowresponse.bodywhen callingPOST /channels/{channel_id}/typingthroughclient.rest.call- Non-breaking parity updates, which need no change: Optional embed fields (
url,author.url,author.iconUrl,footer.iconUrl,image.description,thumbnail.description) and webhook message overrides (username,avatarUrl) now accept exact""and send it as given to match Fluxer'somitEmptyStringpreprocessing while still rejecting whitespace-only strings andtimestamp: ""on non-webhook-edit routes, gateway close code4003beforeREADYorRESUMEDnow retries cleanly while preserving Resume state instead of failing the shard permanently while post-readiness4003closes remain fatal, and generated REST route types, documentedGUILD_HEALTH_UPDATEandREADY.geoip_country_coderaw payload types and opcode 12 voice refusal documentation match Fluxer commit75781bf9
Public interface additions and type refinements for callers implementing or faking SDK interfaces, each with the code it affects and how to migrate:
Client(both default and Effect APIs) adds requiredvoice: VoiceandonMany(events, handler, options?)Affected: Code that implements or fakes theClientinterface Migration: ImplementvoiceandonManyon customClientfakes, or usecreateTestClientfrom@neontechspace/fluxerly/testingor@neontechspace/fluxerly/effect/testingCurrentBotApplicationadds requiredfetchPublic(applicationId, options?), andBotApplicationOperationadds"application.fetchPublic"Affected: Code that implements or fakesCurrentBotApplication, or switches exhaustively overBotApplicationOperationMigration: ImplementfetchPublicon customCurrentBotApplicationfakes and handle"application.fetchPublic"inBotApplicationOperationswitchesGatewayCommandsadds requiredfetchBot(options?)Affected: Code that implements or fakesGatewayCommandsMigration: ImplementfetchBoton customGatewayCommandsfakesMessagesadds requiredconfirm(channelId, input, options), andPrefixCommandContextandNativePrefixCommandContextadd requiredconfirm(input, options?)Affected: Code that implements or fakesMessagesor constructs command context objects directly Migration: Implementconfirmon customMessagesfakes and command context fixturesOAuthClientadds requiredrequest(accessToken, input, options?),oauthaddscreateState(), andOAuthOperationadds"oauth.request"Affected: Code that implements or fakesOAuthClientor switches exhaustively overOAuthOperationMigration: Implementrequeston customOAuthClientfakes and handle"oauth.request"inOAuthOperationswitchesRolesadds requiredfetchCanManage(role, options?), andGuildOperationadds"roles.fetchCanManage"Affected: Code that implements or fakesRolesor switches exhaustively overGuildOperationMigration: ImplementfetchCanManageon customRolesfakes and handle"roles.fetchCanManage"inGuildOperationswitchesScheduledTaskin the default API adds required[Symbol.dispose]()(Disposable) Affected: Code that implements or fakesScheduledTaskMigration: Add[Symbol.dispose]()delegating toclose()on customScheduledTaskfakesGuardsadds requiredrequireBotPermissions,requireRoles,guildOwnerOnlyandcanManage, and built-in community guards returnBuiltInCommandGuard<GuildMessageRefinement>narrowingcontext.message.guildIdtostringAffected: Code that implements or fakesGuardsor assigns a built-in guard to a custom invariant signature incompatible withBuiltInCommandGuardMigration: Implement the four new guard factories on customGuardsfakes and type custom guard variables withPrefixCommandGuardorBuiltInCommandGuardEventMap,EventNameandEventInvocationadd"threadMemberUpdate","voiceServerUpdate"and"voiceSignal",OperationaddsGatewayOperation,VoiceOperation,"onMany"and"confirm",DefectReasonaddsGatewayOperationErrorandVoiceError,ConfigurationError["field"]adds"confirmOptions","approveEmoji","cancelEmoji","includeRemovals","embed"and"tts", andNotFoundResourceadds"ban"Affected: Exhaustiveswitchstatements or mapped records overEventName,EventInvocation,Operation,DefectReason,ConfigurationError["field"]orNotFoundResourceMigration: Handle"threadMemberUpdate","voiceServerUpdate"and"voiceSignal"in exhaustive event switches,GatewayOperation,VoiceOperation,"onMany"and"confirm"in exhaustive operation switches,GatewayOperationErrorandVoiceErrorin exhaustive defect switches, the newConfigurationError["field"]literals in exhaustive field switches, and"ban"in exhaustiveNotFoundResourceswitchesPermissionBitHelpersadds requiredoverwrite(input), andHelperError["operation"]adds"permissionBits.overwrite"and"format.escapeMarkdown"Affected: Code that implements or fakesPermissionBitHelpersor switches exhaustively overHelperError["operation"]Migration: Implementoverwriteon customPermissionBitHelpersfakes and handle"permissionBits.overwrite"and"format.escapeMarkdown"in exhaustiveHelperErrorswitchesFixtures(both@neontechspace/fluxerly/testingand@neontechspace/fluxerly/effect/testing) adds requiredvoiceServerUpdate(overrides?)andvoiceSignal(overrides?)Affected: Code that implements or fakes theFixturesinterface Migration: ImplementvoiceServerUpdateandvoiceSignalon customFixturesfakes, or use the fixtures returned bycreateTestClientorcreateTestBot- The
format.escapeMarkdownhelper validates its input and throwsHelperErrorwhen passed a non-string value Affected: Code that passed non-string values toformat.escapeMarkdownMigration: Pass a string toformat.escapeMarkdown
Minor Changes
Add typed gateway voice signaling, multi-event ordered queues, new Fluxer API helpers, command/builder/collector upgrades and expanded CLI options:
- Gateway voice signaling: Add engine-agnostic
client.voice(join,leave,updateState) sending opcode 4 on each community's owning shard across default and Effect APIs, decode typedvoiceServerUpdateandvoiceSignalevents while keepinggateway.ignoredEvents: "auto"active, mask voice tokens,e2eeKeyand ICE credentials in logs and error reports, exportVoiceError, and add voice fixtures to both testing entry points - Multi-event ordered queues: Add
client.onMany(events, handler, { partition })to feed multiple event types into one shared bounded per-key ordered queue with atomic subscription closure and automatic gateway ignore tracking - New Fluxer operations and helpers: Emit typed
threadMemberUpdatefromTHREAD_MEMBER_UPDATE, addclient.gateway.fetchBot,client.application.fetchPublic,oauth.createState,oauthClient.request(reusing OAuth discovery, budgets and secret masking),client.roles.fetchCanManagewith opt-inpreferCacheon both role and member hierarchy checks,GatewayOperationError, andpermissionBits.overwrite({ id, type, allow?, deny? }) - Command router and guard upgrades: Narrow
context.message.guildIdtostringacrossafterParse,cooldown.keyandexecutefor built-in community guards, add the post-parseafterParseguard stage, addguards.requireBotPermissions,guards.requireRoles,guards.guildOwnerOnlyandguards.canManage(argumentName, options?), add argumentdefaultontext,boolean,choiceandcustom, addchoicecaseInsensitiveandtextminLength/maxLength, add focused single-commandhelp({ command }), and add reaction-based confirmation prompts viaclient.messages.confirmand command contextconfirm - Builder and collector ergonomics: Accept ready
MessageBuilderinstances directly inmessages.send,messages.reply,directMessages.send,webhookClient.sendand handlerreply, add.tts(),.nonce(),.suppressEmbeds(),.suppressNotifications()and dynamic array spreads foraddEmbedsonMessageBuilder, addEmbedBuilder.from,.clone()and string shorthands.image(url),.thumbnail(url)and.footer(text), and support emoji arrays and opt-inincludeRemovalsonReactionCollector - Errors, disposal and helpers: Add
Symbol.disposetoScheduledTask, adderrors.isNotFound(error, "ban")forUNKNOWN_BAN, unwrap EffectCausevalues inerrors.apiCodeanderrors.isNotFound, tightenerrors.matchto return a non-undefined result when_is supplied, expose structuredrequiredPermissionson sensitive member-search rejections, and allowundefinedguildIdin direct-messagelinks.channelandlinks.messagehelpers - CLI improvements: Support subcommand
--helpand--flag=valuesyntax acrossfluxerly init,agents,doctor,triageandinvite, write all supported targets onfluxerly agents --target all, add--dir <folder>tofluxerly doctor, and add--instance <url>tofluxerly invite
- Gateway voice signaling: Add engine-agnostic
Patch Changes
Fix SDK runtime bugs, timer and listener leaks, redundant REST reads, error hints and CLI diagnostics:
- Keep
InstanceResolver.resolveretries interruptible with one shared strictRetry-Afterparser, and use logical capped timers, EffectClockpropagation and distinct timeout-versus-abort handling in attachment downloads - Fix gateway frame validation paths for invalid dispatch sequences and duplicate
READYframes, freePresenceOwnercommunity quota on clear while keeping bounded resume-clear tombstones, and switch the rate-limit alias cache to true LRU with expired-first sweeps andstream_keymajor-parameter extraction - Abort supervisor child signals on protocol failure, detach
forwardLinesdrain listeners on close and keep child error listeners attached - Hoist member-search
ManageGuildchecks per traversal, parallelize independent permission fetches, attributeWebhookClient.fetchMessageroutes statically, remove unresolvedretryAfterMsand0 msplaceholders from error hints, and hardenfluxerly doctor.gitignoreand JSONC parsing
- Keep