Getting node ID strings from a GVJ_t edge

There’s a plugin I’d like to derive from gvrender_core_svg.c, but I got stuck at svg_begin_edge. My code needs the ID strings of the nodes connected by the edge. However, I don’t know how to acquire those from the GVJ_t * passed into the function.

While I can get the endpoint node_t * values with agtail(obj->u.e) and aghead(obj->u.e), I don’t see a way to map those into an obj_state_t * so I can grab their ID strings with obj->id.

Am I missing something obvious, or is this difficult/impossible?

Thanks,
— Scott