pub async fn serve(
registry: Registry,
roster: Roster,
root: Root,
define: Option<DefineHandler>,
listener: UnixListener,
) -> Result<()>Expand description
Bind path and serve the root session plus roster until the listener
errors.
root is served first and labelled by its own SessionId (the agent’s
session id — not the registry’s agent:orchestrator alias). Every session
named by roster is served too, now and as it grows. A client addresses a
session by frame.session; a server whose current served set is exactly
one session also accepts any id, preserving the single-session flow (the
--socket client’s placeholder "remote" still reaches it). define, when
installed, answers Request::Define — the composition root’s worker factory.
registry is consulted (read-only) for each served session’s model, so the
roster this server pushes names models the server actually knows.