shardwire
Release history for the shardwire npm package (v1.0.0 onward).
This page lists releases for the shardwire package.
npm: shardwire · Also see @shardwire/react if you use the hooks package.
2.0.1
SHARDWIRE_DOCScanonical URLs inpackages/shardwire/src/utils/docs-links.tsnow match the beginner-first docs site (e.g. Troubleshooting, Getting started, reference deep-links for bot/app setup). No change to runtime TypeScript APIs.
2.0.0
- Breaking:
engines.nodeis now>=22.0.0forshardwire(and this repo’s@shardwire/react, website app, and examples). Aligns with nativeglobalThis.WebSocketforconnectBotBridgeand Web Crypto for request IDs; upgrade Node before upgrading the package. - No intentional changes to the public TypeScript API beyond the supported runtime matrix.
1.9.3
Patch release for Vite / browser action calls.
- Request IDs:
createRequestId/createConnectionIdnow useglobalThis.crypto.randomUUIDorgetRandomValuesonly — nonode:cryptoimport — soshardwire/clientbundles no longer pull Node’scryptomodule (fixes Vite externalize / resolve warnings and brokenapp.actions.*in the browser).
1.9.2
Patch release for browser and Vite app bridges.
connectBotBridgenow usesglobalThis.WebSocket(WHATWG) instead of importing thewspackage, so client bundles no longer hit brokenwsbrowser shims (WebSocket is not a constructor).- Node.js 22+ is required for app processes (native
globalThis.WebSocket). See Troubleshooting — Node.js 22+. - Declaration emit: replaced
NodeJS.Timeout/ interval types withReturnType<typeof setTimeout>/setIntervalwhere needed soshardwire/client.d.tsbuilds cleanly.
1.9.1
Patch release for browser bundlers (Vite, and similar) that pre-bundle discord.js optional dependencies such as zlib-sync.
- Added
shardwire/client— same app bridge + DX + workflows + shared types as the root export, without the bot-sidecreateBotBridge/discord.jsgraph. BOT_INTENT_BITS/BotIntentName: derive intent names and bit values fromdiscord-api-typesGatewayIntentBits(aligned withdiscord.js) so catalog and diagnosis code do not need adiscord.jsimport.
1.9.0
Minor release focused on adoption documentation, diagnostics ergonomics, and an optional React companion package.
- Added
formatShardwireDiagnosis(report, options?)andFormatShardwireDiagnosisOptionsfor readable diagnosis output (CI logs, deploy logs, strict-startup failures). - Regenerated reference docs for the new formatter symbols.
- Documentation (historical): incremental adoption guides, recipes (moderation, interactions, analytics, music), operations notes, slash registration guidance, and advanced product notes — the current narrative docs are the smaller set under /docs (Getting started, How it works, Tutorial, Guides, Troubleshooting); deep detail lives in Reference.
- TypeScript: set
ignoreDeprecationsto"6.0"inpackages/shardwire/tsconfig.jsonso declaration emit stays stable on TypeScript 6.x.
1.8.0
Minor release focused on broad Discord surface expansion and release polish.
- Added built-in events:
messageReactionRemoveAll,messageReactionRemoveEmoji,guildUpdate,typingStart, andwebhooksUpdate. - Added built-in actions:
sendDirectMessage,pinMessage,unpinMessage,bulkDeleteMessages,fetchChannel,fetchThread,fetchGuild, andunbanMember. - Added subscription filter keys:
messageId,interactionId, andemoji. - Extended runtime, diagnostics metadata, app action bindings, and generated reference docs to cover the expanded catalog.
- Bumped package version to
1.8.0(semver minor for additive API surface). - Refreshed workspace dependencies to latest compatible versions and verified current GitHub Actions workflow major versions.
- Updated Shardwire skill docs/references/evals to align with the new built-in event/action/filter catalog.
1.7.1
Patch release focused on docs-domain migration polish and publish readiness.
- Removed legacy project-site
/shardwirewebsite base-path assumptions so deployment works from custom-domain root (https://shardwire.js.org/). - Updated canonical docs URL configuration and generated/runtime reference links to the custom domain.
- Updated package and repository homepages/readmes to the new docs domain.
- Updated the Shardwire skill and its reference notes to point to the custom-domain docs routes.
1.7.0
Minor release focused on full voice-surface coverage and publish readiness polish.
- Added built-in event:
voiceStateUpdatewith normalizedBridgeVoiceStatepayloads. - Added built-in actions:
moveMemberVoice,setMemberMute,setMemberDeaf, andsetMemberSuppressed. - Added subscription filter key:
voiceChannelIdforvoiceStateUpdateevent routing. - Extended runtime + diagnostics/catalog metadata to include voice intents, capability discovery, and subscription matching semantics.
- Regenerated reference docs for new voice event/data and action models.
- Updated skill references and docs guidance to include voice event/action/filter coverage.
1.6.1
Patch release: include package metadata in the npm tarball.
- Added
README.mdandLICENSEunderpackages/shardwire/sonpm publishships a readme and license from the package root (the registry page no longer shows “This package does not have a README”).
1.6.0
- Documentation site migrated to Next.js + Fumadocs with generated API reference under
/docs/reference/. - IDE hovers: public exports carry
@seelinks to their reference pages on the docs site. - Added
docsReferenceAbsoluteUrl/ routing helpers inreference-doc-url.ts(kept in sync with the reference generator). - Website changelog page and expanded docs URL map in
SHARDWIRE_DOCS(packages/shardwire/src/utils/docs-links.ts). - TypeScript: set
ignoreDeprecationsto"5.0"so declaration emit (tsupDTS) works on TypeScript 6.x.
1.5.1
Patch release focused on reliability and docs after the docs-site / monorepo migration.
- Fixed reconnect behavior so exponential backoff no longer resets on socket open before auth succeeds.
- Added stable troubleshooting links in runtime and config errors (
See: https://shardwire.js.org/docs/troubleshooting/#…— anchor IDs match headings on the Troubleshooting page). - Added an Errors documentation section with anchor-based remediation for common failures.
- Updated deployment configuration and canonical docs URL handling.
- Hardened CI and publish workflows for the workspace layout and restored docs build checks in CI.
- Aligned workspace formatting with workspace-local ignore rules for generated artifacts.
1.5.0
- Added
defineShardwireApp(...)for a small app manifest: requiredevents/actions, optional per-eventfilters, optionalname(defaults toshardwire-app). The manifest is intentionally not a general config object — keep transport, secrets, intents, and startup policy elsewhere. - Added
generateSecretScope(manifest)to derive minimumSecretPermissions(events/actionslists) for scoped bot secrets. - Added
diagnoseShardwireApp(manifest, negotiated, options?)for structured reports: manifest-required events and actions vs negotiation, manifest-declared filter keys, runtime subscriptions vsmanifest.events/manifest.filters, optionalbotIntents, optionalunused_negotiated_*warnings for extra granted events or actions, and optionalexpectedScope(emitsseverity: 'error'only when negotiation is broader than that explicit maximum).report.okisfalseonly when at least one issue hasseverity: 'error'; warnings never setreport.oktofalse(same rule as strict startup). - Added strict startup:
await app.ready({ strict: true, manifest, botIntents?, expectedScope? })runs diagnosis after authentication and throwsShardwireStrictStartupErroronseverity: 'error'issues only (not onunused_negotiated_*warnings);botIntentsis required in strict mode when manifest events require gateway intents. - Exported
ShardwireStrictStartupErroralongside existing bridge errors. - Updated examples to use manifests,
generateSecretScope(scoped botallowin production-style samples),app.ready({ strict: true, botIntents }), andapp.explainCapability/app.preflightwhere relevant. - Diagnosis contract rules: runtime
subscriptionsmust targetmanifest.events, and any subscriptionfilterkeys must be declared undermanifest.filtersfor that event. Filter viability checks apply only to manifest-declared keys. Surplus negotiation isunused_negotiated_*warnings only;expectedScopeis the explicit opt-in for hard failures on “too broad.” - Filter diagnosis semantics:
filter_key_never_populatedrenamed tofilter_key_absent_from_event_metadata— only when a catalog key is never supplied on the bridge’s subscription-matching metadata for that event (structurally impossible to match). Narrow filters that merely match infrequently are out of scope.EVENT_SUBSCRIPTION_METADATA_KEYSreplacesSUBSCRIPTION_FILTER_KEYS_POPULATED_BY_EVENT(the old name remains as a deprecated alias).
1.4.5
- Added
app.catalog()for static discovery of built-in events (with intent hints), actions, and subscription filter keys. - Added
app.explainCapability(...)to inspect whether an event or action is built-in and allowed by the current negotiated bridge. - Added
app.preflight(desired?)for startup diagnostics (connection, transport hints, desired vs negotiated capabilities, subscription mismatches) without throwing on capability issues alone. - Added structured
detailsonFORBIDDENaction results when an action is not in negotiated capabilities;BridgeCapabilityErrornow carries optionaldetails(includingrequiredIntentsfor disallowed event subscriptions). - Exported
getShardwireCatalog()for the same static catalog without an app instance. - Added workflow helpers:
deferThenEditInteractionReply,deferUpdateThenEditInteractionReply, andcreateThreadThenSendMessage.
1.4.0
- Added built-in events:
channelCreate,channelUpdate,channelDelete, andmessageBulkDelete. - Added built-in actions:
timeoutMember,removeMemberTimeout,createChannel,editChannel,deleteChannel,createThread, andarchiveThread. - Extended subscription filters with
channelType,parentChannelId, andthreadId(plus richer message and interaction metadata:channelTypeandparentChannelIdonBridgeMessage,BridgeDeletedMessage, andBridgeInteractionwhen the runtime resolves the channel).
1.3.0
- Added
check:changelogscript and wired it intoverifyand the publish workflow so the current package version cannot remain marked(unreleased)in the root changelog file. - Replaced a broken
SECURITY.mdREADME link with in-README vulnerability reporting and secret rotation guidance. - Added startup lifecycle documentation and expanded transport, idempotency, and metrics notes in the README.
- Added optional bridge
server.idempotencyScope(connection|secret) andserver.idempotencyTtlMsfor cross-connection idempotent retries. - Surfaced Discord rate-limit
retry_afterasdetails.retryAfterMsonSERVICE_UNAVAILABLEfailures and forwardeddiscordStatus,discordCode, andretryAfterMstometrics.onActionCompletewhen present. - Added integration coverage for secret-scoped idempotency, action queue timeouts, interaction and read actions,
maxPayloadBytesenforcement, andDiscordAPIError429 mapping. - Added operational documentation and production-style examples with matching npm scripts.
1.2.0
- Added built-in events:
guildCreate,guildDelete,guildMemberUpdate,threadCreate,threadUpdate, andthreadDelete. - Added subscription filters for
interactionCreate:customIdandinteractionKind. - Added interaction lifecycle actions:
deferUpdateInteraction,editInteractionReply,deleteInteractionReply,updateInteraction, andshowModal. - Added query and read actions:
fetchMessageandfetchMember. - Expanded message input and payload normalization with component support and richer send and edit parity fields.
- Added best-effort action idempotency via
idempotencyKeyon app action calls. - Added bridge-side action backpressure controls:
server.maxConcurrentActionsandserver.actionQueueTimeoutMs. - Added bridge-side connection and authentication safeguards:
server.maxConnectionsand auth rate limiting. - Added optional app metrics hook (
metrics.onActionComplete) and richer structured action and error details. - Added shard-aware event envelopes by populating
shardIdwhen available. - Strengthened release and CI quality gates with lint and coverage in
verify, Node version alignment, changelog and version checks, and npm provenance publishing.
1.1.0
- Added
messageReactionAddandmessageReactionRemovebuilt-in events, including normalized reaction payload types and subscription filtering support. - Added
addMessageReactionandremoveOwnMessageReactionbuilt-in app actions with runtime support in the defaultdiscord.jsadapter. - Expanded Discord alignment by deriving supported bot intent names from
discord.jsGatewayIntentBitsand usingdiscord.jsEventsconstants for runtime event binding. - Improved action error mapping in the
discord.jsruntime adapter so Discord API failures are surfaced as structuredFORBIDDEN,NOT_FOUND, andINVALID_REQUESTresults where applicable. - Updated event capability gating so
interactionCreateis available without requiring theGuildsintent. - Removed unused secret-scope helper exports and fixed app capability validation when negotiated event capabilities are empty.
- Updated README, examples, and integration references for reaction intents, events, actions, and current intent requirements.
1.0.0
- Breaking: Replaced the generic host and consumer WebSocket bridge API with a Discord-first public API centered on
createBotBridge(...)andconnectBotBridge(...). - Breaking: Removed the public generic command and event abstractions, schema adapter exports, and legacy host and consumer examples from the package surface.
- Added built-in Discord event streaming for
ready,interactionCreate,messageCreate,messageUpdate,messageDelete,guildMemberAdd, andguildMemberRemove. - Added built-in app action APIs for messaging, interaction replies, deferrals, follow-ups, moderation, and member role changes.
- Added negotiated bridge capabilities based on bot intents and optional scoped secrets.
- Added app-driven event subscriptions with optional
guildId,channelId,userId, andcommandNamefilters. - Added a token-first Discord runtime with normalized JSON payload types backed by internal
discord.jsintegration. - Removed Discord interaction callback tokens from serialized
BridgeInteractionpayloads sent to apps. - Tightened secret handling to reject duplicate configured secret values and ambiguous value-only authentication matches.
- Replaced package examples, tests, and skill metadata to match the Discord-first direction.