Skip to content

feat: add @wolfstar/plugin-gateway with GatewayClient - #93

Merged
RedStar071 merged 7 commits into
mainfrom
feat/plugin-gateway
Sep 25, 2026
Merged

RedStar071 merged 7 commits into
mainfrom
feat/plugin-gateway

Conversation

@RedStar071

Copy link
Copy Markdown
Member

Stacked on #92.

🔗 Linked issue

Resolves #54

🧭 Context

@wolfstar/http-framework only talks to Discord through the interactions endpoint, so a bot has no way to react to MESSAGE_CREATE, member updates, or anything else that only exists on the gateway. Today that means pulling in a second framework or hand-rolling a WebSocket client. The RFC in #54 proposes a GatewayClient that extends Client rather than wrapping it, so existing commands, handlers, load() and listen() keep working unchanged.

📚 Description

@wolfstar/plugin-gateway wraps @discordjs/ws for the connection. Every dispatch goes into the optional cache from #92, and the matching event is emitted with Structures instead of raw JSON. Dispatch-to-event mapping is a single declarative table (DispatchHandlers), type-checked against GatewayEventMap, per the RFC's point about not hand-writing a switch per event.

The biggest deviation from the RFC: it planned to extend @discordjs/structures, but that package is only published as dev snapshots, requires Node 24.17, and doesn't export kData/kPatch. The RFC's own User extends Structure snippet can't compile against it, and there's no Guild or GuildMember yet. So the package ships a small Structure base modelled on theirs, with the symbols exported so it can be subclassed. Worth revisiting once theirs reaches 1.0.

How I answered the RFC's open problems:

  • emitter: 'client' works as-is: the base Client sets container.client = this in its constructor.
  • RegisterAsGatewayListener copies the constructor-wrapping mechanism of RegisterAsSubcommand.
  • INTERACTION_CREATE is dropped unconditionally. It still shows up in the raw event.
  • Dispatches are queued per shard, otherwise an async cache like Redis could emit an update before the create it follows.
  • Single-process sharding only. WorkerShardingStrategy can be passed through gateway.buildStrategy, but I haven't tried it.
  • Naming stayed GatewayClient. Shard options follow @discordjs/ws (shardCount, shardIds) instead of the RFC's shards: number | number[] | 'auto', which was ambiguous about the total count.

Left open: interaction handlers still read the raw interaction payload and don't go through client.users. Same for the question of whether these packages belong in stars-components instead.

Key changes

Export What it does
GatewayClient Client + gateway connection, connect() / destroy()
users, guilds, channels, threads, messages, members, roles Managers: get (cache), fetch (cache then REST), refresh (REST)
User, Guild, Channel, Message, GuildMember, Role Structures on top of Structure / kData / kPatch / kClone
EventGatewayListener, RegisterAsGatewayListener File-based listener pieces for gateway events, with once

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation change
  • Workflow / CI change

Pre-flight Checklist

  • I have read the Contributing Guidelines (if applicable)
  • My code follows the code style of this project
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly
  • I added a changeset with pnpm changeset (or pnpm changeset add --empty if no release is needed). See .changeset/README.md.

🤖 AI disclosure: Wolfstar Agent Kit modified this description. My AI open-source policy.

@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

◈ PR Lens

PR Lens paused analysis for this repository — the fair-use limit was reached. It resumes automatically at 2026-09-25T18:00:00.000Z.

@gitguardian

gitguardian Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
37555854 Triggered Generic High Entropy Secret 675bbdc packages/plugin-gateway/tests/EventGatewayListener.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@socket-security

socket-security Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​discordjs/​structures@​1.0.0-dev.1790035407-dbb749062991009398100
Added@​discordjs/​ws@​2.0.49910010098100

View full report

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

One correctness bug found in the manager/cache layer, otherwise this is a clean, well-tested addition.

Reviewed changes

Reviewed the full diff adding @wolfstar/plugin-gateway: GatewayClient (wraps @discordjs/ws, per-shard dispatch queue, handleDispatch), the declarative DispatchHandlers table, seven CachedManager-based entity managers, six Structure-based wrappers (User, Guild, Channel, Message, GuildMember, Role), EventGatewayListener/RegisterAsGatewayListener, tests, README, package scaffolding, and workspace wiring (labeler/labels/changeset/root README).

  • GatewayClient: connects to the gateway, serializes dispatches per shard through a queue so an async cache can't reorder them, writes every dispatch to the optional cache, then emits the mapped event.
  • DispatchHandlers: a single table mapping each GatewayDispatchEvents entry to a before (pre-cache-write, reads old state) / build (post-cache-write, constructs event args) pair — verified the ordering is correct and every GatewayEventMap tuple shape matches what build actually returns.
  • Managers: CachedManager base with get/fetch/refresh semantics; ChannelManager and ThreadManager share the same REST route (Routes.channel) for two different cache buckets — see the inline comment.
  • Structures: thin wrappers around raw API data via kData/kPatch/kClone, modelled on @discordjs/structures since that package isn't usable yet (documented rationale in the README).
  • Verified the discordToken non-null assertion in GatewayClient's constructor against the installed @wolfstar/[email protected] build: the base Client already throws on an empty token and scrubs it from this.options, so it's safe.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using Claude Sonnet | 𝕏

@RedStar071 RedStar071 changed the title feat(plugin-gateway): add GatewayClient with gateway events feat: add @wolfstar/plugin-gateway with GatewayClient Sep 23, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@wolfstar/plugin-api

pnpm add https://pkg.pr.new/wolfstar-project/plugins/@wolfstar/plugin-api@93

@wolfstar/plugin-cache

pnpm add https://pkg.pr.new/wolfstar-project/plugins/@wolfstar/plugin-cache@93

@wolfstar/plugin-gateway

pnpm add https://pkg.pr.new/wolfstar-project/plugins/@wolfstar/plugin-gateway@93

@wolfstar/plugin-i18next

pnpm add https://pkg.pr.new/wolfstar-project/plugins/@wolfstar/plugin-i18next@93

@wolfstar/plugin-logger

pnpm add https://pkg.pr.new/wolfstar-project/plugins/@wolfstar/plugin-logger@93

@wolfstar/plugin-subcommands-advanced

pnpm add https://pkg.pr.new/wolfstar-project/plugins/@wolfstar/plugin-subcommands-advanced@93

commit: 7ebe6c5

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — minor suggestions inline.

Reviewed changes

Reviewed commit b58df16, a large restructure since the last Pullfrog review: flattened src/lib/* → src/*, and replaced the flat channel structure with a mixin-composed per-channel-type system.

  • Confirmed the previously flagged bug (ChannelManager.fetch()/refresh() mis-caching thread data into the "channels" bucket) is fixed: refresh() now checks channel.isThread() and routes the cache write to client.cache.threads vs client.cache.channels accordingly, with a regression test asserting the correct bucket. Resolved the thread.
  • Verified createChannel()'s dispatch switch covers all 12 concrete channel types plus a BaseChannel fallback, and that structures/index.ts/structures/mixins/index.ts barrel exports are complete.
  • Verified Mixin()'s prototype-copy precedence (target wins, earlier mixin wins over later) against its dedicated test, and that the new .oxlintrc.json declaration-merging override is scoped correctly to structures/**.
  • Cross-checked every mixin composition list (Mixin(X, [...])) against the actual fields in [email protected]'s vendored .d.ts for the corresponding APIXChannel type — found two channel types that are missing a slowmode getter their underlying API payload actually carries (see inline comments).
  • Spot-checked GatewayClient.ts, CachedManager.ts, util/decorators.ts, util/dispatch.ts, util/events.ts, util/container.ts, util/cache.ts, util/cdn.ts, EventGatewayListener.ts, exports/rest.ts/exports/ws.ts, package.json, .oxlintrc.json, root/package-gateway README, .changeset, .github/labeler.yml/labels.yml, tsconfig.json, tsdown.config.ts, all remaining structure and mixin files, and both test files — all consistent with the refactor, no regressions from the prior review.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using Claude Sonnet | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

One dependency/engines inconsistency to fix, plus an architectural question worth discussing before this grows further.

Reviewed changes

Reviewed commit a06592f, which pivots @wolfstar/plugin-gateway's Structure base to actually extend @discordjs/structures' private BaseStructure (via shared Symbol.for("djs.structures.data"/"patch"/"clone") registry keys) instead of hand-rolling it, and adds a cluster of supporting pieces:

  • Structure.ts: rewritten to extend @discordjs/structures' Structure through the well-known symbol trick, since that package's kData/kPatch/kClone symbols aren't exported. Installed the real dev-preview dependency and ran the full plugin-gateway test suite against it (45/45 passing) to confirm the symbol keys actually line up with the installed package rather than trusting the pattern on inspection alone.
  • Role.ts: now declares a DataTemplate/Omitted/Partialize<Data, Omitted> triple, matching the convention every @discordjs/structures subclass follows upstream — correct pattern, currently applied to only one structure (see inline nit).
  • New Typing.ts structure and TYPING_START dispatch/event wiring — cross-checked GatewayTypingStartDispatchData.member and the GuildMember construction against the vendored [email protected] payload shapes, looks correct.
  • New flags.ts / PermissionsBitField.ts / bitfield.test.ts: a bigint-backed BitField wrapper (NumberFlagsBitField) coercing 32-bit flag enums to bigint, again modelled on @discordjs/structures's BitField.
  • New messages.ts, events.ts additions, events.test.ts, package.json/pnpm-lock.yaml updates.
  • Confirmed pnpm build (tsdown + attw + publint) and pnpm lint (oxlint/oxfmt) both pass clean on the new code.
  • The previously open review threads on AnnouncementChannel.ts and ForumChannel.ts (slowmode mixin gaps) are on files untouched by this commit, so they're left open rather than retired.

⚠️ Hand-rolled channel/mixin system now duplicates what @discordjs/structures already ships

Now that @discordjs/structures is a real runtime dependency (not just a documented rationale for why it "isn't usable yet"), it already ships fully-built AnnouncementChannel, TextChannel, ForumChannel, MediaChannel, DMChannel, CategoryChannel, StageChannel, VoiceChannel, GroupDMChannel, and thread channel classes, plus the same-named mixins (Mixin(), ChannelSlowmodeMixin, etc.) that packages/plugin-gateway/src/structures/* hand-rolls independently.

Technical details

Two concrete signals that these have drifted apart rather than merely being parallel implementations:

  • Upstream's AnnouncementChannel already composes ChannelSlowmodeMixin — exactly the gap flagged as still-open in review thread PRRT_kwDOTNxric6lkENa on wolfstar's own AnnouncementChannel.ts. Building on the dependency instead would have gotten this for free.
  • Upstream's ForumChannel/MediaChannel do not compose a slowmode mixin either, so that half of the open nit (thread PRRT_kwDOTNxric6lkENe) isn't unique to wolfstar's implementation — it's a gap shared with upstream.

This isn't a request to rewrite the channel/mixin layer in this PR — the Structure base pivot alone is a meaningful, well-tested step. But worth deciding deliberately: continue hand-rolling Channel subclasses/mixins that duplicate (and can silently diverge from) what the dependency already provides, or migrate to importing them directly now that the package is pulled in for real? Since Guild/GuildMember aren't shipped upstream, a full migration isn't a drop-in win — but the channel side looks like it could be.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using Claude Sonnet | 𝕏

Comment thread packages/plugin-gateway/package.json Resolved
Comment thread packages/plugin-gateway/README.md Resolved
@RedStar071
RedStar071 added this pull request to stack #96 September 24, 2026 14:56
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
151 4 147 0
View the top 3 failed test(s) by shortest run time
packages/plugin-gateway/tests/EventGatewayListener.test.ts > packages/plugin-gateway/tests/EventGatewayListener.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@wolfstar/plugin-cache". The package may have incorrect main/module/exports specified in its package.json.
  Plugin: vite:import-analysis
  File: .../plugin-gateway/src/GatewayClient.ts:8:49
  5  |  } from "@discordjs/ws";
  6  |  import { Client, container } from "@wolfstar/http-framework";
  7  |  import { applyGatewayDispatch } from "@wolfstar/plugin-cache";
     |                                        ^
  8  |  import {
  9  |    GatewayDispatchEvents
 ❯ packageEntryFailure node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16198:15
 ❯ resolvePackageEntry node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16195:3
 ❯ tryNodeResolve node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16060:18
 ❯ ResolveIdContext.resolveId node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:15831:19
 ❯ EnvironmentPluginContainer.resolveId node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:42372:17
 ❯ TransformPluginContext.resolve node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:42579:15
 ❯ normalizeUrl node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:40622:26
 ❯ node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:40753:37
packages/plugin-gateway/tests/GatewayClient.test.ts > packages/plugin-gateway/tests/GatewayClient.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@wolfstar/plugin-cache". The package may have incorrect main/module/exports specified in its package.json.
  Plugin: vite:import-analysis
  File: .../plugin-gateway/tests/GatewayClient.test.ts:3:48
  2  |  import { WebSocketShardEvents } from "@discordjs/ws";
  3  |  import { container } from "@wolfstar/http-framework";
  4  |  import { createInMemoryCache } from "@wolfstar/plugin-cache";
     |                                       ^
  5  |  import {
  6  |    ChannelType,
 ❯ packageEntryFailure node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16198:15
 ❯ resolvePackageEntry node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16195:3
 ❯ tryNodeResolve node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16060:18
 ❯ ResolveIdContext.resolveId node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:15831:19
 ❯ EnvironmentPluginContainer.resolveId node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:42372:17
 ❯ TransformPluginContext.resolve node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:42579:15
 ❯ normalizeUrl node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:40622:26
 ❯ node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:40753:37
packages/plugin-gateway/tests/events.test.ts > packages/plugin-gateway/tests/events.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@wolfstar/plugin-cache". The package may have incorrect main/module/exports specified in its package.json.
  Plugin: vite:import-analysis
  File: .../plugin-gateway/tests/events.test.ts:2:36
  1  |  "use strict";
  2  |  import { WebSocketShardEvents } from "@discordjs/ws";
  3  |  import { createInMemoryCache } from "@wolfstar/plugin-cache";
     |                                       ^
  4  |  import {
  5  |    GatewayDispatchEvents,
 ❯ packageEntryFailure node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16198:15
 ❯ resolvePackageEntry node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16195:3
 ❯ tryNodeResolve node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16060:18
 ❯ ResolveIdContext.resolveId node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:15831:19
 ❯ EnvironmentPluginContainer.resolveId node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:42372:17
 ❯ TransformPluginContext.resolve node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:42579:15
 ❯ normalizeUrl node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:40622:26
 ❯ node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:40753:37
packages/plugin-gateway/tests/structures.test.ts > packages/plugin-gateway/tests/structures.test.ts
Stack Traces | 0s run time
Error: Failed to resolve entry for package "@wolfstar/plugin-cache". The package may have incorrect main/module/exports specified in its package.json.
  Plugin: vite:import-analysis
  File: .../plugin-gateway/src/GatewayClient.ts:8:49
  5  |  } from "@discordjs/ws";
  6  |  import { Client, container } from "@wolfstar/http-framework";
  7  |  import { applyGatewayDispatch } from "@wolfstar/plugin-cache";
     |                                        ^
  8  |  import {
  9  |    GatewayDispatchEvents
 ❯ packageEntryFailure node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16198:15
 ❯ resolvePackageEntry node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16195:3
 ❯ tryNodeResolve node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:16060:18
 ❯ ResolveIdContext.resolveId node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:15831:19
 ❯ EnvironmentPluginContainer.resolveId node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:42372:17
 ❯ TransformPluginContext.resolve node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:42579:15
 ❯ normalizeUrl node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:40622:26
 ❯ node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]..../node/chunks/dep-Dm0c1Wj2.js:40753:37

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues — this round is a single test-infrastructure fix, verified by running the suite.

Reviewed changes

Reviewed the one commit since the last Pullfrog review (9a68506), which resolves @wolfstar/plugin-cache to its sources in the shared Vitest config.

  • Added a @wolfstar/plugin-cache alias to root vitest.config.ts: an anchored regex (/^@wolfstar\/plugin-cache$/) now redirects the bare specifier to packages/plugin-cache/src/index.ts instead of its built dist/esm output, so plugin-gateway's tests exercise the cache package's current source instead of depending on a prior build step.
  • Confirmed the fix does what it claims: ran plugin-gateway's suite against a workspace with packages/plugin-cache/dist/ absent (unbuilt) — all 5 test files / 45 tests passed, where they previously failed with "Failed to resolve entry for package". plugin-cache's own suite (23 tests) is unaffected. The regex is anchored to the exact bare specifier and plugin-cache only ships a single "." export, so there's no subpath-import case this alias misses.

Pullfrog  | Fix it ➔ | View workflow run | Using Claude Sonnet | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues — this round is a small dependency-alignment chore, verified against the real upstream changelog and the installed package's types rather than taken on faith.

Reviewed changes

Reviewed commit d556ca1 — the only genuinely new commit since the last review; the base branch (feat/plugin-cache) was rebased forward in between, which rewrote every other commit's SHA without changing its content (confirmed via git diff --stat against the previous review's commit).

  • packages/plugin-gateway/package.json bumps the @wolfstar/http-framework devDependency ^3.4.0 → ^5.1.0 and widens the peerDependencies range to "^3.4.0 || ^5.0.0" (pnpm-lock.yaml updated to match).
  • Checked this against the real upstream changelog (wolfstar-project/stars-components/packages/http-framework/CHANGELOG.md) for every major crossed: 4.0.0 only changes CLI/build-tooling defaults; 5.0.0 adds Client#fetch() (additive) and removes/replaces the /fetch submodule and /config's ConfigError — both confirmed absent from plugin-gateway's imports via grep; 5.1.0 splits stars.config loading into a new package, re-exported unchanged.
  • Cross-checked the installed @wolfstar/[email protected] build's .d.ts directly: every surface GatewayClient depends on (Client extends AsyncEventEmitter<MappedClientEvents>, ClientOptions.discordToken, readonly logger: ILogger, load(), listen()) is unchanged and marked @since 3.4.0.
  • The engines.node field on the same package.json (still ">=20.0.0", the open thread below) was untouched by this commit.

The 5 threads from prior rounds remain open — none of their files (AnnouncementChannel.ts, ForumChannel.ts, package.json's engines block, README.md, Role.ts) were touched by this commit, so they carry forward unchanged.

Pullfrog  | Fix it ➔ | View workflow run | Using Claude Sonnet | 𝕏

@pullfrog

pullfrog Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Your Claude subscription has hit its usage limit. It resets at 7:20pm (UTC). Re-trigger Pullfrog after the reset, or add an ANTHROPIC_API_KEY repo secret — Pullfrog routes around an exhausted subscription automatically when one is present.

Add repo secret → · Model settings → · Setup docs → · Ask in Discord →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using Claude Sonnet | 𝕏

Base automatically changed from feat/plugin-cache to main September 25, 2026 17:51
Implements the Gateway RFC: GatewayClient extends the framework Client
with a @discordjs/ws connection, cache-backed managers, events carrying
structures, and EventGatewayListener/RegisterAsGatewayListener.

Refs #54
… channel structures

Flatten src/ into GatewayClient, managers/, structures/ (with mixins/)
and util/, one class per channel type composed through Mixin(), a
ThreadManager, CDN URLs from @discordjs/rest, and /ws and /rest
subpath re-exports.
…ructures

Structures extend @discordjs/structures' Structure, reaching its
kData/kPatch/kClone through the Symbol.for registry. Bitfields come from
it too, with a resolve override working around number flag values mixed
with bigint bits. Adds typingStart, channelPinsUpdate, webhooksUpdate and
voiceServerUpdate events.

Refs #54
CI runs vitest right after install, so the gateway tests failed to
resolve the unbuilt plugin-cache dist.
…a channels

Also require Node.js 24.17 like @discordjs/structures, and describe how Structure builds on it.
@pullfrog

pullfrog Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Your Claude subscription has hit its usage limit. It resets at 7:20pm (UTC). Re-trigger Pullfrog after the reset, or add an ANTHROPIC_API_KEY repo secret — Pullfrog routes around an exhausted subscription automatically when one is present.

Add repo secret → · Model settings → · Setup docs → · Ask in Discord →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using Claude Sonnet | 𝕏

@RedStar071
RedStar071 merged commit c576cfb into main Sep 25, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC: GatewayClient — Gateway (WebSocket) support for @wolfstar/http-framework

1 participant