alpiecode 10.8.9__tar.gz → 10.9.0__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 (133) hide show
  1. {alpiecode-10.8.9 → alpiecode-10.9.0}/PKG-INFO +1 -1
  2. {alpiecode-10.8.9 → alpiecode-10.9.0}/pyproject.toml +1 -1
  3. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/alpiecode.egg-info/PKG-INFO +1 -1
  4. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/__init__.py +1 -1
  5. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/blueprints.py +125 -38
  6. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_lifecycle_and_portfolio.py +23 -0
  7. {alpiecode-10.8.9 → alpiecode-10.9.0}/README.md +0 -0
  8. {alpiecode-10.8.9 → alpiecode-10.9.0}/setup.cfg +0 -0
  9. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/alpiecode/__init__.py +0 -0
  10. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/alpiecode.egg-info/SOURCES.txt +0 -0
  11. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/alpiecode.egg-info/dependency_links.txt +0 -0
  12. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/alpiecode.egg-info/entry_points.txt +0 -0
  13. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/alpiecode.egg-info/requires.txt +0 -0
  14. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/alpiecode.egg-info/top_level.txt +0 -0
  15. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/agent.py +0 -0
  16. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/assessment.py +0 -0
  17. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/backends/__init__.py +0 -0
  18. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/backends/base.py +0 -0
  19. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/backends/local_backend.py +0 -0
  20. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/backends/openai_backend.py +0 -0
  21. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/cache.py +0 -0
  22. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/cli.py +0 -0
  23. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/client.py +0 -0
  24. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/compaction.py +0 -0
  25. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/config.py +0 -0
  26. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/context.py +0 -0
  27. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/diff_preview.py +0 -0
  28. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/discovery.py +0 -0
  29. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/doctor.py +0 -0
  30. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/dream_rsi.py +0 -0
  31. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/executor.py +0 -0
  32. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/git_ops.py +0 -0
  33. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/github.py +0 -0
  34. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/guardian.py +0 -0
  35. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/guardrails.py +0 -0
  36. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/ipython_ext.py +0 -0
  37. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/local_model.py +0 -0
  38. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/media.py +0 -0
  39. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/memory.py +0 -0
  40. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/metrics.py +0 -0
  41. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/orchestrator.py +0 -0
  42. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/paths.py +0 -0
  43. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/progress.py +0 -0
  44. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/project_template.py +0 -0
  45. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/prompt.py +0 -0
  46. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/rephraser.py +0 -0
  47. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/server.py +0 -0
  48. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/session.py +0 -0
  49. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/accessibility-audit/SKILL.md +0 -0
  50. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/accessibility-testing/SKILL.md +0 -0
  51. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/accessibility-ui-components/SKILL.md +0 -0
  52. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/agentic-workflows/SKILL.md +0 -0
  53. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/api-design/SKILL.md +0 -0
  54. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/architecture-design/SKILL.md +0 -0
  55. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/backend-engineering/SKILL.md +0 -0
  56. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/browser-automation/SKILL.md +0 -0
  57. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/cli-development/SKILL.md +0 -0
  58. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/cloud-infrastructure/SKILL.md +0 -0
  59. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/code-generation/SKILL.md +0 -0
  60. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/code-review/SKILL.md +0 -0
  61. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/codebase-onboarding/SKILL.md +0 -0
  62. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/cost-optimization/SKILL.md +0 -0
  63. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/data-analysis/SKILL.md +0 -0
  64. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/data-engineering/SKILL.md +0 -0
  65. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/database-engineering/SKILL.md +0 -0
  66. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/dependency-management/SKILL.md +0 -0
  67. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/dependency-security/SKILL.md +0 -0
  68. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/dependency-upgrades/SKILL.md +0 -0
  69. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/devops-ci-cd/SKILL.md +0 -0
  70. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/docker-containers/SKILL.md +0 -0
  71. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/documentation/SKILL.md +0 -0
  72. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/documentation-site/SKILL.md +0 -0
  73. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/e2e-testing/SKILL.md +0 -0
  74. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/error-handling-resilience/SKILL.md +0 -0
  75. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/feature-development/SKILL.md +0 -0
  76. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/frontend-engineering/SKILL.md +0 -0
  77. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/git-workflow/SKILL.md +0 -0
  78. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/incident-response/SKILL.md +0 -0
  79. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/legacy-code-modernization/SKILL.md +0 -0
  80. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/llm-application-engineering/SKILL.md +0 -0
  81. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/localization-i18n/SKILL.md +0 -0
  82. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/mcp-server-development/SKILL.md +0 -0
  83. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/migration-engineering/SKILL.md +0 -0
  84. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/mobile-development/SKILL.md +0 -0
  85. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/model-evaluation/SKILL.md +0 -0
  86. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/nodejs-services/SKILL.md +0 -0
  87. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/observability/SKILL.md +0 -0
  88. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/performance-optimization/SKILL.md +0 -0
  89. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/privacy-data-protection/SKILL.md +0 -0
  90. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/prompt-engineering/SKILL.md +0 -0
  91. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/python-engineering/SKILL.md +0 -0
  92. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/rag-retrieval/SKILL.md +0 -0
  93. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/react-engineering/SKILL.md +0 -0
  94. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/release-management/SKILL.md +0 -0
  95. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/requirements-analysis/SKILL.md +0 -0
  96. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/responsive-design/SKILL.md +0 -0
  97. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/safe-refactoring/SKILL.md +0 -0
  98. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/secure-coding/SKILL.md +0 -0
  99. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/systematic-debugging/SKILL.md +0 -0
  100. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/technical-planning/SKILL.md +0 -0
  101. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/technical-research/SKILL.md +0 -0
  102. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/technical-writing/SKILL.md +0 -0
  103. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/test-engineering/SKILL.md +0 -0
  104. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/tool-integration/SKILL.md +0 -0
  105. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/typescript-engineering/SKILL.md +0 -0
  106. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/visual-regression-testing/SKILL.md +0 -0
  107. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/web-performance/SKILL.md +0 -0
  108. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/web-security-testing/SKILL.md +0 -0
  109. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills/workflow-automation/SKILL.md +0 -0
  110. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/skills.py +0 -0
  111. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/slash.py +0 -0
  112. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/subagent.py +0 -0
  113. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/system1.py +0 -0
  114. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/tools.py +0 -0
  115. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/updater.py +0 -0
  116. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/verifier.py +0 -0
  117. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/vscode_installer.py +0 -0
  118. {alpiecode-10.8.9 → alpiecode-10.9.0}/src/codeagent/walkthrough.py +0 -0
  119. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_adaptive_resilience.py +0 -0
  120. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_cli_ui.py +0 -0
  121. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_context_and_trajectory.py +0 -0
  122. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_deloop_and_sessions.py +0 -0
  123. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_dream_rsi.py +0 -0
  124. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_local_model_download.py +0 -0
  125. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_non_thinking_and_local_stream.py +0 -0
  126. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_project_templates.py +0 -0
  127. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_skills_engine.py +0 -0
  128. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_slash_and_diff.py +0 -0
  129. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_subagents.py +0 -0
  130. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_task_assessment.py +0 -0
  131. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_verifier.py +0 -0
  132. {alpiecode-10.8.9 → alpiecode-10.9.0}/test/test_walkthrough.py +0 -0
  133. {alpiecode-10.8.9 → alpiecode-10.9.0}/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.8.9
3
+ Version: 10.9.0
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.8.9"
7
+ version = "10.9.0"
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.8.9
3
+ Version: 10.9.0
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.8.9"
20
+ __version__ = "10.9.0"
21
21
 
22
22
  def run(task: str, workdir: str = ".", reasoning_level: str = "thinking", **kwargs):
23
23
  """Run an autonomous coding task programmatically."""
@@ -536,9 +536,114 @@ def is_ambiguous_web_task(task: str) -> bool:
536
536
  return True
537
537
 
538
538
 
539
+ def _read_terminal_key() -> str:
540
+ """Read a single keypress or escape sequence from terminal in raw mode."""
541
+ import sys
542
+ if sys.platform == "win32":
543
+ try:
544
+ import msvcrt
545
+ ch = msvcrt.getch()
546
+ if ch in (b"\x00", b"\xe0"):
547
+ ch2 = msvcrt.getch()
548
+ if ch2 == b"H":
549
+ return "up"
550
+ if ch2 == b"P":
551
+ return "down"
552
+ return ""
553
+ if ch in (b"\r", b"\n"):
554
+ return "enter"
555
+ if ch == b"\x03":
556
+ raise KeyboardInterrupt
557
+ return ch.decode("utf-8", errors="ignore")
558
+ except Exception:
559
+ return ""
560
+ else:
561
+ import tty, termios, select
562
+ fd = sys.stdin.fileno()
563
+ old_settings = termios.tcgetattr(fd)
564
+ try:
565
+ tty.setraw(fd)
566
+ ch = sys.stdin.read(1)
567
+ if ch == "\x1b":
568
+ r, _, _ = select.select([sys.stdin], [], [], 0.05)
569
+ if r:
570
+ ch2 = sys.stdin.read(1)
571
+ if ch2 in ("[", "O"):
572
+ ch3 = sys.stdin.read(1)
573
+ if ch3 == "A":
574
+ return "up"
575
+ elif ch3 == "B":
576
+ return "down"
577
+ return "esc"
578
+ elif ch in ("\r", "\n"):
579
+ return "enter"
580
+ elif ch == "\x03":
581
+ raise KeyboardInterrupt
582
+ return ch
583
+ finally:
584
+ termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
585
+
586
+
587
+ def _interactive_arrow_select(title: str, options: list, default_index: int = 0) -> int:
588
+ """
589
+ Render an interactive Up/Down arrow selection menu in the terminal.
590
+ Allows navigating with Up/Down arrows (or j/k) and confirming with Enter.
591
+ """
592
+ import sys
593
+ selected = default_index
594
+ total = len(options)
595
+
596
+ # Hide cursor
597
+ sys.stdout.write("\x1b[?25l")
598
+ sys.stdout.flush()
599
+
600
+ first_render = True
601
+ try:
602
+ while True:
603
+ lines = []
604
+ lines.append(f"\x1b[1;33m? \x1b[1;37m{title}\x1b[0m")
605
+ for i, (name, desc) in enumerate(options):
606
+ if i == selected:
607
+ lines.append(f" \x1b[1;36m❯ {name}\x1b[0m \x1b[2m— {desc}\x1b[0m")
608
+ else:
609
+ lines.append(f" \x1b[37m{name}\x1b[0m \x1b[2m— {desc}\x1b[0m")
610
+ lines.append("\x1b[2m (Use ↑/↓ arrow keys to navigate, press Enter to select)\x1b[0m")
611
+
612
+ if not first_render:
613
+ sys.stdout.write(f"\r\x1b[{len(lines)}A\x1b[J")
614
+
615
+ sys.stdout.write("\n".join(lines) + "\n")
616
+ sys.stdout.flush()
617
+ first_render = False
618
+
619
+ key = _read_terminal_key()
620
+ if key in ("up", "k"):
621
+ selected = (selected - 1) % total
622
+ elif key in ("down", "j"):
623
+ selected = (selected + 1) % total
624
+ elif key in ("enter", " "):
625
+ break
626
+ elif key.isdigit() and 1 <= int(key) <= total:
627
+ selected = int(key) - 1
628
+ break
629
+ elif key == "esc":
630
+ break
631
+
632
+ # Clear menu and print confirmation line
633
+ sys.stdout.write(f"\r\x1b[{len(options) + 2}A\x1b[J")
634
+ chosen_name = options[selected][0]
635
+ sys.stdout.write(f"\x1b[1;32m✔\x1b[0m \x1b[1m{title}\x1b[0m \x1b[1;36m{chosen_name}\x1b[0m\n\n")
636
+ sys.stdout.flush()
637
+ return selected
638
+
639
+ finally:
640
+ sys.stdout.write("\x1b[?25h")
641
+ sys.stdout.flush()
642
+
643
+
539
644
  def prompt_website_framework_choice(task: str) -> str:
540
645
  """
541
- Prompt user via interactive terminal to choose their preferred tech stack:
646
+ Prompt user via interactive terminal using Up/Down arrow keys and Enter to select:
542
647
  1. Vanilla (Pure HTML5/CSS3/Vanilla JS)
543
648
  2. React.js
544
649
  3. Vue.js
@@ -550,49 +655,31 @@ def prompt_website_framework_choice(task: str) -> str:
550
655
  if not sys.stdin or not hasattr(sys.stdin, "isatty") or not sys.stdin.isatty():
551
656
  return f"{task} using Vanilla HTML5/CSS3/JavaScript"
552
657
 
658
+ framework_options = [
659
+ ("Vanilla", "Pure HTML5 + Modern CSS3 + Vanilla JS (Zero dependencies, instant browser load)"),
660
+ ("React.js", "Modern React component architecture with hooks & modular state"),
661
+ ("Vue.js", "Vue 3 Single Page Application with reactive Composition API"),
662
+ ("Angular", "Enterprise TypeScript framework with modular standalone components"),
663
+ ("Golang", "Go net/http server with HTML templates & REST API endpoints"),
664
+ ]
665
+
553
666
  try:
554
- from rich.console import Console
555
- from rich.panel import Panel
556
- from rich.table import Table
557
- console = Console()
558
- console.print()
559
-
560
- table = Table(show_header=False, box=None, padding=(0, 2))
561
- table.add_column("Key", style="bold cyan")
562
- table.add_column("Framework", style="bold white")
563
- table.add_column("Description", style="dim")
564
- table.add_row("1", "Vanilla", "Pure HTML5 + Modern CSS3 + Vanilla JS (Zero dependencies, instant browser load)")
565
- table.add_row("2", "React.js", "Modern React component architecture with hooks & modular state")
566
- table.add_row("3", "Vue.js", "Vue 3 Single Page Application with reactive Composition API")
567
- table.add_row("4", "Angular", "Enterprise TypeScript framework with modular standalone components")
568
- table.add_row("5", "Golang", "Go net/http server with HTML templates & REST API endpoints")
569
-
570
- console.print(Panel(
571
- table,
572
- title="[bold yellow]🌐 Select Website Tech Stack[/bold yellow]",
573
- subtitle="[dim]Choose 1-5 or framework name (default: 1 - Vanilla)[/dim]",
574
- border_style="cyan",
575
- ))
576
- choice = console.input("[bold green]Choose framework (1-5) ❯[/bold green] ").strip().lower()
667
+ idx = _interactive_arrow_select(
668
+ title="Which tech stack would you like to build your website with?",
669
+ options=framework_options,
670
+ default_index=0,
671
+ )
577
672
  except Exception:
578
- print("\n🌐 Select Website Tech Stack:")
579
- print(" 1. Vanilla (Pure HTML5 + Modern CSS3 + Vanilla JS)")
580
- print(" 2. React.js")
581
- print(" 3. Vue.js")
582
- print(" 4. Angular")
583
- print(" 5. Golang")
584
- try:
585
- choice = input("Choose framework (1-5) [1]: ").strip().lower()
586
- except Exception:
587
- choice = "1"
673
+ # Fallback to Vanilla if raw mode or termios fails
674
+ return f"{task} using Vanilla HTML5/CSS3/JavaScript"
588
675
 
589
- if choice in ("2", "react", "reactjs", "react.js"):
676
+ if idx == 1:
590
677
  return f"{task} using React.js"
591
- elif choice in ("3", "vue", "vuejs", "vue.js"):
678
+ elif idx == 2:
592
679
  return f"{task} using Vue.js"
593
- elif choice in ("4", "angular", "angularjs"):
680
+ elif idx == 3:
594
681
  return f"{task} using Angular"
595
- elif choice in ("5", "golang", "go"):
682
+ elif idx == 4:
596
683
  return f"{task} using Golang"
597
684
  else:
598
685
  return f"{task} using Vanilla HTML5/CSS3/JavaScript"
@@ -274,3 +274,26 @@ class TestDomainBlueprintsAndTheming:
274
274
  assert "main.go" in bp_go_web.target_files
275
275
  assert "templates/index.html" in bp_go_web.target_files
276
276
  assert "net/http" in bp_go_web.render_contract()
277
+
278
+ def test_interactive_arrow_selection_navigation(self, monkeypatch):
279
+ from codeagent.blueprints import _interactive_arrow_select
280
+
281
+ options = [
282
+ ("Vanilla", "HTML/CSS/JS"),
283
+ ("React.js", "React hooks"),
284
+ ("Vue.js", "Vue 3"),
285
+ ("Angular", "TypeScript"),
286
+ ("Golang", "Go net/http"),
287
+ ]
288
+
289
+ # Case 1: Press 'down' then 'enter' -> Selects index 1 (React.js)
290
+ key_seq = iter(["down", "enter"])
291
+ monkeypatch.setattr("codeagent.blueprints._read_terminal_key", lambda: next(key_seq))
292
+ idx = _interactive_arrow_select("Choose framework", options, default_index=0)
293
+ assert idx == 1
294
+
295
+ # Case 2: Press 'up' then 'enter' -> Wraps around to index 4 (Golang)
296
+ key_seq2 = iter(["up", "enter"])
297
+ monkeypatch.setattr("codeagent.blueprints._read_terminal_key", lambda: next(key_seq2))
298
+ idx2 = _interactive_arrow_select("Choose framework", options, default_index=0)
299
+ assert idx2 == 4
File without changes
File without changes