Something went wrong. Try again.
small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334from __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, thread: bool = False) -> str: """Reply to an incoming iMessage in the paired chat; return the sent GUID.
thread=True shows the reply under the message it answers. """ return cast( str, await host( "photon.reply", {"guid": message_ref, "text": text, "thread": thread} ), )
async def react(self, message_ref: str, emoji: str) -> str: """Add a Tapback to a paired incoming message and return its GUID.""" return cast( str, await host("photon.react", {"guid": message_ref, "emoji": emoji}) )
def setup(api: PythonApi) -> dict[str, object]: global host host = api.host return {"photon": Photon(), "PhotonError": api.HostError}