Extract reusable Buzz client boundary - #4717
Draft
MajorTal wants to merge 1 commit into
Draft
Conversation
Signed-off-by: Tal Weiss <major.tal@gmail.com>
MajorTal
force-pushed
the
codex/extract-reusable-buzz-client
branch
from
August 4, 2026 13:34
bc3d619 to
00f4d91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey good people - I wanted to start working on my own client, but the code is a bit of spaghetti and this is my attempt to untangle it. I’d like to extract the correctness-sensitive client logic currently trapped in crates/buzz-cli/src/client.rs into a new reusable crates/buzz-client library, with buzz-ws-client remaining the lower-level transport beneath it. The reason is that signing, NIP-OA authentication, community scoping, pagination, retries, and ambiguous delivery outcomes should have one authoritative implementation shared by every Buzz client (and NOT be reimplemented independently by the CLI, desktop, mobile, and my future client...).
The first change would just establish the intended final boundary immediately: an explicit community endpoint and configuration, an asynchronous signer abstraction, typed errors/results, and semantic delivery outcomes, but keep the scope deliberately small by migrating only channels list and messages send, preserving all existing CLI behavior while proving the same public API supports both the CLI and a minimal independent consumer.
What changed
crates/buzz-clientwith explicit community, signer, authentication, retry, error, and delivery types.buzz channels listandbuzz messages sendwhile keeping their command line behavior and output stable.Validation
. ./bin/activate-hermit && just ci. ./bin/activate-hermit && just test-integrationbuzz-clienttests plus its documentation test