plexus.cli.procedure.state_machine_stages module

Extract TaskStage configuration from Procedure state machines.

This module provides functions to convert state machine definitions into TaskStage configurations that can be used with the Task progress tracking system.

plexus.cli.procedure.state_machine_stages.get_stage_names_from_state_machine() List[str]

Get the ordered list of stage names from the state machine.

Returns:

List of stage names in order

plexus.cli.procedure.state_machine_stages.get_stages_from_state_machine() Dict[str, StageConfig]

Get TaskStage configurations from the procedure state machine.

Currently returns hard-coded stages from ProcedureStateMachine. In the future, this will parse the state machine from YAML configuration.

Returns:

Dictionary mapping stage names to StageConfig objects

plexus.cli.procedure.state_machine_stages.parse_state_machine_from_yaml(yaml_code: str) Dict[str, StageConfig]

Parse state machine configuration from YAML and return TaskStage configs.

This is a placeholder for future functionality where procedures can define custom state machines in their YAML configuration.

Args:

yaml_code: The YAML configuration containing state machine definition

Returns:

Dictionary mapping stage names to StageConfig objects

TODO: Implement YAML parsing for custom state machines