mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-05 13:29:44 +02:00
Replaces the hostname-derived daemon_id with a UUID written to ~/.multica/<profile>/daemon.id on first start and reread forever after, so macOS .local suffix drift, system rename, or profile switch can no longer produce a second agent_runtime row for the same physical daemon. At registration the daemon reports any hostname-based identifiers it may have used historically (hostname, hostname.local, hostname-<profile>, hostname.local-<profile>) as legacy_daemon_ids. The server reparents agents and tasks from matching stale rows onto the new UUID row, deletes them, and records the last value in a new legacy_daemon_id column for audit. Scoped by (workspace, provider, owner) so another user's runtimes on a shared hostname are never touched. Removes MigrateAgentsToRuntime and its LIKE hostname-% logic; the UUID makes runtime rebuild impossible, so the brittle profile-prefix heuristic is no longer needed. Refs MUL-975.