diff --git a/crates/jacquard/src/client.rs b/crates/jacquard/src/client.rs index 99876201..839d6501 100644 --- a/crates/jacquard/src/client.rs +++ b/crates/jacquard/src/client.rs @@ -27,11 +27,6 @@ pub use token::FileAuthStore; use crate::client::credential_session::{CredentialSession, SessionKey}; -pub(crate) const NSID_REFRESH_SESSION: &str = "com.atproto.server.refreshSession"; - -/// Basic client wrapper: reqwest transport + in-memory session store. -pub struct BasicClient(); //AtClient, AuthSession>>); - /// App password session information from `com.atproto.server.createSession` /// /// Contains the access and refresh tokens along with user identity information. @@ -256,3 +251,22 @@ impl XrpcClient for Agent { async move { self.inner.send(request).await } } } + +impl From for Agent { + fn from(inner: A) -> Self { + Self::new(inner) + } +} + +/// Alias for an agent over a credential (app‑password) session. +pub type CredentialAgent = Agent>; +/// Alias for an agent over an OAuth (DPoP) session. +pub type OAuthAgent = Agent>; + +/// BasicClient: in-memory store + public resolver over a credential session. +pub type BasicClient = Agent< + CredentialSession< + MemorySessionStore, + jacquard_identity::PublicResolver, + >, +>;