# Generated by @typespec-fastapi/emitter
# Do not edit this file manually — regenerate with: tsp compile .
# This file contains FastAPI router definitions generated from TypeSpec.
"""FastAPI router generated from TypeSpec operations."""
from __future__ import annotations


from fastapi import APIRouter, Depends, HTTPException, Path, Query, status
from pydantic import BaseModel

from ..models.common import NotFoundError, ValidationError
from ..models.session_hub import MessageRow, SessionDetail, SessionRow


router = APIRouter(tags=["Sessions"])


@router.get("/api/sessions", response_model=list[SessionRow] | ValidationError)
async def list_sessions(tool: str | None = Query(None), host: str | None = Query(None), working_directory: str | None = Query(None), limit: int | None = Query(None), offset: int | None = Query(None)) -> list[SessionRow] | ValidationError:
    # TODO: Implement business logic (Phase 3 — service layer)
    raise NotImplementedError(
        "Endpoint GET /api/sessions not yet implemented"
    )


@router.get("/api/sessions/{host}/{tool}/{session_id}/messages", response_model=list[MessageRow] | NotFoundError)
async def get_messages(host: str, tool: str, session_id: str) -> list[MessageRow] | NotFoundError:
    # TODO: Implement business logic (Phase 3 — service layer)
    raise NotImplementedError(
        "Endpoint GET /api/sessions/{host}/{tool}/{session_id}/messages not yet implemented"
    )


@router.get("/api/sessions/{host}/{tool}/{session_id}", response_model=SessionDetail | NotFoundError)
async def get_session(host: str, tool: str, session_id: str) -> SessionDetail | NotFoundError:
    # TODO: Implement business logic (Phase 3 — service layer)
    raise NotImplementedError(
        "Endpoint GET /api/sessions/{host}/{tool}/{session_id} not yet implemented"
    )
