builtin/remote: rewrite functions to take object_id arguments