diff --git a/codex-rs/tui/src/statusline_provider.rs b/codex-rs/tui/src/statusline_provider.rs index e9112c45f7..0175ed5fd2 100644 --- a/codex-rs/tui/src/statusline_provider.rs +++ b/codex-rs/tui/src/statusline_provider.rs @@ -175,6 +175,7 @@ impl ResolvedStatuslineProvider { params: McpResourceReadParams { thread_id: Some(self.thread.to_string()), server: provider.id.server.0.clone(), + environment_id: None, uri: provider.uri.clone(), connector_id: None, origin_call_id: None, diff --git a/codex-rs/tui/src/statusline_provider/inventory.rs b/codex-rs/tui/src/statusline_provider/inventory.rs index 6b0cf57436..e8d4154fe6 100644 --- a/codex-rs/tui/src/statusline_provider/inventory.rs +++ b/codex-rs/tui/src/statusline_provider/inventory.rs @@ -110,6 +110,7 @@ pub(super) fn global_pages( ListMcpServerStatusParams { thread_id: None, server_name: None, + environment_id: None, detail: Some(McpServerStatusDetail::ToolsAndAuthOnly), cursor, limit: None, @@ -150,6 +151,7 @@ pub(super) async fn server( ListMcpServerStatusParams { thread_id: thread.map(|id| id.to_string()), server_name: Some(name.0.clone()), + environment_id: None, detail: Some(McpServerStatusDetail::ToolsAndAuthOnly), cursor: None, limit: None, @@ -157,13 +159,13 @@ pub(super) async fn server( ) .await?; if page.next_cursor.is_some() || page.data.len() > 1 { - bail!("targeted MCP inventory returned more than one server") + bail!("targeted MCP inventory returned more than one server"); } let Some(value) = page.data.pop() else { return Ok(None); }; if value["name"] != name.as_str() { - bail!("targeted MCP inventory did not identify the requested server") + bail!("targeted MCP inventory did not identify the requested server"); } local_server(value) } diff --git a/codex-rs/tui/src/statusline_provider/inventory_tests.rs b/codex-rs/tui/src/statusline_provider/inventory_tests.rs index ec0419f7d8..7e3235009e 100644 --- a/codex-rs/tui/src/statusline_provider/inventory_tests.rs +++ b/codex-rs/tui/src/statusline_provider/inventory_tests.rs @@ -136,7 +136,7 @@ async fn global_pages_preserve_catalogs_and_skip_hosted_or_unidentified_transpor reply( &mut commands, "mcpServerStatus/list", - json!({"threadId":null,"serverName":null,"detail":"toolsAndAuthOnly","cursor":cursor,"limit":null}), + json!({"threadId":null,"serverName":null,"environmentId":null,"detail":"toolsAndAuthOnly","cursor":cursor,"limit":null}), json!({"data":rows,"nextCursor":next}), ).await; } @@ -177,7 +177,7 @@ async fn targeted_inventory_rejects_another_server() { reply( &mut commands, "mcpServerStatus/list", - json!({"threadId":null,"serverName":"calendar","detail":"toolsAndAuthOnly","cursor":null,"limit":null}), + json!({"threadId":null,"serverName":"calendar","environmentId":null,"detail":"toolsAndAuthOnly","cursor":null,"limit":null}), json!({"data":[other],"nextCursor":null}), ) ); diff --git a/codex-rs/tui/src/statusline_provider_tests.rs b/codex-rs/tui/src/statusline_provider_tests.rs index 4aad6fd529..bf5c72045f 100644 --- a/codex-rs/tui/src/statusline_provider_tests.rs +++ b/codex-rs/tui/src/statusline_provider_tests.rs @@ -75,7 +75,7 @@ async fn named(commands: &mut Requests, thread: Option, row: Value) { commands, "mcpServerStatus/list", json!({"threadId":thread.map(|id| id.to_string()),"serverName":row["name"], - "detail":"toolsAndAuthOnly","cursor":null,"limit":null}), + "environmentId":null,"detail":"toolsAndAuthOnly","cursor":null,"limit":null}), json!({"data":[row],"nextCursor":null}), ) .await; @@ -109,6 +109,7 @@ async fn picker_choice_reads_the_displayed_threads_uri_with_the_snapshot() -> Re json!({ "threadId": thread.to_string(), "server": "calendar", + "environmentId": null, "uri": "ui://calendar/today", "connectorId": null, "target": null, @@ -236,7 +237,7 @@ async fn selecting_a_plugin_requires_the_globally_advertised_tool_and_the_connec "mcpServer/resource/read", json!({ "threadId":thread.to_string(),"server":"calendar","uri":"ui://calendar/current", - "connectorId":null,"target":null,"originCallId":null, + "environmentId":null,"connectorId":null,"target":null,"originCallId":null, "_meta":{"com.openai/codex-statusline-state":{"version":1}} }), json!({"contents":[],"originCallId":null}),