daveloop 1.3.0__py3-none-any.whl → 1.4.0__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: daveloop
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Self-healing debug agent powered by Claude Code CLI
5
5
  Home-page: https://github.com/davebruzil/DaveLoop
6
6
  Author: Dave Bruzil
@@ -0,0 +1,7 @@
1
+ daveloop.py,sha256=vO_mKj_kSciLmupY_GAw3qkRp4Axo6rsrTJx-lhFIZc,53540
2
+ daveloop_swebench.py,sha256=iD9AU3XRiMQpt7TknFNlvnmPCNp64V-JaTfqTFgsGBM,15996
3
+ daveloop-1.4.0.dist-info/METADATA,sha256=KFXheqH4I1_XexxlhPXlXnMRNzeYEVDnDKCGydjFqEg,10463
4
+ daveloop-1.4.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
5
+ daveloop-1.4.0.dist-info/entry_points.txt,sha256=QcFAZgFrDfPtIikNQb7eW9DxOpBK7T-qWrKqbGAS9Ww,86
6
+ daveloop-1.4.0.dist-info/top_level.txt,sha256=36DiYt70m4DIK8t7IhV_y6hAzUIyeb5-qDUf3-gbDdg,27
7
+ daveloop-1.4.0.dist-info/RECORD,,
daveloop.py CHANGED
@@ -20,6 +20,8 @@ MAX_ITERATIONS = 20
20
20
  DEFAULT_TIMEOUT = 600 # 10 minutes in seconds
21
21
  SCRIPT_DIR = Path(__file__).parent
22
22
  PROMPT_FILE = SCRIPT_DIR / "daveloop_prompt.md"
23
+ MAESTRO_PROMPT_FILE = SCRIPT_DIR / "daveloop_maestro_prompt.md"
24
+ WEB_PROMPT_FILE = SCRIPT_DIR / "daveloop_web_prompt.md"
23
25
  LOG_DIR = SCRIPT_DIR / "logs"
24
26
 
25
27
  # Exit signals from Claude Code
@@ -493,6 +495,24 @@ def load_prompt() -> str:
493
495
  return "You are debugging. Fix the bug. Output [DAVELOOP:RESOLVED] when done."
494
496
 
495
497
 
498
+ def load_maestro_prompt() -> str:
499
+ """Load the Maestro mobile testing prompt."""
500
+ if MAESTRO_PROMPT_FILE.exists():
501
+ return MAESTRO_PROMPT_FILE.read_text(encoding="utf-8")
502
+ else:
503
+ print_warning_box(f"Maestro prompt file not found: {MAESTRO_PROMPT_FILE}")
504
+ return None
505
+
506
+
507
+ def load_web_prompt() -> str:
508
+ """Load the Web UI testing prompt."""
509
+ if WEB_PROMPT_FILE.exists():
510
+ return WEB_PROMPT_FILE.read_text(encoding="utf-8")
511
+ else:
512
+ print_warning_box(f"Web prompt file not found: {WEB_PROMPT_FILE}")
513
+ return None
514
+
515
+
496
516
  def find_claude_cli():
497
517
  """Find Claude CLI executable path."""
498
518
  import platform
@@ -837,6 +857,8 @@ def main():
837
857
  parser.add_argument("-t", "--timeout", type=int, default=DEFAULT_TIMEOUT,
838
858
  help="Timeout per iteration in seconds (default: 600)")
839
859
  parser.add_argument("-v", "--verbose", action="store_true", help="Verbose output")
860
+ parser.add_argument("--maestro", action="store_true", help="Enable Maestro mobile testing mode")
861
+ parser.add_argument("--web", action="store_true", help="Enable Playwright web UI testing mode")
840
862
 
841
863
  args = parser.parse_args()
842
864
 
@@ -863,6 +885,14 @@ def main():
863
885
  # Setup
864
886
  session_id = datetime.now().strftime("%Y%m%d_%H%M%S")
865
887
  system_prompt = load_prompt()
888
+ if args.maestro:
889
+ maestro_prompt = load_maestro_prompt()
890
+ if maestro_prompt:
891
+ system_prompt = system_prompt + "\n\n---\n\n" + maestro_prompt
892
+ elif args.web:
893
+ web_prompt = load_web_prompt()
894
+ if web_prompt:
895
+ system_prompt = system_prompt + "\n\n---\n\n" + web_prompt
866
896
  working_dir = args.dir or os.getcwd()
867
897
 
868
898
  # Load session history
@@ -876,7 +906,8 @@ def main():
876
906
  print_status("Iterations", str(args.max_iterations), C.WHITE)
877
907
  print_status("Timeout", f"{args.timeout // 60}m per iteration", C.WHITE)
878
908
  print_status("Tasks", str(len(bug_descriptions)), C.WHITE)
879
- print_status("Mode", "Autonomous", C.WHITE)
909
+ mode_name = "Maestro Mobile Testing" if args.maestro else "Playwright Web Testing" if args.web else "Autonomous"
910
+ print_status("Mode", mode_name, C.WHITE)
880
911
  print(f"{C.BRIGHT_BLUE}└{'─' * 70}┘{C.RESET}")
881
912
 
882
913
  # Build task queue
@@ -907,15 +938,60 @@ def main():
907
938
  bug_input = task["description"]
908
939
  task_queue.summary_display()
909
940
 
910
- print_section("BUG REPORT", C.BRIGHT_RED)
941
+ if args.maestro:
942
+ print_section("MAESTRO TASK", C.BRIGHT_CYAN)
943
+ section_color = C.BRIGHT_CYAN
944
+ elif args.web:
945
+ print_section("WEB UI TASK", C.BRIGHT_MAGENTA)
946
+ section_color = C.BRIGHT_MAGENTA
947
+ else:
948
+ print_section("BUG REPORT", C.BRIGHT_RED)
949
+ section_color = C.BRIGHT_RED
911
950
  for line in bug_input.split('\n')[:8]:
912
- print(f" {C.BRIGHT_RED}{line[:70]}{C.RESET}")
951
+ print(f" {section_color}{line[:70]}{C.RESET}")
913
952
  if len(bug_input.split('\n')) > 8:
914
- print(f" {C.RED}... +{len(bug_input.split(chr(10))) - 8} more lines{C.RESET}")
953
+ print(f" {section_color}... +{len(bug_input.split(chr(10))) - 8} more lines{C.RESET}")
915
954
  sys.stdout.flush()
916
955
 
917
956
  # Initial context for this task
918
- context = f"""
957
+ if args.maestro:
958
+ context = f"""
959
+ ## Maestro Mobile Testing Task
960
+
961
+ {bug_input}
962
+ {history_context}
963
+
964
+ ## Instructions
965
+
966
+ 1. First, detect connected devices/emulators (run `adb devices` and/or `xcrun simctl list devices available`)
967
+ 2. If no device is found, auto-launch an emulator/simulator
968
+ 3. Ensure the target app is installed on the device
969
+ 4. Proceed with the Maestro testing task described above
970
+ 5. Before declaring success, verify by running the flow(s) 3 consecutive times - all must pass
971
+
972
+ Use the reasoning protocol before each action.
973
+ """
974
+ elif args.web:
975
+ context = f"""
976
+ ## Web UI Testing Task
977
+
978
+ {bug_input}
979
+ {history_context}
980
+
981
+ ## Instructions
982
+
983
+ 1. First, explore the project to detect the framework and find the dev server command
984
+ 2. Install Playwright if not already installed (`npm install -D @playwright/test && npx playwright install chromium`)
985
+ 3. Start the dev server if not already running
986
+ 4. Read the source code to understand the UI components, especially any gesture/drag/interactive elements
987
+ 5. Write Playwright tests in an `e2e/` directory that test the app like a real human would - use actual mouse movements, drags, clicks, hovers, keyboard input
988
+ 6. Test gestures and buttons SEPARATELY - a working button does not prove the gesture works
989
+ 7. Before declaring success, verify by running the tests 3 consecutive times - all must pass
990
+
991
+ Use the reasoning protocol before each action.
992
+ """
993
+ else:
994
+ context = f"""
919
995
  ## Bug Report
920
996
 
921
997
  {bug_input}
@@ -1063,7 +1139,29 @@ Continue debugging with this information. Use the reasoning protocol before each
1063
1139
  break # Move to next task
1064
1140
 
1065
1141
  # Prepare context for next iteration
1066
- context = f"""
1142
+ if args.maestro:
1143
+ context = f"""
1144
+ ## Iteration {iteration + 1}
1145
+
1146
+ The Maestro flow(s) are NOT yet passing reliably. You have full context from previous iterations.
1147
+
1148
+ Continue working on the flows. Check device status, inspect the UI hierarchy, fix selectors or timing issues, and re-run.
1149
+ Remember: all flows must pass 3 consecutive times before resolving.
1150
+ Use the reasoning protocol before each action.
1151
+ """
1152
+ elif args.web:
1153
+ context = f"""
1154
+ ## Iteration {iteration + 1}
1155
+
1156
+ The Playwright tests are NOT yet passing reliably. You have full context from previous iterations.
1157
+
1158
+ Continue working on the tests. Check selectors, timing, server status, and re-run.
1159
+ Make sure you are testing like a real human - use actual mouse gestures, not just button clicks.
1160
+ Remember: all tests must pass 3 consecutive times before resolving.
1161
+ Use the reasoning protocol before each action.
1162
+ """
1163
+ else:
1164
+ context = f"""
1067
1165
  ## Iteration {iteration + 1}
1068
1166
 
1069
1167
  The bug is NOT yet resolved. You have full context from previous iterations.
@@ -1,7 +0,0 @@
1
- daveloop.py,sha256=Htq9-ga4EPeyfIUW2Llq6yz7TJi4umfWD7-zlQPGZLs,49406
2
- daveloop_swebench.py,sha256=iD9AU3XRiMQpt7TknFNlvnmPCNp64V-JaTfqTFgsGBM,15996
3
- daveloop-1.3.0.dist-info/METADATA,sha256=eOrj3xTjeHWdrS9_Y87_H3KfHYa3KOtv5fXBDDC485w,10463
4
- daveloop-1.3.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
5
- daveloop-1.3.0.dist-info/entry_points.txt,sha256=QcFAZgFrDfPtIikNQb7eW9DxOpBK7T-qWrKqbGAS9Ww,86
6
- daveloop-1.3.0.dist-info/top_level.txt,sha256=36DiYt70m4DIK8t7IhV_y6hAzUIyeb5-qDUf3-gbDdg,27
7
- daveloop-1.3.0.dist-info/RECORD,,