feat: add external API providers and central settings database

- Add central settings database client (system_settings on postgres-shared)
  - User-scoped settings with global fallback
  - API config storage with enabled/disabled toggle
  - Per-source category filtering for news

- Add modular external API providers in src/apis/:
  - OpenMeteoProvider: weather with geocoding (free, no key)
  - NOSProvider: Dutch news RSS feeds
  - BBCProvider: English news RSS feeds
  - AggregatedNewsProvider: merges sources with category filtering
  - AlphaVantageProvider: financial quotes (API key from settings DB)

- Add provider dependencies and lifecycle management
- Add requirements-dev.txt with pip-audit for security auditing
- Add MEMORY_REMEMBER_PLAN.md documenting volatile/document memory architecture

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-26 12:07:58 +01:00
co-authored by Claude Opus 4.5
parent 99eefa291c
commit 5d4a8dba95
14 changed files with 2513 additions and 4 deletions
+17
View File
@@ -121,6 +121,13 @@ class Settings(BaseSettings):
maintenance_orphan_cleanup_enabled: bool = Field(default=True, description="Enable automatic orphan cleanup")
maintenance_cleanup_batch_size: int = Field(default=100, ge=10, le=1000, description="Cleanup batch size")
# Central Settings Database (Tatlock-wide)
system_settings_host: str = Field(default="postgres-shared", description="System settings PostgreSQL host")
system_settings_port: int = Field(default=5432, description="System settings PostgreSQL port")
system_settings_db: str = Field(default="system_settings", description="System settings database name")
system_settings_user: str = Field(default="settings", description="System settings database user")
system_settings_password: str = Field(default="", description="System settings database password")
@property
def qdrant_url(self) -> str:
"""Computed Qdrant URL."""
@@ -131,6 +138,16 @@ class Settings(BaseSettings):
"""Computed Redis URL."""
return f"redis://{self.redis_host}:{self.redis_port}/{self.redis_db}"
@property
def system_settings_dsn(self) -> str:
"""Computed System Settings PostgreSQL DSN."""
if not self.system_settings_password:
return ""
return (
f"postgresql://{self.system_settings_user}:{self.system_settings_password}"
f"@{self.system_settings_host}:{self.system_settings_port}/{self.system_settings_db}"
)
@lru_cache
def get_settings() -> Settings: