Skip to content

Response Schemas

Each content class pairs 1:1 with one of these TypedDicts — access them by key (resp["decision"]), never by attribute.

Content class Response class Shape
BinaryApprovalContent BinaryApprovalResponse {"decision": str}
ModifyApprovalContent ModifyApprovalResponse {"decision": str, "values"?: dict}
SingleDecisionContent SingleDecisionResponse {"selected": str}
MultiDecisionContent MultiDecisionResponse {"selected": list[str]}
RankDecisionContent RankDecisionResponse {"ranking": list[str]}
FreetextContextContent FreetextContextResponse {"value": str}
FormContextContent FormContextResponse {"values": dict}
ConfirmContextContent ConfirmContextResponse {"confirmed": bool}
ContentEditContent ContentEditResponse {"content": str}
ToolArgsEditContent ToolArgsEditResponse {"args": dict}

hgateway_sdk.BinaryApprovalResponse

Bases: TypedDict

Shape of the operator response for a BinaryApprovalContent interrupt.

Returned by the gateway after the operator clicks one of the approval buttons.

Keys

decision (str): The key of the Choice the operator selected, e.g. "approve" or "reject".

hgateway_sdk.ModifyApprovalResponse

Bases: TypedDict

Shape of the operator response for a ModifyApprovalContent interrupt.

Returned by the gateway after the operator selects a decision and optionally edits one or more modifiable fields.

Keys

decision (str): The key of the Choice the operator selected, e.g. "approve" or "reject". values (dict, optional): Map of ModifiableField.key to the value the operator entered. Present only if the operator changed at least one field; omitted (NotRequired) when no edits were made.

hgateway_sdk.SingleDecisionResponse

Bases: TypedDict

Shape of the operator response for a SingleDecisionContent interrupt.

Returned by the gateway after the operator picks exactly one option.

Keys

selected (str): The key of the Choice the operator chose.

hgateway_sdk.MultiDecisionResponse

Bases: TypedDict

Shape of the operator response for a MultiDecisionContent interrupt.

Returned by the gateway after the operator selects one or more options.

Keys

selected (list[str]): Ordered list of Choice.key values for every option the operator selected. Length is guaranteed to satisfy the min_select / max_select constraints declared in the content.

hgateway_sdk.RankDecisionResponse

Bases: TypedDict

Shape of the operator response for a RankDecisionContent interrupt.

Returned by the gateway after the operator orders all options.

Keys

ranking (list[str]): All Choice.key values ordered from most preferred (index 0) to least preferred. Every key from the original options list is included exactly once.

hgateway_sdk.FreetextContextResponse

Bases: TypedDict

Shape of the operator response for a FreetextContextContent interrupt.

Returned by the gateway after the operator types their free-form answer.

Keys

value (str): The text the operator entered in the text-area input.

hgateway_sdk.FormContextResponse

Bases: TypedDict

Shape of the operator response for a FormContextContent interrupt.

Returned by the gateway after the operator fills in and submits the form.

Keys

values (dict): Map of FormField.key → submitted value for every field in the form. Value types match the FieldType declared on each FormField (str, int/float, bool, or ISO-8601 date string).

hgateway_sdk.ConfirmContextResponse

Bases: TypedDict

Shape of the operator response for a ConfirmContextContent interrupt.

Returned by the gateway after the operator clicks the confirmation button.

Keys

confirmed (bool): True when the operator clicked "Confirm", indicating they have read and acknowledged the statement.

hgateway_sdk.ContentEditResponse

Bases: TypedDict

Shape of the operator response for a ContentEditContent interrupt.

Returned by the gateway after the operator reviews and optionally edits the text draft.

Keys

content (str): The final text submitted by the operator. May be identical to the original draft if the operator made no changes, or a modified version reflecting their edits.

hgateway_sdk.ToolArgsEditResponse

Bases: TypedDict

Shape of the operator response for a ToolArgsEditContent interrupt.

Returned by the gateway after the operator reviews and optionally edits the tool call arguments.

Keys

args (dict): Map of ToolArg.key → submitted value for every argument in the ToolArgsEditContent. Read-only args (editable=False) are echoed back with their original values; editable args carry the operator's (possibly updated) values.