alpiecode 2.0.7__tar.gz → 2.0.8__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 (40) hide show
  1. {alpiecode-2.0.7 → alpiecode-2.0.8}/PKG-INFO +1 -1
  2. alpiecode-2.0.8/README.md +342 -0
  3. {alpiecode-2.0.7 → alpiecode-2.0.8}/pyproject.toml +1 -1
  4. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/alpiecode.egg-info/PKG-INFO +1 -1
  5. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/config.py +9 -4
  6. alpiecode-2.0.7/README.md +0 -96
  7. {alpiecode-2.0.7 → alpiecode-2.0.8}/setup.cfg +0 -0
  8. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/alpiecode/__init__.py +0 -0
  9. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/alpiecode.egg-info/SOURCES.txt +0 -0
  10. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/alpiecode.egg-info/dependency_links.txt +0 -0
  11. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/alpiecode.egg-info/entry_points.txt +0 -0
  12. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/alpiecode.egg-info/requires.txt +0 -0
  13. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/alpiecode.egg-info/top_level.txt +0 -0
  14. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/__init__.py +0 -0
  15. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/agent.py +0 -0
  16. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/backends/__init__.py +0 -0
  17. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/backends/base.py +0 -0
  18. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/backends/local_backend.py +0 -0
  19. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/backends/openai_backend.py +0 -0
  20. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/cache.py +0 -0
  21. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/cli.py +0 -0
  22. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/client.py +0 -0
  23. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/compaction.py +0 -0
  24. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/context.py +0 -0
  25. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/doctor.py +0 -0
  26. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/executor.py +0 -0
  27. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/extension/alpiecode.vsix +0 -0
  28. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/github.py +0 -0
  29. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/guardian.py +0 -0
  30. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/ipython_ext.py +0 -0
  31. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/local_model.py +0 -0
  32. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/media.py +0 -0
  33. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/memory.py +0 -0
  34. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/orchestrator.py +0 -0
  35. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/prompt.py +0 -0
  36. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/server.py +0 -0
  37. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/session.py +0 -0
  38. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/tools.py +0 -0
  39. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/updater.py +0 -0
  40. {alpiecode-2.0.7 → alpiecode-2.0.8}/src/codeagent/vscode_installer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alpiecode
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: AlpieCode — Autonomous AI Coding Agent CLI powered by local 169Pi GGUF VLM
5
5
  Requires-Python: >=3.9
6
6
  Requires-Dist: huggingface_hub>=0.20.0
@@ -0,0 +1,342 @@
1
+ # ⚡ AlpieCode: The Autonomous AI Coding Agent & Full Developer Platform
2
+ > **Powered by 169Pi Alpie Vision-Language-Action Models (Local GGUF & Remote Cloud API)**
3
+ > *Seamlessly integrated across VS Code, Command Line (CLI), Python SDK, Jupyter Notebooks, and Google Colab.*
4
+
5
+ ---
6
+
7
+ ## 📑 Table of Contents
8
+ 1. [🌟 Executive Overview](#-executive-overview)
9
+ 2. [🏗️ Core Architecture & Hybrid Dual-Engine](#️-core-architecture--hybrid-dual-engine)
10
+ 3. [📦 Installation & Getting Started](#-installation--getting-started)
11
+ 4. [💻 VS Code Extension Deep-Dive](#-vs-code-extension-deep-dive)
12
+ 5. [⌨️ Command-Line Interface (CLI) Guide](#️-command-line-interface-cli-guide)
13
+ 6. [📓 Jupyter Notebooks, JupyterLab & Google Colab](#-jupyter-notebooks-jupyterlab--google-colab)
14
+ 7. [🛠️ 15 Built-In Agentic Tools](#️-15-built-in-agentic-tools)
15
+ 8. [🛡️ Safety Guardian, Virtual Environment & Guardrails](#️-safety-guardian-virtual-environment--guardrails)
16
+ 9. [❓ FAQ & Troubleshooting](#-faq--troubleshooting)
17
+
18
+ ---
19
+
20
+ ## 🌟 Executive Overview
21
+
22
+ **AlpieCode** is a full-stack, state-of-the-art autonomous software engineering agent designed to reason, plan, write, test, debug, and explain code across multiple environments.
23
+
24
+ ### 🎯 Key Capabilities at a Glance
25
+ | Environment | Key Features |
26
+ | :--- | :--- |
27
+ | **VS Code Extension** | Plan-First Review Cards, Slash Commands (`/`), Reasoning Selector (`High/Med/Low`), Proactive `.venv` Auto-Prompt, Live Token/Speed Meter, Multimodal Screenshot Attachment, Inline Ghost Text (`Tab` to complete), Sandbox Output Cards |
28
+ | **Terminal CLI** | `alpiecode serve`, `alpiecode run`, `alpiecode chat`, `alpiecode plan`, `alpiecode explain`, `alpiecode doctor`, `alpiecode diff`, `alpiecode init` |
29
+ | **Notebooks & Colab** | `%load_ext alpiecode`, `%alpie <task>`, `%%alpie <multiline>`, `%alpie_plan`, `%alpie_explain`, `%alpie_doctor` |
30
+ | **Python SDK** | `import alpiecode; alpiecode.run("...")`, `alpiecode.plan()`, `alpiecode.explain()`, `alpiecode.doctor()` |
31
+
32
+ ---
33
+
34
+ ## 🏗️ Core Architecture & Hybrid Dual-Engine
35
+
36
+ AlpieCode features an intelligent **Hybrid Dual-Engine** routing architecture:
37
+
38
+ ```
39
+ ┌───────────────────────────┐
40
+ │ User Prompt / Task │
41
+ └─────────────┬─────────────┘
42
+
43
+
44
+ ┌───────────────────────────┐
45
+ │ Server Reachability Ping │
46
+ └──────┬─────────────┬──────┘
47
+ │ │
48
+ Online (Port 8000 Up) Offline (No Connection)
49
+ │ │
50
+ ▼ ▼
51
+ ┌─────────────────┐ ┌──────────────────────┐
52
+ │ OpenAIBackend │ │ LocalBackend │
53
+ │ (Azure VLM API) │ │ (Local GGUF Engine) │
54
+ │ 169Pi Remote │ │ 169Pi Offline Model │
55
+ └────────┬────────┘ └──────────┬───────────┘
56
+ │ │
57
+ └───────────┬───────────┘
58
+
59
+ ┌───────────────────────┐
60
+ │ Agent Orchestrator │
61
+ │ • Context Compaction │
62
+ │ • Tool Executor │
63
+ │ • Memory Extraction │
64
+ └───────────┬───────────┘
65
+
66
+ SSE Stream Events / Terminal Output
67
+ ```
68
+
69
+ 1. **Online Cloud VLM API** (`OpenAIBackend`): When connected to the network, queries the high-throughput 169Pi model hosted on cloud infrastructure.
70
+ 2. **Local GGUF Offline Engine** (`LocalBackend`): If internet is lost or the remote server is offline, AlpieCode **automatically falls back to local GGUF weights** (`169Pi/Alpie_learn_prototype_GGUF_NEW`) using CPU/GPU CUDA acceleration — zero crashes.
71
+
72
+ ---
73
+
74
+ ## 📦 Installation & Getting Started
75
+
76
+ ### 1. Requirements
77
+ - **Python**: `>= 3.9` (Recommended: Python 3.10 – 3.12)
78
+ - **Platforms**: Linux (Ubuntu/Debian), Windows (Native & WSL2), macOS (Apple Silicon & Intel)
79
+ - **Editor (Optional)**: VS Code / Cursor / VSCodium (for extension support)
80
+
81
+ ### 2. Python Package Installation
82
+ ```bash
83
+ # Option A: Install from local repository (Editable Mode)
84
+ git clone https://github.com/169Pi/codeagent-poc.git
85
+ cd codeagent-poc
86
+ pip install -e .
87
+
88
+ # Option B: Install via pre-built Wheel
89
+ pip install alpiecode-2.0.7-py3-none-any.whl
90
+ ```
91
+
92
+ ### 3. Launching the AlpieCode API Server
93
+ The API server coordinates between the agent engine and the VS Code extension / SDK:
94
+ ```bash
95
+ alpiecode serve
96
+ ```
97
+ *Output:*
98
+ ```text
99
+ _ _ _ ____ _
100
+ / \ | |_ _| | ___ / ___|___ __| | ___
101
+ / _ \ | | '_ \ |/ _ \ | / _ \ / _` |/ _ \
102
+ / ___ \| | |_) | | __/ |__| (_) | (_| | __/
103
+ /_/ \_\_|_.__/|_|\___|\____\___/ \__,_|\___|
104
+
105
+ ✅ AlpieCode VS Code extension is installed.
106
+ 🚀 Starting AlpieCode Server on http://127.0.0.1:7169
107
+ INFO: Uvicorn running on http://127.0.0.1:7169 (Press CTRL+C to quit)
108
+ ```
109
+
110
+ ---
111
+
112
+ ## 💻 VS Code Extension Deep-Dive
113
+
114
+ The AlpieCode VS Code extension provides an IDE sidebar pairing modern AI interaction patterns with developer control:
115
+
116
+ ### 1. ⚡ Slash Commands Autocomplete (`/`)
117
+ Type **`/`** in the chat input area to trigger a floating command palette:
118
+ - `📋 /plan <task>` — Generate an architectural plan without making destructive file edits.
119
+ - `💡 /explain <file>` — Explain a file, function, or concept step-by-step.
120
+ - `🩺 /doctor` — Run full system diagnostic health checks in the chat.
121
+ - `🧪 /test` — Automatically generate unit tests and execute verification.
122
+ - `🔍 /diff` — Inspect recent changes made by AlpieCode in this session.
123
+ - `🗑️ /clear` — Reset and start a fresh chat session.
124
+
125
+ ### 2. 🧠 169Pi Reasoning Effort Dropdown Selector (`⌃`)
126
+ Situated directly in the bottom options bar:
127
+ - ⚖️ **Medium (Default)**: Balanced reasoning depth and generation speed (`temperature: 0.1`).
128
+ - 🧠 **High**: Deep chain-of-thought step-by-step reasoning, full context, maximal accuracy (`temperature: 0.2`).
129
+ - ⚡ **Low (Fast)**: Direct code generation without reasoning traces (`temperature: 0.0`) for quick edits and one-liners.
130
+
131
+ ### 3. 📋 Plan-First Review & Change Approval Workflow
132
+ - **New Files**: Written directly to disk, opened in the editor, and auto-executed in the sandbox.
133
+ - **Modifying Existing Files**: Displays an interactive **Change Plan Card** in chat with an inline line-by-line diff preview (`-` red / `+` green):
134
+ - **`✅ Accept`**: Applies the change, opens the file, and runs verification.
135
+ - **`❌ Reject`**: Discards the proposed modification cleanly.
136
+ - **`✏️ Edit Request`**: Opens an inline input box to type custom instructions (e.g., *"Use an iterative approach instead of recursion"*).
137
+
138
+ ### 4. 🐍 Proactive Virtual Environment (`.venv`) Auto-Detection
139
+ When generated Python code imports external packages (`numpy`, `pandas`, `flask`, etc.):
140
+ - AlpieCode scans the AST imports before execution.
141
+ - If the package is not installed, it pops up:
142
+ ```text
143
+ 📦 'numpy' is required by matrix_multiplication.py but not installed.
144
+ 🐍 No virtual environment found. Create one?
145
+
146
+ [Create .venv & Install] [Install Globally] [Skip]
147
+ ```
148
+ - Selecting **Create .venv & Install** creates `.venv`, installs the package, and executes the script using `.venv/bin/python3`!
149
+
150
+ ### 5. 📊 Live Token & Speed Meter
151
+ Top-right header displays real-time generation speed and token accumulation:
152
+ `🟢 Online API` ── `⚡ 42 tok/s · 📊 1,240 tokens`
153
+
154
+ ### 6. 📎 Multimodal Image Attachment
155
+ Drag-and-drop screenshots, paste from clipboard (`Ctrl+V`), or click **`📎 Image`** to send mockups, diagrams, and error screenshots to the VLM.
156
+
157
+ ### 7. 👻 Inline Ghost Text Code Completions
158
+ As you type in any code editor, AlpieCode streams gray inline suggestions ahead of your cursor (press **`Tab`** to accept).
159
+
160
+ ---
161
+
162
+ ## ⌨️ Command-Line Interface (CLI) Guide
163
+
164
+ AlpieCode offers a complete suite of standalone terminal commands:
165
+
166
+ ### `alpiecode run "<task>"`
167
+ Runs an autonomous coding task in the current repository:
168
+ ```bash
169
+ alpiecode run "Create a FastAPI service with SQLite database and CRUD endpoints"
170
+ ```
171
+
172
+ ### `alpiecode chat`
173
+ Starts an interactive terminal chat REPL with multi-turn conversation memory:
174
+ ```bash
175
+ alpiecode chat
176
+ ```
177
+
178
+ ### `alpiecode plan "<task>"`
179
+ Generates a structured implementation plan without making any file edits:
180
+ ```bash
181
+ alpiecode plan "Refactor authentication layer to use OAuth2 and JWT tokens"
182
+ ```
183
+
184
+ ### `alpiecode explain "<target>"`
185
+ Explains any file, class, function, or concept:
186
+ ```bash
187
+ # Explain a local file:
188
+ alpiecode explain src/codeagent/orchestrator.py
189
+
190
+ # Explain a concept:
191
+ alpiecode explain "How does the tool calling loop work in AlpieCode?"
192
+ ```
193
+
194
+ ### `alpiecode doctor`
195
+ Runs an instant system health and environment diagnostic:
196
+ ```bash
197
+ alpiecode doctor
198
+ ```
199
+ *Checks:*
200
+ - Python version & Virtual Environment status
201
+ - CUDA / GPU hardware acceleration
202
+ - General Internet connectivity (8.8.8.8) & Remote VLM latency (ms)
203
+ - Compilers & runtimes (`gcc`, `g++`, `git`, `node`, `java`, etc.)
204
+ - VS Code extension installation status
205
+
206
+ ### `alpiecode diff`
207
+ Shows all code modifications made by AlpieCode since the last git checkpoint:
208
+ ```bash
209
+ alpiecode diff
210
+ ```
211
+
212
+ ### `alpiecode init`
213
+ Interactively configures custom model endpoints, API keys, and context parameters:
214
+ ```bash
215
+ alpiecode init
216
+ ```
217
+
218
+ ---
219
+
220
+ ## 📓 Jupyter Notebooks, JupyterLab & Google Colab
221
+
222
+ ### 1. 🪄 IPython Magic Commands
223
+
224
+ Load AlpieCode in any Jupyter / Colab cell:
225
+ ```python
226
+ %load_ext alpiecode
227
+ ```
228
+
229
+ #### Line Magic (`%alpie`)
230
+ ```python
231
+ %alpie create a python function to compute moving averages on a pandas Series
232
+ ```
233
+
234
+ #### Cell Magic (`%%alpie`)
235
+ ```python
236
+ %%alpie
237
+ Create a script train_model.py that:
238
+ 1. Loads dataset from data.csv
239
+ 2. Preprocesses numerical and categorical columns with ColumnTransformer
240
+ 3. Trains an XGBoost classifier and evaluates with ROC-AUC score
241
+ 4. Saves the model with joblib
242
+ ```
243
+
244
+ #### Specialized Notebook Magics:
245
+ ```python
246
+ %alpie_plan Build a custom PyTorch dataset loader for audio spectrograms
247
+ %alpie_explain model.py
248
+ %alpie_doctor
249
+ ```
250
+
251
+ ---
252
+
253
+ ### 2. 🐍 Python SDK API (Programmatic Usage)
254
+
255
+ ```python
256
+ import alpiecode
257
+
258
+ # 1. Execute task
259
+ alpiecode.run("Create a benchmark script comparing numpy vs cupy matrix multiplication")
260
+
261
+ # 2. Plan a project
262
+ alpiecode.plan("Implement a Redis caching layer for API responses")
263
+
264
+ # 3. Explain code
265
+ alpiecode.explain("src/codeagent/tools.py")
266
+
267
+ # 4. System health check
268
+ alpiecode.doctor()
269
+ ```
270
+
271
+ ---
272
+
273
+ ### 3. ☁️ Google Colab Setup Guide
274
+
275
+ In Google Colab:
276
+ ```python
277
+ # Cell 1: Install AlpieCode wheel
278
+ !pip install alpiecode
279
+
280
+ # Cell 2: Load Extension
281
+ %load_ext alpiecode
282
+
283
+ # Cell 3: Execute Task
284
+ %alpie build a random forest regressor on housing data and display metrics
285
+ ```
286
+
287
+ ---
288
+
289
+ ## 🛠️ 15 Built-In Agentic Tools
290
+
291
+ The AlpieCode agent autonomously orchestrates **15 specialized tools**:
292
+
293
+ | Tool Name | Category | Purpose |
294
+ | :--- | :--- | :--- |
295
+ | `write_file` | File System | Creates new files or overwrites existing files safely |
296
+ | `edit_file` | File System | Precise replacement of target text blocks with exact whitespace matching |
297
+ | `read_file` | File System | Reads complete files or specific line ranges (`start_line`, `end_line`) |
298
+ | `apply_patch` | File System | Applies standard unified diff format patches |
299
+ | `bash` | System Execution | Runs shell commands with environment isolation & guardian safety gate |
300
+ | `list_files` | Workspace Discovery | Recursive directory listing with pattern filtering |
301
+ | `file_search` | Workspace Discovery | Ripgrep regex search across the entire codebase |
302
+ | `view_image` | Multimodal Vision | Inspects and analyzes image files and UI screenshots |
303
+ | `fetch_url` | Web & Research | Fetches live documentation and web pages |
304
+ | `web_search` | Web & Research | Searches technical references and API docs online |
305
+ | `clone_repo` | Repository | Clones public git repositories into workspace for reference |
306
+ | `update_plan` | Agent Planning | Updates structured implementation plan checkpoints (`[x]` / `[ ]`) |
307
+ | `extract_memories` | Memory | Saves long-term user preferences and project patterns |
308
+ | `compact_context` | Optimization | Compresses multi-turn conversation context to prevent token overflows |
309
+ | `diagnostics` | Code Intelligence | Inspects compiler and linter diagnostics |
310
+
311
+ ---
312
+
313
+ ## 🛡️ Safety Guardian, Virtual Environment & Guardrails
314
+
315
+ 1. **Safety Guardian Gate** (`src/codeagent/guardian.py`):
316
+ - Blocks destructive shell commands (e.g. `rm -rf /`, `mkfs`, raw disk writes).
317
+ - Enforces execution inside the designated project root directory (`workdir`).
318
+ 2. **Auto-Fix Loop Rate Limiting**:
319
+ - Caps automated error retry loops at **3 attempts max** to prevent infinite error-fix cycles.
320
+ - Prompts the user with actionable diagnostics if errors persist.
321
+ 3. **Cross-Platform WSL & Shell Normalization**:
322
+ - Automatically detects Windows UNC paths (`\\wsl.localhost\...` / `\\wsl$\...`) and routes commands through `wsl -e bash -c`.
323
+ - Native execution on PowerShell, macOS (zsh), and Linux (bash).
324
+ 4. **Context Window Compaction**:
325
+ - Compresses long multi-turn sessions into concise summaries when context approaches token limits.
326
+
327
+ ---
328
+
329
+ ## ❓ FAQ & Troubleshooting
330
+
331
+ #### Q: The extension shows "Local GGUF" even though I am connected to the internet. Why?
332
+ > **A:** AlpieCode checks reachability of the specific remote model API (`http://20.245.200.125:8000/v1`). If port 8000 on the remote VM is not listening, it automatically switches to **Local GGUF** so you can continue coding without interruption. Run `alpiecode doctor` to verify.
333
+
334
+ #### Q: How do I test the extension after updates?
335
+ > **A:** In VS Code, press **`Ctrl+Shift+P`** → select **`Developer: Reload Window`**.
336
+
337
+ #### Q: Can I use AlpieCode offline without internet?
338
+ > **A:** Yes! AlpieCode includes full offline GGUF inference (`169Pi/Alpie_learn_prototype_GGUF_NEW`) with local tool execution.
339
+
340
+ ---
341
+
342
+ *Generated by AlpieCode AI Platform — Version 2.0.7 / Extension v0.8.5*
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "alpiecode"
7
- version = "2.0.7"
7
+ version = "2.0.8"
8
8
  description = "AlpieCode — Autonomous AI Coding Agent CLI powered by local 169Pi GGUF VLM"
9
9
  requires-python = ">=3.9"
10
10
  dependencies = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alpiecode
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: AlpieCode — Autonomous AI Coding Agent CLI powered by local 169Pi GGUF VLM
5
5
  Requires-Python: >=3.9
6
6
  Requires-Dist: huggingface_hub>=0.20.0
@@ -18,11 +18,11 @@ 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 = 2 # v2: n_ctx upgraded 16384 32768
21
+ CONFIG_VERSION = 3 # v3: endpoint updated to 18.223.193.170 & grpo_phase_4_merged
22
22
 
23
23
  DEFAULTS = {
24
- "base_url": "http://20.245.200.125:8000/v1", # Remote VLM server endpoint
25
- "model": "169Pi/grpo_phase_2_merged",
24
+ "base_url": "http://18.223.193.170:8000/v1", # Remote VLM server endpoint
25
+ "model": "169Pi/grpo_phase_4_merged",
26
26
  "model_repo": "169Pi/Alpie_learn_prototype_GGUF_NEW",
27
27
  "api_key": "not-needed",
28
28
  "hf_token": None,
@@ -84,7 +84,7 @@ def get_shared_http_client():
84
84
  @dataclass
85
85
  class Config:
86
86
  base_url: Optional[str] = None
87
- model: str = "169Pi/grpo_phase_2_merged" # Server API model name (vLLM)
87
+ model: str = "169Pi/grpo_phase_4_merged" # 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
@@ -111,6 +111,11 @@ 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
+ # v2 → v3: endpoint update
115
+ if "20.245.200.125" in str(saved_data.get("base_url", "")):
116
+ data["base_url"] = "http://18.223.193.170:8000/v1"
117
+ if "grpo_phase_2_merged" in str(saved_data.get("model", "")):
118
+ data["model"] = "169Pi/grpo_phase_4_merged"
114
119
  data["config_version"] = CONFIG_VERSION
115
120
  needs_save = True
116
121
  except Exception:
alpiecode-2.0.7/README.md DELETED
@@ -1,96 +0,0 @@
1
- # 🤖 AlpieCode
2
-
3
- > **Autonomous AI Software Engineering Agent** powered by 169Pi. Operates locally on your device (CPU/GPU) with zero internet, or connects to high-speed cloud VLM endpoints. Integrates seamlessly into **CLI**, **REST/SSE API**, and **VS Code IDE**.
4
-
5
- ```
6
- _ _ _ ____ _
7
- / \ | |_ _| | ___ / ___|___ __| | ___
8
- / _ \ | | '_ \ |/ _ \ | / _ \ / _` |/ _ / ___ \| | |_) | | __/ |__| (_) | (_| | __/
9
- /_/ \_\_|_.__/|_|\___|\____\___/ \__,_|\___|
10
- ```
11
-
12
- [![Python Version](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/downloads/)
13
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
14
- [![FastAPI](https://img.shields.io/badge/FastAPI-0.100%2B-green.svg)](https://fastapi.tiangolo.com)
15
- [![VS Code Extension](https://img.shields.io/badge/VS%20Code-Extension-blue.svg)](./vscode)
16
-
17
- ---
18
-
19
- ## ⚡ Quick Start
20
-
21
- ### 1. Installation
22
- ```bash
23
- pip install --upgrade alpiecode
24
- ```
25
- *Or install from source with uv:*
26
- ```bash
27
- git clone https://github.com/169pi/codeagent-poc.git
28
- cd codeagent-poc
29
- uv venv && source .venv/bin/activate
30
- uv pip install -e .
31
- ```
32
-
33
- ### 2. Run Autonomous Coding Tasks (CLI)
34
- ```bash
35
- # Direct task execution
36
- alpiecode run "Create a FastAPI REST API for a todo app with full test coverage"
37
-
38
- # Dry-run planning (read-only)
39
- alpiecode plan "Refactor database connection to async SQLModel"
40
-
41
- # Multimodal UI generation from image / screenshot
42
- alpiecode run "Build an HTML/CSS landing page matching this design" --image ./mockup.png
43
- ```
44
-
45
- ### 3. Launch Backend & VS Code Extension
46
- ```bash
47
- alpiecode serve
48
- ```
49
- *Starts the background API and automatically installs the AlpieCode VS Code Extension.*
50
-
51
- ---
52
-
53
- ## 🌟 Key Highlights
54
-
55
- - 🌐 **Dual Online & Offline Modes**: High-speed cloud VLM (80-120 tok/s) when online, automatic fallback to local GGUF (`169Pi/Alpie_learn_prototype_GGUF_NEW`) on CPU/GPU when offline.
56
- - 💭 **Thinking & Non-Thinking Modes**: Deep chain-of-thought reasoning for complex multi-file projects, or instant low-latency mode for rapid edits.
57
- - 🖼️ **Multimodal Perception**: Analyze UI mockups, screenshots, video recordings (`--video`), YouTube links (`--url`), and GitHub repos (`--github`).
58
- - ⚡ **VS Code Ghost-Text Autocomplete**: Real-time Fill-In-Middle inline suggestions. Press `Tab` to accept.
59
- - 📝 **Native Side-by-Side Diff Previews**: Inspect `Original ↔ Modified` diffs with one-click `Accept` or `Reject` in VS Code before writing to disk.
60
- - 🛡️ **Guardian Safety Gate**: Automatically classifies shell commands into `SAFE`, `WARNING`, and hard-blocks `DANGEROUS` operations (`rm -rf /`, `sudo`, `mkfs`).
61
- - 🧠 **Cross-Session Memory & Plan Preservation**: Automatically remembers working build/test commands and project architecture across chat sessions.
62
-
63
- ---
64
-
65
- ## 📖 Complete Documentation
66
-
67
- For the full detailed manual covering all 14 tools, CLI flags, REST API endpoints, vision extraction, and offline GGUF setup:
68
-
69
- 👉 **[Read the Full Documentation (DOCUMENTATION.md)](./DOCUMENTATION.md)**
70
-
71
- ---
72
-
73
- ## 🛠️ CLI Cheat Sheet
74
-
75
- | Command | Description |
76
- |:---|:---|
77
- | `alpiecode run "<task>"` | Execute an autonomous software engineering task |
78
- | `alpiecode chat` | Multi-turn interactive terminal REPL |
79
- | `alpiecode plan "<task>"` | Generate a structured execution plan (read-only dry run) |
80
- | `alpiecode diff` | Show git diff of all modifications made by AlpieCode |
81
- | `alpiecode serve` | Start API server on `http://127.0.0.1:7169` & install VS Code plugin |
82
- | `alpiecode init` | Guided setup wizard (pre-download offline GGUF model) |
83
-
84
- ### Important Flags
85
- - `--image <path>` : Analyze screenshot/diagram for vision tasks
86
- - `--video <path>` : Extract keyframes from video for debugging
87
- - `--url <url>` : Analyze YouTube tutorial/bug report
88
- - `--github <repo>` : Explore open-source repo (e.g. `facebook/react`)
89
- - `--no-thinking` : Disable reasoning tokens for instant execution
90
- - `--max-turns <n>` : Set maximum turn limit (default: `50`)
91
- - `--workdir <dir>` : Set target workspace directory
92
-
93
- ---
94
-
95
- ## 📄 License
96
- MIT License. Built by the **169Pi AI Research Team**.
File without changes