Build a resume :class:Command from request input items, if present.
Two input shapes are accepted, both keyed by interrupt.id:
FunctionCallOutputItemParam matched by call_id. Its
output field is decoded — a JSON object with any of
{"resume", "update", "goto"} populates the :class:Command;
anything else (string, malformed JSON, list of content parts) is
treated as the raw resume value.MCPApprovalResponse matched by approval_request_id.
approve=True resumes with the original interrupt value;
approve=False is not handled here — use
:func:detect_approval_rejection to surface the rejection to the
host.Conflict resolution: when both shapes target the same interrupt id
in one request, the function_call_output wins (richer payload)
and a warning is logged. This is a deliberate, deterministic
departure from Agent Framework's order-dependent last-write-wins.
Resume shape: with a single pending interrupt the resume value is
passed through as-is (Command(resume=value)). With parallel
pending interrupts LangGraph requires an id-keyed resume map — a
bare value raises RuntimeError: When there are multiple pending interrupts, you must specify the interrupt id when resuming. — so
every matched item that explicitly carries a resume value is folded
into Command(resume={id: value}). Answering only some of the pending
interrupts is allowed; the unanswered ones stay paused.
Resolved input items from the request.
Pending interrupts on the graph's checkpointed state.