[RFC PATCH 2/5] history: expand history API