Class: SkillBench::Tools::Registry

Inherits:
Object
  • Object
show all
Defined in:
lib/skill_bench/tools/registry.rb

Overview

Registry for all available tools, providing their definitions to the LLM.

Constant Summary collapse

DEFINITIONS =

The static tool definitions sent to the LLM API. The tool schemas are constant JSON-schema specs (no per-call state or runtime config), so the array and its nested hashes are built once and deep-frozen for reuse across every ReAct step instead of being reallocated on each call.

Returns:

  • (Array<Hash>)

    Frozen list of tools with their names, descriptions, and schemas.

deep_freeze(
  [
    ReadFile.definition,
    WriteFile.definition,
    RunCommand.definition
  ]
)

Class Method Summary collapse

Class Method Details

.definitionsArray<Hash>

Returns the memoized, frozen array of tool definitions for the LLM API.

Returns:

  • (Array<Hash>)

    The frozen list of available tools with their names, descriptions, and schemas.



44
45
46
# File 'lib/skill_bench/tools/registry.rb', line 44

def self.definitions
  DEFINITIONS
end