Class: Antigravity::Config
- Inherits:
-
Object
- Object
- Antigravity::Config
- Defined in:
- lib/antigravity/config.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#default_model ⇒ Object
Returns the value of attribute default_model.
-
#harness_path ⇒ Object
Returns the value of attribute harness_path.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#timeout_handshake ⇒ Object
Timeouts (seconds) — aggressive for dev, override via ENV for prod.
-
#timeout_llm ⇒ Object
Timeouts (seconds) — aggressive for dev, override via ENV for prod.
-
#timeout_ws ⇒ Object
Timeouts (seconds) — aggressive for dev, override via ENV for prod.
Instance Method Summary collapse
- #api_key? ⇒ Boolean
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/antigravity/config.rb', line 13 def initialize @api_key = ENV["GEMINI_API_KEY"] @default_model = ENV["GEMINI_MODEL"] || ENV["ANTIGRAVITY_MODEL"] || "gemini-3.6-flash" @harness_path = ENV["ANTIGRAVITY_HARNESS_PATH"] || File.("~/.antigravity/bin/localharness") @log_level = :info # Timeouts: aggressive for dev, relax via ENV for production @timeout_llm = (ENV["ANTIGRAVITY_TIMEOUT_LLM"] || 40).to_i @timeout_ws = (ENV["ANTIGRAVITY_TIMEOUT_WS"] || 3).to_i @timeout_handshake = (ENV["ANTIGRAVITY_TIMEOUT_HANDSHAKE"] || 5).to_i end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/antigravity/config.rb', line 5 def api_key @api_key end |
#default_model ⇒ Object
Returns the value of attribute default_model.
5 6 7 |
# File 'lib/antigravity/config.rb', line 5 def default_model @default_model end |
#harness_path ⇒ Object
Returns the value of attribute harness_path.
5 6 7 |
# File 'lib/antigravity/config.rb', line 5 def harness_path @harness_path end |
#log_level ⇒ Object
Returns the value of attribute log_level.
5 6 7 |
# File 'lib/antigravity/config.rb', line 5 def log_level @log_level end |
#timeout_handshake ⇒ Object
Timeouts (seconds) — aggressive for dev, override via ENV for prod. ANTIGRAVITY_TIMEOUT_LLM — per-message wait for LLM response (default: 20s) ANTIGRAVITY_TIMEOUT_WS — WebSocket connect/handshake (default: 3s) ANTIGRAVITY_TIMEOUT_HANDSHAKE — stdio binary handshake (default: 5s)
11 12 13 |
# File 'lib/antigravity/config.rb', line 11 def timeout_handshake @timeout_handshake end |
#timeout_llm ⇒ Object
Timeouts (seconds) — aggressive for dev, override via ENV for prod. ANTIGRAVITY_TIMEOUT_LLM — per-message wait for LLM response (default: 20s) ANTIGRAVITY_TIMEOUT_WS — WebSocket connect/handshake (default: 3s) ANTIGRAVITY_TIMEOUT_HANDSHAKE — stdio binary handshake (default: 5s)
11 12 13 |
# File 'lib/antigravity/config.rb', line 11 def timeout_llm @timeout_llm end |
#timeout_ws ⇒ Object
Timeouts (seconds) — aggressive for dev, override via ENV for prod. ANTIGRAVITY_TIMEOUT_LLM — per-message wait for LLM response (default: 20s) ANTIGRAVITY_TIMEOUT_WS — WebSocket connect/handshake (default: 3s) ANTIGRAVITY_TIMEOUT_HANDSHAKE — stdio binary handshake (default: 5s)
11 12 13 |
# File 'lib/antigravity/config.rb', line 11 def timeout_ws @timeout_ws end |
Instance Method Details
#api_key? ⇒ Boolean
25 26 27 |
# File 'lib/antigravity/config.rb', line 25 def api_key? !@api_key.nil? && !@api_key.empty? end |