mirror of
https://github.com/block/buzz.git
synced 2026-10-27 12:40:30 +00:00
`bot` has the same permissions as `member`; it only labels a key with a recorded agent owner. Instead of storing that label and converting rows when an owner is recorded, store `member` for both ordinary roles and compute the label wherever a role is read: rosters, member lists, role reads, DM participants and the bot list. An agent owner is recorded once and never changes, so a key's label changes at most once. - Writers store `member` for an ordinary role; reads show `bot` exactly when users.agent_owner_pubkey is set for the key in that community. - The app-side roster fence treats `member` and `bot` as one role, so an owner recorded between roster capture and insert does not refuse the publication. - After recording an owner, a background task lists the agent's active ordinary channels and republishes their rosters. - BUZZ_RECONCILE_BOT_ROSTERS runs a one-shot startup repair of rosters that show a stale label (for example, ones older relays published). Nothing scans at every startup. - Migration 0074 drops the 0032 roster trigger, which compared roster labels with the stored role exactly. Every relay must run #8611 first. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
Examples
This directory contains reference material for building on Buzz beyond the desktop app and AI agents.
countdown-bot/
A small non-AI bot that connects directly to the Buzz relay over WebSocket, authenticates with NIP-42, subscribes to one channel, and replies to deterministic commands like !countdown 5 and !fib 8.
It demonstrates two identity paths:
- Standalone bot identity — the bot authenticates with its own key and must be explicitly admitted to closed/allowlisted relays.
- Owner-attested / agent OAuth path — the bot authenticates with its own key while presenting the same
BUZZ_AUTH_TAGNIP-OA credential that Buzz agents receive from the owner/agent OAuth flow, so a relay can admit it because its owner is already a relay member.
See countdown-bot/README.md for usage.
meadow-core/
A persona-pack example for Buzz agents.