This commit is contained in:
Owen Lin
2025-11-03 13:30:30 -08:00
parent 368314980c
commit ce35cb16b2
3 changed files with 6 additions and 45 deletions

View File

@@ -513,11 +513,6 @@ server_notification_definitions! {
#[strum(serialize = "thread/started")]
ThreadStarted(v2::ThreadStartedNotification),
#[serde(rename = "thread/error")]
#[ts(rename = "thread/error")]
#[strum(serialize = "thread/error")]
ThreadError(v2::ThreadErrorNotification),
#[serde(rename = "turn/started")]
#[ts(rename = "turn/started")]
#[strum(serialize = "turn/started")]
@@ -528,21 +523,11 @@ server_notification_definitions! {
#[strum(serialize = "turn/completed")]
TurnCompleted(v2::TurnCompletedNotification),
#[serde(rename = "turn/failed")]
#[ts(rename = "turn/failed")]
#[strum(serialize = "turn/failed")]
TurnFailed(v2::TurnFailedNotification),
#[serde(rename = "item/started")]
#[ts(rename = "item/started")]
#[strum(serialize = "item/started")]
ItemStarted(v2::ItemStartedNotification),
#[serde(rename = "item/updated")]
#[ts(rename = "item/updated")]
#[strum(serialize = "item/updated")]
ItemUpdated(v2::ItemUpdatedNotification),
#[serde(rename = "item/completed")]
#[ts(rename = "item/completed")]
#[strum(serialize = "item/completed")]

View File

@@ -377,17 +377,17 @@ pub enum TurnStatus {
pub struct TurnStartParams {
pub thread_id: String,
pub input: Vec<UserInput>,
// Override the working directory for this turn and subsequent turns.
/// Override the working directory for this turn and subsequent turns.
pub cwd: Option<PathBuf>,
// Override the approval policy for this turn and subsequent turns.
/// Override the approval policy for this turn and subsequent turns.
pub approval_policy: Option<AskForApproval>,
// Override the sandbox policy for this turn and subsequent turns.
/// Override the sandbox policy for this turn and subsequent turns.
pub sandbox_policy: Option<SandboxPolicy>,
// Override the model for this turn and subsequent turns.
/// Override the model for this turn and subsequent turns.
pub model: Option<String>,
// Override the reasoning effort for this turn and subsequent turns.
/// Override the reasoning effort for this turn and subsequent turns.
pub effort: Option<ReasoningEffort>,
// Override the reasoning summary for this turn and subsequent turns.
/// Override the reasoning summary for this turn and subsequent turns.
pub summary: Option<ReasoningSummary>,
}
@@ -583,14 +583,6 @@ pub struct TurnCompletedNotification {
pub usage: Usage,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct TurnFailedNotification {
// TODO: should the error be stored on the Turn object, and we return that instead?
pub error: TurnError,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
@@ -598,13 +590,6 @@ pub struct ItemStartedNotification {
pub item: ThreadItem,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct ItemUpdatedNotification {
pub item: ThreadItem,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
@@ -612,13 +597,6 @@ pub struct ItemCompletedNotification {
pub item: ThreadItem,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct ThreadErrorNotification {
pub message: String,
}
// Item-specific progress notifications
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]

View File

@@ -61,8 +61,6 @@ pub struct McpProcess {
impl McpProcess {
pub async fn new(codex_home: &Path) -> anyhow::Result<Self> {
// Ensure tests run with the default Codex originator (codex_cli_rs)
// regardless of any environment overrides that may be present.
Self::new_with_env(codex_home, &[]).await
}