Add a gateway adapter contract plus a SimpleX adapter (lazy websockets, default-deny allowlist, batching, structured /_send) and a GatewayService that maps chats onto the single-slot scheduler: submit_request, owner maps, pending-run ownership, queue drain, and authoring questions/repairs routed back to the origin chat. Wire `cli gateway [--platform simplex] [--dashboard]` and the gateway.simplex config block. Scheduler gains submit_request() and an on_request_requeued hook. DMs only for the first cut.
13 lines
530 B
Python
13 lines
530 B
Python
"""Messaging gateway: external messenger intake/reply for the SemIf agent.
|
|
|
|
A `GatewayAdapter` owns a transport (SimpleX first), and `GatewayService`
|
|
maps inbound text onto the scheduler's existing gate/score/queue/dispatch
|
|
pipeline and routes results, questions, and repairs back to the originating
|
|
chat. See `base.py` for the contract.
|
|
"""
|
|
|
|
from .base import GatewayAdapter, InboundMessage, OutboundMessage
|
|
from .service import GatewayService
|
|
|
|
__all__ = ["GatewayAdapter", "InboundMessage", "OutboundMessage", "GatewayService"]
|