feat(agent): harden API-first service

This commit is contained in:
2026-09-16 21:12:47 +02:00
parent aa637270b7
commit c8b55fbd38
12 changed files with 839 additions and 162 deletions
+5 -1
View File
@@ -89,9 +89,11 @@ class Config:
# Service
port: int = 8080
api_key: str = "" # leer = nur fuer lokale Entwicklung ohne Auth
admin_api_key: str = "" # leer = api_key auch fuer /reindex verwenden
@classmethod
def from_env(cls) -> "Config":
def from_env(cls) -> Config:
d = cls()
return cls(
kb_dir=_env_str("PV_KB_DIR", d.kb_dir),
@@ -122,4 +124,6 @@ class Config:
survey_blocks=_env_int("PV_SURVEY_BLOCKS", d.survey_blocks),
temporal_boost=_env_float("PV_TEMPORAL_BOOST", d.temporal_boost),
port=_env_int("PV_PORT", d.port),
api_key=_env_str("PV_API_KEY", d.api_key),
admin_api_key=_env_str("PV_ADMIN_API_KEY", d.admin_api_key),
)