alpiecode 10.10.0__tar.gz → 10.10.2__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 (145) hide show
  1. {alpiecode-10.10.0 → alpiecode-10.10.2}/PKG-INFO +1 -1
  2. {alpiecode-10.10.0 → alpiecode-10.10.2}/pyproject.toml +1 -1
  3. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/alpiecode.egg-info/PKG-INFO +1 -1
  4. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/__init__.py +1 -1
  5. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/agent.py +10 -4
  6. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/backends/local_backend.py +6 -3
  7. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/blueprints.py +5 -4
  8. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/chat_tags.py +34 -10
  9. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/cli.py +4 -4
  10. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/config.py +1 -1
  11. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/local_model.py +1 -1
  12. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/media.py +181 -37
  13. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/orchestrator.py +1 -1
  14. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/prompt.py +1 -1
  15. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/server.py +1 -1
  16. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/session.py +10 -1
  17. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/slash.py +100 -32
  18. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_chat_tags_and_offline_multimodal.py +118 -1
  19. {alpiecode-10.10.0 → alpiecode-10.10.2}/README.md +0 -0
  20. {alpiecode-10.10.0 → alpiecode-10.10.2}/setup.cfg +0 -0
  21. {alpiecode-10.10.0 → alpiecode-10.10.2}/setup.py +0 -0
  22. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/alpiecode/__init__.py +0 -0
  23. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/alpiecode.egg-info/SOURCES.txt +0 -0
  24. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/alpiecode.egg-info/dependency_links.txt +0 -0
  25. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/alpiecode.egg-info/entry_points.txt +0 -0
  26. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/alpiecode.egg-info/requires.txt +0 -0
  27. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/alpiecode.egg-info/top_level.txt +0 -0
  28. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/__main__.py +0 -0
  29. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/assessment.py +0 -0
  30. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/backends/__init__.py +0 -0
  31. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/backends/base.py +0 -0
  32. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/backends/openai_backend.py +0 -0
  33. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/cache.py +0 -0
  34. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/client.py +0 -0
  35. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/compaction.py +0 -0
  36. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/context.py +0 -0
  37. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/diff_preview.py +0 -0
  38. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/discovery.py +0 -0
  39. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/doctor.py +0 -0
  40. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/dream_rsi.py +0 -0
  41. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/executor.py +0 -0
  42. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/git_ops.py +0 -0
  43. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/github.py +0 -0
  44. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/guardian.py +0 -0
  45. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/guardrails.py +0 -0
  46. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/ipython_ext.py +0 -0
  47. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/memory.py +0 -0
  48. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/metrics.py +0 -0
  49. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/onboarding.py +0 -0
  50. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/paths.py +0 -0
  51. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/progress.py +0 -0
  52. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/project_template.py +0 -0
  53. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/rephraser.py +0 -0
  54. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/accessibility-audit/SKILL.md +0 -0
  55. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/accessibility-testing/SKILL.md +0 -0
  56. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/accessibility-ui-components/SKILL.md +0 -0
  57. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/agentic-workflows/SKILL.md +0 -0
  58. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/api-design/SKILL.md +0 -0
  59. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/architecture-design/SKILL.md +0 -0
  60. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/backend-engineering/SKILL.md +0 -0
  61. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/browser-automation/SKILL.md +0 -0
  62. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/cli-development/SKILL.md +0 -0
  63. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/cloud-infrastructure/SKILL.md +0 -0
  64. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/code-generation/SKILL.md +0 -0
  65. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/code-review/SKILL.md +0 -0
  66. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/codebase-onboarding/SKILL.md +0 -0
  67. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/cost-optimization/SKILL.md +0 -0
  68. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/data-analysis/SKILL.md +0 -0
  69. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/data-engineering/SKILL.md +0 -0
  70. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/database-engineering/SKILL.md +0 -0
  71. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/dependency-management/SKILL.md +0 -0
  72. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/dependency-security/SKILL.md +0 -0
  73. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/dependency-upgrades/SKILL.md +0 -0
  74. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/devops-ci-cd/SKILL.md +0 -0
  75. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/docker-containers/SKILL.md +0 -0
  76. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/documentation/SKILL.md +0 -0
  77. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/documentation-site/SKILL.md +0 -0
  78. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/e2e-testing/SKILL.md +0 -0
  79. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/error-handling-resilience/SKILL.md +0 -0
  80. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/feature-development/SKILL.md +0 -0
  81. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/frontend-engineering/SKILL.md +0 -0
  82. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/git-workflow/SKILL.md +0 -0
  83. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/incident-response/SKILL.md +0 -0
  84. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/legacy-code-modernization/SKILL.md +0 -0
  85. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/llm-application-engineering/SKILL.md +0 -0
  86. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/localization-i18n/SKILL.md +0 -0
  87. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/mcp-server-development/SKILL.md +0 -0
  88. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/migration-engineering/SKILL.md +0 -0
  89. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/mobile-development/SKILL.md +0 -0
  90. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/model-evaluation/SKILL.md +0 -0
  91. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/nodejs-services/SKILL.md +0 -0
  92. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/observability/SKILL.md +0 -0
  93. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/performance-optimization/SKILL.md +0 -0
  94. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/privacy-data-protection/SKILL.md +0 -0
  95. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/prompt-engineering/SKILL.md +0 -0
  96. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/python-engineering/SKILL.md +0 -0
  97. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/rag-retrieval/SKILL.md +0 -0
  98. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/react-engineering/SKILL.md +0 -0
  99. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/release-management/SKILL.md +0 -0
  100. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/requirements-analysis/SKILL.md +0 -0
  101. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/responsive-design/SKILL.md +0 -0
  102. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/safe-refactoring/SKILL.md +0 -0
  103. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/secure-coding/SKILL.md +0 -0
  104. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/systematic-debugging/SKILL.md +0 -0
  105. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/technical-planning/SKILL.md +0 -0
  106. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/technical-research/SKILL.md +0 -0
  107. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/technical-writing/SKILL.md +0 -0
  108. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/test-engineering/SKILL.md +0 -0
  109. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/tool-integration/SKILL.md +0 -0
  110. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/typescript-engineering/SKILL.md +0 -0
  111. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/visual-regression-testing/SKILL.md +0 -0
  112. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/web-performance/SKILL.md +0 -0
  113. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/web-security-testing/SKILL.md +0 -0
  114. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills/workflow-automation/SKILL.md +0 -0
  115. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/skills.py +0 -0
  116. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/subagent.py +0 -0
  117. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/system1.py +0 -0
  118. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/tools.py +0 -0
  119. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/updater.py +0 -0
  120. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/verifier.py +0 -0
  121. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/vscode_installer.py +0 -0
  122. {alpiecode-10.10.0 → alpiecode-10.10.2}/src/codeagent/walkthrough.py +0 -0
  123. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_adaptive_resilience.py +0 -0
  124. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_cli_ui.py +0 -0
  125. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_context_and_trajectory.py +0 -0
  126. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_deloop_and_sessions.py +0 -0
  127. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_dream_rsi.py +0 -0
  128. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_frontier_architecture.py +0 -0
  129. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_gpu_detection.py +0 -0
  130. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_lifecycle_and_portfolio.py +0 -0
  131. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_local_model_download.py +0 -0
  132. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_memory_optimization.py +0 -0
  133. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_non_thinking_and_local_stream.py +0 -0
  134. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_onboarding.py +0 -0
  135. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_project_templates.py +0 -0
  136. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_security_config.py +0 -0
  137. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_skills_engine.py +0 -0
  138. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_slash_and_diff.py +0 -0
  139. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_subagents.py +0 -0
  140. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_task_assessment.py +0 -0
  141. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_token_economy_and_256k.py +0 -0
  142. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_truncation_resilience.py +0 -0
  143. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_verifier.py +0 -0
  144. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_walkthrough.py +0 -0
  145. {alpiecode-10.10.0 → alpiecode-10.10.2}/test/test_web_resilience_and_guardrails.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alpiecode
3
- Version: 10.10.0
3
+ Version: 10.10.2
4
4
  Summary: AlpieCode
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 = "10.10.0"
7
+ version = "10.10.2"
8
8
  description = "AlpieCode"
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: 10.10.0
3
+ Version: 10.10.2
4
4
  Summary: AlpieCode
5
5
  Requires-Python: >=3.9
6
6
  Requires-Dist: huggingface_hub>=0.20.0
@@ -17,7 +17,7 @@ Supports:
17
17
  from pathlib import Path
18
18
  from typing import Optional, Any, Dict
19
19
 
20
- __version__ = "10.10.0"
20
+ __version__ = "10.10.2"
21
21
 
22
22
  def run(task: str, workdir: str = ".", reasoning_level: str = "thinking", **kwargs):
23
23
  """Run an autonomous coding task programmatically."""
@@ -502,9 +502,15 @@ def run_agent(
502
502
  if github_repo:
503
503
  console.print(f"🐙 GitHub Repo: {github_repo}", style="cyan")
504
504
  if image_path:
505
- console.print(f"🖼️ Image: {image_path}", style="cyan")
505
+ if isinstance(image_path, list):
506
+ console.print(f"🖼️ Images ({len(image_path)}): {', '.join(Path(p).name for p in image_path)}", style="cyan")
507
+ else:
508
+ console.print(f"🖼️ Image: {image_path}", style="cyan")
506
509
  if video_path:
507
- console.print(f"🎬 Video: {video_path}", style="cyan")
510
+ if isinstance(video_path, list):
511
+ console.print(f"🎬 Videos ({len(video_path)}): {', '.join(Path(p).name for p in video_path)}", style="cyan")
512
+ else:
513
+ console.print(f"🎬 Video: {video_path}", style="cyan")
508
514
  if url:
509
515
  console.print(f"📺 URL: {url}", style="cyan")
510
516
  status_spinner.resume("Analyzing requirements & planning execution...")
@@ -974,8 +980,8 @@ def run_chat(
974
980
  console.print(tag_badges)
975
981
 
976
982
  effective_task = clean_task or user_input
977
- req_image = parsed_tags.get("image_path") or getattr(session, "active_image", None)
978
- req_video = parsed_tags.get("video_path") or getattr(session, "active_video", None)
983
+ req_image = parsed_tags.get("image_path") or getattr(session, "active_images", None) or getattr(session, "active_image", None)
984
+ req_video = parsed_tags.get("video_path") or getattr(session, "active_videos", None) or getattr(session, "active_video", None)
979
985
  req_url = parsed_tags.get("url") or getattr(session, "active_url", None)
980
986
  req_github = parsed_tags.get("github_repo") or getattr(session, "active_github", None)
981
987
  turn_debug = parsed_tags.get("debug") if parsed_tags.get("debug") is not None else (debug or getattr(session, "debug", False))
@@ -336,7 +336,8 @@ class LocalBackend:
336
336
  import time
337
337
  start_time = time.time()
338
338
  temp = temperature if temperature is not None else getattr(self._cfg, "temperature", 0.2)
339
- m_tokens = max_tokens if max_tokens is not None else getattr(self._cfg, "max_tokens", 2048)
339
+ raw_m = max_tokens if max_tokens is not None else getattr(self._cfg, "max_tokens", 2048)
340
+ m_tokens = min(raw_m, 4096)
340
341
 
341
342
  model = self._ensure_model()
342
343
  sanitized_msgs = self._sanitize_messages_for_gguf(messages)
@@ -656,7 +657,8 @@ class LocalBackend:
656
657
  sanitized[-1]["content"] = u_text + "\n\n[Direct Mode: Output code and tool calls directly without <think> tags. Do not deliberate.]"
657
658
 
658
659
  n_ctx = getattr(self._cfg, "n_ctx", 8192) or 8192
659
- m_tokens = max_tokens if max_tokens is not None else getattr(self._cfg, "max_tokens", 2048)
660
+ raw_m = max_tokens if max_tokens is not None else getattr(self._cfg, "max_tokens", 2048)
661
+ m_tokens = min(raw_m, 4096)
660
662
  sanitized, safe_max_tokens = self._enforce_context_headroom(sanitized, max_context=n_ctx, max_tokens=m_tokens)
661
663
  payload = {
662
664
  "model": "local",
@@ -1118,7 +1120,8 @@ class iOSBackend(BasePlatformBackend):
1118
1120
  bridge_url = self._get_bridge_url()
1119
1121
  sanitized = self._sanitize_messages_for_gguf(messages)
1120
1122
  n_ctx = getattr(self._cfg, "n_ctx", 4096) or 4096
1121
- m_tokens = max_tokens if max_tokens is not None else getattr(self._cfg, "max_tokens", 2048)
1123
+ raw_m = max_tokens if max_tokens is not None else getattr(self._cfg, "max_tokens", 2048)
1124
+ m_tokens = min(raw_m, 4096)
1122
1125
  sanitized, safe_max_tokens = self._enforce_context_headroom(sanitized, max_context=n_ctx, max_tokens=m_tokens)
1123
1126
  payload = {
1124
1127
  "model": "local",
@@ -12,6 +12,7 @@ Binds concrete, unambiguous engineering blueprints to user tasks:
12
12
  from dataclasses import dataclass, field
13
13
  from enum import Enum
14
14
  from pathlib import Path
15
+ import re
15
16
  from typing import Dict, List, Optional, Union
16
17
 
17
18
 
@@ -509,21 +510,21 @@ def resolve_domain_blueprint(task: str, repo: Optional[Dict] = None, intent: str
509
510
  return get_ai_ml_blueprint(task)
510
511
 
511
512
  # 3. C / C++ Tasks
512
- if any(kw in task_lower for kw in ("c++", "cpp", "g++", "gcc", "clang", "in c", "in c++")):
513
+ if any(kw in task_lower for kw in ("c++", "cpp", "g++", "gcc", "clang", "in c++")) or re.search(r"\bin c\b", task_lower):
513
514
  return get_native_cpp_blueprint(task)
514
515
 
515
516
  # 3b. Rust Tasks
516
- if any(kw in task_lower for kw in ("rust", "in rust", "cargo")):
517
+ if any(kw in task_lower for kw in ("cargo",)) or re.search(r"\b(rust|in rust)\b", task_lower):
517
518
  return get_rust_blueprint(task)
518
519
 
519
520
  # 3c. Go Tasks
520
- if any(kw in task_lower for kw in ("golang", "in go", "in golang", "go language")):
521
+ if any(kw in task_lower for kw in ("golang", "go language")) or re.search(r"\b(in go|in golang)\b", task_lower):
521
522
  if any(w in task_lower for w in ("website", "web app", "webapp", "web", "frontend", "html", "site", "page")):
522
523
  return get_golang_web_blueprint(task)
523
524
  return get_golang_blueprint(task)
524
525
 
525
526
  # 3d. Java Tasks
526
- if any(kw in task_lower for kw in ("java", "in java", "javac", "maven", "gradle")):
527
+ if any(kw in task_lower for kw in ("javac", "maven", "gradle")) or re.search(r"\b(in java|java)\b(?!script)", task_lower):
527
528
  return get_java_blueprint(task)
528
529
 
529
530
  # 3e. Autonomous Technical Research & Synthesis
@@ -70,21 +70,45 @@ def parse_chat_tags_and_flags(
70
70
  raw = f"{core_candidate} {trailing}".strip()
71
71
 
72
72
  # 2. Extract media tags: @image:path, @image path, --image path
73
+ from .media import split_media_paths
74
+
73
75
  # Image
74
- img_match = re.search(r"(?:--image\s+|@image:?\s*)([\"'][^\"']+[\"']|\S+)", raw)
75
- if img_match:
76
- val = img_match.group(1).strip("\"'")
77
- parsed["image_path"] = val
78
- parsed["badges"].append(f"🖼️ image: {val}")
76
+ img_pattern = r"(?:--image\s+|@image:?\s*)(.+?)(?=(?:\s+--[a-zA-Z]|\s+@[a-zA-Z]|$))"
77
+ img_vals = []
78
+ while True:
79
+ img_match = re.search(img_pattern, raw)
80
+ if not img_match:
81
+ break
82
+ img_vals.append(img_match.group(1).strip())
79
83
  raw = raw[: img_match.start()] + " " + raw[img_match.end() :]
84
+ if img_vals:
85
+ img_paths = split_media_paths(img_vals)
86
+ if img_paths:
87
+ parsed["image_path"] = img_paths[0] if len(img_paths) == 1 else ", ".join(img_paths)
88
+ parsed["image_paths"] = img_paths
89
+ if len(img_paths) == 1:
90
+ parsed["badges"].append(f"🖼️ image: {img_paths[0]}")
91
+ else:
92
+ parsed["badges"].append(f"🖼️ images ({len(img_paths)}): {', '.join(Path(p).name for p in img_paths)}")
80
93
 
81
94
  # Video
82
- vid_match = re.search(r"(?:--video\s+|@video:?\s*)([\"'][^\"']+[\"']|\S+)", raw)
83
- if vid_match:
84
- val = vid_match.group(1).strip("\"'")
85
- parsed["video_path"] = val
86
- parsed["badges"].append(f"🎬 video: {val}")
95
+ vid_pattern = r"(?:--video\s+|@video:?\s*)(.+?)(?=(?:\s+--[a-zA-Z]|\s+@[a-zA-Z]|$))"
96
+ vid_vals = []
97
+ while True:
98
+ vid_match = re.search(vid_pattern, raw)
99
+ if not vid_match:
100
+ break
101
+ vid_vals.append(vid_match.group(1).strip())
87
102
  raw = raw[: vid_match.start()] + " " + raw[vid_match.end() :]
103
+ if vid_vals:
104
+ vid_paths = split_media_paths(vid_vals)
105
+ if vid_paths:
106
+ parsed["video_path"] = vid_paths[0] if len(vid_paths) == 1 else ", ".join(vid_paths)
107
+ parsed["video_paths"] = vid_paths
108
+ if len(vid_paths) == 1:
109
+ parsed["badges"].append(f"🎬 video: {vid_paths[0]}")
110
+ else:
111
+ parsed["badges"].append(f"🎬 videos ({len(vid_paths)}): {', '.join(Path(p).name for p in vid_paths)}")
88
112
 
89
113
  # URL (YouTube / Web)
90
114
  url_match = re.search(r"(?:--url\s+|@url:?\s*)([\"'][^\"']+[\"']|\S+)", raw)
@@ -147,15 +147,15 @@ def main():
147
147
 
148
148
  common = argparse.ArgumentParser(add_help=False)
149
149
  common.add_argument("--workdir", default=".", help="Repo directory (default: current dir)")
150
- common.add_argument("--image", default=None, help="Path to an image file for vision analysis")
151
- common.add_argument("--video", default=None, help="Path to a video file for multimodal analysis")
150
+ common.add_argument("--image", nargs="*", default=None, help="Path to image file(s) for vision analysis")
151
+ common.add_argument("--video", nargs="*", default=None, help="Path to video file(s) for multimodal analysis")
152
152
  common.add_argument("--url", default=None, help="YouTube URL for video analysis")
153
153
  common.add_argument("--github", default=None, help="GitHub repository (e.g. owner/repo or URL) for open-source analysis")
154
154
  common.add_argument("--max-turns", type=int, default=None, help="Override max turns")
155
155
  common.add_argument("--endpoint", "--base-url", dest="endpoint", default=None, help="VLM API endpoint base URL")
156
- common.add_argument("--model", dest="model", default=None, help="Model name (e.g. alpie_seed, alpie_9b)")
156
+ common.add_argument("--model", dest="model", default=None, help="Model name (e.g. alpie_seed)")
157
157
  common.add_argument("--api-key", dest="api_key", default=None, help="API key for endpoint authentication")
158
- common.add_argument("--preset", dest="preset", choices=["default", "alpie_seed", "alpie_9b"], default=None, help="Endpoint preset profile")
158
+ common.add_argument("--preset", dest="preset", choices=["default", "alpie_seed"], default=None, help="Endpoint preset profile")
159
159
  common.add_argument("--thinking", "--reasoning", dest="thinking", action="store_true", help="Enable VLM reasoning mode")
160
160
  common.add_argument("--no-thinking", "--non-thinking", dest="no_thinking", action="store_true", help="Disable VLM reasoning mode")
161
161
  common.add_argument("--force-thinking", dest="force_thinking", action="store_true", help="Force VLM reasoning on all turns, disabling dynamic gating")
@@ -89,7 +89,7 @@ KNOWN_PRESETS = {
89
89
  },
90
90
  "alpie_9b": {
91
91
  "base_url": _INTERNAL_9B_URL,
92
- "model": "alpie_9b",
92
+ "model": "alpie_seed",
93
93
  "api_key": "not-needed",
94
94
  },
95
95
  }
@@ -648,7 +648,7 @@ class LocalModel:
648
648
  if self._mmproj_path:
649
649
  try:
650
650
  import llama_cpp.llama_chat_format as _lcf
651
- for handler_name in ("Llava15ChatHandler", "MiniCPMv26ChatHandler", "Qwen25VLChatHandler", "MoondreamChatHandler"):
651
+ for handler_name in ("Qwen25VLChatHandler", "Llava15ChatHandler", "MiniCPMv26ChatHandler", "MoondreamChatHandler"):
652
652
  handler_cls = getattr(_lcf, handler_name, None)
653
653
  if handler_cls:
654
654
  try:
@@ -16,7 +16,7 @@ import shutil
16
16
  import subprocess
17
17
  import tempfile
18
18
  from pathlib import Path
19
- from typing import List, Optional, Tuple
19
+ from typing import Any, List, Optional, Tuple, Union
20
20
 
21
21
  try:
22
22
  from rich.console import Console
@@ -64,6 +64,119 @@ def is_image_file(path: str) -> bool:
64
64
  return Path(path).suffix.lower() in IMAGE_EXTENSIONS
65
65
 
66
66
 
67
+ def split_media_paths(raw_input: Any) -> List[str]:
68
+ """
69
+ Split user input into individual file paths.
70
+ Supports:
71
+ - Comma-separated: "path1", "path2" or path1, path2
72
+ - Space-separated: "path 1.mp4" "path 2.mp4" or v1.mp4 v2.mp4
73
+ - Lists / tuples of strings
74
+ - Windows / WSL paths with backslashes
75
+ """
76
+ if not raw_input:
77
+ return []
78
+ if isinstance(raw_input, (list, tuple)):
79
+ out = []
80
+ for item in raw_input:
81
+ out.extend(split_media_paths(item))
82
+ return [x for x in out if x]
83
+
84
+ s = str(raw_input).strip()
85
+ if not s:
86
+ return []
87
+
88
+ # Check if there is an unquoted comma
89
+ has_comma = False
90
+ in_dquote = False
91
+ in_squote = False
92
+ for ch in s:
93
+ if ch == '"' and not in_squote:
94
+ in_dquote = not in_dquote
95
+ elif ch == "'" and not in_dquote:
96
+ in_squote = not in_squote
97
+ elif ch == "," and not in_dquote and not in_squote:
98
+ has_comma = True
99
+ break
100
+
101
+ tokens: List[str] = []
102
+ if has_comma:
103
+ current: List[str] = []
104
+ in_dquote = False
105
+ in_squote = False
106
+ for ch in s:
107
+ if ch == '"' and not in_squote:
108
+ in_dquote = not in_dquote
109
+ elif ch == "'" and not in_dquote:
110
+ in_squote = not in_squote
111
+ elif ch == "," and not in_dquote and not in_squote:
112
+ part = "".join(current).strip().strip("'\"").strip()
113
+ if part:
114
+ tokens.append(part)
115
+ current = []
116
+ continue
117
+ current.append(ch)
118
+ part = "".join(current).strip().strip("'\"").strip()
119
+ if part:
120
+ tokens.append(part)
121
+ else:
122
+ # Match quoted strings or non-whitespace sequences
123
+ matches = re.finditer(r'"([^"]+)"|\'([^\']+)\'|(\S+)', s)
124
+ for m in matches:
125
+ val = m.group(1) or m.group(2) or m.group(3)
126
+ if val:
127
+ val = val.strip().strip("'\"").strip()
128
+ if val:
129
+ tokens.append(val)
130
+
131
+ return tokens
132
+
133
+
134
+ def normalize_media_path(raw_path: str, workdir: Optional[Path] = None) -> Optional[Path]:
135
+ r"""
136
+ Normalize a media file path, handling:
137
+ - Windows WSL UNC paths (e.g. \\wsl.localhost\Ubuntu\home\... or \\wsl$\Ubuntu\home\...)
138
+ - Windows drive paths (e.g. C:\Users\... or C:/Users/... -> /mnt/c/Users/...)
139
+ - Windows backslashes in Linux paths
140
+ - Relative paths resolved against workdir or cwd
141
+ - Tilde home expansion (~/)
142
+ """
143
+ if not raw_path:
144
+ return None
145
+ raw = str(raw_path).strip().strip("'\"").strip()
146
+ if not raw:
147
+ return None
148
+
149
+ # Handle ~ home expansion
150
+ if raw.startswith("~"):
151
+ raw = str(Path.home()) + raw[1:]
152
+
153
+ # Convert Windows backslashes to forward slashes
154
+ norm = raw.replace("\\", "/")
155
+
156
+ # 1. WSL UNC paths: //wsl.localhost/<distro>/... or //wsl$/<distro>/...
157
+ wsl_match = re.match(r"^//wsl(?:\.localhost|\$)/[^/]+(/.*)$", norm)
158
+ if wsl_match:
159
+ norm = wsl_match.group(1)
160
+ elif norm.startswith("//wsl.localhost/") or norm.startswith("//wsl$/"):
161
+ parts = norm.split("/", 4)
162
+ if len(parts) >= 5:
163
+ norm = "/" + parts[4]
164
+
165
+ # 2. Windows drive paths: C:/Users/... -> /mnt/c/Users/... on Linux/WSL
166
+ drive_match = re.match(r"^([a-zA-Z]):/(.*)$", norm)
167
+ if drive_match and os.name != "nt":
168
+ drive = drive_match.group(1).lower()
169
+ rest = drive_match.group(2)
170
+ norm = f"/mnt/{drive}/{rest}"
171
+
172
+ p = Path(norm)
173
+ if not p.is_absolute():
174
+ p = ((workdir or Path.cwd()) / p).resolve()
175
+ else:
176
+ p = p.resolve()
177
+ return p
178
+
179
+
67
180
  # ── Frame extraction via ffmpeg ───────────────────────────────────────
68
181
 
69
182
  def _get_video_duration(video_path: str) -> Optional[float]:
@@ -277,8 +390,8 @@ def download_youtube(url: str, output_dir: str = None) -> str:
277
390
 
278
391
  def build_media_content(
279
392
  task: str,
280
- image_path: Optional[str] = None,
281
- video_path: Optional[str] = None,
393
+ image_path: Optional[Union[str, List[str]]] = None,
394
+ video_path: Optional[Union[str, List[str]]] = None,
282
395
  url: Optional[str] = None,
283
396
  workdir: Path = None,
284
397
  ) -> list:
@@ -286,8 +399,8 @@ def build_media_content(
286
399
  Build a multimodal message content array from text + optional media.
287
400
 
288
401
  Handles:
289
- - image_path: single image → 1 image_url entry
290
- - video_path: video file → N frame image_url entries
402
+ - image_path: single image or multiple images (list or comma-separated)
403
+ - video_path: single or multiple video files → N frame image_url entries
291
404
  - url: YouTube URL → download + extract frames
292
405
 
293
406
  Returns:
@@ -296,45 +409,76 @@ def build_media_content(
296
409
  content = [{"type": "text", "text": task}]
297
410
  workdir = workdir or Path(".")
298
411
 
299
- # ── Image ──
412
+ # ── Image(s) ──
300
413
  if image_path:
301
- img_file = workdir / image_path if not Path(image_path).is_absolute() else Path(image_path)
302
- if img_file.exists():
303
- ext = img_file.suffix.lower().lstrip(".")
304
- mime = f"image/{'jpeg' if ext in ('jpg', 'jpeg') else ext}"
305
- b64 = base64.b64encode(img_file.read_bytes()).decode("utf-8")
306
- content.append({
307
- "type": "image_url",
308
- "image_url": {"url": f"data:{mime};base64,{b64}"},
309
- })
310
- if HAS_RICH:
311
- console.print(f"🖼️ Image loaded: {image_path}", style="cyan")
312
- else:
313
- if HAS_RICH:
314
- console.print(f"⚠️ Image not found: {image_path}", style="yellow")
315
-
316
- # ── Video file ──
317
- if video_path:
318
- vid_file = workdir / video_path if not Path(video_path).is_absolute() else Path(video_path)
319
- if vid_file.exists():
320
- if HAS_RICH:
321
- console.print(f"🎬 Extracting frames from: {video_path}...", style="cyan")
322
- try:
323
- frames = extract_frames(str(vid_file))
324
- for i, (mime, raw_bytes) in enumerate(frames):
325
- b64 = base64.b64encode(raw_bytes).decode("utf-8")
414
+ raw_imgs = split_media_paths(image_path)
415
+ valid_imgs = []
416
+ for im in raw_imgs:
417
+ ip = normalize_media_path(im, workdir=workdir)
418
+ if ip and ip.is_file():
419
+ valid_imgs.append((im, ip))
420
+ else:
421
+ if HAS_RICH:
422
+ console.print(f"⚠️ Image not found: {im}", style="yellow")
423
+ else:
424
+ print(f"⚠️ Image not found: {im}")
425
+
426
+ if valid_imgs:
427
+ num_imgs = len(valid_imgs)
428
+ for idx, (orig_str, img_file) in enumerate(valid_imgs, 1):
429
+ try:
430
+ ext = img_file.suffix.lower().lstrip(".")
431
+ mime = f"image/{'jpeg' if ext in ('jpg', 'jpeg') else ext}"
432
+ b64 = base64.b64encode(img_file.read_bytes()).decode("utf-8")
433
+ if num_imgs > 1:
434
+ content.append({"type": "text", "text": f"--- Image {idx}/{num_imgs}: {img_file.name} ---"})
326
435
  content.append({
327
436
  "type": "image_url",
328
437
  "image_url": {"url": f"data:{mime};base64,{b64}"},
329
438
  })
439
+ if HAS_RICH:
440
+ console.print(f"🖼️ Image loaded [{idx}/{num_imgs}]: {img_file.name}", style="cyan")
441
+ except Exception as e:
442
+ if HAS_RICH:
443
+ console.print(f" ❌ Failed to load image {img_file.name}: {e}", style="red")
444
+
445
+ # ── Video file(s) ──
446
+ if video_path:
447
+ raw_vids = split_media_paths(video_path)
448
+ valid_vids = []
449
+ for v in raw_vids:
450
+ vp = normalize_media_path(v, workdir=workdir)
451
+ if vp and vp.is_file():
452
+ valid_vids.append((v, vp))
453
+ else:
330
454
  if HAS_RICH:
331
- console.print(f" ✅ Extracted {len(frames)} frames", style="green")
332
- except RuntimeError as e:
455
+ console.print(f"⚠️ Video not found: {v}", style="yellow")
456
+ else:
457
+ print(f"⚠️ Video not found: {v}")
458
+
459
+ if valid_vids:
460
+ num_vids = len(valid_vids)
461
+ frames_per_vid = MAX_FRAMES if num_vids <= 1 else max(3, min(6, 18 // num_vids))
462
+
463
+ for idx, (orig_str, vid_file) in enumerate(valid_vids, 1):
333
464
  if HAS_RICH:
334
- console.print(f" ❌ {e}", style="red")
335
- else:
336
- if HAS_RICH:
337
- console.print(f"⚠️ Video not found: {video_path}", style="yellow")
465
+ console.print(f"🎬 Extracting frames from [{idx}/{num_vids}]: {vid_file.name}...", style="cyan")
466
+ try:
467
+ frames = extract_frames(str(vid_file), max_frames=frames_per_vid)
468
+ if frames:
469
+ header = f"--- Video {idx}/{num_vids}: {vid_file.name} ({len(frames)} keyframes) ---"
470
+ content.append({"type": "text", "text": header})
471
+ for i, (mime, raw_bytes) in enumerate(frames):
472
+ b64 = base64.b64encode(raw_bytes).decode("utf-8")
473
+ content.append({
474
+ "type": "image_url",
475
+ "image_url": {"url": f"data:{mime};base64,{b64}"},
476
+ })
477
+ if HAS_RICH:
478
+ console.print(f" ✅ Extracted {len(frames)} frames from {vid_file.name}", style="green")
479
+ except RuntimeError as e:
480
+ if HAS_RICH:
481
+ console.print(f" ❌ {e}", style="red")
338
482
 
339
483
  # ── YouTube URL ──
340
484
  if url and is_youtube_url(url):
@@ -892,10 +892,10 @@ class AgentOrchestrator:
892
892
  # Truncation cleanup: If any tool call was truncated, condense its arguments before saving to context
893
893
  # to prevent massive truncated strings (15k+ chars) from exhausting the context window on subsequent turns
894
894
  for tc in resp.tool_calls or []:
895
+ import json as _json
895
896
  tc_args = tc.arguments if isinstance(tc.arguments, dict) else {}
896
897
  if isinstance(tc.arguments, str):
897
898
  try:
898
- import json as _json
899
899
  tc_args = _json.loads(tc.arguments)
900
900
  except Exception:
901
901
  tc_args = {}
@@ -493,7 +493,7 @@ Strictly software engineering. For technical tasks, bypass all non-applicable ge
493
493
  - All unit tests MUST finish in under 0.05 seconds.
494
494
 
495
495
  - For single-file tasks, write complete code on Turn 1. Verify by running it.
496
- - For multi-file projects (HTML/CSS/JS or backend+frontend):
496
+ - For multi-file frontend web projects (when explicitly asked to build an HTML/CSS/JS website):
497
497
  * Write EXACTLY ONE complete file per turn (Turn 1: index.html, Turn 2: styles.css, Turn 3: app.js).
498
498
  * index.html: Semantic HTML5, navbar with #theme-toggle button, modals with #close-btn, forms (#rsvp-form), explicit IDs.
499
499
  * styles.css: Light-mode first (clean white/slate), CSS variables (:root and [data-theme='dark']), responsive Grid/Flexbox.
@@ -78,7 +78,7 @@ if HAS_FASTAPI:
78
78
  "status": "online",
79
79
  "mode": "offline" if is_offline else "online",
80
80
  "backend": backend_name,
81
- "model": getattr(getattr(app.state, "cfg", None), "model", "alpie_9b"),
81
+ "model": getattr(getattr(app.state, "cfg", None), "model", "alpie_seed"),
82
82
  "available": is_avail,
83
83
  "uptime_seconds": round(uptime, 2),
84
84
  "version": "0.9.2",
@@ -46,7 +46,7 @@ class Session:
46
46
  def to_dict(self) -> Dict[str, Any]:
47
47
  """Serialize session state for disk persistence."""
48
48
  msgs = getattr(self.context, "all_messages", self.context.messages)
49
- return {
49
+ res = {
50
50
  "id": self.id,
51
51
  "workdir": str(self.workdir.resolve()),
52
52
  "created_at": self.created_at,
@@ -56,6 +56,11 @@ class Session:
56
56
  "system_prompt": getattr(self.context, "system_prompt", ""),
57
57
  "messages": msgs,
58
58
  }
59
+ for attr in ("active_video", "active_videos", "active_image", "active_images", "active_url", "active_github"):
60
+ val = getattr(self, attr, None)
61
+ if val is not None:
62
+ res[attr] = val
63
+ return res
59
64
 
60
65
 
61
66
  class SessionManager:
@@ -145,6 +150,10 @@ class SessionManager:
145
150
  session.updated_at = data.get("updated_at", time.time())
146
151
  session.is_offline = data.get("is_offline", False)
147
152
 
153
+ for attr in ("active_video", "active_videos", "active_image", "active_images", "active_url", "active_github"):
154
+ if attr in data:
155
+ setattr(session, attr, data[attr])
156
+
148
157
  if data.get("system_prompt"):
149
158
  session.context.set_system_prompt(data["system_prompt"])
150
159