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.
Files changed (27) hide show
  1. {patchpal-0.4.1/patchpal.egg-info → patchpal-0.4.2}/PKG-INFO +1 -1
  2. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/__init__.py +1 -1
  3. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/tools.py +10 -6
  4. {patchpal-0.4.1 → patchpal-0.4.2/patchpal.egg-info}/PKG-INFO +1 -1
  5. {patchpal-0.4.1 → patchpal-0.4.2}/LICENSE +0 -0
  6. {patchpal-0.4.1 → patchpal-0.4.2}/MANIFEST.in +0 -0
  7. {patchpal-0.4.1 → patchpal-0.4.2}/README.md +0 -0
  8. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/agent.py +0 -0
  9. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/cli.py +0 -0
  10. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/context.py +0 -0
  11. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/permissions.py +0 -0
  12. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/skills.py +0 -0
  13. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal/system_prompt.md +0 -0
  14. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal.egg-info/SOURCES.txt +0 -0
  15. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal.egg-info/dependency_links.txt +0 -0
  16. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal.egg-info/entry_points.txt +0 -0
  17. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal.egg-info/requires.txt +0 -0
  18. {patchpal-0.4.1 → patchpal-0.4.2}/patchpal.egg-info/top_level.txt +0 -0
  19. {patchpal-0.4.1 → patchpal-0.4.2}/pyproject.toml +0 -0
  20. {patchpal-0.4.1 → patchpal-0.4.2}/setup.cfg +0 -0
  21. {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_agent.py +0 -0
  22. {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_cli.py +0 -0
  23. {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_context.py +0 -0
  24. {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_guardrails.py +0 -0
  25. {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_operational_safety.py +0 -0
  26. {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_skills.py +0 -0
  27. {patchpal-0.4.1 → patchpal-0.4.2}/tests/test_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: patchpal
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: A lean Claude Code clone in pure Python
5
5
  Author: PatchPal Contributors
6
6
  License-Expression: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  """PatchPal - An open-source Claude Code clone implemented purely in Python."""
2
2
 
3
- __version__ = "0.4.1"
3
+ __version__ = "0.4.2"
4
4
 
5
5
  from patchpal.agent import create_agent
6
6
  from patchpal.tools import (
@@ -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 absolute)
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(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 / path).resolve()
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
- # Resolve path (handle both absolute and relative paths)
1078
- path_obj = Path(path)
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 / path).resolve()
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():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: patchpal
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: A lean Claude Code clone in pure Python
5
5
  Author: PatchPal Contributors
6
6
  License-Expression: Apache-2.0
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