Sessions begin with session.open, complete with session.accepted,
and end with session.close or transport closure.
ARCPClient::open() sends SessionOpen; HandshakeNegotiator validates
capabilities and authentication, then emits SessionAccepted.
$accepted = $client->open(
Auth::none(),
new PeerInfo('cli', '0.1', principal: 'alice'),
new Capabilities(anonymous: true, subscriptions: true),
);$runtime = new ARCPRuntime(authRouter: new AuthRouter([new NoneAuth()]));
$runtime->serve($transport);SessionState tracks opening, authenticated, rejected, and closed
states.
Call ARCPClient::close(); the runtime also closes the transport in
ARCPRuntime::serve() cleanup.
Capabilities is a typed DTO. Unsupported required capabilities reject
the session with UNIMPLEMENTED.
Apply host-level caps at the transport and web-server layer: max frame size, connection count, session TTL, and auth rate limits.
Use ARCPClient::ping() for session liveness. Jobs can call
JobContext::heartbeat().
Ack is registered in the message catalog and used for replay and flow
control acknowledgement.
Resume replay is backed by EventLog::replayAfter(). See
Resume.