computer-use-ootb-internal 0.0.170__py3-none-any.whl → 0.0.172__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,48 +1,48 @@
1
- # Helper script to signal guard service about user connection
2
- # Save as e.g., ootb_lite_pypi/ootb_lite_pypi/src/computer_use_ootb_internal/signal_connection.py
3
- import sys
4
- import requests
5
- import logging
6
- import os
7
- import pathlib
8
-
9
- # Basic logging for the script itself
10
- LOG_DIR = pathlib.Path(os.environ.get('PROGRAMDATA', 'C:/ProgramData')) / "OOTBGuardService" / "SignalLogs"
11
- LOG_DIR.mkdir(parents=True, exist_ok=True)
12
- LOG_FILE = LOG_DIR / "signal_connection.log"
13
-
14
- logging.basicConfig(
15
- filename=LOG_FILE,
16
- level=logging.INFO,
17
- format='%(asctime)s %(levelname)s: %(message)s'
18
- )
19
-
20
- GUARD_SERVICE_URL = "http://localhost:14000/internal/user_connected"
21
-
22
- if __name__ == "__main__":
23
- if len(sys.argv) < 2:
24
- logging.error("Username argument missing.")
25
- sys.exit(1)
26
-
27
- username = sys.argv[1]
28
- logging.info(f"Signaling connection for user: {username}")
29
-
30
- payload = {"username": username}
31
-
32
- try:
33
- response = requests.post(GUARD_SERVICE_URL, json=payload, timeout=10)
34
- response.raise_for_status()
35
- logging.info(f"Successfully signaled connection for user {username}. Status: {response.status_code}")
36
- sys.exit(0)
37
- except requests.exceptions.ConnectionError:
38
- logging.error(f"Connection refused when trying to signal for user {username}. Guard service might not be running or accessible.")
39
- sys.exit(2)
40
- except requests.exceptions.Timeout:
41
- logging.error(f"Timeout when trying to signal for user {username}.")
42
- sys.exit(3)
43
- except requests.exceptions.RequestException as e:
44
- logging.error(f"Error signaling connection for user {username}: {e}")
45
- sys.exit(4)
46
- except Exception as e:
47
- logging.error(f"Unexpected error for user {username}: {e}")
1
+ # Helper script to signal guard service about user connection
2
+ # Save as e.g., ootb_lite_pypi/ootb_lite_pypi/src/computer_use_ootb_internal/signal_connection.py
3
+ import sys
4
+ import requests
5
+ import logging
6
+ import os
7
+ import pathlib
8
+
9
+ # Basic logging for the script itself
10
+ LOG_DIR = pathlib.Path(os.environ.get('PROGRAMDATA', 'C:/ProgramData')) / "OOTBGuardService" / "SignalLogs"
11
+ LOG_DIR.mkdir(parents=True, exist_ok=True)
12
+ LOG_FILE = LOG_DIR / "signal_connection.log"
13
+
14
+ logging.basicConfig(
15
+ filename=LOG_FILE,
16
+ level=logging.INFO,
17
+ format='%(asctime)s %(levelname)s: %(message)s'
18
+ )
19
+
20
+ GUARD_SERVICE_URL = "http://localhost:14000/internal/user_connected"
21
+
22
+ if __name__ == "__main__":
23
+ if len(sys.argv) < 2:
24
+ logging.error("Username argument missing.")
25
+ sys.exit(1)
26
+
27
+ username = sys.argv[1]
28
+ logging.info(f"Signaling connection for user: {username}")
29
+
30
+ payload = {"username": username}
31
+
32
+ try:
33
+ response = requests.post(GUARD_SERVICE_URL, json=payload, timeout=10)
34
+ response.raise_for_status()
35
+ logging.info(f"Successfully signaled connection for user {username}. Status: {response.status_code}")
36
+ sys.exit(0)
37
+ except requests.exceptions.ConnectionError:
38
+ logging.error(f"Connection refused when trying to signal for user {username}. Guard service might not be running or accessible.")
39
+ sys.exit(2)
40
+ except requests.exceptions.Timeout:
41
+ logging.error(f"Timeout when trying to signal for user {username}.")
42
+ sys.exit(3)
43
+ except requests.exceptions.RequestException as e:
44
+ logging.error(f"Error signaling connection for user {username}: {e}")
45
+ sys.exit(4)
46
+ except Exception as e:
47
+ logging.error(f"Unexpected error for user {username}: {e}")
48
48
  sys.exit(5)
@@ -1,58 +1,58 @@
1
- import pyautogui
2
- import asyncio
3
- import sys
4
- import time
5
- from pathlib import Path
6
- from computer_use_ootb_internal.computer_use_demo.tools.computer import ComputerTool
7
-
8
-
9
- # pyautogui.keyDown("alt")
10
-
11
-
12
- # pyautogui.click(x=1600, y=47)
13
- # pyautogui.click(x=1600, y=47)
14
- # pyautogui.keyUp("alt")
15
-
16
-
17
- async def test_animations():
18
-
19
- # Initialize the computer tool
20
- computer = ComputerTool()
21
-
22
- # # Test mouse move animation
23
- print("Testing mouse move animation...")
24
- # await computer(action="mouse_move_windll", coordinate=(1600, 500))
25
- # print("Waiting 2 seconds...")
26
- # await asyncio.sleep(2)
27
-
28
- # # Test click animation
29
- # print("Testing click animation...")
30
- # await computer(action="left_click_windll", coordinate=(1600, 300))
31
- # print("Waiting 2 seconds...")
32
- # await asyncio.sleep(2)
33
-
34
- # Test another move
35
- print("Testing move and click sequence...")
36
- await computer(action="key_down_windll", text='alt')
37
- # pyautogui.keyDown('alt')
38
- # await asyncio.sleep(1)
39
- # await computer(action="mouse_move_windll", coordinate=(2550+1600, 45))
40
- # await asyncio.sleep(1)
41
- # await computer(action="left_click", coordinate=(2550+1600, 45))
42
- await computer(action="mouse_move", coordinate=(1600, 45))
43
- # pyautogui.keyDown('alt')
44
-
45
- await computer(action="left_click", coordinate=(1600, 45))
46
- # await computer(action="left_cl1ck_windll", coordinate=(2550+1600, 45))
47
- await asyncio.sleep(1)
48
- await computer(action="key_up_windll", text='alt')
49
- # pyautogui.keyUp('alt')
50
-
51
- # Wait for animations to comple1e
52
- print("Waiting for animations to complete...")
53
- await asyncio.sleep(3)
54
-
55
- print("Test completed")
56
-
57
- if __name__ == "__main__":
1
+ import pyautogui
2
+ import asyncio
3
+ import sys
4
+ import time
5
+ from pathlib import Path
6
+ from computer_use_ootb_internal.computer_use_demo.tools.computer import ComputerTool
7
+
8
+
9
+ # pyautogui.keyDown("alt")
10
+
11
+
12
+ # pyautogui.click(x=1600, y=47)
13
+ # pyautogui.click(x=1600, y=47)
14
+ # pyautogui.keyUp("alt")
15
+
16
+
17
+ async def test_animations():
18
+
19
+ # Initialize the computer tool
20
+ computer = ComputerTool()
21
+
22
+ # # Test mouse move animation
23
+ print("Testing mouse move animation...")
24
+ # await computer(action="mouse_move_windll", coordinate=(1600, 500))
25
+ # print("Waiting 2 seconds...")
26
+ # await asyncio.sleep(2)
27
+
28
+ # # Test click animation
29
+ # print("Testing click animation...")
30
+ # await computer(action="left_click_windll", coordinate=(1600, 300))
31
+ # print("Waiting 2 seconds...")
32
+ # await asyncio.sleep(2)
33
+
34
+ # Test another move
35
+ print("Testing move and click sequence...")
36
+ await computer(action="key_down_windll", text='alt')
37
+ # pyautogui.keyDown('alt')
38
+ # await asyncio.sleep(1)
39
+ # await computer(action="mouse_move_windll", coordinate=(2550+1600, 45))
40
+ # await asyncio.sleep(1)
41
+ # await computer(action="left_click", coordinate=(2550+1600, 45))
42
+ await computer(action="mouse_move", coordinate=(1600, 45))
43
+ # pyautogui.keyDown('alt')
44
+
45
+ await computer(action="left_click", coordinate=(1600, 45))
46
+ # await computer(action="left_cl1ck_windll", coordinate=(2550+1600, 45))
47
+ await asyncio.sleep(1)
48
+ await computer(action="key_up_windll", text='alt')
49
+ # pyautogui.keyUp('alt')
50
+
51
+ # Wait for animations to comple1e
52
+ print("Waiting for animations to complete...")
53
+ await asyncio.sleep(3)
54
+
55
+ print("Test completed")
56
+
57
+ if __name__ == "__main__":
58
58
  asyncio.run(test_animations())
@@ -1,29 +1,30 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: computer-use-ootb-internal
3
- Version: 0.0.170
3
+ Version: 0.0.172
4
4
  Summary: Computer Use OOTB
5
5
  Author-email: Siyuan Hu <siyuan.hu.sg@gmail.com>
6
6
  Requires-Python: >=3.11
7
7
  Requires-Dist: anthropic[bedrock,vertex]>=0.37.1
8
8
  Requires-Dist: boto3>=1.28.57
9
+ Requires-Dist: flask>=2.0
9
10
  Requires-Dist: google-auth<3,>=2
10
11
  Requires-Dist: gradio>=5.6.0
11
12
  Requires-Dist: jsonschema==4.22.0
12
13
  Requires-Dist: litellm
13
14
  Requires-Dist: matplotlib
14
15
  Requires-Dist: opencv-python
15
- Requires-Dist: pre-commit==3.8.0
16
+ Requires-Dist: psutil>=5.0; sys_platform == 'win32'
16
17
  Requires-Dist: pyautogui==0.9.54
17
- Requires-Dist: pyside6
18
- Requires-Dist: pytest-asyncio==0.23.6
19
- Requires-Dist: pytest==8.3.3
20
- Requires-Dist: pywinauto
21
- Requires-Dist: ruff==0.6.7
18
+ Requires-Dist: pywin32>=306; sys_platform == 'win32'
19
+ Requires-Dist: pywinauto; sys_platform == 'win32'
20
+ Requires-Dist: requests>=2.0
22
21
  Requires-Dist: screeninfo
23
22
  Requires-Dist: streamlit>=1.38.0
24
23
  Requires-Dist: textdistance
25
- Requires-Dist: uiautomation
24
+ Requires-Dist: uiautomation; sys_platform == 'win32'
25
+ Requires-Dist: waitress>=2.0
26
26
  Provides-Extra: dev
27
+ Requires-Dist: pre-commit>=3.8.0; extra == 'dev'
27
28
  Requires-Dist: pytest-asyncio>=0.23.6; extra == 'dev'
28
29
  Requires-Dist: pytest>=8.3.3; extra == 'dev'
29
30
  Requires-Dist: ruff>=0.6.7; extra == 'dev'
@@ -1,17 +1,16 @@
1
1
  computer_use_ootb_internal/README.md,sha256=FxpW95lyub2iX73ZDfK6ML7SdEKg060H5I6Grub7li4,31
2
2
  computer_use_ootb_internal/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
3
- computer_use_ootb_internal/app_teachmode.py,sha256=842v79pjUvX1yck6n4uel45ysZTcsWXoskwcfEzSgw4,26866
3
+ computer_use_ootb_internal/app_teachmode.py,sha256=S3qqkizoEs18qU_1zsaqHoYeHwQ-Njbx3DsuMbpZ8E4,26633
4
4
  computer_use_ootb_internal/dependency_check.py,sha256=y8RMEP6RXQzTgU1MS_1piBLtz4J-Hfn9RjUZg59dyvo,1333
5
- computer_use_ootb_internal/guard_service.py,sha256=B-eNrs97lhCBsPixspcRNZJHkKYuN4IbwUnpB0W8fsw,49381
6
- computer_use_ootb_internal/launch_ootb_elevated.ps1,sha256=_WWVbxOU1Ow8MpOC9GUYV0B-DYEnLGaRCTkT9rNGuYY,2426
5
+ computer_use_ootb_internal/guard_service.py,sha256=0-lUbJO02XAT9t5zUPgrfjbv1Uy8KAJjVeK2mLp5mHk,49990
7
6
  computer_use_ootb_internal/requirements-lite.txt,sha256=5DAHomz4A_P2BmTIXNkNqkHbnIF0AyZ4_1XAlb1LaYs,290
8
- computer_use_ootb_internal/run_teachmode_ootb_args.py,sha256=ZYVxaOMxOOTZt2S-xmJcZqXmYqqIPl57tgheMO8OOBU,7910
9
- computer_use_ootb_internal/service_manager.py,sha256=1P8FbCUNIGg650xlayCQcVmSy6ELlU8ZeqqpD7Nmg_M,18364
10
- computer_use_ootb_internal/signal_connection.py,sha256=e6eGByhb2Gx8HHJHrHM3HvchobSUmba1y7-YRB6L59E,1821
11
- computer_use_ootb_internal/test_click_0425.py,sha256=uZtP6DsPVRFonKMYlbe9eHmPY6hH5y8xWgr2KxHC8E4,1808
7
+ computer_use_ootb_internal/run_teachmode_ootb_args.py,sha256=eUPpfA7bB3bdBBiIBIxKJSS-Jpz2G6R46fpDO440Jyo,7687
8
+ computer_use_ootb_internal/service_manager.py,sha256=SD8jzfn0VVXBOr_nP6zmBWSC2TzrU_sp2e5JJkSlQFU,9734
9
+ computer_use_ootb_internal/signal_connection.py,sha256=8jPLOj0WSBXI_NElm5A-F146DTAE5LdL07lov7YXTNQ,1774
10
+ computer_use_ootb_internal/test_click_0425.py,sha256=gJUBpPK6gGgVS6nkJSgoCj4mKl-ngcoR_jeVmDslSAs,1751
12
11
  computer_use_ootb_internal/computer_use_demo/animation/click_animation.py,sha256=tP1gsayFy-CKk10UlrE9RlexwlHWiHQUe5Ogg4vQvSg,3234
13
12
  computer_use_ootb_internal/computer_use_demo/animation/icons8-select-cursor-transparent-96.gif,sha256=4LfwsfFQnREXrNRs32aJU2jO65JXianJoL_8q7-8elg,30966
14
- computer_use_ootb_internal/computer_use_demo/animation/test_animation.py,sha256=SOJz2yffXTkjuAHqk0IZLcMriR0KQYTo7W1b8wGyRGY,1222
13
+ computer_use_ootb_internal/computer_use_demo/animation/test_animation.py,sha256=2R1u98OLKYalSZ5nt5vvyZ71FL5R5vLv-n8zM8jVdV8,1183
15
14
  computer_use_ootb_internal/computer_use_demo/executor/teachmode_executor.py,sha256=dP5rbO1tVxwu7GJ_LS_lGBtI_GK473_aGVnU0sfrU2o,15300
16
15
  computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/__init__.py,sha256=h2CNeuACklxVpJC65QR8_6AvSybEZLmeO45hY_-lLBs,61
17
16
  computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/gui_capture.py,sha256=CxFJbsSb68ERKH7-C4RaaZy7FIhhzrzGx5qQJ4C37cA,13907
@@ -35,8 +34,9 @@ computer_use_ootb_internal/computer_use_demo/tools/edit.py,sha256=b0PwUitxckHCQq
35
34
  computer_use_ootb_internal/computer_use_demo/tools/run.py,sha256=xhXdnBK1di9muaO44CEirL9hpGy3NmKbjfMpyeVmn8Y,1595
36
35
  computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py,sha256=L8qfvtUkPPQGt92N-2Zfw5ZTDBzLsDps39uMnX3_uSA,6857
37
36
  computer_use_ootb_internal/preparation/__init__.py,sha256=AgtGHcBpiTkxJjF0xwcs3yyQ6SyUvhL3G0vD2XO-zJw,63
38
- computer_use_ootb_internal/preparation/star_rail_prepare.py,sha256=RAriQxrv55csBNBm0m8CKyd_RW8k1tXx0kdJAcOpYlg,4734
39
- computer_use_ootb_internal-0.0.170.dist-info/METADATA,sha256=LjpaJCl3ruC43TTqHE85N__WL-f2Iv92SgGK3B3TGdw,910
40
- computer_use_ootb_internal-0.0.170.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
- computer_use_ootb_internal-0.0.170.dist-info/entry_points.txt,sha256=-AbmawU7IRQuDZihgVMVDrFoY4E6rnXYOUB-5vSeBKs,93
42
- computer_use_ootb_internal-0.0.170.dist-info/RECORD,,
37
+ computer_use_ootb_internal/preparation/powerpoint_prepare.py,sha256=cYRlGs6YWKe1lk-74lkLr-nlwC1W_Q6-tuddxlDrKFM,4149
38
+ computer_use_ootb_internal/preparation/star_rail_prepare.py,sha256=r0b19M_c1sXkN3_MRFjql8w_ThC9nZUe8zbSLYUvKS8,4635
39
+ computer_use_ootb_internal-0.0.172.dist-info/METADATA,sha256=uonjcUD5IHJ228RElNz8IDbwocnNyEd0i4FK7XWrQcY,1048
40
+ computer_use_ootb_internal-0.0.172.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
+ computer_use_ootb_internal-0.0.172.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
42
+ computer_use_ootb_internal-0.0.172.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ computer-use-ootb-internal = computer_use_ootb_internal.app_teachmode:main
3
+ ootb-install-service = computer_use_ootb_internal.service_manager:install_and_start
4
+ ootb-remove-service = computer_use_ootb_internal.service_manager:stop_and_remove
@@ -1,63 +0,0 @@
1
- # launch_ootb_elevated.ps1
2
- param(
3
- [Parameter(Mandatory=$true)]
4
- [string]$TargetExePath,
5
-
6
- [Parameter(Mandatory=$true)]
7
- [string]$Port,
8
-
9
- [Parameter(Mandatory=$true)]
10
- [string]$TargetUser,
11
-
12
- [Parameter(Mandatory=$true)]
13
- [string]$WorkingDirectory
14
- )
15
-
16
- try {
17
- Write-Host "--- OOTB Elevation Helper ---"
18
- Write-Host "Timestamp: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
19
- Write-Host "Received parameters:"
20
- Write-Host " Target Exe Path : $TargetExePath"
21
- Write-Host " Port : $Port"
22
- Write-Host " Target User : $TargetUser"
23
- Write-Host " Working Dir : $WorkingDirectory"
24
- Write-Host ""
25
-
26
- # Validate paths
27
- if (-not (Test-Path -Path $TargetExePath -PathType Leaf)) {
28
- throw "Target executable not found at '$TargetExePath'"
29
- }
30
- if (-not (Test-Path -Path $WorkingDirectory -PathType Container)) {
31
- throw "Working directory not found at '$WorkingDirectory'"
32
- }
33
-
34
- # Construct the argument list string for the target executable
35
- # Ensure target user is single-quoted for the argument parser
36
- $argumentList = "--port $Port --target_user '$TargetUser'"
37
-
38
- Write-Host "Constructed ArgumentList for Target Exe: $argumentList"
39
- Write-Host "Executing elevated process..."
40
- Write-Host "Command: Start-Process -FilePath `$TargetExePath` -ArgumentList `$argumentList` -WorkingDirectory `$WorkingDirectory` -Verb RunAs"
41
- Write-Host "--- Waiting for UAC prompt if necessary ---"
42
-
43
- # Execute the command to launch the target exe elevated directly
44
- Start-Process -FilePath $TargetExePath -ArgumentList $argumentList -WorkingDirectory $WorkingDirectory -Verb RunAs
45
-
46
- Write-Host "--- OOTB Elevation Helper: Start-Process command executed. ---"
47
- # The calling powershell window (started by CreateProcessAsUser with -NoExit) will remain open.
48
-
49
- } catch {
50
- Write-Error "--- OOTB Elevation Helper Error ---"
51
- Write-Error "Error launching elevated process: $($_.Exception.Message)"
52
- Write-Error "Script Parameters:"
53
- Write-Error " Target Exe Path : $TargetExePath"
54
- Write-Error " Port : $Port"
55
- Write-Error " Target User : $TargetUser"
56
- Write-Error " Working Dir : $WorkingDirectory"
57
- Write-Host "Press Enter to exit..."
58
- Read-Host # Keep window open on error
59
- Exit 1
60
- }
61
-
62
- # Exit gracefully if successful
63
- Exit 0
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- computer-use-ootb-internal = computer_use_ootb_internal.app_teachmode:main