computer-use-ootb-internal 0.0.183__tar.gz → 0.0.185__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.
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/PKG-INFO +1 -1
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/pyproject.toml +1 -1
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/guard_service.py +21 -17
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/preparation/excel_prepare.py +20 -13
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/preparation/powerpoint_prepare.py +16 -8
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/preparation/pr_prepare.py +20 -14
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/preparation/word_prepare.py +21 -14
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/.gitignore +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/README.md +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/__init__.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/app_teachmode.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/animation/click_animation.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/animation/icons8-select-cursor-transparent-96.gif +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/animation/test_animation.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/executor/teachmode_executor.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/__init__.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/gui_capture.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/utils.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/__init__.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/screenshot_cli.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/screenshot_service.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/llm_utils.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/oai.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/run_litellm.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/gui_agent/llm_utils/run_llm.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/__init__.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/aws_request.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/base.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/bash.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/collection.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/colorful_text.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/computer.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/computer_marbot.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/edit.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/run.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/dependency_check.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/preparation/__init__.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/preparation/star_rail_prepare.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/requirements-lite.txt +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/run_teachmode_ootb_args.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/service_manager.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/signal_connection.py +0 -0
- {computer_use_ootb_internal-0.0.183 → computer_use_ootb_internal-0.0.185}/src/computer_use_ootb_internal/test_autogui.py +0 -0
@@ -828,37 +828,41 @@ class GuardService(win32serviceutil.ServiceFramework):
|
|
828
828
|
self.log_error(f"Cannot create task for {username}: Failed to find associated python executable via _get_python_executable_from_target_exe.")
|
829
829
|
return False
|
830
830
|
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
action_executable = python_exe
|
831
|
+
# Prepare paths and arguments carefully for PowerShell
|
832
|
+
action_executable_path = python_exe.strip("'\"") # Remove potential existing quotes
|
833
|
+
script_path = self.signal_script_path.strip("'\"")
|
834
|
+
user_arg = username # Assuming username has no special chars needing escape within PS
|
835
|
+
|
837
836
|
# Ensure script path is quoted if needed
|
838
|
-
|
837
|
+
quoted_script_path = f'""{script_path}""' if ' ' in script_path else script_path # Use "" for literal quotes inside PS string
|
839
838
|
# Username might need quoting if it contains spaces, though unlikely
|
840
|
-
|
841
|
-
|
842
|
-
safe_action_executable = action_executable.replace("'", "''") # Escape for PS
|
843
|
-
safe_action_arguments = action_arguments.replace("'", "''") # Escape for PS
|
839
|
+
# Construct the argument string passed TO python.exe: "script_path" username
|
840
|
+
python_arguments = f'{quoted_script_path} {user_arg}'
|
844
841
|
|
845
842
|
# Working directory for the script (likely its own directory)
|
846
843
|
try:
|
847
|
-
script_dir = os.path.dirname(
|
844
|
+
script_dir = os.path.dirname(script_path)
|
848
845
|
if not script_dir: script_dir = "."
|
849
|
-
|
850
|
-
|
846
|
+
# Escape single quotes for PowerShell string literal
|
847
|
+
ps_escaped_working_directory = script_dir.replace("'", "''")
|
848
|
+
working_directory_setting = f"$action.WorkingDirectory = '{ps_escaped_working_directory}'"
|
851
849
|
except Exception as e:
|
852
850
|
self.log_error(f"Error determining working directory for signal script task: {e}. WD will not be set.")
|
853
851
|
working_directory_setting = "# Could not set WorkingDirectory"
|
854
852
|
|
853
|
+
# Escape paths and args for embedding in PowerShell command string
|
854
|
+
ps_escaped_executable = action_executable_path.replace("'", "''")
|
855
|
+
ps_escaped_arguments = python_arguments.replace("'", "''")
|
856
|
+
ps_escaped_username = username.replace("'", "''")
|
857
|
+
task_name = f"OOTB_UserConnect_{username}"
|
858
|
+
|
855
859
|
# PowerShell command construction
|
856
860
|
ps_command = f"""
|
857
|
-
$taskName = "{task_name}"
|
858
|
-
$principal = New-ScheduledTaskPrincipal -UserId
|
861
|
+
$taskName = \"{task_name}\"
|
862
|
+
$principal = New-ScheduledTaskPrincipal -UserId '{ps_escaped_username}' -LogonType Interactive
|
859
863
|
|
860
864
|
# Action: Run python signal script
|
861
|
-
$action = New-ScheduledTaskAction -Execute '{
|
865
|
+
$action = New-ScheduledTaskAction -Execute '{ps_escaped_executable}' -Argument '{ps_escaped_arguments}'
|
862
866
|
{working_directory_setting}
|
863
867
|
|
864
868
|
# Trigger: At Logon for the specified user
|
@@ -75,21 +75,28 @@ def run_preparation(state):
|
|
75
75
|
# --- End of kill process ---
|
76
76
|
|
77
77
|
# Open the file with Excel maximized on Windows
|
78
|
-
log.info(f"Attempting to open {template_file} with Excel maximized on Windows...")
|
79
78
|
try:
|
80
|
-
#
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
79
|
+
# Check if template exists and construct command accordingly
|
80
|
+
if template_file.exists():
|
81
|
+
log.info(f"Template file found. Attempting to open {template_file} with Excel maximized...")
|
82
|
+
cmd_args = ['EXCEL.EXE', str(template_file)]
|
83
|
+
else:
|
84
|
+
log.info(f"Template file not found. Attempting to launch Excel maximized...")
|
85
|
+
cmd_args = ['EXCEL.EXE']
|
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': ''})()
|
86
93
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
94
|
+
if result.returncode == 0:
|
95
|
+
log.info(f"Successfully executed command for Excel.")
|
96
|
+
else:
|
97
|
+
log.error(f"Error opening Excel: {result.stderr.strip()}")
|
98
|
+
if result.stdout:
|
99
|
+
log.error(f"Stdout from start command: {result.stdout.strip()}")
|
93
100
|
except FileNotFoundError:
|
94
101
|
log.error("Error: 'cmd' or 'start' command not found. Ensure system PATH is configured correctly.")
|
95
102
|
except Exception as e:
|
@@ -77,18 +77,26 @@ def run_preparation(state):
|
|
77
77
|
# --- End of kill process ---
|
78
78
|
|
79
79
|
# Open the file with PowerPoint maximized on Windows
|
80
|
-
log.info(f"Attempting to open {template_file} with PowerPoint maximized on Windows...")
|
81
80
|
try:
|
82
|
-
#
|
83
|
-
|
84
|
-
|
85
|
-
|
81
|
+
# Check if template exists and construct command accordingly
|
82
|
+
if template_file.exists():
|
83
|
+
log.info(f"Template file found. Attempting to open {template_file} with PowerPoint maximized...")
|
84
|
+
cmd_args = ['POWERPNT.EXE', str(template_file)]
|
85
|
+
else:
|
86
|
+
log.info(f"Template file not found. Attempting to launch PowerPoint maximized...")
|
87
|
+
cmd_args = ['POWERPNT.EXE']
|
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': ''})()
|
95
|
+
|
86
96
|
if result.returncode == 0:
|
87
|
-
log.info(f"Successfully
|
97
|
+
log.info(f"Successfully executed command for PowerPoint.")
|
88
98
|
else:
|
89
|
-
# Log stderr for debugging potential start command issues
|
90
99
|
log.error(f"Error opening PowerPoint: {result.stderr.strip()}")
|
91
|
-
# Also log stdout as start command might output info there
|
92
100
|
if result.stdout:
|
93
101
|
log.error(f"Stdout from start command: {result.stdout.strip()}")
|
94
102
|
except FileNotFoundError:
|
@@ -76,22 +76,28 @@ def run_preparation(state):
|
|
76
76
|
# --- End of kill process ---
|
77
77
|
|
78
78
|
# Open the file with Premiere Pro maximized on Windows
|
79
|
-
log.info(f"Attempting to open {template_file} with Premiere Pro maximized on Windows...")
|
80
79
|
try:
|
81
|
-
#
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
80
|
+
# Check if template exists and construct command accordingly
|
81
|
+
if template_file.exists():
|
82
|
+
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
|
86
|
+
else:
|
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
|
+
cmd = ['cmd', '/c', 'start', '/max', '""', pr_executable]
|
91
|
+
|
92
|
+
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
|
88
94
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
+
if result.returncode == 0:
|
96
|
+
log.info(f"Successfully executed command for Premiere Pro.")
|
97
|
+
else:
|
98
|
+
log.error(f"Error opening Premiere Pro: {result.stderr.strip()}")
|
99
|
+
if result.stdout:
|
100
|
+
log.error(f"Stdout from start command: {result.stdout.strip()}")
|
95
101
|
except FileNotFoundError:
|
96
102
|
log.error("Error: 'cmd' or 'start' command not found. Ensure system PATH is configured correctly.")
|
97
103
|
except Exception as e:
|
@@ -75,21 +75,28 @@ def run_preparation(state):
|
|
75
75
|
# --- End of kill process ---
|
76
76
|
|
77
77
|
# Open the file with Word maximized on Windows
|
78
|
-
log.info(f"Attempting to open {template_file} with Word maximized on Windows...")
|
79
78
|
try:
|
80
|
-
#
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
#
|
90
|
-
|
91
|
-
|
92
|
-
#
|
79
|
+
# Check if template exists and construct command accordingly
|
80
|
+
if template_file.exists():
|
81
|
+
log.info(f"Template file found. Attempting to open {template_file} with Word maximized...")
|
82
|
+
cmd_args = ['WINWORD.EXE', str(template_file)]
|
83
|
+
else:
|
84
|
+
log.info(f"Template file not found. Attempting to launch Word maximized...")
|
85
|
+
cmd_args = ['WINWORD.EXE']
|
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': ''})()
|
93
|
+
|
94
|
+
if result.returncode == 0:
|
95
|
+
log.info(f"Successfully executed command for Word.")
|
96
|
+
else:
|
97
|
+
log.error(f"Error opening Word: {result.stderr.strip()}")
|
98
|
+
if result.stdout:
|
99
|
+
log.error(f"Stdout from start command: {result.stdout.strip()}")
|
93
100
|
except FileNotFoundError:
|
94
101
|
log.error("Error: 'cmd' or 'start' command not found. Ensure system PATH is configured correctly.")
|
95
102
|
except Exception as e:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|