Class: LLM::A2A::Card::Capabilities

Inherits:
Object
  • Object
show all
Defined in:
lib/llm/a2a/card/capabilities.rb

Overview

Represents the agent's optional capabilities.

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Capabilities

Returns a new instance of Capabilities.

Parameters:

  • data (Hash)


9
10
11
# File 'lib/llm/a2a/card/capabilities.rb', line 9

def initialize(data)
  @data = LLM::Object.from(data)
end

Instance Method Details

#streamingBoolean

Returns whether the agent supports streaming.

Returns:

  • (Boolean)


16
17
18
# File 'lib/llm/a2a/card/capabilities.rb', line 16

def streaming
  @data.streaming == true
end

#push_notificationsBoolean

Returns whether the agent supports push notifications.

Returns:

  • (Boolean)


23
24
25
# File 'lib/llm/a2a/card/capabilities.rb', line 23

def push_notifications
  @data.pushNotifications == true
end

#extended_agent_cardBoolean

Returns whether the agent exposes an extended card.

Returns:

  • (Boolean)


30
31
32
# File 'lib/llm/a2a/card/capabilities.rb', line 30

def extended_agent_card
  @data.extendedAgentCard == true
end

#extensionsArray<LLM::Object>

Returns the declared agent extensions.

Returns:



37
38
39
# File 'lib/llm/a2a/card/capabilities.rb', line 37

def extensions
  @extensions ||= (@data.extensions || []).map { LLM::Object.from(_1) }
end