Skip to content

Commit e21606b

Browse files
wpfleger96Hayt
andauthored
feat(cli): leave archived identities out of users get --name (#9752)
`buzz users get --name` now leaves out identities on the relay's NIP-IA archive list. `--include-archived` brings them back, each marked `"archived": true`. `--pubkey` lookups always return the profile and mark it when archived. - The list is read by `fetch_archived_snapshot`, the same reader as `buzz agents archived`, so only a kind:13535 event signed by the relay's NIP-11 `self` key (with the NIP-70 tag) counts. A profile that sets its own `archived: true` is not marked unless the signed list names it. - Fail open: if the list can't be read, can't be verified, or takes longer than 5s, results come back unfiltered with a JSON warning on stderr. The search never fails because of it. - Name searches and `--pubkey` lookups read the profiles and the archive list in parallel. A profile error returns at once as the usual single JSON error, without waiting for the archive read or printing its warning. `--owner` with no matching agents returns `[]` straight away. - Documented in the CLI README. Out of scope: the relay and `send`/`dm`. Related: [buzz-app#4021](block/buzz-app#4021) --------- Signed-off-by: Will Pfleger <wpfleger@block.xyz> Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
1 parent 51b0ea6 commit e21606b

3 files changed

Lines changed: 408 additions & 25 deletions

File tree

‎crates/buzz-cli/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ buzz users get # your own profile
117117
buzz users get --pubkey <hex> # single user
118118
buzz users get --pubkey <hex> --pubkey <hex> # batch (max 200)
119119
buzz users get --name Honey --owner me # exact-name lookup in your managed agents
120+
buzz users get --name Alice --include-archived # --name leaves out archived identities unless asked
121+
# Archived identities (the relay's NIP-IA list, see `buzz agents archived`) carry
122+
# "archived": true; --pubkey lookups always return them. If the list can't be
123+
# read, results are unfiltered and a warning goes to stderr.
120124
# Where the community advertises verified profiles, `users get` adds a "verified"
121125
# object ({username, display_name, full_name?, issuer_label, verified_at}) from a
122126
# kind:30382 signed by the relay's NIP-11 `self` key. Where it is also `searchable`, --name finds verified usernames.

0 commit comments

Comments
 (0)