Module: Anthropic::Models::Beta::Sessions::BetaManagedAgentsAgentToolEvaluation

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/beta/sessions/beta_managed_agents_agent_tool_evaluation.rb,
sig/anthropic/models/beta/sessions/beta_managed_agents_agent_tool_evaluation.rbs

Overview

Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants

Methods included from Internal::Util::SorbetRuntimeSupport

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

Methods included from Internal::Type::Converter

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

Class Method Details

.new(type:, **args) ⇒ Anthropic::Models::Beta::Sessions::BetaManagedAgentsAgentToolEvaluationAlwaysAllow, ...

Creates a new instance of the variant class whose type matches the given value, passing the remaining arguments to its constructor.

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

Parameters:

  • type (Symbol, String)
  • args (Hash{Symbol=>Object})

    Attributes for the chosen variant.

    @option args [Anthropic::Models::Beta::Sessions::BetaManagedAgentsAgentAutoEvaluatedPermissionAllow, Anthropic::Models::Beta::Sessions::BetaManagedAgentsAgentAutoEvaluatedPermissionAsk, Anthropic::Models::Beta::Sessions::BetaManagedAgentsAgentAutoEvaluatedPermissionDeny] :evaluated_permission The server's per-invocation judgement under the auto permission policy. Its type

Returns:

Raises:

  • (ArgumentError)


53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_agent_tool_evaluation.rb', line 53

def self.new(type:, **args)
  case type.to_sym
  when :always_allow
    Anthropic::Beta::Sessions::BetaManagedAgentsAgentToolEvaluationAlwaysAllow.new(**args)
  when :always_ask
    Anthropic::Beta::Sessions::BetaManagedAgentsAgentToolEvaluationAlwaysAsk.new(**args)
  when :auto
    Anthropic::Beta::Sessions::BetaManagedAgentsAgentToolEvaluationAuto.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_agent_tool_evaluation.rb', line 31

.variantsArray(Anthropic::Models::Beta::Sessions::BetaManagedAgentsAgentToolEvaluationAlwaysAllow, Anthropic::Models::Beta::Sessions::BetaManagedAgentsAgentToolEvaluationAlwaysAsk, Anthropic::Models::Beta::Sessions::BetaManagedAgentsAgentToolEvaluationAuto)



# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_agent_tool_evaluation.rb', line 35

Instance Method Details

#self?.variants::Array[Anthropic::Models::Beta::Sessions::beta_managed_agents_agent_tool_evaluation]

Returns:

  • (::Array[Anthropic::Models::Beta::Sessions::beta_managed_agents_agent_tool_evaluation])


25
# File 'sig/anthropic/models/beta/sessions/beta_managed_agents_agent_tool_evaluation.rbs', line 25

def self?.variants: -> ::Array[Anthropic::Models::Beta::Sessions::beta_managed_agents_agent_tool_evaluation]