Skip to content

feat(desktop): support authorized external agent identities - #3746

Draft
zeolenon wants to merge 4 commits into
block:mainfrom
zeolenon:fix/external-hermes-mentions
Draft

zeolenon wants to merge 4 commits into
block:mainfrom
zeolenon:fix/external-hermes-mentions

Conversation

@zeolenon

Copy link
Copy Markdown

Summary

  • allow relay-native agents to appear in mention autocomplete when they are
    current channel agents, present in the agent directory, and invocable by the
    current viewer;
  • list invocable relay-native agents in a separate Connected agents section,
    with profile, messaging, channels, memories, and activity access;
  • let an owner securely link an external agent's nsec in the OS keychain
    after verifying both key identity and NIP-OA ownership;
  • allow linked identities to update their public display name, photo, and
    description without adopting or launching their external runtime;
  • allow authorized relay-native agents to be selected and added from the
    channel member picker;
  • preserve the existing behavior for locally managed agents;
  • keep relay-only non-members and profile-only agents without a directory entry
    hidden;
  • avoid attempting to start an external agent as a local managed runtime.

Why

Hermes' native Buzz gateway creates a relay-native agent identity rather than a
Buzz Desktop managed runtime. The current autocomplete filter only admits
locally managed agent identities, so a working Hermes agent can receive messages
but cannot be selected through @ autocomplete or found on the Agents screen.

Requiring channel membership, an agent-directory record, and the relay response
policy keeps the visibility boundary narrow and avoids exposing arbitrary relay
profiles.

External runtimes also need a safe, limited profile-management path. Treating
them as managed agents would incorrectly give Buzz lifecycle ownership and
could start a duplicate harness. The new link flow therefore stores only the
signing key in the existing OS-backed secret store and limits its surface to
public kind-0 profile fields.

Tests

  • full desktop unit suite after the connected-agent upgrade: 3,782 passed;
  • TypeScript typecheck;
  • Biome checks on changed files;
  • Rust unit tests for namespaced secret storage and non-echoing validation;
  • E2E: relay-only allowlisted non-member remains hidden;
  • E2E: directory-backed external channel agent is mentionable and does not start
    a local runtime;
  • E2E: stopped local managed agent still starts when mentioned;
  • E2E: invocable relay-native agents appear separately from local runtimes;
  • E2E: link identity, edit public profile, and refresh the connected-agent
    card;
  • E2E: add an authorized external agent through the channel member picker
    without creating or starting a local runtime.

Related: #2349, #3277.

zeolenon added 4 commits July 30, 2026 11:20
Signed-off-by: Leo Zenon Tassi <60750902+zeolenon@users.noreply.github.com>
Signed-off-by: Leo Zenon Tassi <60750902+zeolenon@users.noreply.github.com>
Signed-off-by: Leo Zenon Tassi <60750902+zeolenon@users.noreply.github.com>
Signed-off-by: Leo Zenon Tassi <60750902+zeolenon@users.noreply.github.com>

Copy link
Copy Markdown

Thank you for the relay-native external-agent direction in this PR.

A generic deployment case needs one additional Desktop-side capability: a persistent ACP/Hermes agent runs on a VPS, its agent identity is generated and kept there, the human owner uses Buzz Desktop, and a private relay enforces membership. The owner needs to issue a NIP-OA attestation for that existing external pubkey without exporting, copying, or otherwise exposing the owner's private key.

Could Buzz Desktop provide a native, explicit “attest external agent” action that:

  • accepts exactly one external agent pubkey;
  • resolves and displays the agent profile before signing;
  • rejects malformed pubkeys and self-attestation;
  • uses empty NIP-OA conditions;
  • requires a separate human confirmation for every attestation;
  • signs through the existing Desktop signer/keychain integration;
  • never returns the owner's private key; and
  • outputs only the signed NIP-OA tag for the agent launcher/provider to present to the relay?

The associated tests should cover cancellation without signing, no private material in logs or errors, cryptographic verification of the produced tag, visibility and @-mention of the remote agent, and confirmation that Desktop never launches the remote runtime locally.

This appears complementary to relay-native agents, long-lived remote agents, and the closed-relay owner-materialization work in #5581. Does this belong in #3746, or would maintainers prefer a separate issue for the Desktop attestation flow?

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.

2 participants