open-edison 0.1.43__tar.gz → 0.1.44__tar.gz

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 (56) hide show
  1. {open_edison-0.1.43 → open_edison-0.1.44}/PKG-INFO +10 -34
  2. {open_edison-0.1.43 → open_edison-0.1.44}/README.md +8 -33
  3. {open_edison-0.1.43 → open_edison-0.1.44}/hatch_build.py +14 -11
  4. {open_edison-0.1.43 → open_edison-0.1.44}/pyproject.toml +10 -3
  5. open_edison-0.1.44/src/setup_tui/__init__.py +5 -0
  6. open_edison-0.1.44/src/setup_tui/main.py +157 -0
  7. {open_edison-0.1.43 → open_edison-0.1.44}/.gitignore +0 -0
  8. {open_edison-0.1.43 → open_edison-0.1.44}/LICENSE +0 -0
  9. {open_edison-0.1.43 → open_edison-0.1.44}/config.json +0 -0
  10. {open_edison-0.1.43 → open_edison-0.1.44}/desktop_ext/README.md +0 -0
  11. {open_edison-0.1.43 → open_edison-0.1.44}/docs/README.md +0 -0
  12. {open_edison-0.1.43 → open_edison-0.1.44}/docs/architecture/single_user_design.md +0 -0
  13. {open_edison-0.1.43 → open_edison-0.1.44}/docs/core/configuration.md +0 -0
  14. {open_edison-0.1.43 → open_edison-0.1.44}/docs/core/project_structure.md +0 -0
  15. {open_edison-0.1.43 → open_edison-0.1.44}/docs/core/proxy_usage.md +0 -0
  16. {open_edison-0.1.43 → open_edison-0.1.44}/docs/deployment/docker.md +0 -0
  17. {open_edison-0.1.43 → open_edison-0.1.44}/docs/deployment/local.md +0 -0
  18. {open_edison-0.1.43 → open_edison-0.1.44}/docs/development/contributing.md +0 -0
  19. {open_edison-0.1.43 → open_edison-0.1.44}/docs/development/development_guide.md +0 -0
  20. {open_edison-0.1.43 → open_edison-0.1.44}/docs/development/testing.md +0 -0
  21. {open_edison-0.1.43 → open_edison-0.1.44}/docs/quick-reference/api_reference.md +0 -0
  22. {open_edison-0.1.43 → open_edison-0.1.44}/docs/quick-reference/config_quick_start.md +0 -0
  23. {open_edison-0.1.43 → open_edison-0.1.44}/installation_test/README.md +0 -0
  24. {open_edison-0.1.43 → open_edison-0.1.44}/prompt_permissions.json +0 -0
  25. {open_edison-0.1.43 → open_edison-0.1.44}/resource_permissions.json +0 -0
  26. {open_edison-0.1.43 → open_edison-0.1.44}/src/__init__.py +0 -0
  27. {open_edison-0.1.43 → open_edison-0.1.44}/src/__main__.py +0 -0
  28. {open_edison-0.1.43 → open_edison-0.1.44}/src/cli.py +0 -0
  29. {open_edison-0.1.43 → open_edison-0.1.44}/src/config.py +0 -0
  30. {open_edison-0.1.43 → open_edison-0.1.44}/src/config.pyi +0 -0
  31. {open_edison-0.1.43 → open_edison-0.1.44}/src/events.py +0 -0
  32. {open_edison-0.1.43 → open_edison-0.1.44}/src/frontend_dist/assets/index-BUUcUfTt.js +0 -0
  33. {open_edison-0.1.43 → open_edison-0.1.44}/src/frontend_dist/assets/index-o6_8mdM8.css +0 -0
  34. {open_edison-0.1.43 → open_edison-0.1.44}/src/frontend_dist/index.html +0 -0
  35. {open_edison-0.1.43 → open_edison-0.1.44}/src/frontend_dist/sw.js +0 -0
  36. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/__init__.py +0 -0
  37. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/__main__.py +0 -0
  38. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/api.py +0 -0
  39. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/cli.py +0 -0
  40. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/export_cli.py +0 -0
  41. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/exporters.py +0 -0
  42. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/import_api.py +0 -0
  43. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/importers.py +0 -0
  44. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/merge.py +0 -0
  45. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/parsers.py +0 -0
  46. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/paths.py +0 -0
  47. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/quick_cli.py +0 -0
  48. {open_edison-0.1.43 → open_edison-0.1.44}/src/mcp_importer/types.py +0 -0
  49. {open_edison-0.1.43 → open_edison-0.1.44}/src/middleware/data_access_tracker.py +0 -0
  50. {open_edison-0.1.43 → open_edison-0.1.44}/src/middleware/session_tracking.py +0 -0
  51. {open_edison-0.1.43 → open_edison-0.1.44}/src/oauth_manager.py +0 -0
  52. {open_edison-0.1.43 → open_edison-0.1.44}/src/permissions.py +0 -0
  53. {open_edison-0.1.43 → open_edison-0.1.44}/src/server.py +0 -0
  54. {open_edison-0.1.43 → open_edison-0.1.44}/src/single_user_mcp.py +0 -0
  55. {open_edison-0.1.43 → open_edison-0.1.44}/src/telemetry.py +0 -0
  56. {open_edison-0.1.43 → open_edison-0.1.44}/tool_permissions.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: open-edison
3
- Version: 0.1.43
3
+ Version: 0.1.44
4
4
  Summary: Open-source MCP security, aggregation, and monitoring. Single-user, self-hosted MCP proxy.
5
5
  Author-email: Hugo Berg <hugo@edison.watch>
6
6
  License-File: LICENSE
@@ -17,6 +17,7 @@ Requires-Dist: opentelemetry-exporter-otlp>=1.36.0
17
17
  Requires-Dist: opentelemetry-sdk>=1.36.0
18
18
  Requires-Dist: python-dotenv>=1.0.1
19
19
  Requires-Dist: pyyaml>=6.0.2
20
+ Requires-Dist: questionary>=2.1.1
20
21
  Requires-Dist: sqlalchemy>=2.0.41
21
22
  Requires-Dist: starlette>=0.47.1
22
23
  Requires-Dist: uvicorn>=0.35.0
@@ -72,11 +73,11 @@ curl -fsSL https://raw.githubusercontent.com/Edison-Watch/open-edison/main/curl_
72
73
 
73
74
  Run locally with uvx: `uvx open-edison`
74
75
 
75
- Optionally, import your existing MCP configs from Cursor, VS Code, or Claude Code with:
76
+ Optionally, run the setup wizard to import/configure MCP:
76
77
 
77
78
  ```bash
78
- # From source (no install) — quick one-liner (add --dry-run to preview)
79
- uv run python -m src.mcp_importer.quick_cli --yes
79
+ uv run python -m src.setup_tui.main
80
+ # add --dry-run to preview without writing
80
81
  ```
81
82
 
82
83
  <details>
@@ -131,38 +132,13 @@ OPEN_EDISON_CONFIG_DIR=~/edison-config open-edison run
131
132
  <details>
132
133
  <summary>🔄 Import from Cursor/VS Code/Claude Code</summary>
133
134
 
134
- ### Import from Cursor/VS Code/Claude Code
135
+ Run the interactive setup wizard to detect clients, import servers, and configure your editor:
135
136
 
136
- - **CLI**
137
-
138
- - Import & configure to use edison as your MCP server:
139
-
140
- ```bash
141
- # From source (no install)
142
- uv run python -m src.mcp_importer.quick_cli --yes
143
- ```
144
-
145
- - Preview what will be imported (no writes):
146
-
147
- ```bash
148
- uv run python -m src.mcp_importer --source cursor --dry-run
149
- ```
150
-
151
- - Import servers into Open Edison `config.json` (merge policy defaults to `skip`):
152
-
153
- ```bash
154
- uv run python -m src.mcp_importer --source cursor
155
- uv run python -m src.mcp_importer --source vscode
156
- uv run python -m src.mcp_importer --source claude-code
157
- ```
158
-
159
- - Point your editor to Open Edison (backup original config and replace with a single Open Edison server):
137
+ ```bash
138
+ uv run python -m src.setup_tui.main
139
+ ```
160
140
 
161
- ```bash
162
- uv run python -m src.mcp_importer export --target cursor --yes
163
- uv run python -m src.mcp_importer export --target vscode --yes
164
- uv run python -m src.mcp_importer export --target claude-code --yes
165
- ```
141
+ Use `--dry-run` to preview without writing.
166
142
 
167
143
  </details>
168
144
 
@@ -48,11 +48,11 @@ curl -fsSL https://raw.githubusercontent.com/Edison-Watch/open-edison/main/curl_
48
48
 
49
49
  Run locally with uvx: `uvx open-edison`
50
50
 
51
- Optionally, import your existing MCP configs from Cursor, VS Code, or Claude Code with:
51
+ Optionally, run the setup wizard to import/configure MCP:
52
52
 
53
53
  ```bash
54
- # From source (no install) — quick one-liner (add --dry-run to preview)
55
- uv run python -m src.mcp_importer.quick_cli --yes
54
+ uv run python -m src.setup_tui.main
55
+ # add --dry-run to preview without writing
56
56
  ```
57
57
 
58
58
  <details>
@@ -107,38 +107,13 @@ OPEN_EDISON_CONFIG_DIR=~/edison-config open-edison run
107
107
  <details>
108
108
  <summary>🔄 Import from Cursor/VS Code/Claude Code</summary>
109
109
 
110
- ### Import from Cursor/VS Code/Claude Code
110
+ Run the interactive setup wizard to detect clients, import servers, and configure your editor:
111
111
 
112
- - **CLI**
113
-
114
- - Import & configure to use edison as your MCP server:
115
-
116
- ```bash
117
- # From source (no install)
118
- uv run python -m src.mcp_importer.quick_cli --yes
119
- ```
120
-
121
- - Preview what will be imported (no writes):
122
-
123
- ```bash
124
- uv run python -m src.mcp_importer --source cursor --dry-run
125
- ```
126
-
127
- - Import servers into Open Edison `config.json` (merge policy defaults to `skip`):
128
-
129
- ```bash
130
- uv run python -m src.mcp_importer --source cursor
131
- uv run python -m src.mcp_importer --source vscode
132
- uv run python -m src.mcp_importer --source claude-code
133
- ```
134
-
135
- - Point your editor to Open Edison (backup original config and replace with a single Open Edison server):
112
+ ```bash
113
+ uv run python -m src.setup_tui.main
114
+ ```
136
115
 
137
- ```bash
138
- uv run python -m src.mcp_importer export --target cursor --yes
139
- uv run python -m src.mcp_importer export --target vscode --yes
140
- uv run python -m src.mcp_importer export --target claude-code --yes
141
- ```
116
+ Use `--dry-run` to preview without writing.
142
117
 
143
118
  </details>
144
119
 
@@ -1,4 +1,3 @@
1
- import os
2
1
  import shutil
3
2
  from pathlib import Path
4
3
 
@@ -17,19 +16,22 @@ class BuildHook(BuildHookInterface): # type: ignore
17
16
  """
18
17
 
19
18
  def initialize(self, version: str, build_data: dict) -> None: # noqa: D401 # type: ignore
19
+ # For editable builds, just return without doing anything
20
+ # This prevents failures during `uv sync` in CI environments
21
+ if version == "editable":
22
+ return
23
+
24
+ # For wheel and sdist builds, ensure frontend assets are present
25
+ self._ensure_frontend_assets()
26
+
27
+ def _ensure_frontend_assets(self) -> None:
28
+ """Ensure frontend assets are available for packaging."""
20
29
  project_root = Path(self.root)
21
30
  src_frontend_dist = project_root / "src" / "frontend_dist"
22
31
  repo_frontend_dist = project_root / "frontend" / "dist"
23
32
 
24
- # Opt-in enforcement: only enforce when OPEN_EDISON_REQUIRE_FRONTEND=1/true/yes
25
- enforce = os.environ.get("OPEN_EDISON_REQUIRE_FRONTEND", "").lower() in {"1", "true", "yes"}
26
- if not enforce:
27
- self.app.display_info(
28
- "Skipping frontend_dist enforcement (set OPEN_EDISON_REQUIRE_FRONTEND=1 to enforce)"
29
- )
30
- return
31
-
32
- # Fast path: already present in src/
33
+ # Always ensure frontend assets are available for packaging
34
+ # Fast path: already present in src/ with actual content
33
35
  if (src_frontend_dist / "index.html").exists():
34
36
  self.app.display_info("frontend_dist already present; skipping build/copy")
35
37
  return
@@ -42,7 +44,8 @@ class BuildHook(BuildHookInterface): # type: ignore
42
44
  self.app.display_info("Copied frontend/dist -> src/frontend_dist for packaging")
43
45
  return
44
46
 
45
- # No assets available; fail fast with guidance
47
+ # If we reach here, neither src/frontend_dist nor frontend/dist exist
48
+ # This should fail the build as requested
46
49
  raise RuntimeError(
47
50
  "Packaged dashboard (src/frontend_dist) missing and frontend/dist not found. "
48
51
  "Run 'make build_package' to generate assets before packaging/uvx."
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "open-edison"
3
- version = "0.1.43"
3
+ version = "0.1.44"
4
4
  description = "Open-source MCP security, aggregation, and monitoring. Single-user, self-hosted MCP proxy."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -22,6 +22,7 @@ dependencies = [
22
22
  "opentelemetry-sdk>=1.36.0",
23
23
  "opentelemetry-exporter-otlp>=1.36.0",
24
24
  "hatchling>=1.27.0",
25
+ "questionary>=2.1.1",
25
26
  ]
26
27
  requires-python = ">= 3.12"
27
28
 
@@ -64,6 +65,10 @@ include = [
64
65
  "prompt_permissions.json",
65
66
  "docs/**",
66
67
  ]
68
+ artifacts = [
69
+ "src/frontend_dist/**",
70
+ ]
71
+
67
72
 
68
73
  [tool.hatch.build.targets.wheel.hooks.custom]
69
74
  path = "hatch_build.py"
@@ -78,10 +83,12 @@ include = [
78
83
  "resource_permissions.json",
79
84
  "prompt_permissions.json",
80
85
  "src/**",
81
- "src/frontend_dist/**",
82
86
  "docs/**",
83
87
  ]
84
- force-include = { "src/frontend_dist" = "src/frontend_dist" }
88
+ artifacts = [
89
+ "src/frontend_dist/**",
90
+ ]
91
+
85
92
 
86
93
  [tool.hatch.build.targets.sdist.hooks.custom]
87
94
  path = "hatch_build.py"
@@ -0,0 +1,5 @@
1
+ """Setup TUI package initializer.
2
+
3
+ Intentionally empty to avoid importing submodules at package import time,
4
+ which prevents warnings when executing `python -m src.setup_tui.main`.
5
+ """
@@ -0,0 +1,157 @@
1
+ import argparse
2
+
3
+ import questionary
4
+
5
+ from src.config import MCPServerConfig
6
+ from src.mcp_importer.api import (
7
+ CLIENT,
8
+ detect_clients,
9
+ export_edison_to,
10
+ import_from,
11
+ verify_mcp_server,
12
+ )
13
+
14
+
15
+ def show_welcome_screen(*, dry_run: bool = False) -> None:
16
+ """Display the welcome screen for open-edison setup."""
17
+ welcome_text = """
18
+ ╔══════════════════════════════════════════════════════════════╗
19
+ ║ ║
20
+ ║ Welcome to open-edison ║
21
+ ║ ║
22
+ ║ This setup wizard will help you configure open-edison ║
23
+ ║ for your development environment. ║
24
+ ║ ║
25
+ ╚══════════════════════════════════════════════════════════════╝
26
+ """
27
+
28
+ print(welcome_text)
29
+
30
+ # Prompt to continue
31
+ questionary.confirm("Ready to begin the setup process?", default=True).ask()
32
+
33
+
34
+ def handle_mcp_source(source: CLIENT, *, dry_run: bool = False) -> list[MCPServerConfig]:
35
+ """Handle the MCP source."""
36
+ if not questionary.confirm(
37
+ f"We have found {source.name} installed. Would you like to import its MCP servers to open-edison?",
38
+ default=True,
39
+ ).ask():
40
+ return []
41
+
42
+ configs = import_from(source)
43
+
44
+ print(f"Loaded {len(configs)} MCP server configuration from {source.name}!")
45
+
46
+ verified_configs: list[MCPServerConfig] = []
47
+
48
+ for config in configs:
49
+ print(f"Verifying the configuration for {config.name}... (TODO)")
50
+ result = verify_mcp_server(config)
51
+ if result:
52
+ verified_configs.append(config)
53
+ else:
54
+ print(
55
+ f"The configuration for {config.name} is not valid. Please check the configuration and try again."
56
+ )
57
+
58
+ return verified_configs
59
+
60
+
61
+ def confirm_configs(configs: list[MCPServerConfig], *, dry_run: bool = False) -> bool:
62
+ """Confirm the MCP configs."""
63
+ print("These are the servers you have selected:")
64
+
65
+ for config in configs:
66
+ print(f"○ {config.name}")
67
+
68
+ return questionary.confirm(
69
+ "Are you sure you want to use these servers with open-edison?", default=True
70
+ ).ask()
71
+
72
+
73
+ def confirm_apply_configs(client: CLIENT, *, dry_run: bool = False) -> None:
74
+ if not questionary.confirm(
75
+ f"We have detected that you have {client.name} installed. Would you like to connect it to open-edison?",
76
+ default=True,
77
+ ).ask():
78
+ return
79
+
80
+ export_edison_to(client, dry_run=dry_run)
81
+ if dry_run:
82
+ print(f"[dry-run] Export prepared for {client.name}; no changes written.")
83
+ else:
84
+ print(f"Successfully set up Open Edison for {client.name}!")
85
+
86
+
87
+ def show_manual_setup_screen() -> None:
88
+ """Display manual setup instructions for open-edison."""
89
+ manual_setup_text = """
90
+ ╔══════════════════════════════════════════════════════════════╗
91
+ ║ ║
92
+ ║ Manual Setup Instructions ║
93
+ ║ ║
94
+ ╚══════════════════════════════════════════════════════════════╝
95
+
96
+ To set up open-edison manually in other clients, find your client's MCP config
97
+ JSON file and add the following configuration:
98
+
99
+ "mcpServers": {
100
+ "open-edison": {
101
+ "command": "npx",
102
+ "args": [
103
+ "-y",
104
+ "mcp-remote",
105
+ "http://localhost:3000/mcp/",
106
+ "--http-only",
107
+ "--header",
108
+ "Authorization: Bearer dev-api-key-change-me"
109
+ ]
110
+ }
111
+ },
112
+
113
+ Make sure to replace 'dev-api-key-change-me' with your actual API key.
114
+ """
115
+
116
+ print(manual_setup_text)
117
+
118
+
119
+ def run(*, dry_run: bool = False) -> None:
120
+ """Run the complete setup process."""
121
+ show_welcome_screen(dry_run=dry_run)
122
+ # Additional setup steps will be added here
123
+
124
+ mcp_sources = detect_clients()
125
+ mcp_clients = detect_clients()
126
+
127
+ configs: list[MCPServerConfig] = []
128
+
129
+ for source in mcp_sources:
130
+ configs.extend(handle_mcp_source(source, dry_run=dry_run))
131
+
132
+ if len(configs) == 0:
133
+ print(
134
+ "No MCP servers found. Please set up an MCP client with some servers and run this setup again."
135
+ )
136
+ return
137
+
138
+ if not confirm_configs(configs, dry_run=dry_run):
139
+ return
140
+
141
+ for client in mcp_clients:
142
+ confirm_apply_configs(client, dry_run=dry_run)
143
+
144
+ show_manual_setup_screen()
145
+
146
+
147
+ def main(argv: list[str] | None = None) -> int:
148
+ parser = argparse.ArgumentParser(description="Open Edison Setup TUI")
149
+ parser.add_argument("--dry-run", action="store_true", help="Preview actions without writing")
150
+ args = parser.parse_args(argv)
151
+
152
+ run(dry_run=args.dry_run)
153
+ return 0
154
+
155
+
156
+ if __name__ == "__main__":
157
+ raise SystemExit(main())
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes