Expose connector candidates in external agent detection (#36218)

## What changed

- Add a `connectors` array to `ExternalAgentConfigDetectResponse` with each candidate's normalized name, detected session count, and detection source.
- Define detection sources for remote MCP server configuration and session tool use, and export the corresponding JSON Schema and TypeScript types.
- Default `connectors` to an empty array when deserializing responses from older servers.

## Testing

- Add a protocol test covering deserialization when `connectors` is omitted.

GitOrigin-RevId: b65d76791099385226ed54411f4c1ef902be43d8
This commit is contained in:
charlesgong-openai authored and copyberry committed 2026-07-30 20:58:06 +00:00
1 parent 97576b1794
commit e6cfd40c3f
11 files changed
+157 -2

No files matched your search

@@ -72,6 +72,22 @@ fn test_absolute_path() -> AbsolutePathBuf {
absolute_path("readable")
}
#[test]
fn external_agent_config_detect_response_defaults_connectors_for_older_servers() {
let response = serde_json::from_value::<ExternalAgentConfigDetectResponse>(json!({
"items": [],
}))
.expect("older detect response should deserialize");
assert_eq!(
response,
ExternalAgentConfigDetectResponse {
items: Vec::new(),
connectors: Vec::new(),
}
);
}
#[test]
fn thread_background_terminals_list_response_round_trips_foreign_paths() {
for (uri, expected_cwd) in [