Class: HermesAgent::Client::Entities::Capabilities

Inherits:
HermesAgent::Client::Entity show all
Defined in:
lib/hermes_agent/client/entities/capabilities.rb

Overview

The server's advertised capabilities (GET /v1/capabilities). Field readers are best-effort; HermesAgent::Client::Entity#to_h remains the source of truth.

Instance Method Summary collapse

Methods inherited from HermesAgent::Client::Entity

#==, #[], #eql?, #hash, #to_h

Instance Method Details

#authAuth?

The authentication scheme, wrapped in an Auth entity. Returns nil when the field is absent.

Returns:



249
250
251
252
# File 'lib/hermes_agent/client/entities/capabilities.rb', line 249

def auth
  raw = self["auth"]
  raw.is_a?(::Hash) ? Auth.new(raw) : nil
end

#endpointsHash{String => Endpoint}?

The advertised routes, keyed by logical name (e.g. "models"), each value wrapped in an Endpoint. Returns nil when the field is absent.

Returns:



280
281
282
283
284
285
# File 'lib/hermes_agent/client/entities/capabilities.rb', line 280

def endpoints
  raw = self["endpoints"]
  return nil unless raw.is_a?(::Hash)

  raw.transform_values { |value| Endpoint.new(value) }
end

#featuresFeatures?

The feature matrix, wrapped in a Features entity. Returns nil when the field is absent.

Returns:



269
270
271
272
# File 'lib/hermes_agent/client/entities/capabilities.rb', line 269

def features
  raw = self["features"]
  raw.is_a?(::Hash) ? Features.new(raw) : nil
end

#modelString?

The configured server-side model id, e.g. "hermes-test".

Returns:

  • (String, nil)


240
241
242
# File 'lib/hermes_agent/client/entities/capabilities.rb', line 240

def model
  self["model"]
end

#objectString?

The object type, "hermes.api_server.capabilities".

Returns:

  • (String, nil)


224
225
226
# File 'lib/hermes_agent/client/entities/capabilities.rb', line 224

def object
  self["object"]
end

#platformString?

The platform identifier, e.g. "hermes-agent".

Returns:

  • (String, nil)


232
233
234
# File 'lib/hermes_agent/client/entities/capabilities.rb', line 232

def platform
  self["platform"]
end

#runtimeRuntime?

The execution model, wrapped in a Runtime entity. Returns nil when the field is absent.

Returns:



259
260
261
262
# File 'lib/hermes_agent/client/entities/capabilities.rb', line 259

def runtime
  raw = self["runtime"]
  raw.is_a?(::Hash) ? Runtime.new(raw) : nil
end