|
|
|
@ -7,16 +7,12 @@ from fastapi import Response
|
|
|
|
|
|
|
|
|
|
|
|
import app.a2a.router as a2a_module
|
|
|
|
import app.a2a.router as a2a_module
|
|
|
|
from app.a2a.models import A2ARpcRequest
|
|
|
|
from app.a2a.models import A2ARpcRequest
|
|
|
|
|
|
|
|
from app.core.models import CoreBusySlot
|
|
|
|
import app.main as main_module
|
|
|
|
import app.main as main_module
|
|
|
|
import app.mcp.server as mcp_server_module
|
|
|
|
import app.mcp.server as mcp_server_module
|
|
|
|
import app.mcp.tools as mcp_tools_module
|
|
|
|
import app.mcp.tools as mcp_tools_module
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class _Slot(dict):
|
|
|
|
|
|
|
|
def __getattr__(self, item: str) -> str:
|
|
|
|
|
|
|
|
return self[item]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class _DummyCoreService:
|
|
|
|
class _DummyCoreService:
|
|
|
|
def check_availability(
|
|
|
|
def check_availability(
|
|
|
|
self,
|
|
|
|
self,
|
|
|
|
@ -25,7 +21,7 @@ class _DummyCoreService:
|
|
|
|
calendar_ids: list[str] | None,
|
|
|
|
calendar_ids: list[str] | None,
|
|
|
|
) -> SimpleNamespace:
|
|
|
|
) -> SimpleNamespace:
|
|
|
|
checked = calendar_ids or ["primary"]
|
|
|
|
checked = calendar_ids or ["primary"]
|
|
|
|
busy_slots = [_Slot(calendar_id=checked[0], start=start, end=end)]
|
|
|
|
busy_slots = [CoreBusySlot(calendar_id=checked[0], start=start, end=end)]
|
|
|
|
return SimpleNamespace(
|
|
|
|
return SimpleNamespace(
|
|
|
|
start=start,
|
|
|
|
start=start,
|
|
|
|
end=end,
|
|
|
|
end=end,
|
|
|
|
|