Skip to content

feat(desktop): name the computer an agent lives on — core (device identity, split from #6259) - #6698

Open
mfethe1 wants to merge 1 commit into
block:mainfrom
mfethe1:feat/device-identity-core
Open

feat(desktop): name the computer an agent lives on — core (device identity, split from #6259)#6698
mfethe1 wants to merge 1 commit into
block:mainfrom
mfethe1:feat/device-identity-core

Conversation

@mfethe1

@mfethe1 mfethe1 commented Aug 24, 2026

Copy link
Copy Markdown

Supersedes the conflict-free backend half of #6259 ("name the computer an agent lives on"). The mention-UI half of #6259 conflicts semantically with #6337/#6401 (agentProvenance) and needs a product decision, so this PR carries only the parts that merge cleanly onto current main.

What this adds

  • device_identity.rs (+551): opaque 32-hex device_id minted per install, user-editable device_label (validated: non-empty, ≤32 chars, control/format chars rejected), stable across restarts, persisted atomically
  • Agent event projection stamps device_id/device_label on kind:30177 records for local backends only — a provider-backed agent publishes device: null (it does not run on the owner's computer)
  • RelayAgentInfo gains optional device_id/device_label (#[serde(default)]), projected from the directory
  • DeviceNameSettingsCard UI (Settings → Agents), mounted before PreventSleepSettingsCard
  • listRelayAgents moves from tauri.ts to tauriRelayAgents.ts with the new fields

Why split from #6259

  1. origin/main moved 38+ commits since feat(desktop): name the computer an agent lives on #6259's last rebase; all three textual conflicts are mention-UI files (MentionAutocomplete.tsx, useMentionSendFlow.ts, AgentsSettingsPanel.tsx) where feat(desktop-messages): keep agents addressed across messages #6315/fix(desktop): distinguish duplicate agent devices #6337/fix(desktop): simplify duplicate agent provenance #6401 landed a competing disambiguator. Resolving them textually would ship two disambiguators in one suggestion row.
  2. This branch is a fresh three-way integration, not a cherry-pick. Files were taken from a git merge-tree of feat(desktop): name the computer an agent lives on #6259 × origin/main (preserving upstream's 0.5.17→0.5.18 bump and custom_harness_dir in lib.rs), with the panel wiring applied semantically to current main rather than copying feat(desktop): name the computer an agent lives on #6259's stale whole-file version.
  3. Fixes a latent defect in feat(desktop): name the computer an agent lives on #6259 itself: three test-only RelayAgentInfo literals in relay_directory.rs were never updated for the new fields. #[serde(default)] does not fill struct literals, so cargo check --tests fails on feat(desktop): name the computer an agent lives on #6259's head 4e0764d4b (verified: exit 101, 3× E0063). This branch adds device_id: None, device_label: None to those three sites (detailed on feat(desktop): name the computer an agent lives on #6259: feat(desktop): name the computer an agent lives on #6259 (comment)).

Verification (all on this branch's head, macOS 15.6 arm64, rustc 1.95.0)

Gate Result
cargo fmt --all -- --check pass
cargo check --locked --tests (tauri) pass, 0 errors
device_identity:: suite 16/16
managed_agents::agent_events:: suite 16/16
tsc --noEmit (desktop) pass, 0 errors
agentDeviceLabel.test.mjs 4/4

Negative control on the core invariant: flipping only the BackendKind::Provider arm of the device stamp to current() fails exactly one test — projection_omits_the_device_for_a_provider_backend ("a remote body must not be given this computer's id") — with 15/16 passing. Restored, 16/16. So the local-vs-provider gate is behaviorally pinned, not just compiled.

Independently reproduced by @ScaleLeanChris on #6259 (macOS): agentDeviceLabel.test.mjs 4/4, focused Tauri device-identity tests 13/13, TS checking clean — the files exercised there are unchanged by the rebase.

Scope / limitations

Backend-only split of block#6259, assembled on current main (0720f53).
Excludes the mention-UI half (MentionAutocomplete, useMentionSendFlow,
useMentions, mentionCandidates, mentions.spec, e2eBridge) which
conflicts with upstream block#6315/block#6337/block#6401 agentProvenance and needs a
product decision, not a textual merge resolution.

Also fixes 3 test-only RelayAgentInfo literals in relay_directory.rs
that block#6259 head does not update; serde(default) does not fill struct
literals, so cargo check --tests fails on 4e0764d without this.

Gates: cargo fmt --check 0, cargo check --locked --tests 0,
device_identity:: 16/16, managed_agents::agent_events:: 16/16,
tsc --noEmit 0, agentDeviceLabel.test.mjs 4/4.
@mfethe1
mfethe1 requested a review from a team as a code owner August 24, 2026 16:07
mfethe1 added a commit to mfethe1/buzz that referenced this pull request Aug 24, 2026
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.

1 participant