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

@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
@mfethe1
mfethe1 force-pushed the feat/device-identity-core branch from 94af576 to 6c46c27 Compare August 26, 2026 12:02
@mfethe1

mfethe1 commented Aug 26, 2026

Copy link
Copy Markdown
Author

DCO repaired tree-identically at 6c46c272b (only the required Signed-off-by trailer changed; tree hash still matches the previously reviewed implementation). The DCO check now passes and GitHub reports the PR mergeable; review is the remaining gate.

This core is also the dependency for a follow-up owner-attested agent-directory capability/model surface (REG-4), which I will propose separately after this lands to keep each review focused.

@mfethe1

mfethe1 commented Aug 26, 2026

Copy link
Copy Markdown
Author

DCO is repaired at 6c46c272b. The fix touched only the Signed-off-by trailer — the implementation tree is byte-identical to the previously reviewed version, so no re-review of the code itself should be needed. DCO Check is now passing and there are no failing checks on the head.

Ready for maintainer review whenever there's bandwidth; happy to rebase or address requested changes.

@mfethe1
mfethe1 force-pushed the feat/device-identity-core branch from 6c46c27 to 365966c Compare September 1, 2026 23:57
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is ac5a18697c8294e9237f505a2e01ec6fc374849a...8a8ad8c7d58ab19046b77fce0ec565cac6a405d6.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 8a8ad8c7d58ab19046b77fce0ec565cac6a405d6 to authorize a new review.
Any previous review applies only to its recorded range.

mfethe1 added a commit to mfethe1/buzz that referenced this pull request Sep 2, 2026
…ble)

Signed-off-by: Michael Fethe <mfethe1@gmail.com>
@mfethe1
mfethe1 force-pushed the feat/device-identity-core branch from 365966c to 1e4b870 Compare September 2, 2026 18:42
@mfethe1

mfethe1 commented Sep 2, 2026

Copy link
Copy Markdown
Author

Rebased onto current main (0dbd036f5). One conflict in managed_agents/types.rs: this PR extracts the harness DTOs to harness_catalog_types.rs, while #4625 added effort_canonical_values + effort doc updates to their old location. Resolution keeps the extraction and ports upstream's field/docs into the moved file — no behavioral change to this PR's feature. DCO and authorship preserved; desktop cargo test --lib 3146 passed / 0 failed, pnpm typecheck and all check:* guards green.

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.

Signed-off-by: Michael Feth <mfethe1@gmail.com>
@mfethe1
mfethe1 force-pushed the feat/device-identity-core branch from 1e4b870 to 8a8ad8c Compare September 2, 2026 22:46
@mfethe1

mfethe1 commented Sep 2, 2026

Copy link
Copy Markdown
Author

Rebased onto current main (ac5a186). Conflict resolution mirrors #6259: kept the type extraction into relayDirectoryTypes.ts and ported upstream's status: "unknown" union member into the extracted RelayAgent. Local gates: typecheck clean, 5968 tests pass / 0 fail. Authored locally; DCO preserved.

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