Skip to content

fix(desktop): allow mentioning invocable external relay agents - #3472

Open
scoop wants to merge 1 commit into
block:mainfrom
scoop:fix/mention-external-relay-agents
Open

fix(desktop): allow mentioning invocable external relay agents#3472
scoop wants to merge 1 commit into
block:mainfrom
scoop:fix/mention-external-relay-agents

Conversation

@scoop

@scoop scoop commented Jul 29, 2026

Copy link
Copy Markdown

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 useMentionsisAgentIdentityInManagedList 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

Attested agents without a local managed-agent record were hard-dropped
from mention candidates, so externally-hosted agents (relay directory,
kind:10100) could not be mentioned by anyone — including their owner.
Accept agents present in mentionableAgentPubkeys alongside managed ones.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TS2Hjgy6RXd6TeaVi5oTLw
Signed-off-by: Patrick Lenz <plenz@topmedia.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant