Module: Legion::Extensions::Llm::Inventory::Capabilities

Defined in:
lib/legion/extensions/llm/inventory/capabilities.rb

Overview

Inventory-side capability normalization. Every per-gem DiscoveryRefresh actor calls this from ‘lanes_from_instance` to coerce offering capabilities into a canonical symbol list before writing the lane to Inventory. Without this constant, every actor’s guard ‘return [] unless defined?(…)` fires and the lane is written with `capabilities: []` — even when the operator declared `enable_tools: true` / `enable_thinking: true` on the instance and the provider’s CapabilityPolicy correctly resolved them in the offering.

Delegates to Legion::Extensions::Llm::Capabilities so the alias table (function_calling/tool_use/tool_calls/tool/functions → tools, etc.) stays in one place.

Constant Summary collapse

ALIASES =
Legion::Extensions::Llm::Capabilities::ALIASES

Class Method Summary collapse

Class Method Details

.include_all?(available, required) ⇒ Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/legion/extensions/llm/inventory/capabilities.rb', line 33

def include_all?(available, required, **)
  Legion::Extensions::Llm::Capabilities.include_all?(available, required, **)
end

.merge(*sets) ⇒ Object



29
30
31
# File 'lib/legion/extensions/llm/inventory/capabilities.rb', line 29

def merge(*sets, **)
  Legion::Extensions::Llm::Capabilities.merge(*sets, **)
end

.normalize(caps) ⇒ Object



25
26
27
# File 'lib/legion/extensions/llm/inventory/capabilities.rb', line 25

def normalize(caps, **)
  Legion::Extensions::Llm::Capabilities.normalize(caps, **)
end