mirror of
https://github.com/openai/codex.git
synced 2026-11-29 07:35:16 +00:00
Detect connectors used in external agent sessions (#36336)
## What changed - Add session connector detection to `ExternalAgentConfigService` for Claude and Cursor migrations. - Resolve Claude connector attributions through session manifests and map Cursor `CallMcpTool` server IDs through cached plugin metadata. - Return deduplicated connector candidates with their session counts and detection sources, and expose the new result types from the migration crate. ## Testing - Cover Claude connector resolution by server name and UUID. - Cover Cursor connector detection and per-session counting from MCP tool calls. GitOrigin-RevId: 772bfe949bdc734b385a6e06f6a4b1d35b4cf210
This commit is contained in:
1 parent
ef293f7ac9
commit
448118f544
9 files changed
+479
-19
No files matched your search
@@ -2,8 +2,11 @@ use crate::ClaSource;
|
||||
use crate::CurSource;
|
||||
use crate::RewriteProfile;
|
||||
use crate::detect::plugins;
|
||||
use crate::detect::sessions::detect_cla_session_connectors;
|
||||
use crate::detect::sessions::detect_cur_session_connectors;
|
||||
use crate::detect::sessions::detect_recent_cla_sessions_with_limits;
|
||||
use crate::detect::sessions::detect_recent_cur_sessions_with_limits;
|
||||
use crate::model::DetectedConnectorCandidate;
|
||||
use crate::model::ExternalAgentSessionImportLimits;
|
||||
use crate::sessions::ExternalAgentSessionMigration;
|
||||
use crate::sessions::SessionMetadataMode;
|
||||
@@ -149,6 +152,18 @@ impl ExternalAgentSource {
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn detect_session_connectors(
|
||||
self,
|
||||
sessions: &[ExternalAgentSessionMigration],
|
||||
connector_metadata_roots: &[PathBuf],
|
||||
external_agent_home: &Path,
|
||||
) -> Vec<DetectedConnectorCandidate> {
|
||||
match self {
|
||||
Self::Cla => detect_cla_session_connectors(sessions, connector_metadata_roots),
|
||||
Self::Cur => detect_cur_session_connectors(sessions, external_agent_home),
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn marketplace_import_sources(
|
||||
self,
|
||||
external_agent_home: &Path,
|
||||
|
||||
Reference in new issue
Block a user