Skip to content

feat: add broker streaming#873

Merged
johngeorgewright merged 6 commits into
masterfrom
new-requirements
Jun 10, 2026
Merged

feat: add broker streaming#873
johngeorgewright merged 6 commits into
masterfrom
new-requirements

Conversation

@johngeorgewright

Copy link
Copy Markdown
Collaborator

No description provided.

johngeorgewright and others added 6 commits June 10, 2026 15:16
Replace the four positional generics on `MessageBus`, `Broker`, and
`InvokableNotRegisteredError` with a single `$ extends MessageBusContext`
bag. Adding a new feature now means adding a property to
`MessageBusContext` rather than threading a new positional generic
through every reference.

A `CreateMessageBusContext<Partial>` helper fills unspecified slots with
their defaults, so consumers only specify the slots they use. The
collection types (`Subscribers`, `Invokers`, `Streams`, …) and their
record interfaces now take `$` directly, which also threads the context
down into the stored `Broker<$>`.

BREAKING CHANGE: `MessageBus`, `Broker`, and `InvokableNotRegisteredError`
now take a single `MessageBusContext` type parameter instead of four
positional generics. Replace `MessageBus<Events, Gens, Invokables,
Streams>` with `MessageBus<CreateMessageBusContext<{ events: Events;
generators: Gens; invokables: Invokables; streams: Streams }>>`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@johngeorgewright johngeorgewright merged commit 2c03766 into master Jun 10, 2026
2 checks passed
@johngeorgewright johngeorgewright deleted the new-requirements branch June 10, 2026 16:26
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.

1 participant