- All Known Implementing Classes:
GateResponse.Escalation,GateResponse.Input,GateResponse.Review,GateResponse.StepApproval,GateResponse.ToolApproval,GateResponse.ToolDecision
public sealed interface GateResponse
permits GateResponse.Input, GateResponse.Review, GateResponse.StepApproval, GateResponse.Escalation, GateResponse.ToolApproval, GateResponse.ToolDecision
A scripted human response that
WorkflowTestHarness drains
at each human-in-the-loop pause to drive a run forward deterministically. One response is consumed
per pause, in queue order; when the queue is exhausted the run is left at whatever state it last
reached (terminal or still paused), so a scenario may also assert a meaningful pending state.
The variants map one-to-one onto the runtime resume verbs: GateResponse.Input →
submitInput, GateResponse.Review → submitReview, GateResponse.StepApproval →
decideStepApproval, GateResponse.Escalation → approve. Tool-gate resumes
(continueAfterToolApproval / resolveToolDecision) extend this sealed set when the
tool tier needs them — the harness drive loop is the shared, reusable surface.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordAn approval note for anAWAITING_APPROVALpause raised by anESCALATEcommand.static final recordAnswers for anAWAITING_INPUTpause, keyed by artifact item id.static final recordA forward-only note for anAWAITING_REVIEWpause (aHUMAN_REVIEWgate).static final recordAn approve/reject decision for anAWAITING_STEP_APPROVALpause (aHUMAN_APPROVALgate).static final recordAn approve/reject decision for anAWAITING_TOOL_APPROVALpause (tool policyRequireApproval).static final recordA continue/retry decision for anAWAITING_TOOL_DECISIONpause (tool policyDenyor a failed invocation). -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic GateResponseapproveStep(String note) Creates an approvingGateResponse.StepApprovalresponse.static GateResponseescalationApproval(String note) Creates anGateResponse.Escalationresponse.static GateResponseCreates anGateResponse.Inputresponse.static GateResponserejectStep(String reason) Creates a rejectingGateResponse.StepApprovalresponse.static GateResponseCreates aGateResponse.Reviewresponse.static GateResponseCreates an approvingGateResponse.ToolApprovalthat auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).static GateResponsetoolApprove(String toolInvocationId) Creates an approvingGateResponse.ToolApprovalresponse targeting an explicit invocation id.static GateResponseCreates a continueGateResponse.ToolDecisionthat auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).static GateResponsetoolContinue(String toolInvocationId) Creates a continueGateResponse.ToolDecisionresponse targeting an explicit invocation id.static GateResponsetoolReject(String reason) Creates a rejectingGateResponse.ToolApprovalthat auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).static GateResponsetoolReject(String toolInvocationId, String reason) Creates a rejectingGateResponse.ToolApprovalresponse targeting an explicit invocation id.static GateResponseCreates a retryGateResponse.ToolDecisionthat auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).static GateResponseCreates a retryGateResponse.ToolDecisionresponse targeting an explicit invocation id.
-
Method Details
-
input
Creates anGateResponse.Inputresponse.- Parameters:
answers- item-id → answer map- Returns:
- the response
-
review
Creates aGateResponse.Reviewresponse.- Parameters:
note- review note; may be blank- Returns:
- the response
-
approveStep
Creates an approvingGateResponse.StepApprovalresponse.- Parameters:
note- approval note; may be blank- Returns:
- the response
-
rejectStep
Creates a rejectingGateResponse.StepApprovalresponse.- Parameters:
reason- rejection reason; may be blank- Returns:
- the response
-
escalationApproval
Creates anGateResponse.Escalationresponse.- Parameters:
note- approver note; may be blank- Returns:
- the response
-
toolApprove
Creates an approvingGateResponse.ToolApprovalthat auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).- Returns:
- the response
-
toolApprove
Creates an approvingGateResponse.ToolApprovalresponse targeting an explicit invocation id.- Parameters:
toolInvocationId- id of the pending tool invocation to approve- Returns:
- the response
-
toolReject
Creates a rejectingGateResponse.ToolApprovalthat auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).- Parameters:
reason- rejection reason; may be blank- Returns:
- the response
-
toolReject
Creates a rejectingGateResponse.ToolApprovalresponse targeting an explicit invocation id.- Parameters:
toolInvocationId- id of the pending tool invocation to rejectreason- rejection reason; may be blank- Returns:
- the response
-
toolContinue
Creates a continueGateResponse.ToolDecisionthat auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).- Returns:
- the response
-
toolContinue
Creates a continueGateResponse.ToolDecisionresponse targeting an explicit invocation id.- Parameters:
toolInvocationId- id of the pending tool invocation to resolve- Returns:
- the response
-
toolRetry
Creates a retryGateResponse.ToolDecisionthat auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).- Returns:
- the response
-
toolRetry
Creates a retryGateResponse.ToolDecisionresponse targeting an explicit invocation id.- Parameters:
toolInvocationId- id of the pending tool invocation to resolve- Returns:
- the response
-