mcpower-proxy 0.0.63__tar.gz → 0.0.65__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.
Potentially problematic release.
This version of mcpower-proxy might be problematic. Click here for more details.
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/PKG-INFO +1 -1
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/pyproject.toml +1 -1
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/mcpower_proxy.egg-info/PKG-INFO +1 -1
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/logs/audit_trail.py +7 -3
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/wrapper/__version__.py +1 -1
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/wrapper/middleware.py +9 -8
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/LICENSE +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/README.md +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/setup.cfg +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/LICENSE +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/main.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/mcpower_proxy.egg-info/SOURCES.txt +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/mcpower_proxy.egg-info/dependency_links.txt +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/mcpower_proxy.egg-info/entry_points.txt +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/mcpower_proxy.egg-info/requires.txt +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/mcpower_proxy.egg-info/top_level.txt +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/__init__.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/apis/__init__.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/apis/security_policy.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/logs/__init__.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/logs/logger.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/redaction/__init__.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/redaction/constants.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/redaction/gitleaks_rules.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/redaction/pii_rules.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/redaction/redactor.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/__init__.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/classes.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/confirmation.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/simple_dialog.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/xdialog/__init__.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/xdialog/constants.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/xdialog/mac_dialogs.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/xdialog/tk_dialogs.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/xdialog/windows_custom_dialog.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/xdialog/windows_dialogs.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/xdialog/windows_structs.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/xdialog/yad_dialogs.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/xdialog/zenity_dialogs.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/utils/__init__.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/utils/cli.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/utils/config.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/utils/copy.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/utils/ids.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/utils/json.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/utils/mcp_configs.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/wrapper/__init__.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/wrapper/schema.py +0 -0
- {mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/wrapper/server.py +0 -0
|
@@ -130,16 +130,20 @@ class AuditTrailLogger:
|
|
|
130
130
|
|
|
131
131
|
This is called by the middleware after workspace roots are available.
|
|
132
132
|
All queued logs will be written with app_uid as the first key.
|
|
133
|
+
Supports updating app_uid when workspace context changes.
|
|
133
134
|
|
|
134
135
|
Args:
|
|
135
136
|
app_uid: The application UID from workspace root
|
|
136
137
|
"""
|
|
137
|
-
if self.app_uid
|
|
138
|
-
self.logger.warning(f"app_uid already set to {self.app_uid}, ignoring new value {app_uid}")
|
|
138
|
+
if self.app_uid == app_uid:
|
|
139
139
|
return
|
|
140
140
|
|
|
141
|
+
if self.app_uid is not None:
|
|
142
|
+
self.logger.info(f"app_uid changed from {self.app_uid} to {app_uid}")
|
|
143
|
+
else:
|
|
144
|
+
self.logger.debug(f"app_uid set to: {app_uid}")
|
|
145
|
+
|
|
141
146
|
self.app_uid = app_uid
|
|
142
|
-
self.logger.debug(f"✅ app_uid set to: {app_uid}")
|
|
143
147
|
|
|
144
148
|
# Flush all pending logs
|
|
145
149
|
if self._pending_logs:
|
|
@@ -55,6 +55,7 @@ class SecurityMiddleware(Middleware):
|
|
|
55
55
|
app_id: str = ""
|
|
56
56
|
_TOOLS_INIT_DEBOUNCE_SECONDS = 60
|
|
57
57
|
_last_tools_init_time: Optional[float] = None
|
|
58
|
+
_last_workspace_root: Optional[str] = None
|
|
58
59
|
|
|
59
60
|
def __init__(self,
|
|
60
61
|
wrapped_server_configs: dict,
|
|
@@ -69,6 +70,7 @@ class SecurityMiddleware(Middleware):
|
|
|
69
70
|
self.logger = logger
|
|
70
71
|
self.audit_logger = audit_logger
|
|
71
72
|
self.app_id = ""
|
|
73
|
+
self._last_workspace_root = None
|
|
72
74
|
|
|
73
75
|
self.wrapped_server_name, self.wrapped_server_transport = (
|
|
74
76
|
extract_wrapped_server_info(self.wrapper_server_name, self.logger, self.wrapped_server_configs)
|
|
@@ -85,14 +87,13 @@ class SecurityMiddleware(Middleware):
|
|
|
85
87
|
async def on_message(self, context: MiddlewareContext, call_next: CallNext) -> Any:
|
|
86
88
|
self.logger.info(f"on_message: {redact(safe_json_dumps(context))}")
|
|
87
89
|
|
|
88
|
-
#
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
self.app_id = read_app_uid(logger=self.logger, project_folder_path=str(Path.home() / ".mcpower"))
|
|
90
|
+
# Check workspace roots and re-initialize app_uid if workspace changed
|
|
91
|
+
workspace_roots = await self._extract_workspace_roots(context)
|
|
92
|
+
current_workspace_root = workspace_roots[0] if workspace_roots else str(Path.home() / ".mcpower")
|
|
93
|
+
if current_workspace_root != self._last_workspace_root:
|
|
94
|
+
self.logger.debug(f"Workspace root changed from {self._last_workspace_root} to {current_workspace_root}")
|
|
95
|
+
self._last_workspace_root = current_workspace_root
|
|
96
|
+
self.app_id = read_app_uid(logger=self.logger, project_folder_path=current_workspace_root)
|
|
96
97
|
self.audit_logger.set_app_uid(self.app_id)
|
|
97
98
|
|
|
98
99
|
operation_type = "message"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/mcpower_proxy.egg-info/dependency_links.txt
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
|
|
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
|
{mcpower_proxy-0.0.63 → mcpower_proxy-0.0.65}/src/modules/ui/xdialog/windows_custom_dialog.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
|
|
File without changes
|
|
File without changes
|