How do I put a panel in the dopesheet header or complet the dope sheep context menu?

Menus let you append (or prepend) draw_functions to them…

def YourFunction(self, context):
    self.layout.label(text="Place Your Function Here")

bpy.types.DOPESHEET_MT_context_menu.append(YourFunction)

Check the ‘Addon Add Object’ Template, as it shows how to add a function to a menu (the add_object_button)