mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Fallback for older app-server MCP inventory
This commit is contained in:
+5
-2
@@ -19532,12 +19532,15 @@
|
||||
"type": "array"
|
||||
},
|
||||
"mcpServerNames": {
|
||||
"default": [],
|
||||
"default": null,
|
||||
"description": "Names of the effective MCP servers in the thread's initial runtime.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
|
||||
+5
-2
@@ -17311,12 +17311,15 @@
|
||||
"type": "array"
|
||||
},
|
||||
"mcpServerNames": {
|
||||
"default": [],
|
||||
"default": null,
|
||||
"description": "Names of the effective MCP servers in the thread's initial runtime.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
|
||||
@@ -2431,12 +2431,15 @@
|
||||
"type": "array"
|
||||
},
|
||||
"mcpServerNames": {
|
||||
"default": [],
|
||||
"default": null,
|
||||
"description": "Names of the effective MCP servers in the thread's initial runtime.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
|
||||
@@ -12,7 +12,7 @@ import type { Thread } from "./Thread";
|
||||
export type ThreadStartResponse = {thread: Thread, model: string, modelProvider: string, serviceTier: string | null, cwd: AbsolutePathBuf, /**
|
||||
* Names of the effective MCP servers in the thread's initial runtime.
|
||||
*/
|
||||
mcpServerNames: Array<string>, /**
|
||||
mcpServerNames: Array<string> | null, /**
|
||||
* Environment-native paths to instruction source files currently loaded for this thread.
|
||||
*/
|
||||
instructionSources: Array<LegacyAppPathString>, approvalPolicy: AskForApproval, /**
|
||||
|
||||
@@ -2608,7 +2608,7 @@ mod tests {
|
||||
model_provider: "openai".to_string(),
|
||||
service_tier: None,
|
||||
cwd,
|
||||
mcp_server_names: vec!["example".to_string()],
|
||||
mcp_server_names: Some(vec!["example".to_string()]),
|
||||
runtime_workspace_roots: Vec::new(),
|
||||
instruction_sources: vec![
|
||||
codex_utils_path_uri::LegacyAppPathString::from_abs_path(&absolute_path(
|
||||
|
||||
@@ -3978,6 +3978,7 @@ fn thread_lifecycle_responses_default_missing_optional_fields() {
|
||||
serde_json::from_value(response.clone()).expect("thread/fork response");
|
||||
|
||||
assert_eq!(start.instruction_sources, Vec::<LegacyAppPathString>::new());
|
||||
assert_eq!(start.mcp_server_names, None);
|
||||
assert_eq!(start.thread.parent_thread_id, None);
|
||||
assert_eq!(start.thread.recency_at, None);
|
||||
assert_eq!(
|
||||
|
||||
@@ -175,7 +175,7 @@ pub struct ThreadStartResponse {
|
||||
pub cwd: AbsolutePathBuf,
|
||||
/// Names of the effective MCP servers in the thread's initial runtime.
|
||||
#[serde(default)]
|
||||
pub mcp_server_names: Vec<String>,
|
||||
pub mcp_server_names: Option<Vec<String>>,
|
||||
/// Thread-scoped runtime workspace roots used to materialize
|
||||
/// `:workspace_roots`.
|
||||
#[experimental("thread/start.runtimeWorkspaceRoots")]
|
||||
|
||||
Reference in New Issue
Block a user