Skip to content

fix(desktop): show shared invocable agents in mentions - #4242

Open
bluestonetrust wants to merge 5 commits into
block:mainfrom
bluestonetrust:fix/shared-agent-channel-mentions
Open

fix(desktop): show shared invocable agents in mentions#4242
bluestonetrust wants to merge 5 commits into
block:mainfrom
bluestonetrust:fix/shared-agent-channel-mentions

Conversation

@bluestonetrust

@bluestonetrust bluestonetrust commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • show shared relay agents in mention autocomplete only when they advertise the exact active stream or forum and their respond_to policy permits the current viewer
  • keep DMs, unresolved channel types, new-message recipients, and project-agent pickers fail closed for other-owned relay agents
  • revalidate cached autocomplete rows when channel or relay policy changes
  • prevent relay-directory identities from reappearing as ordinary people through global search
  • preserve picker-selected outbound Nostr p tags and forum mention support

Root cause

Desktop treated relay-agent eligibility as profile-wide. An allowlisted agent could be suggested without belonging to the active channel, while an anyone agent could be suggested because it overlapped some other joined channel. That exposed identities and advertised actions that ACP would not dispatch.

Security and privacy

The picker now requires all of these for an other-owned relay agent:

  1. the composer is for a known stream or forum
  2. the agent's channel_ids contains that exact channel
  3. respond_to is anyone, or the current viewer is explicitly allowlisted

DMs remain managed-only because ACP's DM author gate permits only the owner or same-owner sibling agents. Cached suggestions are rechecked against current eligible candidates before display.

Validation

  • pnpm test: 3,905 passed, 0 failed
  • pnpm check: passed
  • pnpm build: passed
  • pnpm build:e2e: passed
  • playwright tests/e2e/mentions.spec.ts: 54 passed
  • new-message relay misclassification regression: passed
  • targeted exact-channel, cross-channel, DM, unresolved-type, stale-cache, forum, and outbound p-tag coverage: passed
  • independent privacy and correctness review: approved, with one non-blocking future test-coverage suggestion
  • local aarch64-apple-darwin Tauri app bundle: built successfully

Fixes #3971

Originating Buzz channel: 1e408238-c672-4d83-ab5c-25ff3f7401eb

Khanh Le added 4 commits August 2, 2026 13:37
Include relay agents that the current user can invoke through a shared channel or allowlist while continuing to hide unavailable agent identities. Keep duplicate agent entries coalesced and cover the picker and outbound mention flow with unit and browser tests.

Co-authored-by: Khanh Le <bluestonetrust04@gmail.com>
Signed-off-by: Khanh Le <bluestonetrust04@gmail.com>
Co-authored-by: Khanh Le <bluestonetrust04@gmail.com>
Signed-off-by: Khanh Le <bluestonetrust04@gmail.com>
Co-authored-by: Khanh Le <bluestonetrust04@gmail.com>
Signed-off-by: Khanh Le <bluestonetrust04@gmail.com>
Pass the known forum channel type only from forum-backed composers so other ForumComposer reuse stays fail closed. Strengthen the DM and unresolved-state browser controls and cover relay-only forum autocomplete.

Co-authored-by: Khanh Le <bluestonetrust04@gmail.com>
Signed-off-by: Khanh Le <bluestonetrust04@gmail.com>
@bluestonetrust
bluestonetrust marked this pull request as ready for review August 2, 2026 04:20
@bluestonetrust
bluestonetrust requested a review from a team as a code owner August 2, 2026 04:20
@bluestonetrust
bluestonetrust marked this pull request as draft August 3, 2026 05:06
Require relay agents to be invocable in the exact stream or forum being composed. Keep DMs and context-free pickers fail closed, revalidate cached suggestions, and prevent relay identities from reappearing as people.

Co-authored-by: OpenAI <support@openai.com>
Signed-off-by: Khanh Le <bluestonetrust04@gmail.com>
@bluestonetrust
bluestonetrust marked this pull request as ready for review August 3, 2026 05:42
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.

Mention autocomplete never offers remotely-hosted agents (shared relay agent eligibility is unreachable)

1 participant