Class: OllamaAgent::Runtime::KernelToolSeed

Inherits:
Object
  • Object
show all
Defined in:
lib/ollama_agent/runtime/kernel_tool_seed.rb

Overview

Registers default phase-scoped tools on ToolRuntime::ToolRegistry.

Defined Under Namespace

Modules: SearchTextBackend Classes: PlanningSandbox

Constant Summary collapse

MAX_READ_BYTES =
2_097_152
MAX_LIST_FILES =
500

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tool_registry:, kernel_pipeline:) ⇒ KernelToolSeed

Returns a new instance of KernelToolSeed.



29
30
31
32
33
34
35
# File 'lib/ollama_agent/runtime/kernel_tool_seed.rb', line 29

def initialize(tool_registry:, kernel_pipeline:)
  @tool_registry = tool_registry
  @kernel_pipeline = kernel_pipeline
  @root = kernel_pipeline.workspace_root
  @translator = IntentTranslator.new(workspace_root: @root)
  @planning = PlanningSandbox.new(@root)
end

Class Method Details

.seed(tool_registry:, kernel_pipeline:) ⇒ Object



20
21
22
# File 'lib/ollama_agent/runtime/kernel_tool_seed.rb', line 20

def self.seed(tool_registry:, kernel_pipeline:)
  new(tool_registry: tool_registry, kernel_pipeline: kernel_pipeline).seed
end

.strip_meta_arguments(arguments) ⇒ Object



24
25
26
27
# File 'lib/ollama_agent/runtime/kernel_tool_seed.rb', line 24

def self.strip_meta_arguments(arguments)
  h = arguments.to_h.transform_keys { |k| k.respond_to?(:to_sym) ? k.to_sym : k }
  h.except(:manifest_id, :mode)
end

Instance Method Details

#seedObject



37
38
39
40
41
42
# File 'lib/ollama_agent/runtime/kernel_tool_seed.rb', line 37

def seed
  register_planning
  register_mutation_translated_tools
  register_verification_stubs
  register_integration_stubs
end