computer-use-ootb-internal 0.0.185__tar.gz → 0.0.187__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 (44) hide show
  1. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/PKG-INFO +1 -1
  2. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/pyproject.toml +1 -1
  3. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/app_teachmode.py +14 -0
  4. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/preparation/excel_prepare.py +11 -8
  5. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/preparation/powerpoint_prepare.py +11 -8
  6. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/preparation/pr_prepare.py +14 -9
  7. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/preparation/word_prepare.py +11 -8
  8. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/.gitignore +0 -0
  9. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/README.md +0 -0
  10. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/__init__.py +0 -0
  11. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/animation/click_animation.py +0 -0
  12. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/animation/icons8-select-cursor-transparent-96.gif +0 -0
  13. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/animation/test_animation.py +0 -0
  14. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/executor/teachmode_executor.py +0 -0
  15. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/__init__.py +0 -0
  16. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/gui_capture.py +0 -0
  17. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/utils.py +0 -0
  18. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/__init__.py +0 -0
  19. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/screenshot_cli.py +0 -0
  20. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/screenshot_service.py +0 -0
  21. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/llm_utils.py +0 -0
  22. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/oai.py +0 -0
  23. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/run_litellm.py +0 -0
  24. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/run_llm.py +0 -0
  25. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/__init__.py +0 -0
  26. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/aws_request.py +0 -0
  27. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/base.py +0 -0
  28. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/bash.py +0 -0
  29. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/collection.py +0 -0
  30. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/colorful_text.py +0 -0
  31. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/computer.py +0 -0
  32. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/computer_marbot.py +0 -0
  33. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/edit.py +0 -0
  34. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/run.py +0 -0
  35. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py +0 -0
  36. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/dependency_check.py +0 -0
  37. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/guard_service.py +0 -0
  38. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/preparation/__init__.py +0 -0
  39. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/preparation/star_rail_prepare.py +0 -0
  40. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/requirements-lite.txt +0 -0
  41. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/run_teachmode_ootb_args.py +0 -0
  42. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/service_manager.py +0 -0
  43. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/signal_connection.py +0 -0
  44. {computer_use_ootb_internal-0.0.185 → computer_use_ootb_internal-0.0.187}/src/computer_use_ootb_internal/test_autogui.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: computer-use-ootb-internal
3
- Version: 0.0.185
3
+ Version: 0.0.187
4
4
  Summary: Computer Use OOTB
5
5
  Author-email: Siyuan Hu <siyuan.hu.sg@gmail.com>
6
6
  Requires-Python: >=3.11
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "computer-use-ootb-internal"
7
- version = "0.0.185"
7
+ version = "0.0.187"
8
8
  description = "Computer Use OOTB"
9
9
  authors = [{ name = "Siyuan Hu", email = "siyuan.hu.sg@gmail.com" }]
10
10
  requires-python = ">=3.11"
@@ -55,6 +55,20 @@ except Exception as log_setup_e:
55
55
  print(f"FATAL: Failed to set up logging: {log_setup_e}")
56
56
  # Fallback logging might be needed here if file logging fails
57
57
 
58
+ # --- Get the root logger ---
59
+ root_logger = logging.getLogger()
60
+ root_logger.setLevel(log_level) # Ensure root logger level is set
61
+
62
+ # --- File Handler (as before) ---
63
+ file_handler = RotatingFileHandler(log_file, maxBytes=5*1024*1024, backupCount=2, encoding='utf-8')
64
+ file_handler.setFormatter(logging.Formatter(log_format))
65
+ root_logger.addHandler(file_handler)
66
+
67
+ # --- Console Handler (New) ---
68
+ console_handler = logging.StreamHandler(sys.stdout) # Log to standard output
69
+ console_handler.setFormatter(logging.Formatter(log_format))
70
+ root_logger.addHandler(console_handler)
71
+
58
72
  # --- End App Logging Setup ---
59
73
 
60
74
  app = FastAPI()
@@ -79,17 +79,20 @@ def run_preparation(state):
79
79
  # Check if template exists and construct command accordingly
80
80
  if template_file.exists():
81
81
  log.info(f"Template file found. Attempting to open {template_file} with Excel maximized...")
82
- cmd_args = ['EXCEL.EXE', str(template_file)]
82
+ cmd = ['cmd', '/c', 'start', '/max', 'excel', str(template_file)]
83
83
  else:
84
84
  log.info(f"Template file not found. Attempting to launch Excel maximized...")
85
- cmd_args = ['EXCEL.EXE']
85
+ cmd = ['cmd', '/c', 'start', '/max', 'excel']
86
86
 
87
- log.info(f"Executing command: {' '.join(cmd_args)}")
88
- # Use Popen for more direct execution, don't wait for it
89
- process = subprocess.Popen(cmd_args, creationflags=subprocess.DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP)
90
- log.info(f"Launched Excel process with PID: {process.pid}")
91
- # Simulate success as Popen doesn't give immediate exit code
92
- result = type('obj', (object,), {'returncode' : 0, 'stderr': '', 'stdout': ''})()
87
+ log.info(f"Executing command: {' '.join(cmd)}")
88
+ print(f"[DEBUG] Attempting command in excel_prepare: {' '.join(cmd)}")
89
+ result = subprocess.run(cmd, check=False, capture_output=True, text=True, creationflags=subprocess.CREATE_NO_WINDOW)
90
+
91
+ # ADDED PRINTS for result
92
+ print(f"[DEBUG] excel_prepare command result:")
93
+ print(f"[DEBUG] Return Code: {result.returncode}")
94
+ print(f"[DEBUG] Stdout: {result.stdout.strip() if result.stdout else ''}")
95
+ print(f"[DEBUG] Stderr: {result.stderr.strip() if result.stderr else ''}")
93
96
 
94
97
  if result.returncode == 0:
95
98
  log.info(f"Successfully executed command for Excel.")
@@ -81,17 +81,20 @@ def run_preparation(state):
81
81
  # Check if template exists and construct command accordingly
82
82
  if template_file.exists():
83
83
  log.info(f"Template file found. Attempting to open {template_file} with PowerPoint maximized...")
84
- cmd_args = ['POWERPNT.EXE', str(template_file)]
84
+ cmd = ['cmd', '/c', 'start', '/max', 'powerpnt', str(template_file)]
85
85
  else:
86
86
  log.info(f"Template file not found. Attempting to launch PowerPoint maximized...")
87
- cmd_args = ['POWERPNT.EXE']
87
+ cmd = ['cmd', '/c', 'start', '/max', 'powerpnt']
88
88
 
89
- log.info(f"Executing command: {' '.join(cmd_args)}")
90
- # Use Popen for more direct execution, don't wait for it
91
- process = subprocess.Popen(cmd_args, creationflags=subprocess.DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP)
92
- log.info(f"Launched PowerPoint process with PID: {process.pid}")
93
- # Simulate success as Popen doesn't give immediate exit code
94
- result = type('obj', (object,), {'returncode' : 0, 'stderr': '', 'stdout': ''})()
89
+ log.info(f"Executing command: {' '.join(cmd)}")
90
+ print(f"[DEBUG] Attempting command in powerpoint_prepare: {' '.join(cmd)}")
91
+ result = subprocess.run(cmd, check=False, capture_output=True, text=True, creationflags=subprocess.CREATE_NO_WINDOW)
92
+
93
+ # ADDED PRINTS for result
94
+ print(f"[DEBUG] powerpoint_prepare command result:")
95
+ print(f"[DEBUG] Return Code: {result.returncode}")
96
+ print(f"[DEBUG] Stdout: {result.stdout.strip() if result.stdout else ''}")
97
+ print(f"[DEBUG] Stderr: {result.stderr.strip() if result.stderr else ''}")
95
98
 
96
99
  if result.returncode == 0:
97
100
  log.info(f"Successfully executed command for PowerPoint.")
@@ -77,26 +77,31 @@ def run_preparation(state):
77
77
 
78
78
  # Open the file with Premiere Pro maximized on Windows
79
79
  try:
80
+ pr_executable = r"C:\Program Files\Adobe\Adobe Premiere Pro 2024\Adobe Premiere Pro.exe"
80
81
  # Check if template exists and construct command accordingly
81
82
  if template_file.exists():
82
83
  log.info(f"Template file found. Attempting to open {template_file} with Premiere Pro maximized...")
83
- # Use full path for the executable
84
- pr_executable = r"C:\Program Files\Adobe\Adobe Premiere Pro 2024\Adobe Premiere Pro.exe"
85
- cmd = ['cmd', '/c', 'start', '/max', '""', pr_executable, str(template_file)] # Use empty title "" for start
84
+ # Use empty title "" for start when executable path has spaces
85
+ cmd = ['cmd', '/c', 'start', '/max', '""', pr_executable, str(template_file)]
86
86
  else:
87
87
  log.info(f"Template file not found. Attempting to launch Premiere Pro maximized...")
88
- # Use full path for the executable
89
- pr_executable = r"C:\Program Files\Adobe\Adobe Premiere Pro 2024\Adobe Premiere Pro.exe"
90
88
  cmd = ['cmd', '/c', 'start', '/max', '""', pr_executable]
91
89
 
92
90
  log.info(f"Executing command: {' '.join(cmd)}")
93
- result = subprocess.run(cmd, check=False, capture_output=True, text=True, creationflags=subprocess.CREATE_NO_WINDOW) # Add CREATE_NO_WINDOW
94
-
91
+ print(f"[DEBUG] Attempting command in pr_prepare: {' '.join(cmd)}")
92
+ result = subprocess.run(cmd, check=False, capture_output=True, text=True, creationflags=subprocess.CREATE_NO_WINDOW)
93
+
94
+ # ADDED PRINTS for result
95
+ print(f"[DEBUG] pr_prepare command result:")
96
+ print(f"[DEBUG] Return Code: {result.returncode}")
97
+ print(f"[DEBUG] Stdout: {result.stdout.strip() if result.stdout else ''}")
98
+ print(f"[DEBUG] Stderr: {result.stderr.strip() if result.stderr else ''}")
99
+
95
100
  if result.returncode == 0:
96
101
  log.info(f"Successfully executed command for Premiere Pro.")
97
102
  else:
98
- log.error(f"Error opening Premiere Pro: {result.stderr.strip()}")
99
- if result.stdout:
103
+ log.error(f"Error executing command for Premiere Pro: {result.stderr.strip() if result else 'Command not run'}")
104
+ if result and result.stdout:
100
105
  log.error(f"Stdout from start command: {result.stdout.strip()}")
101
106
  except FileNotFoundError:
102
107
  log.error("Error: 'cmd' or 'start' command not found. Ensure system PATH is configured correctly.")
@@ -79,17 +79,20 @@ def run_preparation(state):
79
79
  # Check if template exists and construct command accordingly
80
80
  if template_file.exists():
81
81
  log.info(f"Template file found. Attempting to open {template_file} with Word maximized...")
82
- cmd_args = ['WINWORD.EXE', str(template_file)]
82
+ cmd = ['cmd', '/c', 'start', '/max', 'winword', str(template_file)]
83
83
  else:
84
84
  log.info(f"Template file not found. Attempting to launch Word maximized...")
85
- cmd_args = ['WINWORD.EXE']
85
+ cmd = ['cmd', '/c', 'start', '/max', 'winword']
86
86
 
87
- log.info(f"Executing command: {' '.join(cmd_args)}")
88
- # Use Popen for more direct execution, don't wait for it
89
- process = subprocess.Popen(cmd_args, creationflags=subprocess.DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP)
90
- log.info(f"Launched Word process with PID: {process.pid}")
91
- # Simulate success as Popen doesn't give immediate exit code
92
- result = type('obj', (object,), {'returncode' : 0, 'stderr': '', 'stdout': ''})()
87
+ log.info(f"Executing command: {' '.join(cmd)}")
88
+ print(f"[DEBUG] Attempting command in word_prepare: {' '.join(cmd)}")
89
+ result = subprocess.run(cmd, check=False, capture_output=True, text=True, creationflags=subprocess.CREATE_NO_WINDOW)
90
+
91
+ # ADDED PRINTS for result
92
+ print(f"[DEBUG] word_prepare command result:")
93
+ print(f"[DEBUG] Return Code: {result.returncode}")
94
+ print(f"[DEBUG] Stdout: {result.stdout.strip() if result.stdout else ''}")
95
+ print(f"[DEBUG] Stderr: {result.stderr.strip() if result.stderr else ''}")
93
96
 
94
97
  if result.returncode == 0:
95
98
  log.info(f"Successfully executed command for Word.")