alpiecode 10.5.5__tar.gz → 10.5.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.
- {alpiecode-10.5.5 → alpiecode-10.5.6}/PKG-INFO +1 -3
- {alpiecode-10.5.5 → alpiecode-10.5.6}/pyproject.toml +1 -6
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/alpiecode.egg-info/PKG-INFO +1 -3
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/alpiecode.egg-info/requires.txt +0 -3
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/__init__.py +1 -1
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/tools.py +35 -55
- {alpiecode-10.5.5 → alpiecode-10.5.6}/README.md +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/setup.cfg +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/alpiecode/__init__.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/alpiecode.egg-info/SOURCES.txt +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/alpiecode.egg-info/dependency_links.txt +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/alpiecode.egg-info/entry_points.txt +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/alpiecode.egg-info/top_level.txt +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/agent.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/assessment.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/backends/__init__.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/backends/base.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/backends/local_backend.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/backends/openai_backend.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/cache.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/cli.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/client.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/compaction.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/config.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/context.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/discovery.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/doctor.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/dream_rsi.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/executor.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/extension/alpiecode.vsix +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/git_ops.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/github.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/guardian.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/guardrails.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/ipython_ext.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/local_model.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/media.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/memory.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/metrics.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/orchestrator.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/progress.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/prompt.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/rephraser.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/server.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/session.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/system1.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/updater.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/verifier.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/src/codeagent/vscode_installer.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/test/test_adaptive_resilience.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/test/test_cli_ui.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/test/test_context_and_trajectory.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/test/test_dream_rsi.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/test/test_task_assessment.py +0 -0
- {alpiecode-10.5.5 → alpiecode-10.5.6}/test/test_verifier.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alpiecode
|
|
3
|
-
Version: 10.5.
|
|
3
|
+
Version: 10.5.6
|
|
4
4
|
Summary: AlpieCode
|
|
5
5
|
Requires-Python: >=3.9
|
|
6
6
|
Requires-Dist: huggingface_hub>=0.20.0
|
|
@@ -14,5 +14,3 @@ Requires-Dist: imageio-ffmpeg>=0.4.0
|
|
|
14
14
|
Requires-Dist: fastapi>=0.100.0
|
|
15
15
|
Requires-Dist: uvicorn>=0.20.0
|
|
16
16
|
Requires-Dist: sse-starlette>=2.0.0
|
|
17
|
-
Provides-Extra: search
|
|
18
|
-
Requires-Dist: duckduckgo-search>=7.0.0; extra == "search"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "alpiecode"
|
|
7
|
-
version = "10.5.
|
|
7
|
+
version = "10.5.6"
|
|
8
8
|
description = "AlpieCode"
|
|
9
9
|
requires-python = ">=3.9"
|
|
10
10
|
dependencies = [
|
|
@@ -21,11 +21,6 @@ dependencies = [
|
|
|
21
21
|
"sse-starlette>=2.0.0",
|
|
22
22
|
]
|
|
23
23
|
|
|
24
|
-
[project.optional-dependencies]
|
|
25
|
-
search = [
|
|
26
|
-
"duckduckgo-search>=7.0.0",
|
|
27
|
-
]
|
|
28
|
-
|
|
29
24
|
[project.scripts]
|
|
30
25
|
alpiecode = "codeagent.cli:main"
|
|
31
26
|
codeagent = "codeagent.cli:main"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alpiecode
|
|
3
|
-
Version: 10.5.
|
|
3
|
+
Version: 10.5.6
|
|
4
4
|
Summary: AlpieCode
|
|
5
5
|
Requires-Python: >=3.9
|
|
6
6
|
Requires-Dist: huggingface_hub>=0.20.0
|
|
@@ -14,5 +14,3 @@ Requires-Dist: imageio-ffmpeg>=0.4.0
|
|
|
14
14
|
Requires-Dist: fastapi>=0.100.0
|
|
15
15
|
Requires-Dist: uvicorn>=0.20.0
|
|
16
16
|
Requires-Dist: sse-starlette>=2.0.0
|
|
17
|
-
Provides-Extra: search
|
|
18
|
-
Requires-Dist: duckduckgo-search>=7.0.0; extra == "search"
|
|
@@ -17,7 +17,7 @@ Supports:
|
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
from typing import Optional, Any, Dict
|
|
19
19
|
|
|
20
|
-
__version__ = "10.5.
|
|
20
|
+
__version__ = "10.5.6"
|
|
21
21
|
|
|
22
22
|
def run(task: str, workdir: str = ".", reasoning_level: str = "thinking", **kwargs):
|
|
23
23
|
"""Run an autonomous coding task programmatically."""
|
|
@@ -760,14 +760,15 @@ def _apply_patch(workdir: Path, path: str, patch: str) -> str:
|
|
|
760
760
|
|
|
761
761
|
|
|
762
762
|
def _web_search(query: str, num_results: int = 5) -> str:
|
|
763
|
-
"""Search the web using httpx
|
|
763
|
+
"""Search the web using httpx and DuckDuckGo HTTP endpoints, parsed via BeautifulSoup."""
|
|
764
764
|
import warnings
|
|
765
765
|
import urllib.parse
|
|
766
766
|
warnings.filterwarnings("ignore", category=RuntimeWarning)
|
|
767
767
|
|
|
768
|
-
# 1. Primary: Pure-Python search using httpx (no Rust/primp native dependencies)
|
|
769
768
|
try:
|
|
770
769
|
import httpx
|
|
770
|
+
from bs4 import BeautifulSoup
|
|
771
|
+
|
|
771
772
|
headers = {
|
|
772
773
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
|
|
773
774
|
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
|
@@ -779,65 +780,44 @@ def _web_search(query: str, num_results: int = 5) -> str:
|
|
|
779
780
|
resp = client.post("https://lite.duckduckgo.com/lite/", data={"q": query}, headers=headers)
|
|
780
781
|
|
|
781
782
|
if resp.status_code == 200 and resp.text:
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
783
|
+
soup = BeautifulSoup(resp.text, "html.parser")
|
|
784
|
+
results = []
|
|
785
|
+
for item in soup.select(".result"):
|
|
786
|
+
title_elem = item.select_one(".result__title a")
|
|
787
|
+
snippet_elem = item.select_one(".result__snippet")
|
|
788
|
+
if title_elem:
|
|
789
|
+
title = title_elem.get_text(strip=True)
|
|
790
|
+
href = title_elem.get("href", "")
|
|
791
|
+
if "uddg=" in href:
|
|
792
|
+
parsed = urllib.parse.parse_qs(urllib.parse.urlparse(href).query)
|
|
793
|
+
href = parsed.get("uddg", [href])[0]
|
|
794
|
+
snippet = snippet_elem.get_text(strip=True) if snippet_elem else ""
|
|
795
|
+
results.append({"title": title, "href": href, "body": snippet})
|
|
796
|
+
if len(results) >= min(num_results, 10):
|
|
797
|
+
break
|
|
798
|
+
|
|
799
|
+
if not results:
|
|
800
|
+
for row in soup.select("table tr"):
|
|
801
|
+
link = row.select_one("a.result-link")
|
|
802
|
+
snippet = row.select_one(".result-snippet")
|
|
803
|
+
if link:
|
|
804
|
+
title = link.get_text(strip=True)
|
|
805
|
+
href = link.get("href", "")
|
|
792
806
|
if "uddg=" in href:
|
|
793
807
|
parsed = urllib.parse.parse_qs(urllib.parse.urlparse(href).query)
|
|
794
808
|
href = parsed.get("uddg", [href])[0]
|
|
795
|
-
|
|
796
|
-
results.append({"title": title, "href": href, "body":
|
|
809
|
+
snip_text = snippet.get_text(strip=True) if snippet else ""
|
|
810
|
+
results.append({"title": title, "href": href, "body": snip_text})
|
|
797
811
|
if len(results) >= min(num_results, 10):
|
|
798
812
|
break
|
|
799
813
|
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
if "uddg=" in href:
|
|
808
|
-
parsed = urllib.parse.parse_qs(urllib.parse.urlparse(href).query)
|
|
809
|
-
href = parsed.get("uddg", [href])[0]
|
|
810
|
-
snip_text = snippet.get_text(strip=True) if snippet else ""
|
|
811
|
-
results.append({"title": title, "href": href, "body": snip_text})
|
|
812
|
-
if len(results) >= min(num_results, 10):
|
|
813
|
-
break
|
|
814
|
-
|
|
815
|
-
if results:
|
|
816
|
-
formatted = []
|
|
817
|
-
for i, r in enumerate(results, 1):
|
|
818
|
-
formatted.append(f"{i}. **{r.get('title', 'No title')}**\n URL: {r.get('href', '')}\n {r.get('body', '')}")
|
|
819
|
-
return "\n\n".join(formatted)
|
|
820
|
-
except Exception:
|
|
821
|
-
pass
|
|
822
|
-
except Exception:
|
|
823
|
-
pass
|
|
824
|
-
|
|
825
|
-
# 2. Secondary fallback: duckduckgo_search if optionally installed
|
|
826
|
-
try:
|
|
827
|
-
try:
|
|
828
|
-
from ddgs import DDGS
|
|
829
|
-
except ImportError:
|
|
830
|
-
from duckduckgo_search import DDGS
|
|
831
|
-
|
|
832
|
-
with DDGS() as ddgs:
|
|
833
|
-
results = list(ddgs.text(query, max_results=min(num_results, 10)))
|
|
834
|
-
if results:
|
|
835
|
-
formatted = []
|
|
836
|
-
for i, r in enumerate(results, 1):
|
|
837
|
-
formatted.append(f"{i}. **{r.get('title', 'No title')}**\n URL: {r.get('href', '')}\n {r.get('body', '')}")
|
|
838
|
-
return "\n\n".join(formatted)
|
|
839
|
-
except Exception:
|
|
840
|
-
pass
|
|
814
|
+
if results:
|
|
815
|
+
formatted = []
|
|
816
|
+
for i, r in enumerate(results, 1):
|
|
817
|
+
formatted.append(f"{i}. **{r.get('title', 'No title')}**\n URL: {r.get('href', '')}\n {r.get('body', '')}")
|
|
818
|
+
return "\n\n".join(formatted)
|
|
819
|
+
except Exception as e:
|
|
820
|
+
return f"error during web search: {e}"
|
|
841
821
|
|
|
842
822
|
return (
|
|
843
823
|
f"No web results found for '{query}'. "
|
|
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
|