Module: OllamaAgent::SelfImprovement::Modes

Defined in:
lib/ollama_agent/self_improvement/modes.rb

Overview

CLI modes for self_review / improve (analysis-only, interactive fixes, automated sandbox).

Constant Summary collapse

VALID =
%w[analysis interactive automated].freeze

Class Method Summary collapse

Class Method Details

.normalize(mode) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/ollama_agent/self_improvement/modes.rb', line 11

def normalize(mode)
  case mode.to_s.strip.downcase
  when "", "analysis", "1", "readonly", "read-only" then "analysis"
  when "interactive", "2", "fix", "confirm" then "interactive"
  when "automated", "3", "sandbox", "full" then "automated"
  else mode.to_s.strip.downcase
  end
end

.valid?(mode) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/ollama_agent/self_improvement/modes.rb', line 20

def valid?(mode)
  VALID.include?(mode)
end