jump is a control-flow plugin used inside sequences to execute another plugin or sequence temporarily and then return to continue the caller sequence. It implements push/return semantics: the runtime executes the target and then resumes the next step of the original sequence.
Two common ways to invoke jump inside a sequence:
# sequence: main
- exec: jump audit_handler
# sequence: main
- exec:
jump: audit_handler
Both forms instruct the runtime to execute the plugin or sequence named audit_handler, then return to continue the calling sequence.
jump sets the metadata key jump_target (string) to the requested target name and sets the RETURN_FLAG to true to signal the sequence executor that control flow needs to handle the jump.SequencePlugin detects jump_target and resolves the target from the injected __plugin_registry in context, then executes the target plugin/sequence immediately.SequencePlugin will continue with the next step of the calling sequence (push/return).RETURN_FLAG internally, the sequence implementation takes care to preserve the caller’s flow (so target-local return flags do not inadvertently stop the caller). However, if a jump target sets goto_label, that will cause a sequence replacement once the target returns (see notes).gotojump: Push/return — execute target, then continue caller sequence.goto: Replace — stop caller sequence and replace it with target sequence.Use jump for auxiliary tasks (logging, metrics, checks) that should not permanently alter the caller’s flow.
jump to other targets (nested jumps are supported).goto_label, that label will be observed after the target returns and the PluginHandler will replace the entire entry sequence with the goto target. Use this intentionally and with caution.RETURN_FLAG state across jump target execution so that target-local RETURN_FLAG settings do not inadvertently stop the caller (see implementation notes in code).jump must be registered in the plugin registry (e.g., sequences or exec plugins).