zerochat 10.28.0__tar.gz → 10.29.0__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.
- {zerochat-10.28.0/zerochat.egg-info → zerochat-10.29.0}/PKG-INFO +1 -1
- {zerochat-10.28.0 → zerochat-10.29.0}/pyproject.toml +1 -1
- {zerochat-10.28.0 → zerochat-10.29.0/zerochat.egg-info}/PKG-INFO +1 -1
- {zerochat-10.28.0 → zerochat-10.29.0}/zerochat.py +19 -9
- {zerochat-10.28.0 → zerochat-10.29.0}/LICENSE +0 -0
- {zerochat-10.28.0 → zerochat-10.29.0}/README.md +0 -0
- {zerochat-10.28.0 → zerochat-10.29.0}/setup.cfg +0 -0
- {zerochat-10.28.0 → zerochat-10.29.0}/zerochat.egg-info/SOURCES.txt +0 -0
- {zerochat-10.28.0 → zerochat-10.29.0}/zerochat.egg-info/dependency_links.txt +0 -0
- {zerochat-10.28.0 → zerochat-10.29.0}/zerochat.egg-info/entry_points.txt +0 -0
- {zerochat-10.28.0 → zerochat-10.29.0}/zerochat.egg-info/top_level.txt +0 -0
|
@@ -1575,7 +1575,7 @@ def dispatch_browser(method: str, params: dict) -> RpcOutcome:
|
|
|
1575
1575
|
|
|
1576
1576
|
|
|
1577
1577
|
|
|
1578
|
-
SOURCE_BACKEND_VERSION = "10.
|
|
1578
|
+
SOURCE_BACKEND_VERSION = "10.29.0"
|
|
1579
1579
|
|
|
1580
1580
|
|
|
1581
1581
|
def _read_source_version(filename: str) -> str | None:
|
|
@@ -6907,7 +6907,9 @@ class AccessController:
|
|
|
6907
6907
|
base, sep, rest = pattern.partition("*")
|
|
6908
6908
|
if base:
|
|
6909
6909
|
# Mismo resolutor que SecurityContext.resolve_path (destino y base de la regla).
|
|
6910
|
-
target = Path(base)
|
|
6910
|
+
target = Path(base)
|
|
6911
|
+
if workspace_dir and not target.is_absolute():
|
|
6912
|
+
target = Path(workspace_dir) / target
|
|
6911
6913
|
real_base = normalize_directory_path(str(target.resolve(strict=False)))
|
|
6912
6914
|
if sep and base.endswith("/") and not real_base.endswith("/"):
|
|
6913
6915
|
real_base += "/"
|
|
@@ -6924,6 +6926,10 @@ class AccessController:
|
|
|
6924
6926
|
if not normalized_dest:
|
|
6925
6927
|
return {"allowed": False, "rule": None, "path": ""}
|
|
6926
6928
|
|
|
6929
|
+
full_rule = self._full_directory_access_rule(user_rules)
|
|
6930
|
+
if full_rule and access in ("R", "W"):
|
|
6931
|
+
return {"allowed": True, "rule": full_rule, "path": normalized_dest}
|
|
6932
|
+
|
|
6927
6933
|
matching_user_rules = []
|
|
6928
6934
|
for raw_rule in user_rules:
|
|
6929
6935
|
parsed = parse_directory_rule(raw_rule)
|
|
@@ -7162,14 +7168,18 @@ class AccessController:
|
|
|
7162
7168
|
return POLICY_ASK, "mcp_default_ask", "", None
|
|
7163
7169
|
|
|
7164
7170
|
@staticmethod
|
|
7165
|
-
def
|
|
7171
|
+
def _full_directory_access_rule(rules: list[str]) -> str | None:
|
|
7172
|
+
"""Primera regla RW sobre la raíz (RW:/** o RW:/), o None."""
|
|
7173
|
+
for raw in rules:
|
|
7174
|
+
parsed = parse_directory_rule(raw)
|
|
7175
|
+
if parsed is not None and parsed["access"] == "RW" and parsed["path"] in ("/**", "/"):
|
|
7176
|
+
return parsed["rule"]
|
|
7177
|
+
return None
|
|
7178
|
+
|
|
7179
|
+
@classmethod
|
|
7180
|
+
def _has_full_directory_access(cls, rules: list[str]) -> bool:
|
|
7166
7181
|
"""Indica si el proyecto tiene acceso RW a todo el sistema de ficheros (RW:/** o RW:/)."""
|
|
7167
|
-
return
|
|
7168
|
-
(parsed := parse_directory_rule(raw)) is not None
|
|
7169
|
-
and parsed["access"] == "RW"
|
|
7170
|
-
and parsed["path"] in ("/**", "/")
|
|
7171
|
-
for raw in rules
|
|
7172
|
-
)
|
|
7182
|
+
return cls._full_directory_access_rule(rules) is not None
|
|
7173
7183
|
|
|
7174
7184
|
@staticmethod
|
|
7175
7185
|
def _command_target(cwd: Path, raw_path: str) -> str:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|