synaps-core 0.10.2

Foundation types, config, session, auth, protocol — leaf crate for agent-runtime
Documentation
pub mod anthropic {
    use crate::auth::OAuthCredentials;
    use reqwest::Client;

    pub async fn login() -> Result<OAuthCredentials, String> {
        crate::auth::login().await
    }
    pub async fn refresh(client: &Client, refresh: &str) -> Result<OAuthCredentials, String> {
        crate::auth::refresh_token(client, refresh).await
    }
}

pub mod openai_codex {
    use crate::auth::OAuthCredentials;
    use reqwest::Client;

    pub async fn login() -> Result<OAuthCredentials, String> {
        super::super::openai_codex::login().await
    }
    pub async fn refresh(client: &Client, refresh: &str) -> Result<OAuthCredentials, String> {
        super::super::openai_codex::refresh_token(client, refresh).await
    }
}

pub mod xai {
    use crate::auth::OAuthCredentials;
    use reqwest::Client;
    pub async fn login() -> Result<OAuthCredentials, String> {
        super::super::xai::login().await
    }
    pub async fn refresh(client: &Client, refresh: &str) -> Result<OAuthCredentials, String> {
        super::super::xai::refresh_token(client, refresh).await
    }
}

pub mod github_copilot {
    use crate::auth::OAuthCredentials;
    use reqwest::Client;
    pub async fn login() -> Result<OAuthCredentials, String> {
        super::super::github_copilot::login().await
    }
    pub async fn refresh(client: &Client, refresh: &str) -> Result<OAuthCredentials, String> {
        super::super::github_copilot::refresh_token(client, refresh).await
    }
}

pub mod google_gemini {
    use crate::auth::OAuthCredentials;
    use reqwest::Client;
    pub async fn login() -> Result<OAuthCredentials, String> {
        super::super::google_gemini::login().await
    }
    pub async fn refresh(client: &Client, refresh: &str) -> Result<OAuthCredentials, String> {
        super::super::google_gemini::refresh_token(client, refresh).await
    }
}

pub mod kimi_code {
    use crate::auth::OAuthCredentials;
    use reqwest::Client;
    pub async fn login() -> Result<OAuthCredentials, String> {
        super::super::kimi_code::login().await
    }
    pub async fn refresh(client: &Client, refresh: &str) -> Result<OAuthCredentials, String> {
        super::super::kimi_code::refresh_token(client, refresh).await
    }
}