diff --git a/codex-rs/app-server-protocol/src/protocol/common.rs b/codex-rs/app-server-protocol/src/protocol/common.rs index 0d7a1d5f5a..be52e56a0b 100644 --- a/codex-rs/app-server-protocol/src/protocol/common.rs +++ b/codex-rs/app-server-protocol/src/protocol/common.rs @@ -9,7 +9,6 @@ use crate::protocol::v2; use codex_protocol::ConversationId; use codex_protocol::parse_command::ParsedCommand; use codex_protocol::protocol::FileChange; -use codex_protocol::protocol::RateLimitSnapshot; use codex_protocol::protocol::ReviewDecision; use codex_protocol::protocol::SandboxCommandAssessment; use paste::paste; @@ -439,7 +438,7 @@ pub enum ServerNotification { #[serde(rename = "account/rateLimits/updated")] #[ts(rename = "account/rateLimits/updated")] #[strum(serialize = "account/rateLimits/updated")] - AccountRateLimitsUpdated(RateLimitSnapshot), + AccountRateLimitsUpdated(v2::AccountRateLimitsUpdatedNotification), /// DEPRECATED NOTIFICATIONS below /// Authentication status changed diff --git a/codex-rs/app-server-protocol/src/protocol/v2.rs b/codex-rs/app-server-protocol/src/protocol/v2.rs index 297716476c..c7fcefae02 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -429,3 +429,13 @@ pub struct TodoItem { pub text: String, pub completed: bool, } + +// === Server Notifications === +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct AccountRateLimitsUpdatedNotification { + // TODO: create our own RateLimitSnapshot type that doesn't depend on codex_protocol + // so we can camelcase that bad boy. + pub rate_limits: RateLimitSnapshot, +}