computer-use-ootb-internal 0.0.118__py3-none-any.whl → 0.0.119__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.
@@ -93,16 +93,33 @@ def get_python_executable():
93
93
  return python_exe
94
94
 
95
95
  def get_pip_executable():
96
- python_path = pathlib.Path(sys.executable)
97
- pip_path = python_path.parent / "Scripts" / "pip.exe"
98
- if pip_path.exists():
99
- pip_exe = str(pip_path)
100
- if " " in pip_exe and not pip_exe.startswith('"'):
101
- pip_exe = f'"{pip_exe}"'
102
- return pip_exe
103
- else:
104
- logging.warning("pip.exe not found in Scripts directory. Falling back to 'python -m pip'.")
105
- return f"{get_python_executable()} -m pip"
96
+ """Tries to locate the pip executable in the same environment."""
97
+ try:
98
+ current_python = sys.executable
99
+ log_info(f"get_pip_executable: sys.executable = {current_python}")
100
+ python_path = pathlib.Path(current_python)
101
+ # Common location is ../Scripts/pip.exe relative to python.exe
102
+ pip_path = python_path.parent / "Scripts" / "pip.exe"
103
+ log_info(f"get_pip_executable: Checking for pip at {pip_path}")
104
+
105
+ if pip_path.exists():
106
+ log_info(f"get_pip_executable: pip.exe found at {pip_path}")
107
+ # Quote if necessary
108
+ pip_exe = str(pip_path)
109
+ if " " in pip_exe and not pip_exe.startswith('"'):
110
+ pip_exe = f'"{pip_exe}"'
111
+ return pip_exe
112
+ else:
113
+ log_error(f"get_pip_executable: pip.exe NOT found at {pip_path}. Falling back to 'python -m pip'.")
114
+ # Fallback is intended here
115
+ pass # Explicitly pass to reach the fallback return outside the else
116
+
117
+ except Exception as e:
118
+ log_error(f"get_pip_executable: Error determining pip path: {e}", exc_info=True)
119
+ log_error("get_pip_executable: Falling back to 'python -m pip' due to error.")
120
+
121
+ # Fallback return statement if 'exists' is false or an exception occurred
122
+ return f"{get_python_executable()} -m pip"
106
123
 
107
124
  def log_info(msg):
108
125
  thread_name = threading.current_thread().name
@@ -250,7 +267,7 @@ class GuardService(win32serviceutil.ServiceFramework):
250
267
  def report_command_status(self, command_id, status, details=""):
251
268
  """Sends command status back to the server."""
252
269
  if not _SERVER_STATUS_REPORT_URL:
253
- log_warning("No server status report URL configured. Skipping report.")
270
+ log_error("No server status report URL configured. Skipping report.")
254
271
  return
255
272
 
256
273
  payload = {
@@ -352,7 +369,7 @@ class GuardService(win32serviceutil.ServiceFramework):
352
369
  log_info(f"Process PID={proc.pid} terminated successfully.")
353
370
  stopped_count += 1
354
371
  except psutil.TimeoutExpired:
355
- log_warning(f"Process PID={proc.pid} did not terminate gracefully, killing.")
372
+ log_error(f"Process PID={proc.pid} did not terminate gracefully, killing.")
356
373
  proc.kill()
357
374
  stopped_count += 1
358
375
  except psutil.NoSuchProcess:
@@ -385,7 +402,7 @@ class GuardService(win32serviceutil.ServiceFramework):
385
402
  normalized_user = user.lower()
386
403
  active_sessions[normalized_user] = session['SessionId']
387
404
  except Exception as query_err:
388
- log_warning(f"Could not query session {session['SessionId']}: {query_err}")
405
+ log_error(f"Could not query session {session['SessionId']}: {query_err}")
389
406
 
390
407
  log_info(f"Found active user sessions: {active_sessions}")
391
408
 
@@ -397,7 +414,7 @@ class GuardService(win32serviceutil.ServiceFramework):
397
414
  if normalized_target in active_sessions:
398
415
  target_session_map[normalized_target] = active_sessions[normalized_target]
399
416
  else:
400
- log_warning(f"Target user '{target_user}' not found in active sessions.")
417
+ log_error(f"Target user '{target_user}' not found in active sessions.")
401
418
  return "failed_user_not_active"
402
419
 
403
420
  if not target_session_map:
@@ -451,7 +468,7 @@ class GuardService(win32serviceutil.ServiceFramework):
451
468
  started_count += 1
452
469
  target_users_started.add(user)
453
470
  else:
454
- log_warning(f"Process PID {dwPid} reported by CreateProcessAsUser does NOT exist shortly after creation. It likely exited immediately.")
471
+ log_error(f"Process PID {dwPid} reported by CreateProcessAsUser does NOT exist shortly after creation. It likely exited immediately.")
455
472
  users_failed_to_start.add(user)
456
473
  # Attempt to get exit code? Difficult without waiting.
457
474
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: computer-use-ootb-internal
3
- Version: 0.0.118
3
+ Version: 0.0.119
4
4
  Summary: Computer Use OOTB
5
5
  Author-email: Siyuan Hu <siyuan.hu.sg@gmail.com>
6
6
  Requires-Python: >=3.11
@@ -3,7 +3,7 @@ computer_use_ootb_internal/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4Tv
3
3
  computer_use_ootb_internal/app_teachmode.py,sha256=PClMS7X6zRGzY7YPOV6Zxkfv5BajLVqmBiv-mOBVxkw,22164
4
4
  computer_use_ootb_internal/app_teachmode_gradio.py,sha256=cmFpBrkdlZxOQADWveVdIaaNqaBD8IVs-xNLJogU7F8,7909
5
5
  computer_use_ootb_internal/dependency_check.py,sha256=y8RMEP6RXQzTgU1MS_1piBLtz4J-Hfn9RjUZg59dyvo,1333
6
- computer_use_ootb_internal/guard_service.py,sha256=z9GQdPJCd_Ds1xwCUn7hJBqPuto_FLhE1F5xqrvgh98,23496
6
+ computer_use_ootb_internal/guard_service.py,sha256=d0tZgzjmS8UQGHx2Yf5HuMtRxdJIgy2zLpUTFQF5JF8,24378
7
7
  computer_use_ootb_internal/requirements-lite.txt,sha256=5DAHomz4A_P2BmTIXNkNqkHbnIF0AyZ4_1XAlb1LaYs,290
8
8
  computer_use_ootb_internal/run_teachmode_ootb_args.py,sha256=7Dj0iY4GG7P03tRKYJ2x9Yvt-PE-b7uyjCAed3SaF3Y,7086
9
9
  computer_use_ootb_internal/service_manager.py,sha256=xbLIxQ4jzMr8AdZdxKw-QcAGm2Y86vudDzSf3hGjOM4,7595
@@ -34,7 +34,7 @@ computer_use_ootb_internal/computer_use_demo/tools/run.py,sha256=xhXdnBK1di9muaO
34
34
  computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py,sha256=L8qfvtUkPPQGt92N-2Zfw5ZTDBzLsDps39uMnX3_uSA,6857
35
35
  computer_use_ootb_internal/preparation/__init__.py,sha256=AgtGHcBpiTkxJjF0xwcs3yyQ6SyUvhL3G0vD2XO-zJw,63
36
36
  computer_use_ootb_internal/preparation/star_rail_prepare.py,sha256=s1VWszcTnJAKxqCHFlaOEwPkqVSrkiFx_yKpWSnSbHs,2649
37
- computer_use_ootb_internal-0.0.118.dist-info/METADATA,sha256=hXxBaos02qZPHK7UQIFaRPJsCjTCmhZuL2Z7WMPRMA0,1048
38
- computer_use_ootb_internal-0.0.118.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
- computer_use_ootb_internal-0.0.118.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
40
- computer_use_ootb_internal-0.0.118.dist-info/RECORD,,
37
+ computer_use_ootb_internal-0.0.119.dist-info/METADATA,sha256=9FKAgkb-tPT3TpODW9nONQUvFwGnX7NwXOJvBKZGAAk,1048
38
+ computer_use_ootb_internal-0.0.119.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
+ computer_use_ootb_internal-0.0.119.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
40
+ computer_use_ootb_internal-0.0.119.dist-info/RECORD,,