patchpal 0.4.1__tar.gz → 0.4.2__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.
- {patchpal-0.4.1/patchpal.egg-info → patchpal-0.4.2}/PKG-INFO +1 -1
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/__init__.py +1 -1
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/tools.py +10 -6
- {patchpal-0.4.1 → patchpal-0.4.2/patchpal.egg-info}/PKG-INFO +1 -1
- {patchpal-0.4.1 → patchpal-0.4.2}/LICENSE +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/MANIFEST.in +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/README.md +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/agent.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/cli.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/context.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/permissions.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/skills.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/system_prompt.md +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal.egg-info/SOURCES.txt +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal.egg-info/dependency_links.txt +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal.egg-info/entry_points.txt +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal.egg-info/requires.txt +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/patchpal.egg-info/top_level.txt +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/pyproject.toml +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/setup.cfg +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_agent.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_cli.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_context.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_guardrails.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_operational_safety.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_skills.py +0 -0
- {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_tools.py +0 -0
|
@@ -665,7 +665,7 @@ def _check_path(path: str, must_exist: bool = True) -> Path:
|
|
|
665
665
|
Validate and resolve a path.
|
|
666
666
|
|
|
667
667
|
Args:
|
|
668
|
-
path: Path to validate (relative or
|
|
668
|
+
path: Path to validate (relative, absolute, or with ~ for home directory)
|
|
669
669
|
must_exist: Whether the file must exist
|
|
670
670
|
|
|
671
671
|
Returns:
|
|
@@ -678,12 +678,15 @@ def _check_path(path: str, must_exist: bool = True) -> Path:
|
|
|
678
678
|
Can access files anywhere on the system (repository or outside).
|
|
679
679
|
Sensitive files (.env, credentials) are always blocked for safety.
|
|
680
680
|
"""
|
|
681
|
+
# Expand ~ for home directory first
|
|
682
|
+
expanded_path = os.path.expanduser(path)
|
|
683
|
+
|
|
681
684
|
# Resolve path (handle both absolute and relative paths)
|
|
682
|
-
path_obj = Path(
|
|
685
|
+
path_obj = Path(expanded_path)
|
|
683
686
|
if path_obj.is_absolute():
|
|
684
687
|
p = path_obj.resolve()
|
|
685
688
|
else:
|
|
686
|
-
p = (REPO_ROOT /
|
|
689
|
+
p = (REPO_ROOT / expanded_path).resolve()
|
|
687
690
|
|
|
688
691
|
# Check if file exists when required
|
|
689
692
|
if must_exist and not p.is_file():
|
|
@@ -1074,12 +1077,13 @@ def tree(path: str = ".", max_depth: int = 3, show_hidden: bool = False) -> str:
|
|
|
1074
1077
|
# Limit max_depth
|
|
1075
1078
|
max_depth = min(max_depth, 10)
|
|
1076
1079
|
|
|
1077
|
-
#
|
|
1078
|
-
|
|
1080
|
+
# Expand ~ for home directory and resolve path (handle both absolute and relative paths)
|
|
1081
|
+
expanded_path = os.path.expanduser(path)
|
|
1082
|
+
path_obj = Path(expanded_path)
|
|
1079
1083
|
if path_obj.is_absolute():
|
|
1080
1084
|
start_path = path_obj.resolve()
|
|
1081
1085
|
else:
|
|
1082
|
-
start_path = (REPO_ROOT /
|
|
1086
|
+
start_path = (REPO_ROOT / expanded_path).resolve()
|
|
1083
1087
|
|
|
1084
1088
|
# Check if path exists and is a directory
|
|
1085
1089
|
if not start_path.exists():
|
|
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
|
|
File without changes
|