Here is one approach you could consider.
It assumes that each of your modules follows a set of conventions. For example a searchable module will expose a search function and a saveable module will expose a save function.
Given that, you can build out your header like this to contain the buttons and hide/show them as necessary.
<div id="header">
<!-- other header content -->
<!-- injected header buttons -->
<!-- will only be shown if the activeItem has a search function -->
<button data-bind="visible: router.activeItem().search,
click: router.activeItem().search">Search</button>
<!-- will only be shown if the activeItem has a resetfunction -->
<button data-bind="visible: router.activeItem().reset,
click: router.activeItem().reset">Reset</button>
<!-- will only be shown if the activeItem has a save function -->
<button data-bind="visible: router.activeItem().save,
click: router.activeItem().save">Save</button>
<!-- will only be shown if the activeItem has a cancel function -->
<button data-bind="visible: router.activeItem().cancel,
click: router.activeItem().cancel">Cancel</button>
</div>
If your modules expose any of the functions that you mentioned then the buttons will be shown accordingly.