fix(config,compose): calendar url out of the config error, capped container logs

This commit is contained in:
hh
2026-09-01 14:13:22 +00:00
parent 56f8f2a1e1
commit c3d5c944ea
3 changed files with 14 additions and 3 deletions
+4 -2
View File
@@ -157,13 +157,15 @@ def chat_path(title: str, agent: str, vault: Path) -> Path: # noqa: ARG001
def _calendar_mcps() -> list[HttpMcp]:
raw = os.environ.get("CALENDAR_MCPS", "").strip()
servers: list[HttpMcp] = []
for raw_entry in raw.split(","):
for position, raw_entry in enumerate(raw.split(","), start=1):
entry = raw_entry.strip()
if not entry:
continue
name, sep, url = entry.partition("=")
if not sep or not url.strip():
msg = f"CALENDAR_MCPS entry must be `name=url`, got: {entry!r}"
# Только номер: в url лежит приватный ical-фид с токеном в пути,
# а traceback уезжает в docker logs целиком.
msg = f"CALENDAR_MCPS: запись #{position} не вида `name=url`"
raise ValueError(msg)
servers.append(McpServer.http(name=f"calendar-{name.strip()}", url=url.strip()))
return servers