open-edison 0.1.30__py3-none-any.whl → 0.1.36__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.
- {open_edison-0.1.30.dist-info → open_edison-0.1.36.dist-info}/METADATA +3 -7
- open_edison-0.1.36.dist-info/RECORD +22 -0
- src/cli.py +2 -16
- src/config.py +20 -2
- src/config.pyi +80 -0
- src/events.py +0 -2
- src/frontend_dist/assets/index-BUUcUfTt.js +51 -0
- src/frontend_dist/index.html +1 -1
- src/server.py +17 -9
- src/single_user_mcp.py +24 -0
- open_edison-0.1.30.dist-info/RECORD +0 -21
- src/frontend_dist/assets/index-DOR5YaNc.js +0 -51
- {open_edison-0.1.30.dist-info → open_edison-0.1.36.dist-info}/WHEEL +0 -0
- {open_edison-0.1.30.dist-info → open_edison-0.1.36.dist-info}/entry_points.txt +0 -0
- {open_edison-0.1.30.dist-info → open_edison-0.1.36.dist-info}/licenses/LICENSE +0 -0
src/frontend_dist/index.html
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
const prefersLight = window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches;
|
11
11
|
document.documentElement.setAttribute('data-theme', prefersLight ? 'light' : 'dark');
|
12
12
|
</script>
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
13
|
+
<script type="module" crossorigin src="/assets/index-BUUcUfTt.js"></script>
|
14
14
|
<link rel="stylesheet" crossorigin href="/assets/index-o6_8mdM8.css">
|
15
15
|
</head>
|
16
16
|
|
src/server.py
CHANGED
@@ -30,7 +30,7 @@ from loguru import logger as log
|
|
30
30
|
from pydantic import BaseModel, Field
|
31
31
|
|
32
32
|
from src import events
|
33
|
-
from src.config import Config, MCPServerConfig,
|
33
|
+
from src.config import Config, MCPServerConfig, clear_json_file_cache
|
34
34
|
from src.config import get_config_dir as _get_cfg_dir # type: ignore[attr-defined]
|
35
35
|
from src.middleware.session_tracking import (
|
36
36
|
MCPSessionModel,
|
@@ -127,15 +127,22 @@ class OpenEdisonProxy:
|
|
127
127
|
app.add_api_route("/favicon.ico", _favicon, methods=["GET"]) # type: ignore[arg-type]
|
128
128
|
log.info(f"📊 Dashboard static assets mounted at /dashboard from {static_dir}")
|
129
129
|
else:
|
130
|
-
#
|
130
|
+
# If running from an installed package (no repository indicators), fail fast.
|
131
|
+
# If running from repository source (pyproject present alongside src/), skip mount.
|
131
132
|
cwd = Path.cwd()
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
133
|
+
repo_root_candidate = Path(__file__).parent.parent / "pyproject.toml"
|
134
|
+
if not repo_root_candidate.exists():
|
135
|
+
msg = (
|
136
|
+
"Packaged dashboard assets not found. Expected at one of: "
|
137
|
+
f"{primary_candidate} or {secondary_candidate}. "
|
138
|
+
f"cwd={cwd}, __file__={Path(__file__).resolve()}"
|
139
|
+
)
|
140
|
+
log.error(msg)
|
141
|
+
raise RuntimeError(msg)
|
142
|
+
log.debug(
|
143
|
+
"Repository source detected ({} present). Skipping dashboard mount.",
|
144
|
+
repo_root_candidate,
|
136
145
|
)
|
137
|
-
log.error(msg)
|
138
|
-
raise RuntimeError(msg)
|
139
146
|
except Exception as mount_err: # noqa: BLE001
|
140
147
|
log.error(f"Failed to mount dashboard static assets: {mount_err}")
|
141
148
|
raise
|
@@ -268,7 +275,7 @@ class OpenEdisonProxy:
|
|
268
275
|
|
269
276
|
# Clear cache for the config file, if it was config.json
|
270
277
|
if name == "config.json":
|
271
|
-
|
278
|
+
clear_json_file_cache()
|
272
279
|
|
273
280
|
return {"status": "ok"}
|
274
281
|
except Exception as e: # noqa: BLE001
|
@@ -956,6 +963,7 @@ class OpenEdisonProxy:
|
|
956
963
|
scopes=scopes,
|
957
964
|
client_name=client_name or "OpenEdison MCP Gateway",
|
958
965
|
token_storage_cache_dir=oauth_manager.cache_dir,
|
966
|
+
callback_port=50001,
|
959
967
|
)
|
960
968
|
|
961
969
|
# Create a temporary client and test the connection
|
src/single_user_mcp.py
CHANGED
@@ -278,6 +278,27 @@ class SingleUserMCP(FastMCP[Any]):
|
|
278
278
|
log.info(f"🧹 Unmounted server {server_name} and cleared references")
|
279
279
|
return True
|
280
280
|
|
281
|
+
async def _send_list_changed_notifications(self) -> None:
|
282
|
+
"""Send notifications to clients about changed component lists."""
|
283
|
+
try:
|
284
|
+
# Import here to avoid circular imports
|
285
|
+
from fastmcp.server.dependencies import get_context
|
286
|
+
|
287
|
+
try:
|
288
|
+
context = get_context()
|
289
|
+
# Queue notifications for all component types since we don't know
|
290
|
+
# what types of components the unmounted server provided
|
291
|
+
context._queue_tool_list_changed() # type: ignore
|
292
|
+
context._queue_resource_list_changed() # type: ignore
|
293
|
+
context._queue_prompt_list_changed() # type: ignore
|
294
|
+
log.debug("Queued component list change notifications")
|
295
|
+
except RuntimeError:
|
296
|
+
# No active context - notifications will be sent when context becomes available
|
297
|
+
log.debug("No active context for notifications")
|
298
|
+
|
299
|
+
except Exception as e:
|
300
|
+
log.warning(f"Error sending unmount notifications: {e}")
|
301
|
+
|
281
302
|
async def initialize(self) -> None:
|
282
303
|
"""Initialize the FastMCP server using unified composite proxy approach."""
|
283
304
|
log.info("Initializing Single User MCP server with composite proxy")
|
@@ -306,6 +327,9 @@ class SingleUserMCP(FastMCP[Any]):
|
|
306
327
|
_ = await self._resource_manager.list_resources()
|
307
328
|
_ = await self._prompt_manager.list_prompts()
|
308
329
|
|
330
|
+
# Send notifications to clients about changed component lists
|
331
|
+
await self._send_list_changed_notifications()
|
332
|
+
|
309
333
|
def _calculate_risk_level(self, trifecta: dict[str, bool]) -> str:
|
310
334
|
"""
|
311
335
|
Calculate a human-readable risk level based on trifecta flags.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
src/__init__.py,sha256=QWeZdjAm2D2B0eWhd8m2-DPpWvIP26KcNJxwEoU1oEQ,254
|
2
|
-
src/__main__.py,sha256=kQsaVyzRa_ESC57JpKDSQJAHExuXme0rM5beJsYxFeA,161
|
3
|
-
src/cli.py,sha256=57XJH-Zd45HgxfILZlNWkHNNjuKKMSuer0l3Q0BgZ_k,10201
|
4
|
-
src/config.py,sha256=LHLQWWWvPzdQfCEUCbCMqHpEOnXJhmPFmk9bSVGnUyY,9443
|
5
|
-
src/events.py,sha256=rBH7rnaSWZ7GIC8zyBTwpcvIKWmKYCki-DNGgJhxPow,5001
|
6
|
-
src/oauth_manager.py,sha256=qcQa5BDRZr4bjqiXNflCnrXOh9mo9JVjvP2Caseg2Uc,9943
|
7
|
-
src/permissions.py,sha256=NGAnlG_z59HEiVA-k3cYvwmmiuHzxuNb5Tbd5umbL00,10483
|
8
|
-
src/server.py,sha256=0sdBz7VLWy5moO1GtecljuXFK7AV6mg6UOi6At4MPEo,45166
|
9
|
-
src/single_user_mcp.py,sha256=P-D6_B_l7fJ2OzMjVeg56OkzRkCsODqKpky4ecHRj6I,17356
|
10
|
-
src/telemetry.py,sha256=-RZPIjpI53zbsKmp-63REeZ1JirWHV5WvpSRa2nqZEk,11321
|
11
|
-
src/frontend_dist/index.html,sha256=skY5DFiRUpVBaVjXzqGkoDhHZM99qeuf08WrcEh-0EU,673
|
12
|
-
src/frontend_dist/sw.js,sha256=rihX1es-vWwjmtnXyaksJjs2dio6MVAOTAWwQPeJUYw,2164
|
13
|
-
src/frontend_dist/assets/index-DOR5YaNc.js,sha256=EhRRS_nAymGQDyv3GA4a7XuBVcNkIdckaKYLmruBZKk,254616
|
14
|
-
src/frontend_dist/assets/index-o6_8mdM8.css,sha256=nwmX_6q55mB9463XN2JM8BdeihjkALpQK83Fc3_iGvE,15936
|
15
|
-
src/middleware/data_access_tracker.py,sha256=bArBffWgYmvxOx9z_pgXQhogvnWQcc1m6WvEblDD4gw,15039
|
16
|
-
src/middleware/session_tracking.py,sha256=5W1VH9HNqIZeX0HNxDEm41U4GY6SqKSXtApDEeZK2qo,23084
|
17
|
-
open_edison-0.1.30.dist-info/METADATA,sha256=9AiZvDoQLKWeIF8G2if1YE7v9u9P0wT9-xungNjqGZI,12136
|
18
|
-
open_edison-0.1.30.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
19
|
-
open_edison-0.1.30.dist-info/entry_points.txt,sha256=qNAkJcnoTXRhj8J--3PDmXz_TQKdB8H_0C9wiCtDIyA,72
|
20
|
-
open_edison-0.1.30.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
21
|
-
open_edison-0.1.30.dist-info/RECORD,,
|