Reload Hook#
Overview#
ReloadHook enables workflow reloading from remote GitHub repositories, allowing workflows to resume from previous states.
Its key features include:
Repository Reloading
Prefix Processing: Processes
self.prefixlist of (role, content) tuplesCommand Re-execution: Re-executes terminal commands from previous session
State Restoration: Restores workflow state from previous execution
Command Processing
Terminal Commands:
terminal_node._exec_and_return_output(cmd_type, cmd)- Re-executes commandsTerminal Text:
terminal_node.get_terminal_text()- Gets current terminal stateRole Mapping: Maps string roles to Role enums for context restoration
Workflow Continuation
Executive Mode:
DirectActionExtraInfo(action="p", target_step=data.num_steps - 1)- Auto-proceed in executive modeNode Selection: Sets
workflow.start_nodebased on last step typeContext Integration: Integrates reloaded context into current workflow
Configuration#
Prefix Data:
prefix: List[Tuple[str, str]]- List of (role, content) pairs to reload