diff --git a/backend/app/api/agent.py b/backend/app/api/agent.py index 7cc356dc..f9cec9f5 100644 --- a/backend/app/api/agent.py +++ b/backend/app/api/agent.py @@ -155,8 +155,7 @@ def _agent_board_openapi_hints( "Authenticated agent token", "Board access is validated before execution", ], - "x-side-effects": side_effects - or ["Read/write side effects vary by endpoint semantics."], + "x-side-effects": side_effects or ["Read/write side effects vary by endpoint semantics."], "x-negative-guidance": negative_guidance or ["Avoid this endpoint when a focused sibling endpoint handles the action."], "x-routing-policy": routing_policy @@ -525,7 +524,10 @@ async def list_tags( "description": "Caller is not board lead", }, 404: {"model": LLMErrorResponse, "description": "Assigned target agent does not exist"}, - 409: {"model": LLMErrorResponse, "description": "Dependency or assignment validation failed"}, + 409: { + "model": LLMErrorResponse, + "description": "Dependency or assignment validation failed", + }, 422: {"model": LLMErrorResponse, "description": "Payload validation failed"}, }, openapi_extra={ diff --git a/backend/app/api/board_group_memory.py b/backend/app/api/board_group_memory.py index 3dfb3bc9..f59b5ff3 100644 --- a/backend/app/api/board_group_memory.py +++ b/backend/app/api/board_group_memory.py @@ -577,7 +577,9 @@ async def stream_board_group_memory_for_board( "decision": "agent_board_group_memory_record", } ], - side_effects=["Persist new group-memory entries with optional agent notification dispatch."], + side_effects=[ + "Persist new group-memory entries with optional agent notification dispatch." + ], routing_policy=[ "Use for shared memory writes that should be visible across linked boards.", "Prefer direct board memory endpoints for board-local persistence.", diff --git a/backend/app/main.py b/backend/app/main.py index db33517f..0da66a6a 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -6,8 +6,8 @@ from contextlib import asynccontextmanager from typing import TYPE_CHECKING, Any from fastapi import APIRouter, FastAPI, status -from fastapi.openapi.utils import get_openapi from fastapi.middleware.cors import CORSMiddleware +from fastapi.openapi.utils import get_openapi from fastapi_pagination import add_pagination from app.api.activity import router as activity_router @@ -397,7 +397,9 @@ def _inject_tagged_operation_openapi_docs(openapi_schema: dict[str, Any]) -> Non continue response_content = response.get("content") if isinstance(response_content, dict): - _inject_json_content_example(content=response_content, components=components) + _inject_json_content_example( + content=response_content, components=components + ) @asynccontextmanager diff --git a/backend/app/schemas/agents.py b/backend/app/schemas/agents.py index fbc05def..0e115d56 100644 --- a/backend/app/schemas/agents.py +++ b/backend/app/schemas/agents.py @@ -8,8 +8,8 @@ from typing import Any from uuid import UUID from pydantic import Field, field_validator -from sqlmodel._compat import SQLModelConfig from sqlmodel import SQLModel +from sqlmodel._compat import SQLModelConfig from app.schemas.common import NonEmptyStr diff --git a/backend/app/schemas/errors.py b/backend/app/schemas/errors.py index 0d4649fa..7eab0618 100644 --- a/backend/app/schemas/errors.py +++ b/backend/app/schemas/errors.py @@ -31,7 +31,10 @@ class LLMErrorResponse(SQLModel): "Error payload. Agents should rely on `code` when present and default " "to `message` for fallback display." ), - examples=["Invalid payload for lead escalation.", {"code": "not_found", "message": "Agent not found."}], + examples=[ + "Invalid payload for lead escalation.", + {"code": "not_found", "message": "Agent not found."}, + ], ) request_id: str | None = Field( default=None, diff --git a/backend/app/schemas/gateway_coordination.py b/backend/app/schemas/gateway_coordination.py index fba74b60..a62a516d 100644 --- a/backend/app/schemas/gateway_coordination.py +++ b/backend/app/schemas/gateway_coordination.py @@ -6,8 +6,8 @@ from typing import Literal from uuid import UUID from pydantic import Field -from sqlmodel._compat import SQLModelConfig from sqlmodel import SQLModel +from sqlmodel._compat import SQLModelConfig from app.schemas.common import NonEmptyStr diff --git a/backend/app/schemas/health.py b/backend/app/schemas/health.py index 0e767605..e67d2d7b 100644 --- a/backend/app/schemas/health.py +++ b/backend/app/schemas/health.py @@ -13,4 +13,3 @@ class HealthStatusResponse(SQLModel): description="Indicates whether the probe check succeeded.", examples=[True], ) -