Skip to content

fix(desktop): allow shared agent mentions - #4913

Merged
wesbillman merged 1 commit into
mainfrom
carl/shared-agent-mention-eligibility
Aug 5, 2026
Merged

fix(desktop): allow shared agent mentions#4913
wesbillman merged 1 commit into
mainfrom
carl/shared-agent-mention-eligibility

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

  • admit relay-discovered agents to autocomplete when their response policy authorizes the viewer
  • require authorization in the exact active stream/forum channel for mentions, while keeping community-wide discovery for member invitation
  • fail closed for relay-only agents in DMs and unresolved composer contexts
  • re-authorize cached autocomplete rows after policy/channel changes so stale agent suggestions cannot leak back in
  • preserve managed-agent behavior and explicitly reject stale agent-marked channel members absent from both live directories

Validation

  • pnpm --dir desktop test — 4,288 passed
  • pnpm --dir desktop typecheck
  • pnpm --dir desktop check
  • pnpm --dir desktop build:e2e
  • focused Playwright mention matrix — 12 passed
  • focused Playwright member-invitation matrix — 2 passed
  • pre-push hooks after rebase to current origin/main — desktop check and 4,288 tests passed
  • independent correctness/privacy re-review cleared with no remaining blocker

Related competing PRs

This supersedes or overlaps #2333, #3056, #4242, #4137, #2314, #4058, and #2605. This version adds exact-channel authorization, fail-closed DM/context handling, cached-row reauthorization, forum coverage, outbound mention-tag coverage, explicit stale-member coverage, and add-member discovery coverage.

@wesbillman
wesbillman requested a review from a team as a code owner August 5, 2026 16:00
Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
@wesbillman
wesbillman force-pushed the carl/shared-agent-mention-eligibility branch from b7be47c to fabbc9a Compare August 5, 2026 17:24
@wesbillman
wesbillman merged commit 014562c into main Aug 5, 2026
46 of 48 checks passed
@wesbillman
wesbillman deleted the carl/shared-agent-mention-eligibility branch August 5, 2026 18:15
@Shipitrealgood

Copy link
Copy Markdown

TY!

tlongwell-block pushed a commit that referenced this pull request Aug 5, 2026
Pull main in before remediation, per Tyler's instruction: no rebase, no
force, new commits on top.

Co-authored-by: Sami <f4a42a97e594b77bdbd8ee35191c8b28a94a4cb871d96f32921558275421fb68@buzz.block.builderlab.xyz>
Signed-off-by: Sami <f4a42a97e594b77bdbd8ee35191c8b28a94a4cb871d96f32921558275421fb68@buzz.block.builderlab.xyz>

* origin/main:
  fix(desktop): remove join API token control (#4897)
  fix(desktop): allow shared agent mentions (#4913)
  Polish mobile top navigation (#4778)
  fix(release): tag immutable desktop candidates (#4811)
  fix(channels): restrict private-channel invitations (#4612)
  fix(acp): reject unattended permission requests (#4609)
  fix(workflow): bind trigger author to the signed event (#4607)
  fix(git): revoke access for banned relay members (#4608)
  fix(agent): recover from unsupported image input instead of poisoning the turn (#4896)
  Define private managed agent wire protocol (#4593)
  fix(mobile): serialize channel sections sync (#3165)
  fix(desktop): make missing-command error actionable for released builds (#4802)

Signed-off-by: Sami <f4a42a97e594b77bdbd8ee35191c8b28a94a4cb871d96f32921558275421fb68@buzz.block.builderlab.xyz>
wpfleger96 pushed a commit that referenced this pull request Aug 5, 2026
…-overflow-recovery

* origin/main:
  fix(buzz-agent): scope handoff cap per turn, not per session lifetime (#4805)
  Fix mobile message timeline bounce (#4862)
  Polish mobile bottom sheets and profile cards (#4911)
  Fix media attachment actions (#4849)
  fix(desktop): remove join API token control (#4897)
  fix(desktop): allow shared agent mentions (#4913)
  Polish mobile top navigation (#4778)
  fix(release): tag immutable desktop candidates (#4811)
  fix(channels): restrict private-channel invitations (#4612)
  fix(acp): reject unattended permission requests (#4609)
  fix(workflow): bind trigger author to the signed event (#4607)
  fix(git): revoke access for banned relay members (#4608)
  fix(agent): recover from unsupported image input instead of poisoning the turn (#4896)
  Define private managed agent wire protocol (#4593)
  fix(mobile): serialize channel sections sync (#3165)
  fix(desktop): make missing-command error actionable for released builds (#4802)
  chore(release): release Buzz Desktop version 0.5.5 (#4809)
  feat: paste composer text without formatting (#4801)
  Revert "chore(release): release Buzz Desktop version 0.5.5" (#4808)
  chore(release): release Buzz Desktop version 0.5.5 (#4800)

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>

# Conflicts:
#	crates/buzz-agent/src/agent.rs
#	crates/buzz-agent/src/handoff.rs
#	crates/buzz-agent/src/types.rs
#	crates/buzz-agent/tests/regressions.rs
atishpatel added a commit that referenced this pull request Aug 5, 2026
…usage

* origin/main:
  fix(buzz-agent): scope handoff cap per turn, not per session lifetime (#4805)
  Fix mobile message timeline bounce (#4862)
  Polish mobile bottom sheets and profile cards (#4911)
  Fix media attachment actions (#4849)
  fix(desktop): remove join API token control (#4897)
  fix(desktop): allow shared agent mentions (#4913)
  Polish mobile top navigation (#4778)
  fix(release): tag immutable desktop candidates (#4811)
  fix(channels): restrict private-channel invitations (#4612)
  fix(acp): reject unattended permission requests (#4609)
  fix(workflow): bind trigger author to the signed event (#4607)
  fix(git): revoke access for banned relay members (#4608)

Co-authored-by: Atish Patel <atish@squareup.com>
Signed-off-by: Atish Patel <atish@squareup.com>
wpfleger96 pushed a commit that referenced this pull request Aug 5, 2026
…arer-auth

* origin/main: (65 commits)
  fix(desktop): route macos notification clicks (#4799)
  feat(mobile): sync themes per community (#3767)
  feat(desktop): sync themes per community (#3653)
  feat(desktop): cap OpenClaw agent parallelism at 5 (#4019)
  fix(buzz-agent): scope handoff cap per turn, not per session lifetime (#4805)
  Fix mobile message timeline bounce (#4862)
  Polish mobile bottom sheets and profile cards (#4911)
  Fix media attachment actions (#4849)
  fix(desktop): remove join API token control (#4897)
  fix(desktop): allow shared agent mentions (#4913)
  Polish mobile top navigation (#4778)
  fix(release): tag immutable desktop candidates (#4811)
  fix(channels): restrict private-channel invitations (#4612)
  fix(acp): reject unattended permission requests (#4609)
  fix(workflow): bind trigger author to the signed event (#4607)
  fix(git): revoke access for banned relay members (#4608)
  fix(agent): recover from unsupported image input instead of poisoning the turn (#4896)
  Define private managed agent wire protocol (#4593)
  fix(mobile): serialize channel sections sync (#3165)
  fix(desktop): make missing-command error actionable for released builds (#4802)
  ...

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>

# Conflicts:
#	CHANGELOG.md
atishpatel added a commit that referenced this pull request Aug 5, 2026
…usage

* origin/main:
  fix(buzz-agent): scope handoff cap per turn, not per session lifetime (#4805)
  Fix mobile message timeline bounce (#4862)
  Polish mobile bottom sheets and profile cards (#4911)
  Fix media attachment actions (#4849)
  fix(desktop): remove join API token control (#4897)
  fix(desktop): allow shared agent mentions (#4913)
  Polish mobile top navigation (#4778)
  fix(release): tag immutable desktop candidates (#4811)
  fix(channels): restrict private-channel invitations (#4612)
  fix(acp): reject unattended permission requests (#4609)
  fix(workflow): bind trigger author to the signed event (#4607)
  fix(git): revoke access for banned relay members (#4608)

Co-authored-by: Atish Patel <atish@squareup.com>
Signed-off-by: Atish Patel <atish@squareup.com>
wpfleger96 pushed a commit that referenced this pull request Aug 5, 2026
…ed-agent-store-merge

* origin/main: (24 commits)
  fix(reactions): support max-length custom emoji (#3833)
  feat(desktop): allow leaving your final community (#3621)
  fix(buzz-agent): recover from context-window 400s instead of sticking (#4946)
  docs(persona-pack): fix stale desktop import instructions (#4500)
  fix(desktop): route macos notification clicks (#4799)
  feat(mobile): sync themes per community (#3767)
  feat(desktop): sync themes per community (#3653)
  feat(desktop): cap OpenClaw agent parallelism at 5 (#4019)
  fix(buzz-agent): scope handoff cap per turn, not per session lifetime (#4805)
  Fix mobile message timeline bounce (#4862)
  Polish mobile bottom sheets and profile cards (#4911)
  Fix media attachment actions (#4849)
  fix(desktop): remove join API token control (#4897)
  fix(desktop): allow shared agent mentions (#4913)
  Polish mobile top navigation (#4778)
  fix(release): tag immutable desktop candidates (#4811)
  fix(channels): restrict private-channel invitations (#4612)
  fix(acp): reject unattended permission requests (#4609)
  fix(workflow): bind trigger author to the signed event (#4607)
  fix(git): revoke access for banned relay members (#4608)
  ...

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>

# Conflicts:
#	desktop/src-tauri/src/managed_agents/runtime.rs
elifoster-block added a commit that referenced this pull request Aug 5, 2026
…p-csp

* origin/main: (66 commits)
  fix(reactions): support max-length custom emoji (#3833)
  feat(desktop): allow leaving your final community (#3621)
  fix(buzz-agent): recover from context-window 400s instead of sticking (#4946)
  docs(persona-pack): fix stale desktop import instructions (#4500)
  fix(desktop): route macos notification clicks (#4799)
  feat(mobile): sync themes per community (#3767)
  feat(desktop): sync themes per community (#3653)
  feat(desktop): cap OpenClaw agent parallelism at 5 (#4019)
  fix(buzz-agent): scope handoff cap per turn, not per session lifetime (#4805)
  Fix mobile message timeline bounce (#4862)
  Polish mobile bottom sheets and profile cards (#4911)
  Fix media attachment actions (#4849)
  fix(desktop): remove join API token control (#4897)
  fix(desktop): allow shared agent mentions (#4913)
  Polish mobile top navigation (#4778)
  fix(release): tag immutable desktop candidates (#4811)
  fix(channels): restrict private-channel invitations (#4612)
  fix(acp): reject unattended permission requests (#4609)
  fix(workflow): bind trigger author to the signed event (#4607)
  fix(git): revoke access for banned relay members (#4608)
  ...
tellaho added a commit that referenced this pull request Aug 5, 2026
Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>

* origin/main:
  fix(reactions): support max-length custom emoji (#3833)
  feat(desktop): allow leaving your final community (#3621)
  fix(buzz-agent): recover from context-window 400s instead of sticking (#4946)
  docs(persona-pack): fix stale desktop import instructions (#4500)
  fix(desktop): route macos notification clicks (#4799)
  feat(mobile): sync themes per community (#3767)
  feat(desktop): sync themes per community (#3653)
  feat(desktop): cap OpenClaw agent parallelism at 5 (#4019)
  fix(buzz-agent): scope handoff cap per turn, not per session lifetime (#4805)
  Fix mobile message timeline bounce (#4862)
  Polish mobile bottom sheets and profile cards (#4911)
  Fix media attachment actions (#4849)
  fix(desktop): remove join API token control (#4897)
  fix(desktop): allow shared agent mentions (#4913)

Signed-off-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz>
@iroiro147

Copy link
Copy Markdown
Contributor

Thanks for landing this @wesbillman — shared-agent mentions resolve correctly now.

One note on attribution: #4058 was open against #3971 from 1 Aug until I closed it today, and it documented this exact root cause — addCandidate filtered isAgent candidates against the local managed-agent list before shouldHideAgentFromMentions could run, which left the shared relay-agent eligibility path unreachable. This PR resolves it the same way, replacing that gate with isAgentIdentityInAllowedList(candidate, mentionableAgentPubkeys) backed by getMentionableAgentPubkeys. If #4058 informed the fix, a credit line would be appreciated. If you arrived at it independently, no concern at all — I've closed #4058 as superseded either way.

Separately: #3971 still appears open and looks resolved by this PR.

kbst9 added a commit to kbst9/buzz that referenced this pull request Aug 6, 2026
Conflict resolutions, upstream-as-default:
- kind.rs: union — upstream KIND_PRIVATE_MANAGED_AGENT (30179) + fork
  KIND_SWARM/KIND_COMMUNITY_GUIDE (30978/30979); no integer clash.
- migration.rs: MIGRATOR len 30; upstream 0028_long_reaction_payloads at
  [27], fork agent_invites/agent_member_role renumbered 0029/0030 (prep
  commit 29618eb) at [28]/[29].
- useMentions.ts: fork's buildMentionCandidates extraction kept; upstream
  block#4913 ported into it (scope-aware eligibility, isAgentIdentityInAllowedList,
  uniqueAutocompleteLabels, filterCachedAgentSuggestions).
- buildMentionCandidates.ts: block#4913 gate adopted for NON-members; the fork's
  member bypass stays — relay-vetted member agents (invite-flow standalone
  agents) remain mentionable. Deliberate divergence from upstream, which
  hides members absent from managed+relay directories.
- MembersSidebar.tsx: fork's 3-arg useClassifiedMembers (profiles overlay)
  kept over upstream's duplicate; upstream's add-dialog eligibility gate
  adopted with verifiedAgentPubkeys wired from search results so verified
  standalone agents stay addable.
- ChannelScreen.tsx: fork's useChannelComposerTargets kept; upstream block#4965
  clamp (useElementWidth before useThreadPanelWidth) arrived via auto-merge.
- mentions.spec.ts: fork's member-agent mentionability test kept over
  upstream's opposite-assertion test; divergence comment added.

Verified: tsc, desktop unit suite (4558), buzz-db/buzz-core/buzz-cli tests,
cargo check -p buzz-acp, cargo fmt.

Signed-off-by: kbst9 <kevinbsteiner@gmail.com>
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.

3 participants