Class: AgUiProtocol::Core::Capabilities::TransportCapabilities

Inherits:
Types::Model
  • Object
show all
Defined in:
lib/ag_ui_protocol/core/capabilities.rb

Overview

Declares which transport mechanisms the agent supports.

Clients use this to pick the best connection strategy. Only set flags to ‘true` for transports your agent actually handles — omit or set `false` for unsupported ones.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Types::Model

#as_json, #to_json

Constructor Details

#initialize(streaming: nil, websocket: nil, http_binary: nil, push_notifications: nil, resumable: nil) ⇒ TransportCapabilities

Returns a new instance of TransportCapabilities.



154
155
156
157
158
159
160
161
162
163
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 154

def initialize(
  streaming: nil, websocket: nil, http_binary: nil,
  push_notifications: nil, resumable: nil
)
  @streaming = streaming
  @websocket = websocket
  @http_binary = http_binary
  @push_notifications = push_notifications
  @resumable = resumable
end

Instance Attribute Details

#http_binaryObject (readonly)

Returns the value of attribute http_binary.



132
133
134
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 132

def http_binary
  @http_binary
end

#push_notificationsObject (readonly)

Returns the value of attribute push_notifications.



135
136
137
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 135

def push_notifications
  @push_notifications
end

#resumableObject (readonly)

Returns the value of attribute resumable.



138
139
140
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 138

def resumable
  @resumable
end

#streamingObject (readonly)

Returns the value of attribute streaming.



126
127
128
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 126

def streaming
  @streaming
end

#websocketObject (readonly)

Returns the value of attribute websocket.



129
130
131
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 129

def websocket
  @websocket
end

Instance Method Details

#to_hObject



166
167
168
169
170
171
172
173
174
# File 'lib/ag_ui_protocol/core/capabilities.rb', line 166

def to_h
  {
    streaming: @streaming,
    websocket: @websocket,
    http_binary: @http_binary,
    push_notifications: @push_notifications,
    resumable: @resumable
  }
end