remove framework/runtime

[finishes #40469425]
Revert "remove framework/runtime"

This reverts commit 2ea74b87db46ea7c8cece5b3a066d41f482a0527.
add a private api for service gateway to update handles