alpiecode 0.9.8__tar.gz → 0.9.9__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 (36) hide show
  1. {alpiecode-0.9.8 → alpiecode-0.9.9}/PKG-INFO +1 -1
  2. {alpiecode-0.9.8 → alpiecode-0.9.9}/pyproject.toml +1 -1
  3. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/alpiecode.egg-info/PKG-INFO +1 -1
  4. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/tools.py +41 -3
  5. {alpiecode-0.9.8 → alpiecode-0.9.9}/README.md +0 -0
  6. {alpiecode-0.9.8 → alpiecode-0.9.9}/setup.cfg +0 -0
  7. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/alpiecode.egg-info/SOURCES.txt +0 -0
  8. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/alpiecode.egg-info/dependency_links.txt +0 -0
  9. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/alpiecode.egg-info/entry_points.txt +0 -0
  10. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/alpiecode.egg-info/requires.txt +0 -0
  11. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/alpiecode.egg-info/top_level.txt +0 -0
  12. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/__init__.py +0 -0
  13. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/agent.py +0 -0
  14. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/backends/__init__.py +0 -0
  15. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/backends/base.py +0 -0
  16. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/backends/local_backend.py +0 -0
  17. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/backends/openai_backend.py +0 -0
  18. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/cache.py +0 -0
  19. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/cli.py +0 -0
  20. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/client.py +0 -0
  21. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/compaction.py +0 -0
  22. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/config.py +0 -0
  23. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/context.py +0 -0
  24. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/executor.py +0 -0
  25. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/extension/alpiecode.vsix +0 -0
  26. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/github.py +0 -0
  27. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/guardian.py +0 -0
  28. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/local_model.py +0 -0
  29. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/media.py +0 -0
  30. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/memory.py +0 -0
  31. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/orchestrator.py +0 -0
  32. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/prompt.py +0 -0
  33. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/server.py +0 -0
  34. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/session.py +0 -0
  35. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/updater.py +0 -0
  36. {alpiecode-0.9.8 → alpiecode-0.9.9}/src/codeagent/vscode_installer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alpiecode
3
- Version: 0.9.8
3
+ Version: 0.9.9
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "alpiecode"
7
- version = "0.9.8"
7
+ version = "0.9.9"
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: 0.9.8
3
+ Version: 0.9.9
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
@@ -334,6 +334,24 @@ def _smart_truncate(text: str, max_chars: int = 6000) -> str:
334
334
  )
335
335
 
336
336
 
337
+
338
+ def _extract_script_path(command: str) -> str:
339
+ """Extract the script file path from a bash command, if any."""
340
+ import re as _re
341
+ patterns = [
342
+ r"python3?\s+(?:-[a-zA-Z]+\s+)*([^\s|>&;]+\.py)",
343
+ r"node\s+([^\s|>&;]+\.js)",
344
+ r"ruby\s+([^\s|>&;]+\.rb)",
345
+ r"\./([^\s|>&;]+)",
346
+ r"bash\s+([^\s|>&;]+\.sh)",
347
+ ]
348
+ for pat in patterns:
349
+ m = _re.search(pat, command)
350
+ if m:
351
+ return m.group(1)
352
+ return ""
353
+
354
+
337
355
  def _bash(workdir: Path, command: str) -> str:
338
356
  """Run a shell command with guardian safety gate.
339
357
 
@@ -391,13 +409,33 @@ def _bash(workdir: Path, command: str) -> str:
391
409
  "exit_code": result.returncode,
392
410
  })
393
411
 
394
- # Inject clear error signal for failed commands
412
+ # ── Smart Guardrail 1: Failed command — inject actionable hints ──
395
413
  if result.returncode != 0:
396
- output = (
414
+ script_file = _extract_script_path(command)
415
+ hint = (
397
416
  f"⚠️ COMMAND FAILED (exit_code={result.returncode}). "
398
417
  f"Read the error output carefully and fix the ROOT CAUSE.\n"
399
- + output
400
418
  )
419
+ if script_file:
420
+ hint += (
421
+ f"💡 HINT: Use read_file to examine \'{script_file}\' around the "
422
+ f"failing line before making edits. Do NOT guess — read first.\n"
423
+ )
424
+ output = hint + output
425
+
426
+ # ── Smart Guardrail 2: Silent success — script ran but no output ──
427
+ elif result.returncode == 0 and not stdout.strip() and not stderr.strip():
428
+ script_file = _extract_script_path(command)
429
+ if script_file:
430
+ output += (
431
+ "\n\n⚠️ WARNING: Command succeeded (exit_code=0) but produced "
432
+ "NO OUTPUT. This usually means:\n"
433
+ " 1. The main execution block (if __name__ == \'__main__\') is missing or broken\n"
434
+ " 2. An exception is being silently caught with a bare \'except: pass\'\n"
435
+ " 3. The print/output statements were accidentally removed\n"
436
+ f"→ Use read_file to check \'{script_file}\' — especially the main block "
437
+ "at the bottom of the file. Do NOT re-run the same command."
438
+ )
401
439
 
402
440
  return output
403
441
  except subprocess.TimeoutExpired:
File without changes
File without changes