Module: Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionResource

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

Overview

A memory store attached to an agent session.

See Also:

  • Anthropic::Resources::Beta::Sessions::Resources#list

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::BetaManagedAgentsGitHubRepositoryResource, ...

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::BetaManagedAgentsSessionResource for more details.

Parameters:

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

    Attributes for the chosen variant.

    @option args [String] :id

    @option args [Time] :created_at A timestamp in RFC 3339 format

    @option args [String, String, nil] :mount_path Filesystem path where the store is mounted in the session container, e.g. /mnt/m

    @option args [Time] :updated_at A timestamp in RFC 3339 format

    @option args [String] :url

    @option args [Anthropic::Models::Beta::BetaManagedAgentsBranchCheckout, Anthropic::Models::Beta::BetaManagedAgentsCommitCheckout, nil] :checkout

    @option args [String] :file_id

    @option args [String] :memory_store_id The memory store ID (memstore_...). Must belong to the caller's organization and

    @option args [Symbol, Anthropic::Models::Beta::Sessions::BetaManagedAgentsMemoryStoreResource::Access, nil] :access Access mode for an attached memory store.

    @option args [String] :description Description of the memory store, snapshotted at attach time. Rendered into the a

    @option args [String, nil] :instructions Per-attachment guidance for the agent on how to use this store. Rendered into th

    @option args [String, nil] :name Display name of the memory store, snapshotted at attach time. Later edits to the

Returns:

Raises:

  • (ArgumentError)


63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_resource.rb', line 63

def self.new(type:, **args)
  case type.to_sym
  when :github_repository
    Anthropic::Beta::Sessions::BetaManagedAgentsGitHubRepositoryResource.new(**args)
  when :file
    Anthropic::Beta::Sessions::BetaManagedAgentsFileResource.new(**args)
  when :memory_store
    Anthropic::Beta::Sessions::BetaManagedAgentsMemoryStoreResource.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

Instance Method Details

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

Returns:

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


13
# File 'sig/anthropic/models/beta/sessions/beta_managed_agents_session_resource.rbs', line 13

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