Feathers
Feathers v6 is the app realtime transport for authenticated SSE events. It is used beside Mastra, not as a Mastra server adapter.
What It Owns
Section titled “What It Owns”apps/apiembeds a small Feathers app for SSE connections and event services.apps/webuses the Feathers client withcredentials: "include"through the same-origin web proxy.- Shared realtime contracts define event names, targets, envelopes, and payload schemas.
- Pinia stores own durable browser state for connectors, chat summaries, shared chats, HITL, and notifications.
Feathers does not own active assistant token streaming, Mastra workflows, memory, tools, evals, or observability.
Version Policy
Section titled “Version Policy”The repo pins feathers@6.0.0-pre.11 in both apps/api and apps/web.
Because this is a prerelease pin:
- use only exported package surfaces:
feathers,feathers/http, andfeathers/client - do not import undocumented paths such as
feathers/sse - check installed types/source and official Feathers release notes before upgrading
- keep app-specific behavior behind the shared realtime contracts
Runtime Shape
Section titled “Runtime Shape”feathers/httpprovides the Web Standard handler mounted at/realtime/sse.- Better Auth session helpers validate the handshake.
- API derives user channels server-side.
- Redis pub/sub fans events across replicas.
- The API raises the app EventEmitter listener warning threshold because one
publishlistener per active SSE subscriber is expected Feathers fanout, and realtime tests verify cleanup after disconnects. - Avoiding listener warnings must not turn private user events into broad broadcasts. Any future transport optimization must keep filtering and channel membership on the server side before event delivery.
- Web stores and typed connector dashboard state consume validated events, including count-bearing connector metrics.
- Connect/reconnect uses targeted HTTP snapshot recovery; compact chat and notification surfaces do not rely on route-change reloads or interval polling.
How To Upgrade
Section titled “How To Upgrade”- Check the installed
featherspackage exports and types. - Review Feathers release notes and migration guidance for the target version.
- Update both
apps/api/package.jsonandapps/web/package.jsontogether. - Run the realtime contract, API, and web tests.
- Browser-verify connector status, synced/indexed count chips, and chat/sidebar lifecycle when fixtures are available.
Canonical Sources
Section titled “Canonical Sources”docs/features/realtime/spec.mddocs/features/realtime/decisions/ADR-001-feathers-v6-realtime-transport.mdpackages/contracts/src/realtime/events.tsapps/api/src/realtime/apps/web/app/plugins/realtime.client.tsapps/api/package.jsonapps/web/package.json