open-edison 0.1.37__py3-none-any.whl → 0.1.38__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. {open_edison-0.1.37.dist-info → open_edison-0.1.38.dist-info}/METADATA +1 -2
  2. open_edison-0.1.38.dist-info/RECORD +22 -0
  3. open_edison-0.1.37.dist-info/RECORD +0 -35
  4. src/mcp_importer/__init__.py +0 -15
  5. src/mcp_importer/__main__.py +0 -19
  6. src/mcp_importer/api.py +0 -106
  7. src/mcp_importer/cli.py +0 -113
  8. src/mcp_importer/export_cli.py +0 -201
  9. src/mcp_importer/exporters.py +0 -393
  10. src/mcp_importer/import_api.py +0 -3
  11. src/mcp_importer/importers.py +0 -63
  12. src/mcp_importer/merge.py +0 -47
  13. src/mcp_importer/parsers.py +0 -148
  14. src/mcp_importer/paths.py +0 -92
  15. src/mcp_importer/quick_cli.py +0 -65
  16. src/mcp_importer/types.py +0 -5
  17. /src/__init__.py → /__init__.py +0 -0
  18. /src/__main__.py → /__main__.py +0 -0
  19. /src/cli.py → /cli.py +0 -0
  20. /src/config.py → /config.py +0 -0
  21. /src/config.pyi → /config.pyi +0 -0
  22. /src/events.py → /events.py +0 -0
  23. {src/frontend_dist → frontend_dist}/assets/index-BUUcUfTt.js +0 -0
  24. {src/frontend_dist → frontend_dist}/assets/index-o6_8mdM8.css +0 -0
  25. {src/frontend_dist → frontend_dist}/index.html +0 -0
  26. {src/frontend_dist → frontend_dist}/sw.js +0 -0
  27. {src/middleware → middleware}/data_access_tracker.py +0 -0
  28. {src/middleware → middleware}/session_tracking.py +0 -0
  29. /src/oauth_manager.py → /oauth_manager.py +0 -0
  30. {open_edison-0.1.37.dist-info → open_edison-0.1.38.dist-info}/WHEEL +0 -0
  31. {open_edison-0.1.37.dist-info → open_edison-0.1.38.dist-info}/entry_points.txt +0 -0
  32. {open_edison-0.1.37.dist-info → open_edison-0.1.38.dist-info}/licenses/LICENSE +0 -0
  33. /src/permissions.py → /permissions.py +0 -0
  34. /src/server.py → /server.py +0 -0
  35. /src/single_user_mcp.py → /single_user_mcp.py +0 -0
  36. /src/telemetry.py → /telemetry.py +0 -0
src/mcp_importer/paths.py DELETED
@@ -1,92 +0,0 @@
1
- import os
2
- import sys
3
- from pathlib import Path
4
-
5
-
6
- def is_windows() -> bool:
7
- return os.name == "nt"
8
-
9
-
10
- def is_macos() -> bool:
11
- return sys.platform == "darwin"
12
-
13
-
14
- def find_cursor_user_file() -> list[Path]:
15
- """Find user-level Cursor MCP config (~/.cursor/mcp.json)."""
16
- p = (Path.home() / ".cursor" / "mcp.json").resolve()
17
- return [p] if p.exists() else []
18
-
19
-
20
- def find_vscode_user_mcp_file() -> list[Path]:
21
- """Find VSCode user-level MCP config (User/mcp.json) on macOS or Linux."""
22
- if is_macos():
23
- p = Path.home() / "Library" / "Application Support" / "Code" / "User" / "mcp.json"
24
- else:
25
- p = Path.home() / ".config" / "Code" / "User" / "mcp.json"
26
- p = p.resolve()
27
- return [p] if p.exists() else []
28
-
29
-
30
- def find_claude_code_user_settings_file() -> list[Path]:
31
- """Find Claude Code user-level settings (~/.claude/settings.json)."""
32
- p = (Path.home() / ".claude" / "settings.json").resolve()
33
- return [p] if p.exists() else []
34
-
35
-
36
- def find_claude_code_user_all_candidates() -> list[Path]:
37
- """Return ordered list of Claude Code user-level MCP config candidates.
38
-
39
- Based on docs, check in priority order:
40
- - ~/.claude.json (primary user-level)
41
- - ~/.claude/settings.json
42
- - ~/.claude/settings.local.json
43
- - ~/.claude/mcp_servers.json
44
- """
45
- home = Path.home()
46
- candidates: list[Path] = [
47
- home / ".claude.json",
48
- home / ".claude" / "settings.json",
49
- home / ".claude" / "settings.local.json",
50
- home / ".claude" / "mcp_servers.json",
51
- ]
52
- existing: list[Path] = []
53
- for p in candidates:
54
- rp = p.resolve()
55
- if rp.exists():
56
- existing.append(rp)
57
- return existing
58
-
59
-
60
- # Shared utils for CLI import/export
61
-
62
-
63
- def detect_cursor_config_path() -> Path | None:
64
- files = find_cursor_user_file()
65
- return files[0] if files else None
66
-
67
-
68
- def detect_vscode_config_path() -> Path | None:
69
- files = find_vscode_user_mcp_file()
70
- return files[0] if files else None
71
-
72
-
73
- def get_default_vscode_config_path() -> Path:
74
- if is_macos():
75
- return (
76
- Path.home() / "Library" / "Application Support" / "Code" / "User" / "mcp.json"
77
- ).resolve()
78
- return (Path.home() / ".config" / "Code" / "User" / "mcp.json").resolve()
79
-
80
-
81
- def get_default_cursor_config_path() -> Path:
82
- return (Path.home() / ".cursor" / "mcp.json").resolve()
83
-
84
-
85
- def detect_claude_code_config_path() -> Path | None:
86
- candidates = find_claude_code_user_all_candidates()
87
- return candidates[0] if candidates else None
88
-
89
-
90
- def get_default_claude_code_config_path() -> Path:
91
- # Prefer top-level ~/.claude.json as default create target
92
- return (Path.home() / ".claude.json").resolve()
@@ -1,65 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import argparse
4
- from collections.abc import Iterable
5
-
6
- from mcp_importer.api import (
7
- CLIENT,
8
- detect_clients,
9
- export_edison_to,
10
- import_from,
11
- save_imported_servers,
12
- )
13
-
14
-
15
- def _pick_first(iterable: Iterable[CLIENT]) -> CLIENT | None:
16
- for item in iterable:
17
- return item
18
- return None
19
-
20
-
21
- def run_cli(argv: list[str] | None = None) -> int:
22
- parser = argparse.ArgumentParser(
23
- description=(
24
- "Detect a client, import its servers into Open Edison, and export Open Edison back to it."
25
- )
26
- )
27
- parser.add_argument("--dry-run", action="store_true", help="Preview actions without writing")
28
- parser.add_argument("--yes", action="store_true", help="Skip confirmations (no effect here)")
29
- args = parser.parse_args(argv)
30
-
31
- detected = detect_clients()
32
- client = _pick_first(detected)
33
- if client is None:
34
- print("No supported clients detected.")
35
- return 2
36
-
37
- servers = import_from(client)
38
- if not servers:
39
- print(f"No servers found to import from '{client.value}'.")
40
- return 0
41
-
42
- if args.dry_run:
43
- print(
44
- f"[dry-run] Would import {len(servers)} server(s) from '{client.value}' and save to config.json"
45
- )
46
- # Exercise export path safely (no writes)
47
- export_edison_to(client, dry_run=True, force=True, create_if_missing=True)
48
- print(
49
- f"[dry-run] Would export Open Edison to '{client.value}' (backup and replace editor MCP config)"
50
- )
51
- print("Dry-run complete.")
52
- return 0
53
-
54
- save_imported_servers(servers)
55
- export_edison_to(client, dry_run=False, force=True, create_if_missing=True)
56
- print(f"Completed quick import/export for {client.value}.")
57
- return 0
58
-
59
-
60
- def main(argv: list[str] | None = None) -> int:
61
- return run_cli(argv)
62
-
63
-
64
- if __name__ == "__main__":
65
- raise SystemExit(main())
src/mcp_importer/types.py DELETED
@@ -1,5 +0,0 @@
1
- """Type helpers for MCP importer."""
2
-
3
- from __future__ import annotations
4
-
5
- # This module intentionally minimal to avoid unused code flags.
File without changes
File without changes
/src/cli.py → /cli.py RENAMED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes