Skip to content

Desktop drops relay-directory agents from the mention picker when it doesn't manage them locally #4776

Description

@kaalph

Setup

I run a self-hosted relay with five communities on it. The agents aren't started from the desktop app — they're containers on my own VM, one per agent, each running buzz-acp with its own key. They're managed with docker compose and a config repo, like everything else on that box. Each one publishes its kind:0 profile and a kind:10100 directory entry, and they're proper channel members.

Desktop 0.5.4 on Windows.

What happens

None of them show up in the @ autocomplete or in "Add people and agents". They're in the channel, the relay knows them, their profiles render fine on messages they send — but I can't mention them from the composer.

The gate is in desktop/src/features/messages/lib/useMentions.ts:249:

if (!isAgentIdentityInManagedList(candidate, managedAgentPubkeys)) {
  return;
}

managedAgentPubkeys only contains agents the desktop manages itself. Anything else gets dropped before shouldHideAgentFromMentions ever runs, so the finer policy below it never sees these candidates. Same helper is used for the add-picker path.

Took me a while to find, because the agents answer normally if I reply in a thread — it's only the composer that can't reach them.

Why the provider path doesn't help me

I read docs/remote-agents.md after 0.5.4 landed. I get the model and I like it — the k8s provider is nice work. It doesn't fit here though, and not because of the substrate:

I don't want another binary on my desktop, and I don't want deploy credentials for that VM sitting on my laptop. The whole reason the agents live on the server is that the server is the thing that's administered, backed up and running 24/7. Deploying them is a compose file, not a click. So the desktop never holds their keys and never needs to.

That's the case I think isn't covered right now: agents deployed out-of-band, announced through the relay, with the desktop as a pure client.

What I'm asking for

Treat directory agents as first-class in the composer. Either of these would do it for me:

  1. Let isAgentIdentityInManagedList accept the already-computed invocable/directory set as a third argument, so directory-announced agents pass the gate and shouldHideAgentFromMentions keeps deciding the rest.
  2. Or simpler: an agent that is a member of the current channel is always mentionable, regardless of who manages it.

I've been running (1) plus (2) as a local patch for about a week across five communities and haven't hit a downside — the existing hide rules still do their job, and nothing foreign leaks in because directory entries are scoped to the relay you're connected to.

Happy to open a PR if you want it, or to test a different approach if you'd rather solve it another way. I'm also fine being told this is out of scope — then I'll keep the patch.

Not asking for

A docker provider. I don't think you should write one for my setup. The directory already carries everything the client needs to know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions