Flow Eval
Evaluate flow conditions against session variables with detailed tracing.
/flow-eval
Evaluate a flow condition against session variables with a step-by-step trace.
- Read
.prompt-language/session-state.json. - Variable source selection:
- If
status == "active", usestate.variables. - Otherwise, treat the loaded state as the last session state and still use
state.variables. - If no primary state exists, try
.prompt-language/session-state.bak.json, then.prompt-language/session-state.bak2.json.
- If
- Evaluate the provided condition using runtime-compatible condition semantics:
- comparisons:
==,!=,>,<,>=,<= - boolean operators:
and,or,notwith parentheses support - variable references: bare identifiers and
${var}tokens
- comparisons:
- Return:
- final boolean/null result,
- intermediate evaluation steps with resolved operand values,
- explicit undefined-variable errors (do not silently coerce missing vars).
- If no state file can be loaded, return a clear message: no active/last session state available.
Use this for debugging branch behavior before if/while/until nodes execute.