feat: opt-out of events in the app-server (#11319)

Add `optOutNotificationMethods` in the app-server to opt-out events
based on exact method matching
This commit is contained in:
jif-oai
2026-02-10 18:04:52 +00:00
committed by GitHub
parent 48e415bdef
commit a364dd8b56
15 changed files with 284 additions and 7 deletions

View File

@@ -46,12 +46,16 @@ pub struct ClientInfo {
}
/// Client-declared capabilities negotiated during initialize.
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Default, JsonSchema, TS)]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
pub struct InitializeCapabilities {
/// Opt into receiving experimental API methods and fields.
#[serde(default)]
pub experimental_api: bool,
/// Exact notification method names that should be suppressed for this
/// connection (for example `codex/event/session_configured`).
#[ts(optional = nullable)]
pub opt_out_notification_methods: Option<Vec<String>>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]