Add Cursor support to setup import (#33426)

## What changed

- Detect and import supported Cursor settings, sandbox permissions, MCP servers,
  project instructions, hooks, agents, commands, plugins, and recent chat
  sessions.
- Update the `/import` flow to check Claude Code and Cursor, prompting for a
  source when both have importable data.
- Add `migrationSource` to the app-server detect and import requests so each
  operation uses the selected adapter, while retaining `source` for import
  attribution and backwards compatibility.

## Testing

- Add coverage for Cursor config conversion, hooks, plugins, session discovery
  and conversion, app-server imports, and TUI source selection.

GitOrigin-RevId: a65a1511b6c1c2f9e3e0cfe4f816bb435807282e
This commit is contained in:
charlesgong-openai authored and copyberry committed 2026-07-15 21:03:49 +00:00
1 parent 0f2321f244
commit 1c4af96394
47 files changed
+2962 -247

No files matched your search

+8 -1
View File
@@ -21,6 +21,7 @@ const MARKETPLACE_MANIFEST_RELATIVE_PATHS: &[&str] = &[
".agents/plugins/marketplace.json",
".agents/plugins/api_marketplace.json",
".claude-plugin/marketplace.json",
".cursor-plugin/marketplace.json",
];
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -662,7 +663,13 @@ fn resolve_local_plugin_source_path(
}
// Non-root local sources must keep the explicit `./` prefix and remain normalized.
let Some(relative_path) = path.strip_prefix("./") else {
let relative_path = path.strip_prefix("./").or_else(|| {
marketplace_path
.as_path()
.ends_with(".cursor-plugin/marketplace.json")
.then_some(path)
});
let Some(relative_path) = relative_path else {
return Err(MarketplaceError::InvalidMarketplaceFile {
path: marketplace_path.to_path_buf(),
message: "local plugin source path must start with `./`".to_string(),