Interface GateResponse

All Known Implementing Classes:
GateResponse.Escalation, GateResponse.Input, GateResponse.Review, GateResponse.StepApproval, 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.InputsubmitInput, GateResponse.ReviewsubmitReview, GateResponse.StepApprovaldecideStepApproval, GateResponse.Escalationapprove. Tool-gate resumes (continueAfterToolApproval / resolveToolDecision) extend this sealed set when the tool tier needs them — the harness drive loop is the shared, reusable surface.

  • Method Details

    • input

      static GateResponse input(Map<String,String> answers)
      Creates an GateResponse.Input response.
      Parameters:
      answers - item-id → answer map
      Returns:
      the response
    • review

      static GateResponse review(String note)
      Creates a GateResponse.Review response.
      Parameters:
      note - review note; may be blank
      Returns:
      the response
    • approveStep

      static GateResponse approveStep(String note)
      Creates an approving GateResponse.StepApproval response.
      Parameters:
      note - approval note; may be blank
      Returns:
      the response
    • rejectStep

      static GateResponse rejectStep(String reason)
      Creates a rejecting GateResponse.StepApproval response.
      Parameters:
      reason - rejection reason; may be blank
      Returns:
      the response
    • escalationApproval

      static GateResponse escalationApproval(String note)
      Creates an GateResponse.Escalation response.
      Parameters:
      note - approver note; may be blank
      Returns:
      the response
    • toolApprove

      static GateResponse toolApprove()
      Creates an approving GateResponse.ToolApproval that auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).
      Returns:
      the response
    • toolApprove

      static GateResponse toolApprove(String toolInvocationId)
      Creates an approving GateResponse.ToolApproval response targeting an explicit invocation id.
      Parameters:
      toolInvocationId - id of the pending tool invocation to approve
      Returns:
      the response
    • toolReject

      static GateResponse toolReject(String reason)
      Creates a rejecting GateResponse.ToolApproval that 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

      static GateResponse toolReject(String toolInvocationId, String reason)
      Creates a rejecting GateResponse.ToolApproval response targeting an explicit invocation id.
      Parameters:
      toolInvocationId - id of the pending tool invocation to reject
      reason - rejection reason; may be blank
      Returns:
      the response
    • toolContinue

      static GateResponse toolContinue()
      Creates a continue GateResponse.ToolDecision that auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).
      Returns:
      the response
    • toolContinue

      static GateResponse toolContinue(String toolInvocationId)
      Creates a continue GateResponse.ToolDecision response targeting an explicit invocation id.
      Parameters:
      toolInvocationId - id of the pending tool invocation to resolve
      Returns:
      the response
    • toolRetry

      static GateResponse toolRetry()
      Creates a retry GateResponse.ToolDecision that auto-targets the run's single current pending tool invocation (the harness fails closed when there is not exactly one).
      Returns:
      the response
    • toolRetry

      static GateResponse toolRetry(String toolInvocationId)
      Creates a retry GateResponse.ToolDecision response targeting an explicit invocation id.
      Parameters:
      toolInvocationId - id of the pending tool invocation to resolve
      Returns:
      the response