# app/sim_api_bridge.py from __future__ import annotations from typing import List, Dict, Any from app.sim_api import place_order from app.catalog import load_catalog def get_hours() -> Dict[str, Any]: c = load_catalog() return {"hours": c.get("hours"), "address": c.get("address"), "phone": c.get("phone")} def menu_lookup(filters: List[str]) -> List[Dict[str, Any]]: # naive filter: return all items and let the LLM filter in text for now c = load_catalog() return c.get("items", []) def create_reservation(name: str, phone: str | None, party_size: int, datetime_str: str) -> Dict[str, Any]: # Simulate success return { "ok": True, "reservation_id": "sim-" + str(abs(hash((name, phone, party_size, datetime_str))))[:8], "name": name, "party_size": party_size, "when": datetime_str, "phone": phone, } def create_order(items: List[Dict[str, Any]]) -> Dict[str, Any]: return place_order(items)