Source code for taimoe.platform.types.manifest
"""Runtime discovery manifest models."""
from __future__ import annotations
from datetime import datetime, timezone
from typing import Any, Literal
from pydantic import BaseModel, ConfigDict, Field
from .._well_known import WELL_KNOWN_PATH
[docs]
class RuntimeEndpoints(BaseModel):
"""Endpoint paths exposed by a managed runtime service."""
model_config = ConfigDict(frozen=True)
health: str = "/health"
agents: str = "/agents"
well_known: str = WELL_KNOWN_PATH
invoke: str | None = None
[docs]
class RuntimeManifest(BaseModel):
"""Metadata used by Taimoe Platform to identify a runtime service."""
model_config = ConfigDict(frozen=True)
taimoe_protocol_version: str = "1.0"
runtime_name: str
runtime_type: Literal["api"] = "api"
sdk_version: str
framework: str | None = None
framework_version: str | None = None
started_at: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))
endpoints: RuntimeEndpoints = Field(default_factory=RuntimeEndpoints)
[docs]
class AgentManifest(BaseModel):
"""Code-level agent shape discovered from the runtime.
This intentionally avoids platform-managed prompt or model config.
Platform config is synchronized separately through the sync API.
"""
model_config = ConfigDict(frozen=True)
id: str
name: str | None = None
kind: str | None = None
entrypoint: bool = True
sub_agents: tuple[str, ...] = ()
declared_tools: tuple[str, ...] = ()
metadata: dict[str, Any] = Field(default_factory=dict)
[docs]
class AgentsManifest(BaseModel):
"""List response for the runtime agents discovery endpoint."""
model_config = ConfigDict(frozen=True)
agents: tuple[AgentManifest, ...]
[docs]
class HealthStatus(BaseModel):
"""Runtime health response."""
model_config = ConfigDict(frozen=True)
status: Literal["healthy", "degraded", "unhealthy"] = "healthy"
version: str
uptime_seconds: float