diff --git a/CHANGELOG.md b/CHANGELOG.md index ad418e8..4c80fab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.2.2] - 2026-01-09 + +### Fixed +- Config parsing for empty environment variables (allowed_paths, cors_*) +- Use `env_parse_none_str=""` to treat empty strings as None + ## [0.2.1] - 2026-01-09 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index f703aa5..37ef7e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "webber" -version = "0.2.1" +version = "0.2.2" description = "Mrs. Webber - Multi-Agent AI Development System" authors = [ {name = "jpmschweitzer"} diff --git a/src/shared/config.py b/src/shared/config.py index 9d2d416..4f5109d 100644 --- a/src/shared/config.py +++ b/src/shared/config.py @@ -8,6 +8,7 @@ from pathlib import Path from functools import lru_cache from typing import Optional +from pydantic import field_validator from pydantic_settings import BaseSettings, SettingsConfigDict @@ -57,7 +58,7 @@ class Settings(BaseSettings): # Tool execution tool_timeout_seconds: int = 120 sandbox_enabled: bool = True - allowed_paths: list[str] = [] + allowed_paths: Optional[list[str]] = None # Sessions session_ttl_hours: int = 24 @@ -67,8 +68,14 @@ class Settings(BaseSettings): env_file=".env", case_sensitive=False, extra="ignore", + env_parse_none_str="", # Treat empty string as None ) + @property + def effective_allowed_paths(self) -> list[str]: + """Return allowed_paths or empty list if None.""" + return self.allowed_paths or [] + @lru_cache() def get_settings() -> Settings: