fix(config,compose): calendar url out of the config error, capped container logs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user