patchpal 0.22.5__tar.gz → 0.22.6__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.22.5/patchpal.egg-info → patchpal-0.22.6}/PKG-INFO +4 -3
- {patchpal-0.22.5 → patchpal-0.22.6}/README.md +3 -2
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/__init__.py +1 -1
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/cli/sandbox.py +51 -4
- {patchpal-0.22.5 → patchpal-0.22.6/patchpal.egg-info}/PKG-INFO +4 -3
- {patchpal-0.22.5 → patchpal-0.22.6}/LICENSE +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/MANIFEST.in +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/agent/__init__.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/agent/function_calling.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/agent/react.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/cli/__init__.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/cli/autopilot.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/cli/interactive.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/cli/mcp.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/cli/streaming.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/config.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/context.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/permissions.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/prompts/react_prompt.md +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/prompts/system_prompt.md +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/skills.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/__init__.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/audit.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/code_analysis.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/common.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/definitions.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/file_reading.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/file_writing.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/find_tool.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/grep_tool.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/image_handler.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/mcp.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/repo_map.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/shell_tools.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/todo_tools.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/tool_schema.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/user_interaction.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal/tools/web_tools.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal.egg-info/SOURCES.txt +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal.egg-info/dependency_links.txt +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal.egg-info/entry_points.txt +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal.egg-info/requires.txt +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/patchpal.egg-info/top_level.txt +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/pyproject.toml +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/setup.cfg +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_agent.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_cli.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_config_dynamic.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_context.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_custom_tools.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_enabled_tools.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_find_tool.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_guardrails.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_image_blocking.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_maximum_security.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_mcp_config.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_memory.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_operational_safety.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_optional_tools.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_permissions.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_react.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_reasoning_content.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_repo_map.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_simplified_prompt.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_skills.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_streaming.py +0 -0
- {patchpal-0.22.5 → patchpal-0.22.6}/tests/test_tools.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: patchpal
|
|
3
|
-
Version: 0.22.
|
|
3
|
+
Version: 0.22.6
|
|
4
4
|
Summary: An agentic coding and automation assistant, supporting both local and cloud LLMs
|
|
5
5
|
Author: PatchPal Contributors
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -59,6 +59,7 @@ Most agent frameworks are [built in TypeScript](https://news.ycombinator.com/ite
|
|
|
59
59
|
|
|
60
60
|
**Key Features**
|
|
61
61
|
- [Terminal Interface](https://amaiya.github.io/patchpal/usage/interactive/) for interactive development
|
|
62
|
+
- [Sandbox Mode](https://amaiya.github.io/patchpal/usage/sandbox/) for secure container isolation
|
|
62
63
|
- [Python SDK](https://amaiya.github.io/patchpal/usage/python-api/) for flexibility and extensibility
|
|
63
64
|
- [Built-In](https://amaiya.github.io/patchpal/features/tools/) and [Custom Tools](https://amaiya.github.io/patchpal/features/custom-tools/)
|
|
64
65
|
- [Skills System](https://amaiya.github.io/patchpal/features/skills/) and [MCP Integration](https://amaiya.github.io/patchpal/features/mcp/)
|
|
@@ -76,7 +77,7 @@ $ pip install patchpal # install
|
|
|
76
77
|
$ patchpal --model <model_id> # start
|
|
77
78
|
```
|
|
78
79
|
|
|
79
|
-
> Model support: Any [LiteLLM-supported model](https://models.litellm.ai/)
|
|
80
|
+
> Model support: Any [LiteLLM-supported model](https://models.litellm.ai/) can be used.
|
|
80
81
|
> Platform support: Linux, macOS, and Windows are all supported
|
|
81
82
|
|
|
82
83
|
**Alternative: Run with Docker/Podman (no installation required)**
|
|
@@ -173,7 +174,7 @@ While originally designed for software development, PatchPal is also a general-p
|
|
|
173
174
|
> There are so many coding agent harnesses. Why build yet another one?
|
|
174
175
|
|
|
175
176
|
1. Most agent harnesses are in TypeScript. We wanted [something in Python](https://amaiya.github.io/patchpal/usage/python-api/) that we could easily extend for our custom workflows.
|
|
176
|
-
2. PatchPal includes a [unique guardrails system](https://amaiya.github.io/patchpal/
|
|
177
|
+
2. PatchPal includes a [unique guardrails system](https://amaiya.github.io/patchpal/safety/) that is better suited to privacy-conscious use cases involving sensitive data.
|
|
177
178
|
3. We needed an agent harness that seamlessly works with [both local and cloud models](https://amaiya.github.io/patchpal/models/overview/#supported-models), including AWS GovCloud Bedrock models.
|
|
178
179
|
|
|
179
180
|
|
|
@@ -11,6 +11,7 @@ Most agent frameworks are [built in TypeScript](https://news.ycombinator.com/ite
|
|
|
11
11
|
|
|
12
12
|
**Key Features**
|
|
13
13
|
- [Terminal Interface](https://amaiya.github.io/patchpal/usage/interactive/) for interactive development
|
|
14
|
+
- [Sandbox Mode](https://amaiya.github.io/patchpal/usage/sandbox/) for secure container isolation
|
|
14
15
|
- [Python SDK](https://amaiya.github.io/patchpal/usage/python-api/) for flexibility and extensibility
|
|
15
16
|
- [Built-In](https://amaiya.github.io/patchpal/features/tools/) and [Custom Tools](https://amaiya.github.io/patchpal/features/custom-tools/)
|
|
16
17
|
- [Skills System](https://amaiya.github.io/patchpal/features/skills/) and [MCP Integration](https://amaiya.github.io/patchpal/features/mcp/)
|
|
@@ -28,7 +29,7 @@ $ pip install patchpal # install
|
|
|
28
29
|
$ patchpal --model <model_id> # start
|
|
29
30
|
```
|
|
30
31
|
|
|
31
|
-
> Model support: Any [LiteLLM-supported model](https://models.litellm.ai/)
|
|
32
|
+
> Model support: Any [LiteLLM-supported model](https://models.litellm.ai/) can be used.
|
|
32
33
|
> Platform support: Linux, macOS, and Windows are all supported
|
|
33
34
|
|
|
34
35
|
**Alternative: Run with Docker/Podman (no installation required)**
|
|
@@ -125,7 +126,7 @@ While originally designed for software development, PatchPal is also a general-p
|
|
|
125
126
|
> There are so many coding agent harnesses. Why build yet another one?
|
|
126
127
|
|
|
127
128
|
1. Most agent harnesses are in TypeScript. We wanted [something in Python](https://amaiya.github.io/patchpal/usage/python-api/) that we could easily extend for our custom workflows.
|
|
128
|
-
2. PatchPal includes a [unique guardrails system](https://amaiya.github.io/patchpal/
|
|
129
|
+
2. PatchPal includes a [unique guardrails system](https://amaiya.github.io/patchpal/safety/) that is better suited to privacy-conscious use cases involving sensitive data.
|
|
129
130
|
3. We needed an agent harness that seamlessly works with [both local and cloud models](https://amaiya.github.io/patchpal/models/overview/#supported-models), including AWS GovCloud Bedrock models.
|
|
130
131
|
|
|
131
132
|
|
|
@@ -163,6 +163,7 @@ def detect_llm_endpoints_from_env():
|
|
|
163
163
|
os.environ.get("AWS_BEDROCK_REGION")
|
|
164
164
|
or os.environ.get("AWS_REGION")
|
|
165
165
|
or os.environ.get("AWS_DEFAULT_REGION")
|
|
166
|
+
or os.environ.get("AWS_REGION_NAME") # LiteLLM-specific
|
|
166
167
|
)
|
|
167
168
|
if aws_region and (
|
|
168
169
|
os.environ.get("AWS_ACCESS_KEY_ID") or os.environ.get("AWS_SECRET_ACCESS_KEY")
|
|
@@ -427,7 +428,25 @@ def build_container_args(sandbox_args, patchpal_args):
|
|
|
427
428
|
if needs_privileged:
|
|
428
429
|
print("⚠️ Rootless Podman detected - using --privileged mode for iptables")
|
|
429
430
|
container_args.extend(["--privileged"])
|
|
430
|
-
|
|
431
|
+
# Only add --cgroup-manager on Linux (not supported on Windows/macOS Podman machines)
|
|
432
|
+
try:
|
|
433
|
+
# Check if we're on a Podman machine (macOS/Windows) vs native Linux
|
|
434
|
+
machine_check = subprocess.run(
|
|
435
|
+
["podman", "machine", "list"], capture_output=True, text=True, check=False
|
|
436
|
+
)
|
|
437
|
+
# If machine list works and shows machines, we're on macOS/Windows
|
|
438
|
+
is_podman_machine = (
|
|
439
|
+
machine_check.returncode == 0
|
|
440
|
+
and machine_check.stdout.strip()
|
|
441
|
+
and len(machine_check.stdout.strip().split("\n")) > 1
|
|
442
|
+
)
|
|
443
|
+
|
|
444
|
+
if not is_podman_machine:
|
|
445
|
+
# Native Linux - add cgroup-manager flag
|
|
446
|
+
container_args.extend(["--cgroup-manager=cgroupfs"])
|
|
447
|
+
except Exception:
|
|
448
|
+
# If check fails, skip the flag (safer default)
|
|
449
|
+
pass
|
|
431
450
|
else:
|
|
432
451
|
container_args.extend(["--cap-add=NET_ADMIN"])
|
|
433
452
|
|
|
@@ -635,19 +654,22 @@ def build_container_args(sandbox_args, patchpal_args):
|
|
|
635
654
|
# Add main patchpal command
|
|
636
655
|
if sandbox_args.restrict_network:
|
|
637
656
|
# Use launch-agent-sandbox pattern: model from env var
|
|
657
|
+
# Falls back to PATCHPAL_MODEL if MODEL not set
|
|
638
658
|
shell_cmd_parts.append(f"""
|
|
639
659
|
echo ""
|
|
640
660
|
echo "=== Starting PatchPal ==="
|
|
641
|
-
echo "Model: $MODEL"
|
|
661
|
+
echo "Model: ${{MODEL:-$PATCHPAL_MODEL}}"
|
|
642
662
|
echo ""
|
|
643
|
-
exec {patchpal_cmd} --model "$MODEL"
|
|
663
|
+
exec {patchpal_cmd} --model "${{MODEL:-$PATCHPAL_MODEL}}"
|
|
644
664
|
""")
|
|
645
665
|
else:
|
|
646
666
|
# Normal mode: use $@ to pass all arguments
|
|
667
|
+
# Display model from command line or fall back to PATCHPAL_MODEL env var
|
|
668
|
+
model_display = model_name if model_name else "${PATCHPAL_MODEL:-default}"
|
|
647
669
|
shell_cmd_parts.append(f"""
|
|
648
670
|
echo ""
|
|
649
671
|
echo "=== Starting PatchPal ==="
|
|
650
|
-
echo "Model: {
|
|
672
|
+
echo "Model: {model_display}"
|
|
651
673
|
echo ""
|
|
652
674
|
exec {patchpal_cmd} "$@"
|
|
653
675
|
""")
|
|
@@ -984,6 +1006,31 @@ def main():
|
|
|
984
1006
|
print(f"Loading environment variables from: {sandbox_args.env_file}")
|
|
985
1007
|
load_env_file(sandbox_args.env_file)
|
|
986
1008
|
|
|
1009
|
+
# If LITELLM_KWARGS contains AWS params, normalize env var names to uppercase
|
|
1010
|
+
# This must happen before endpoint detection for AWS Bedrock auto-detection to work
|
|
1011
|
+
litellm_kwargs = os.environ.get("PATCHPAL_LITELLM_KWARGS") or os.environ.get(
|
|
1012
|
+
"LITELLM_KWARGS", ""
|
|
1013
|
+
)
|
|
1014
|
+
if litellm_kwargs and "aws_" in litellm_kwargs.lower():
|
|
1015
|
+
# Try to parse as JSON first
|
|
1016
|
+
try:
|
|
1017
|
+
import json
|
|
1018
|
+
|
|
1019
|
+
kwargs_dict = json.loads(litellm_kwargs)
|
|
1020
|
+
# Extract AWS parameters and set as environment variables
|
|
1021
|
+
for key, value in kwargs_dict.items():
|
|
1022
|
+
if key.lower().startswith("aws_"):
|
|
1023
|
+
upper_key = key.upper()
|
|
1024
|
+
if upper_key not in os.environ:
|
|
1025
|
+
os.environ[upper_key] = value
|
|
1026
|
+
except (json.JSONDecodeError, ValueError):
|
|
1027
|
+
# Not JSON, check if individual env vars exist (comma-separated format)
|
|
1028
|
+
for key, value in list(os.environ.items()):
|
|
1029
|
+
if key.lower().startswith("aws_"):
|
|
1030
|
+
upper_key = key.upper()
|
|
1031
|
+
if upper_key not in os.environ:
|
|
1032
|
+
os.environ[upper_key] = value
|
|
1033
|
+
|
|
987
1034
|
# Auto-detect LLM endpoints if network restrictions are enabled
|
|
988
1035
|
detected_endpoints = []
|
|
989
1036
|
if sandbox_args.restrict_network:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: patchpal
|
|
3
|
-
Version: 0.22.
|
|
3
|
+
Version: 0.22.6
|
|
4
4
|
Summary: An agentic coding and automation assistant, supporting both local and cloud LLMs
|
|
5
5
|
Author: PatchPal Contributors
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -59,6 +59,7 @@ Most agent frameworks are [built in TypeScript](https://news.ycombinator.com/ite
|
|
|
59
59
|
|
|
60
60
|
**Key Features**
|
|
61
61
|
- [Terminal Interface](https://amaiya.github.io/patchpal/usage/interactive/) for interactive development
|
|
62
|
+
- [Sandbox Mode](https://amaiya.github.io/patchpal/usage/sandbox/) for secure container isolation
|
|
62
63
|
- [Python SDK](https://amaiya.github.io/patchpal/usage/python-api/) for flexibility and extensibility
|
|
63
64
|
- [Built-In](https://amaiya.github.io/patchpal/features/tools/) and [Custom Tools](https://amaiya.github.io/patchpal/features/custom-tools/)
|
|
64
65
|
- [Skills System](https://amaiya.github.io/patchpal/features/skills/) and [MCP Integration](https://amaiya.github.io/patchpal/features/mcp/)
|
|
@@ -76,7 +77,7 @@ $ pip install patchpal # install
|
|
|
76
77
|
$ patchpal --model <model_id> # start
|
|
77
78
|
```
|
|
78
79
|
|
|
79
|
-
> Model support: Any [LiteLLM-supported model](https://models.litellm.ai/)
|
|
80
|
+
> Model support: Any [LiteLLM-supported model](https://models.litellm.ai/) can be used.
|
|
80
81
|
> Platform support: Linux, macOS, and Windows are all supported
|
|
81
82
|
|
|
82
83
|
**Alternative: Run with Docker/Podman (no installation required)**
|
|
@@ -173,7 +174,7 @@ While originally designed for software development, PatchPal is also a general-p
|
|
|
173
174
|
> There are so many coding agent harnesses. Why build yet another one?
|
|
174
175
|
|
|
175
176
|
1. Most agent harnesses are in TypeScript. We wanted [something in Python](https://amaiya.github.io/patchpal/usage/python-api/) that we could easily extend for our custom workflows.
|
|
176
|
-
2. PatchPal includes a [unique guardrails system](https://amaiya.github.io/patchpal/
|
|
177
|
+
2. PatchPal includes a [unique guardrails system](https://amaiya.github.io/patchpal/safety/) that is better suited to privacy-conscious use cases involving sensitive data.
|
|
177
178
|
3. We needed an agent harness that seamlessly works with [both local and cloud models](https://amaiya.github.io/patchpal/models/overview/#supported-models), including AWS GovCloud Bedrock models.
|
|
178
179
|
|
|
179
180
|
|
|
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
|
|
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
|
|
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
|