The host outlives any one AgentSession: at most one session is attached at a time, and
none once it has closed. Session requests go to the attached session and fail with
NO_ACTIVE_SESSION_ERROR while none is; finalize_simulation needs only the job, so
it is answered either way.
Drain accepted responses for three seconds, then allow three seconds for cancellation.
Hooks that ignore cancellation may outlive transport closure; their cleanup stays observed.
Returns Promise<void>
registerSession
registerSession(session): void
Serve session: forward its events and route session requests to it.
Serves a
RemoteSessionclient for the whole job.The host outlives any one
AgentSession: at most one session is attached at a time, and none once it has closed. Session requests go to the attached session and fail withNO_ACTIVE_SESSION_ERRORwhile none is;finalize_simulationneeds only the job, so it is answered either way.