Class: Anthropic::Models::Beta::Sessions::BetaManagedAgentsUserToolConfirmationEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb,
sig/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rbs

Defined Under Namespace

Modules: Result, Type

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, result:, tool_use_id:, type:, deny_message: nil, processed_at: nil, session_thread_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Anthropic::Models::Beta::Sessions::BetaManagedAgentsUserToolConfirmationEvent for more details.

A tool confirmation event that approves or denies a pending tool execution.

Parameters:



# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb', line 56

Instance Attribute Details

#deny_messageString?

Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


40
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb', line 40

optional :deny_message, String, nil?: true

#idString

Unique identifier for this event.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb', line 12

required :id, String

#processed_atTime?

A timestamp in RFC 3339 format

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


46
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb', line 46

optional :processed_at, Time, nil?: true

#resultSymbol, Anthropic::Models::Beta::Sessions::BetaManagedAgentsUserToolConfirmationEvent::Result

UserToolConfirmationResult enum

Parameters:

  • value (Anthropic::Models::Beta::Sessions::BetaManagedAgentsUserToolConfirmationEvent::result)

Returns:



18
19
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb', line 18

required :result,
enum: -> { Anthropic::Beta::Sessions::BetaManagedAgentsUserToolConfirmationEvent::Result }

#session_thread_idString?

When set, the confirmation routes to this subagent's thread rather than the primary. Echo this from the session_thread_id on the agent.tool_use or agent.mcp_tool_use event that prompted the approval.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


54
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb', line 54

optional :session_thread_id, String, nil?: true

#tool_use_idString

The id of the agent.tool_use or agent.mcp_tool_use event this result corresponds to, which can be found in the last session.status_idle event's stop_reason.event_ids field.

Parameters:

  • value (String)

Returns:

  • (String)


28
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb', line 28

required :tool_use_id, String

#typeSymbol, Anthropic::Models::Beta::Sessions::BetaManagedAgentsUserToolConfirmationEvent::Type

Parameters:

  • value (Anthropic::Models::Beta::Sessions::BetaManagedAgentsUserToolConfirmationEvent::type_)

Returns:



33
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb', line 33

required :type, enum: -> { Anthropic::Beta::Sessions::BetaManagedAgentsUserToolConfirmationEvent::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rb', line 86

Instance Method Details

#to_hash{

Returns:

  • ({)


41
# File 'sig/anthropic/models/beta/sessions/beta_managed_agents_user_tool_confirmation_event.rbs', line 41

def to_hash: -> {