feat: add BFF backend scaffold for mobile app

This commit is contained in:
OpenClaw committed 2026-03-07 02:08:25 +08:00
1 parent 03d21f607f
commit 591fd991fa
14 files changed
+462

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
from __future__ import annotations
from fastapi import HTTPException, status
from ..config import Settings
from ..models import AgentInfo, ChatMessage, SendMessageResponse, SessionSummary, StatusResponse
from .base import BackendService
class OpenClawBackendService(BackendService):
def __init__(self, settings: Settings) -> None:
self.settings = settings
async def get_status(self) -> StatusResponse:
self._not_implemented()
async def list_sessions(self) -> list[SessionSummary]:
self._not_implemented()
async def get_messages(self, session_id: str) -> list[ChatMessage]:
self._not_implemented()
async def send_message(self, session_id: str, message: str) -> SendMessageResponse:
self._not_implemented()
async def list_agents(self) -> list[AgentInfo]:
self._not_implemented()
@staticmethod
def _not_implemented() -> None:
raise HTTPException(
status_code=status.HTTP_501_NOT_IMPLEMENTED,
detail="OpenClaw backend provider is not wired yet. Implement the provider bridge here.",
)