19 lines
491 B
Python
19 lines
491 B
Python
from typing import Protocol, runtime_checkable
|
|
|
|
|
|
@runtime_checkable
|
|
class ChannelAdapter(Protocol):
|
|
"""Protocol for channel-specific message delivery."""
|
|
|
|
def send(self, text: str) -> str:
|
|
"""Send a message. Returns message_id if available."""
|
|
...
|
|
|
|
def send_typing(self) -> None:
|
|
"""Send a typing indicator (best-effort)."""
|
|
...
|
|
|
|
def edit(self, message_id: str, text: str) -> None:
|
|
"""Edit an existing message in-place."""
|
|
...
|