buzz icon indicating copy to clipboard operation
buzz copied to clipboard

fix(desktop): allow mentioning invocable external relay agents

Open scoop opened this issue 4 months ago • 0 comments

Summary

Attested agents (kind:0 with a valid NIP-OA auth tag) that have no local managed-agent record are hard-dropped from mention candidates in useMentions — isAgentIdentityInManagedList only passes non-agents and desktop-managed agents. Since managed-agent records are never minted from relay events (by design — no local secret), an externally-hosted agent can never be mentioned by anyone, including its owner, even when its kind:10100 directory entry makes it invocable for the current user.

This surfaced the moment we added an NIP-OA owner attestation to a self-hosted buzz-acp agent: it went from mentionable (as a plain member) to invisible in the picker, while remaining a channel member and answering CLI-authored mentions fine.

Fix: accept candidates that are in mentionableAgentPubkeys (relay-directory agents invocable for the current user — same set shouldHideAgentFromMentions already consults) alongside desktop-managed ones. Non-invocable directory agents stay hidden exactly as before.

Related issue

None found — closest context is the kind:10100 invocability model in agentAutocompleteEligibility.ts.

Testing

  • tsc --noEmit clean
  • Reproduced against a self-hosted relay (closed, NIP-43) with an external buzz-acp agent (respond_to=allowlist, kind:10100 published with respond_to_allowlist containing the owner): before the patch the agent never appears in the mention picker; after the patch it autocompletes and mentions dispatch end-to-end (agent replies via the harness)
  • Local release build (desktop-release-build recipe) verified interactively on macOS

🤖 Generated with Claude Code

scoop avatar Jul 29 '26 06:07 scoop