Class: Anthropic::Models::Beta::Sessions::BetaManagedAgentsSessionThreadStatusTerminatedEvent

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

Instance Attribute 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:, agent_name:, processed_at:, session_thread_id:, type: :"session.thread_status_terminated") ⇒ BetaManagedAgentsSessionThreadStatusTerminatedEvent

A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.

Parameters:

  • id (String) —

    Unique identifier for this event.

  • agent_name (String) —

    Name of the agent the thread runs.

  • processed_at (Time) —

    Timestamp of the status transition.

  • session_thread_id (String) —

    Public sthr_ ID of the thread that terminated.

  • type (Symbol, :"session.thread_status_terminated") (defaults to: :"session.thread_status_terminated")
  • id: (String)
  • agent_name: (String)
  • processed_at: (Time)
  • session_thread_id: (String)
  • type: (:"session.thread_status_terminated") (defaults to: :"session.thread_status_terminated")


# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_status_terminated_event.rb', line 37

Instance Attribute Details

#agent_name ⇒ String

Name of the agent the thread runs.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :agent_name, String

#id ⇒ String

Unique identifier for this event.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#processed_at ⇒ Time

Timestamp of the status transition.

Parameters:

  • value (Time)

Returns:

  • (Time)


24
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_status_terminated_event.rb', line 24

required :processed_at, Time

#session_thread_id ⇒ String

Public sthr_ ID of the thread that terminated.

Parameters:

  • value (String)

Returns:

  • (String)


30
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_session_thread_status_terminated_event.rb', line 30

required :session_thread_id, String

#type ⇒ Symbol, :"session.thread_status_terminated"

Parameters:

  • value (:"session.thread_status_terminated")

Returns:

  • (Symbol, :"session.thread_status_terminated")


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

required :type, const: :"session.thread_status_terminated"

Instance Method Details

#to_hash ⇒ { id: String, agent_name: String, processed_at: Time, session_thread_id: String, type: :"session.thread_status_terminated" }

Returns:

  • ({ id: String, agent_name: String, processed_at: Time, session_thread_id: String, type: :"session.thread_status_terminated" })


33
34
35
36
37
38
39
# File 'sig/anthropic/models/beta/sessions/beta_managed_agents_session_thread_status_terminated_event.rbs', line 33

def to_hash: -> {
  id: String,
  agent_name: String,
  processed_at: Time,
  session_thread_id: String,
  type: :"session.thread_status_terminated"
}