alpiecode 2.0.9__tar.gz → 3.0.1__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-2.0.9 → alpiecode-3.0.1}/PKG-INFO +1 -1
- {alpiecode-2.0.9 → alpiecode-3.0.1}/pyproject.toml +1 -1
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/alpiecode.egg-info/PKG-INFO +1 -1
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/__init__.py +5 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/agent.py +14 -10
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/cli.py +5 -2
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/config.py +8 -7
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/ipython_ext.py +16 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/prompt.py +5 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/README.md +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/setup.cfg +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/alpiecode/__init__.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/alpiecode.egg-info/SOURCES.txt +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/alpiecode.egg-info/dependency_links.txt +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/alpiecode.egg-info/entry_points.txt +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/alpiecode.egg-info/requires.txt +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/alpiecode.egg-info/top_level.txt +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/backends/__init__.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/backends/base.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/backends/local_backend.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/backends/openai_backend.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/cache.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/client.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/compaction.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/context.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/doctor.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/executor.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/extension/alpiecode.vsix +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/github.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/guardian.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/local_model.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/media.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/memory.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/orchestrator.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/server.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/session.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/tools.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/updater.py +0 -0
- {alpiecode-2.0.9 → alpiecode-3.0.1}/src/codeagent/vscode_installer.py +0 -0
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
|
3
|
+
warnings.filterwarnings("ignore", category=FutureWarning)
|
|
4
|
+
warnings.filterwarnings("ignore", module="jupyter_client.*")
|
|
5
|
+
|
|
1
6
|
"""
|
|
2
7
|
AlpieCode — Autonomous AI Coding Agent powered by local 169Pi GGUF VLM & Online API.
|
|
3
8
|
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
|
3
|
+
warnings.filterwarnings("ignore", category=FutureWarning)
|
|
4
|
+
warnings.filterwarnings("ignore", module="jupyter_client.*")
|
|
5
|
+
|
|
1
6
|
"""
|
|
2
7
|
CLI agent wrapper and presentation adapter for AlpieCode.
|
|
3
8
|
|
|
@@ -208,14 +213,13 @@ def run_agent(
|
|
|
208
213
|
console.print(f"📺 URL: {url}", style="cyan")
|
|
209
214
|
console.print(f"📂 Workdir: {workdir}", style="dim")
|
|
210
215
|
if not data["is_offline"]:
|
|
211
|
-
console.print(f"🌐 Mode: [bold green]ONLINE[/bold green]
|
|
212
|
-
console.print(f"🤖 Model:
|
|
216
|
+
console.print(f"🌐 Mode: [bold green]ONLINE[/bold green]", style="dim")
|
|
217
|
+
console.print(f"🤖 Model: [bold cyan]alpie_9b[/bold cyan]", style="dim")
|
|
213
218
|
else:
|
|
214
|
-
console.print(f"🧠 Mode: [bold yellow]OFFLINE[/bold yellow]
|
|
215
|
-
console.print(f"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
console.print(f"🔧 Tools: {data['tool_count']} available", style="dim")
|
|
219
|
+
console.print(f"🧠 Mode: [bold yellow]OFFLINE[/bold yellow]", style="dim")
|
|
220
|
+
console.print(f"🤖 Model: [bold cyan]alpie_9b (Local GGUF)[/bold cyan]", style="dim")
|
|
221
|
+
if cfg.enable_thinking:
|
|
222
|
+
console.print(f"🧠 Reasoning: [bold green]ON[/bold green]", style="dim")
|
|
219
223
|
else:
|
|
220
224
|
console.rule("Agent Started")
|
|
221
225
|
console.print(f"📋 Task: {task.splitlines()[0]}")
|
|
@@ -294,12 +298,12 @@ def run_chat(workdir: Path, cfg: Config, verbose: bool = True) -> None:
|
|
|
294
298
|
|
|
295
299
|
if HAS_RICH:
|
|
296
300
|
console.print()
|
|
301
|
+
mode_line = "🌐 Mode: [bold green]ONLINE[/bold green]\n🤖 Model: [bold cyan]alpie_9b[/bold cyan]" if not is_offline else "🧠 Mode: [bold yellow]OFFLINE[/bold yellow]\n🤖 Model: [bold cyan]alpie_9b (Local GGUF)[/bold cyan]"
|
|
297
302
|
console.print(
|
|
298
303
|
Panel(
|
|
299
|
-
"[bold cyan]AlpieCode[/bold cyan] interactive mode\n"
|
|
304
|
+
f"[bold cyan]AlpieCode[/bold cyan] interactive mode\n"
|
|
300
305
|
f"📂 Working in: [cyan]{workdir}[/cyan]\n"
|
|
301
|
-
|
|
302
|
-
+ f"🔧 Tools: [cyan]{len(active_tools)} available[/cyan]\n\n"
|
|
306
|
+
f"{mode_line}\n\n"
|
|
303
307
|
"Type your request, or [bold red]exit[/bold red] / [bold red]quit[/bold red] to stop.",
|
|
304
308
|
title="💬 Chat Mode",
|
|
305
309
|
border_style="blue",
|
|
@@ -74,7 +74,8 @@ def main():
|
|
|
74
74
|
common.add_argument("--url", default=None, help="YouTube URL for video analysis")
|
|
75
75
|
common.add_argument("--github", default=None, help="GitHub repository (e.g. owner/repo or URL) for open-source analysis")
|
|
76
76
|
common.add_argument("--max-turns", type=int, default=None, help="Override max turns")
|
|
77
|
-
common.add_argument("--
|
|
77
|
+
common.add_argument("--thinking", "--reasoning", dest="thinking", action="store_true", help="Enable VLM reasoning mode")
|
|
78
|
+
common.add_argument("--no-thinking", "--non-thinking", dest="no_thinking", action="store_true", help="Disable VLM reasoning mode")
|
|
78
79
|
common.add_argument("--no-update", action="store_true", help="Skip automatic update check")
|
|
79
80
|
common.add_argument("--quiet", action="store_true", help="Suppress per-turn logging")
|
|
80
81
|
|
|
@@ -149,7 +150,9 @@ def main():
|
|
|
149
150
|
|
|
150
151
|
cfg = load_config()
|
|
151
152
|
|
|
152
|
-
if getattr(args, "
|
|
153
|
+
if getattr(args, "thinking", False):
|
|
154
|
+
cfg.enable_thinking = True
|
|
155
|
+
elif getattr(args, "no_thinking", False):
|
|
153
156
|
cfg.enable_thinking = False
|
|
154
157
|
|
|
155
158
|
if args.command == "run":
|
|
@@ -18,18 +18,18 @@ CONFIG_DIR = Path.home() / ".alpiecode"
|
|
|
18
18
|
CONFIG_PATH = CONFIG_DIR / "config.json"
|
|
19
19
|
|
|
20
20
|
# Config version — bump this when defaults change to trigger auto-migration
|
|
21
|
-
CONFIG_VERSION =
|
|
21
|
+
CONFIG_VERSION = 5 # v5: model alpie_9b, reasoning OFF by default, clean display
|
|
22
22
|
|
|
23
23
|
DEFAULTS = {
|
|
24
24
|
"base_url": "http://20.245.200.125:8000/v1", # Primary endpoint
|
|
25
|
-
"model": "
|
|
25
|
+
"model": "alpie_9b",
|
|
26
26
|
"model_repo": "169Pi/Alpie_learn_prototype_GGUF_NEW",
|
|
27
27
|
"api_key": "not-needed",
|
|
28
28
|
"hf_token": None,
|
|
29
29
|
"max_turns": 50,
|
|
30
30
|
"temperature": 0.1,
|
|
31
31
|
"max_tokens": 8192,
|
|
32
|
-
"enable_thinking":
|
|
32
|
+
"enable_thinking": False, # Reasoning OFF by default
|
|
33
33
|
"n_ctx": 32768, # 32k context window
|
|
34
34
|
"n_gpu_layers": None, # None = auto-detect GPU
|
|
35
35
|
"config_version": CONFIG_VERSION,
|
|
@@ -84,14 +84,14 @@ def get_shared_http_client():
|
|
|
84
84
|
@dataclass
|
|
85
85
|
class Config:
|
|
86
86
|
base_url: Optional[str] = None
|
|
87
|
-
model: str = "
|
|
87
|
+
model: str = "alpie_9b" # Server API model name (vLLM)
|
|
88
88
|
model_repo: str = "169Pi/Alpie_learn_prototype_GGUF_NEW" # HuggingFace repo for offline GGUF
|
|
89
89
|
api_key: str = "not-needed"
|
|
90
90
|
hf_token: Optional[str] = None
|
|
91
91
|
max_turns: int = 50
|
|
92
92
|
temperature: float = 0.1
|
|
93
93
|
max_tokens: int = 8192
|
|
94
|
-
enable_thinking: bool =
|
|
94
|
+
enable_thinking: bool = False
|
|
95
95
|
n_ctx: int = 32768
|
|
96
96
|
n_gpu_layers: Optional[int] = None
|
|
97
97
|
|
|
@@ -111,9 +111,10 @@ def load_config() -> Config:
|
|
|
111
111
|
# v1 → v2: n_ctx was 16384, upgrade to 32768
|
|
112
112
|
if saved_data.get("n_ctx") == 16384:
|
|
113
113
|
data["n_ctx"] = 32768
|
|
114
|
-
#
|
|
114
|
+
# v4 → v5: model alpie_9b, reasoning OFF default
|
|
115
115
|
data["base_url"] = "http://20.245.200.125:8000/v1"
|
|
116
|
-
data["model"] = "
|
|
116
|
+
data["model"] = "alpie_9b"
|
|
117
|
+
data["enable_thinking"] = False
|
|
117
118
|
data["temperature"] = 0.1
|
|
118
119
|
data["max_tokens"] = 8192
|
|
119
120
|
data["config_version"] = CONFIG_VERSION
|
|
@@ -11,9 +11,16 @@ and Google Colab via cell/line magic commands and rich interactive displays:
|
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
13
|
import sys
|
|
14
|
+
import warnings
|
|
14
15
|
from pathlib import Path
|
|
15
16
|
from typing import Optional
|
|
16
17
|
|
|
18
|
+
# Suppress noisy Jupyter / Python 3.12+ deprecation warnings (e.g. datetime.utcnow in jupyter_client)
|
|
19
|
+
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
|
20
|
+
warnings.filterwarnings("ignore", category=FutureWarning)
|
|
21
|
+
warnings.filterwarnings("ignore", module="jupyter_client.*")
|
|
22
|
+
warnings.filterwarnings("ignore", module="ipykernel.*")
|
|
23
|
+
|
|
17
24
|
from .config import load_config
|
|
18
25
|
from .agent import run_agent
|
|
19
26
|
|
|
@@ -42,6 +49,15 @@ def _display_html(html_str: str):
|
|
|
42
49
|
print(html_str)
|
|
43
50
|
|
|
44
51
|
|
|
52
|
+
def _display_markdown(md_str: str):
|
|
53
|
+
"""Render rich Markdown in Jupyter or Google Colab."""
|
|
54
|
+
try:
|
|
55
|
+
from IPython.display import Markdown, display
|
|
56
|
+
display(Markdown(md_str))
|
|
57
|
+
except Exception:
|
|
58
|
+
print(md_str)
|
|
59
|
+
|
|
60
|
+
|
|
45
61
|
def alpie_magic(line: str, cell: Optional[str] = None):
|
|
46
62
|
"""
|
|
47
63
|
%alpie <task> (line magic)
|
|
@@ -121,6 +121,11 @@ the repo's existing patterns and helper APIs over inventing new abstractions. Yo
|
|
|
121
121
|
fix root causes rather than symptoms: you do not silence errors, skip failing \
|
|
122
122
|
tests, or special-case output just to make a check pass.
|
|
123
123
|
|
|
124
|
+
## Direct Informational & Question-Answering Tasks
|
|
125
|
+
If the user asks a conceptual question, algorithm explanation, code explanation, math/science question, or general query (e.g. "what is the best algorithm for training alphafold 2?"):
|
|
126
|
+
- Answer DIRECTLY and comprehensively on Turn 1.
|
|
127
|
+
- Do NOT run unnecessary file searches or bash commands if the question does not require inspecting specific local project files.
|
|
128
|
+
|
|
124
129
|
## Getting your bearings
|
|
125
130
|
Before the first substantive edit, establish these things:
|
|
126
131
|
1. Where you are (list files, understand project structure)
|
|
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
|