Class: HermesAgent::Client::Entities::RunApprovalResponse

Inherits:
HermesAgent::Client::Entity show all
Defined in:
lib/hermes_agent/client/entities/run.rb

Overview

The acknowledgement returned by responding to a run's pending approval (Resources::Runs#respond_approval): {object: "hermes.run.approval_response", run_id, choice, resolved}. The run then resumes (the gated tool executes on an approve, or is aborted on a deny — though a denied run still ends completed); observe the approval.responded and tool.completed frames on the event stream, or poll Resources::Runs#get, for the outcome.

Instance Method Summary collapse

Methods inherited from HermesAgent::Client::Entity

#==, #[], #eql?, #hash, #to_h

Instance Method Details

#choiceString?

The choice that was submitted: "once", "session", "always", or "deny".

Returns:

  • (String, nil)


413
414
415
# File 'lib/hermes_agent/client/entities/run.rb', line 413

def choice
  self["choice"]
end

#objectString?

The object type, "hermes.run.approval_response".

Returns:

  • (String, nil)


396
397
398
# File 'lib/hermes_agent/client/entities/run.rb', line 396

def object
  self["object"]
end

#resolvedInteger?

The number of pending approvals resolved by the response.

Returns:

  • (Integer, nil)


421
422
423
# File 'lib/hermes_agent/client/entities/run.rb', line 421

def resolved
  self["resolved"]
end

#run_idString?

The id of the run whose approval was answered ("run_…").

Returns:

  • (String, nil)


404
405
406
# File 'lib/hermes_agent/client/entities/run.rb', line 404

def run_id
  self["run_id"]
end