One interactive approval run (PRD §6): a GenServer holding the run state machine. Steps execute in supervised tasks so control commands (halt above all) stay responsive while a call is in flight.
States: :paused → :awaiting_permission → :executing → … →
:completed | :halted | :failed.
Commands (see command/2): :step, :next, :run_all, {:halt, reason},
:approve, :decline, {:grant, effect, scope}, {:grant, effect, scope, pattern}, :retry, :skip, {:edit, target, value},
{:set_breakpoint, id}, {:clear_breakpoint, id}, {:annotate, target, text}.
Events are sent to the subscriber as {:genai_approval, run_id, event} maps
with a monotonic :seq.
Summary
Functions
Block until the run reaches a terminal state; returns the §9 result.
Returns a specification to start this module under a supervisor.
Full UI-facing state snapshot (feeds GenAI.Approval.Render.model/1).
Add a live event subscriber (defaults to the caller).
Functions
Block until the run reaches a terminal state; returns the §9 result.
Returns a specification to start this module under a supervisor.
See Supervisor.
Full UI-facing state snapshot (feeds GenAI.Approval.Render.model/1).
Add a live event subscriber (defaults to the caller).