SessionManager
Owns per-node remote-administration session state — the session passkey the firmware embeds in every admin response and the timestamp it was last refreshed at.
Replaces the single global passkey atomic that previously lived in CommandSenderImpl, which silently invalidated the session of node A as soon as node B responded with a different key (the multi-remote-admin bug).
Lifecycle:
recordSession is called by the admin packet handler whenever an inbound admin response carries a non-empty
session_passkey.getPasskey is read on the send path to attach the appropriate per-destination key.
clearAll is called on radio teardown to prevent stale keys from surviving a reconnect.
Properties
Hot stream of srcNodeNum values, emitted exactly once per call to recordSession with a non-empty passkey. Used by EnsureRemoteAdminSessionUseCase to await a session refresh from a specific node without polling.
Functions
Returns the most recently observed passkey for destNum, or ByteString.EMPTY if none.
Cold per-node SessionStatus flow. Emits the current status synchronously on subscription and re-emits whenever the underlying state crosses the staleness threshold.
Record an inbound session refresh from srcNodeNum. No-op for empty passkey.