feat: add centralized Config class with auto-save to ~/.strix/cli-config.json

- Add Config class with all env var defaults in one place
- Auto-load saved config on startup (env vars take precedence)
- Auto-save config after successful LLM warm-up
- Replace scattered os.getenv() calls with Config.get()
This commit is contained in:
0xallam
2026-01-10 15:49:03 -08:00
committed by Ahmed Allam
parent 2d35a4e0bd
commit 543b785d1a
13 changed files with 184 additions and 45 deletions
+4 -2
View File
@@ -4,6 +4,8 @@ from typing import Any
import httpx
from strix.config import Config
if os.getenv("STRIX_SANDBOX_MODE", "false").lower() == "false":
from strix.runtime import get_runtime
@@ -17,8 +19,8 @@ from .registry import (
)
SANDBOX_EXECUTION_TIMEOUT = float(os.getenv("STRIX_SANDBOX_EXECUTION_TIMEOUT", "500"))
SANDBOX_CONNECT_TIMEOUT = float(os.getenv("STRIX_SANDBOX_CONNECT_TIMEOUT", "10"))
SANDBOX_EXECUTION_TIMEOUT = float(Config.get("strix_sandbox_execution_timeout")) # type: ignore[arg-type]
SANDBOX_CONNECT_TIMEOUT = float(Config.get("strix_sandbox_connect_timeout")) # type: ignore[arg-type]
async def execute_tool(tool_name: str, agent_state: Any | None = None, **kwargs: Any) -> Any: