When send_checked gets an ExpiredToken error (400), automatically call com.atproto.server.refreshSession with the refresh_jwt, update the in-memory session + persisted session.json, then retry the original request. This goes in XrpcClient.send_checked in opake-core/src/client.rs. The tricky part: XrpcClient needs interior mutability for the session (RefCell or similar) since send_checked takes &self. Also need to update the CLI's session.json on disk after refresh — either a callback/hook or the CLI checks after each command. Tests via MockTransport: (1) expired→refresh→retry succeeds, (2) expired→refresh fails→propagate error, (3) non-expired errors pass through unchanged.
When send_checked gets an ExpiredToken error (400), automatically call com.atproto.server.refreshSession with the refresh_jwt, update the in-memory session + persisted session.json, then retry the original request. This goes in XrpcClient.send_checked in opake-core/src/client.rs. The tricky part: XrpcClient needs interior mutability for the session (RefCell or similar) since send_checked takes &self. Also need to update the CLI's session.json on disk after refresh — either a callback/hook or the CLI checks after each command. Tests via MockTransport: (1) expired→refresh→retry succeeds, (2) expired→refresh fails→propagate error, (3) non-expired errors pass through unchanged.