2025-09-29 19:34:57 -07:00
|
|
|
mod device_code_auth;
|
2025-08-14 17:11:26 -07:00
|
|
|
mod pkce;
|
|
|
|
|
mod server;
|
2025-08-07 01:27:45 -07:00
|
|
|
|
2025-09-29 19:34:57 -07:00
|
|
|
pub use device_code_auth::run_device_code_login;
|
2025-09-02 18:36:19 -07:00
|
|
|
pub use server::LoginServer;
|
|
|
|
|
pub use server::ServerOptions;
|
|
|
|
|
pub use server::ShutdownHandle;
|
|
|
|
|
pub use server::run_login_server;
|
|
|
|
|
|
|
|
|
|
// Re-export commonly used auth types and helpers from codex-core for compatibility
|
fix: remove mcp-types from app server protocol (#4537)
We continue the separation between `codex app-server` and `codex
mcp-server`.
In particular, we introduce a new crate, `codex-app-server-protocol`,
and migrate `codex-rs/protocol/src/mcp_protocol.rs` into it, renaming it
`codex-rs/app-server-protocol/src/protocol.rs`.
Because `ConversationId` was defined in `mcp_protocol.rs`, we move it
into its own file, `codex-rs/protocol/src/conversation_id.rs`, and
because it is referenced in a ton of places, we have to touch a lot of
files as part of this PR.
We also decide to get away from proper JSON-RPC 2.0 semantics, so we
also introduce `codex-rs/app-server-protocol/src/jsonrpc_lite.rs`, which
is basically the same `JSONRPCMessage` type defined in `mcp-types`
except with all of the `"jsonrpc": "2.0"` removed.
Getting rid of `"jsonrpc": "2.0"` makes our serialization logic
considerably simpler, as we can lean heavier on serde to serialize
directly into the wire format that we use now.
2025-09-30 19:16:26 -07:00
|
|
|
pub use codex_app_server_protocol::AuthMode;
|
2025-09-02 18:36:19 -07:00
|
|
|
pub use codex_core::AuthManager;
|
|
|
|
|
pub use codex_core::CodexAuth;
|
|
|
|
|
pub use codex_core::auth::AuthDotJson;
|
|
|
|
|
pub use codex_core::auth::CLIENT_ID;
|
|
|
|
|
pub use codex_core::auth::OPENAI_API_KEY_ENV_VAR;
|
|
|
|
|
pub use codex_core::auth::get_auth_file;
|
|
|
|
|
pub use codex_core::auth::login_with_api_key;
|
|
|
|
|
pub use codex_core::auth::logout;
|
|
|
|
|
pub use codex_core::auth::try_read_auth_json;
|
|
|
|
|
pub use codex_core::auth::write_auth_json;
|
|
|
|
|
pub use codex_core::token_data::TokenData;
|