feat(agent): derive + report deterministic machine_uid (SPEC-004 Task 1)
All checks were successful
All checks were successful
Agent now derives a recomputable, opaque machine_uid (Windows: SHA-256 of the OS MachineGuid at HKLM\SOFTWARE\Microsoft\Cryptography\MachineGuid -> muid_<hex>; non-Windows / registry-failure: persisted random UUID, warn-logged). Raw GUID never exposed; OnceLock-cached. Reported ALONGSIDE agent_id (unchanged) on AgentStatus (new additive proto field 12) and in the connect handshake query. This is the stable identity that fixes config-loss duplicate registrations (DESKTOP-I66IM5Q x9); server-side dedup keying that consumes it is SPEC-004 Task 2. Non-breaking, isolated. 5 unit tests; cargo fmt/clippy(-D warnings)/test green on GURU-5070. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -317,6 +317,14 @@ message AgentStatus {
|
||||
// negotiation (see StartStream.video_codec). Detected once and cached;
|
||||
// false on non-Windows / no HW encoder / MF unavailable.
|
||||
bool supports_h264 = 11;
|
||||
// Deterministic, recomputable hardware identity (v2 stable-identity Task 1).
|
||||
// Opaque "muid_<hex>" derived by SHA-256 hashing the OS machine GUID
|
||||
// (Windows: HKLM\SOFTWARE\Microsoft\Cryptography\MachineGuid); non-Windows /
|
||||
// registry-failure falls back to a persisted random UUID. Reported ALONGSIDE
|
||||
// agent_id (which is unchanged). The server-side dedup that consumes this is a
|
||||
// separate task; until then it is informational. Empty only if the agent
|
||||
// predates this field.
|
||||
string machine_uid = 12;
|
||||
}
|
||||
|
||||
// Server commands agent to uninstall itself
|
||||
|
||||
Reference in New Issue
Block a user