镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Mark Me chats as personal in the session description for remote agents - #1058

Merged
klross merged 2 commits into
mainfrom
murderbot/personal-session-marker
Oct 14, 2026
Merged

klross merged 2 commits into
mainfrom
murderbot/personal-session-marker

Conversation

@baxen

@baxen baxen commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Why

Me placement is stored only in the owner's encrypted groups:me record. A remote agent (kgoose) signs in with its own key, so it can't tell a Me chat apart from any other private session. It defaults to thread scope, and because every message in Me is top-level, each message starts a fresh session. Local agents get this right because meChat() reads the owner's placement; remote agents have nothing to read.

What

New Me chats add a personal line to the existing session description, which the relay already publishes in the channel's kind 39000 about tag:

Buzz session (buzz.sessions/v1)
[parent:<uuid>]
[personal]

The lines must appear in that order, each at most once, with nothing else allowed. sessionMetadata and the Tauri host validator (channel_writes.rs session_metadata) now share that grammar. Without the Rust change, the desktop host would refuse to sign the new kind 9007.

  • Set: NewSessionComposer passes personal to workSessions.create.
  • Cleared: direct Share already replaces a session description with the user's description (empty by default). It runs before Me placement is removed, so a chat moved to Messages never keeps the hint.
  • Kept on rename: renaming a session sends a name-only kind 9002, so the line stays.
  • Not access authority: this is a routing hint only. The relay doesn't enforce it, and signed membership stays the access authority. That fits the current baseline in docs/sessions/README.md; it doesn't revive the superseded relay-enforced spaces.md proposal.

Contract for remote agents: a channel whose 39000 about parses with a personal line is the owner's personal chat. Use one channel-scoped session and post at the top level, as meChat() does locally. The kgoose side is a separate change.

Not in this PR / decisions for review

  • No backfill. Existing Me chats keep today's remote behavior (thread-scoped) until they're recreated or a one-time edit is added.

  • Link share leaves the hint in place. Destination-link sharing grants other people access but leaves the chat in Me, so it keeps the hint. That matches what local agents do today (they follow placement). If link share should mean "no longer personal", it needs a follow-up.

  • Version skew. Older app builds parse the session description exactly, so they show a new Me chat as an ordinary private stream:

    • the raw description is visible;
    • rename is blocked by the "Buzz session (" guard;
    • direct share from the old build requires editing the description first.

    This only affects people running several devices on different versions.

Testing

  • vitest run: 615 files, 8824 tests pass, plus the new metadata grammar, 9007 creation, composer, rename and direct-share cases. When personal parsing is broken, 8 direct-share tests and the grammar test fail.
  • cargo test --manifest-path src-tauri/Cargo.toml: 369 passed and 1 failed. The failure was host_command::tests::stdin_is_exact_data_and_output_is_drained_concurrently, which passed 3 of 3 times on its own, so it's a load flake unrelated to this change. The new creation_accepts_only_the_session_description_grammar test passes.
  • tsc --noEmit, biome, clippy and pre-push hooks all pass.
  • Not yet exercised in the native app: creating a Me chat and checking its 39000 about, then direct-sharing it and checking the line is gone.

🤖 Generated with Claude Code

Me placement lives only in the owner's encrypted groups:me record, so a
remote agent signed in with its own key cannot tell a Me chat from any
other private session and starts a fresh thread-scoped session for every
top-level message. New Me chats now add a `personal` line to the session
description (header, optional parent:<uuid>, optional personal), which
agents can read from channel metadata. Direct share already replaces the
description, which clears it. The TS parser and the Tauri host validator
share the same grammar.

Co-authored-by: murderbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Bradley Axen <baxen@squareup.com>
@wesbillman

Copy link
Copy Markdown
Collaborator

🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.

Fine as a bridge, but please make the kgoose side trust personal only when signed membership agrees: the owner is the only human and every other member is one of the owner's agents. Otherwise a shared channel that still has the line merges several people into one agent session.

Longer term I'd rather give the owner's agents read access to Me placement (for example, encrypted to their keys) than add more flags to the about text, since that keeps one private source of truth and covers existing chats without a backfill.

@wesbillman

Copy link
Copy Markdown
Collaborator

🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.

Correction to my comment above. I'm withdrawing both suggestions:

  • The membership check was wrong. meChat() only checks placement, so local agents already treat a link-shared Me chat as one channel-scoped conversation. This PR matches that on purpose, and the check would make remote agents behave differently from local ones. Editing about also requires channel owner/admin (the relay's 9002 authorization), so it isn't an open spoofing path.
  • The drift concern was overstated. Placement is only written at creation (NewSessionComposer) and on direct Share (SessionShare), and this PR sets and clears the line at those same two points. The real gap is existing chats, which the PR already documents.

Sorry for the noise.

@klross
klross marked this pull request as ready for review October 14, 2026 22:32
@klross
klross requested a review from a team as a code owner October 14, 2026 22:32
Keep both new channel_writes boundary tests: the session description
grammar test from this branch and the channel label test from main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Katie Ross <katieross@squareup.com>
@klross
klross merged commit 08864aa into main Oct 14, 2026
32 checks passed
@klross
klross deleted the murderbot/personal-session-marker branch October 14, 2026 23:07
johnmatthewtennant added a commit that referenced this pull request Oct 15, 2026
…-drag

* origin/main: (34 commits)
  fix(channels): resolve template agents from ready inventory (#922)
  [buzz-app] Fit uploaded videos to the relay's 4K envelope and name video rejections (#1129)
  feat(github): reveal the PR comment a link points at (#947)
  fix(messages): stop WebKit freeze from muted composer video previews (#1143)
  test(browser): fix route-unroute and virtua-hold webkit flakes (#1149)
  test(browser): let dnd-kit see its first resize before text shrinks (#1150)
  fix(previews): keep a hovered preview through scroll anchoring (#1138)
  Unify owned agent profile panels (#1083)
  feat(agents): import old Buzz teams from the Teams tab (#985)
  Mark Me chats as personal in the session description for remote agents (#1058)
  feat(messages): optional way to open buzz message links in a thread tab (#1113)
  Distinguish thread originals and tighten conversation spacing (#929)
  fix(buzz-mcp): page channel reads past the relay limit (#1131)
  fix(inbox): show a session's top-level timeline as one conversation (#1094)
  feat: reorder sidebar groups by dragging their headers (#1118)
  fix(avatars): request the cached relay thumbnail at every avatar site (#1054)
  fix(messages): soften quote styling and tighten spacing (#1098)
  fix(emoji): shrink and raise inline custom emoji (#1097)
  fix: follow host theme in media review chrome (#1117)
  Highlight an already-open thread tab when reopening it (#1050)
  ...

Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Claude Worker <f425b86c3b780d43f8d9cf1802429d04dd985bf92eac44fca9468b5ad3887c5e@buzz.block.builderlab.xyz>

# Conflicts:
#	src/features/channel-navigation/ChannelSidebarDnd.tsx
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