Files
multica/server/pkg
Jiang Bohan 97d292d89b feat(daemon): stabilize daemon_id with persistent UUID + legacy consolidation
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.
2026-04-17 02:30:40 +08:00
..