Add History API on process side

Powered by very bad and absolutely not DRY copy-paste