from __future__ import annotations from typing import cast from albedo_api import Host, PythonApi host: Host class Photon: async def reply(self, message_ref: str, text: str) -> str: """Reply to an incoming iMessage in the paired chat; return the sent GUID.""" return cast( str, await host("photon.reply", {"guid": message_ref, "text": text}) ) def setup(api: PythonApi) -> dict[str, object]: global host host = api.host return {"photon": Photon()}