Port agent diff logic from CLI (diff_agents.go) to server package. Returns []diffItem with Kind='agent' for link/update/prune/local actions.