@aghoz/client
v0.4.2
Published
Framework-agnostic browser client for the aghoz edge event-stream protocol. Built on fetch and ReadableStream for cursor resume, replay and explicit gaps. Zero dependencies.
Downloads
599
Maintainers
Readme
@aghoz/client
The framework-agnostic browser client, built on fetch and ReadableStream rather than EventSource — because EventSource cannot read response headers, and the checkpoint that reports missed updates is a header. Also exports createSharedClient, which gives every tab of an origin one connection between them.
npm install @aghoz/clientRuns in any browser with fetch and ReadableStream, and in Node 22+. It talks
to an aghoz hub, which is Node.js only for now — there is no server adapter for
another language yet. Cross-origin clients support cookie credentials and dynamic
headers that are evaluated again on reconnect; see the integration guide.
Full documentation, the integration guides and the wire protocol live in the monorepo: https://github.com/thinkgrid-labs/aghoz
License
MIT OR Apache-2.0, at your option.
