MaaFw 4.0.0a2__py3-none-macosx_13_0_x86_64.whl → 4.0.0b2__py3-none-macosx_13_0_x86_64.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.

Potentially problematic release.


This version of MaaFw might be problematic. Click here for more details.

maa/agent_client.py CHANGED
@@ -47,6 +47,9 @@ class AgentClient:
47
47
  def connect(self) -> bool:
48
48
  return bool(Library.agent_client().MaaAgentClientConnect(self._handle))
49
49
 
50
+ def disconnect(self) -> bool:
51
+ return bool(Library.agent_client().MaaAgentClientDisconnect(self._handle))
52
+
50
53
  _api_properties_initialized: bool = False
51
54
 
52
55
  @staticmethod
@@ -81,3 +84,8 @@ class AgentClient:
81
84
  Library.agent_client().MaaAgentClientConnect.argtypes = [
82
85
  MaaAgentClientHandle,
83
86
  ]
87
+
88
+ Library.agent_client().MaaAgentClientDisconnect.restype = MaaBool
89
+ Library.agent_client().MaaAgentClientDisconnect.argtypes = [
90
+ MaaAgentClientHandle,
91
+ ]
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
maa/bin/libMaaUtils.dylib CHANGED
Binary file
maa/define.py CHANGED
@@ -53,7 +53,7 @@ MaaCtrlOption = MaaOption
53
53
  MaaResOption = MaaOption
54
54
 
55
55
 
56
- class MaaGlobalOptionEnum:
56
+ class MaaGlobalOptionEnum(IntEnum):
57
57
  Invalid = 0
58
58
 
59
59
  # Log dir
@@ -89,7 +89,7 @@ class MaaGlobalOptionEnum:
89
89
  DebugMode = 6
90
90
 
91
91
 
92
- class MaaCtrlOptionEnum:
92
+ class MaaCtrlOptionEnum(IntEnum):
93
93
  Invalid = 0
94
94
 
95
95
  # Only one of long and short side can be set, and the other is automatically scaled according to the aspect ratio.
@@ -111,13 +111,13 @@ class MaaCtrlOptionEnum:
111
111
  Recording = 5
112
112
 
113
113
 
114
- class MaaInferenceDeviceEnum:
114
+ class MaaInferenceDeviceEnum(IntEnum):
115
115
  CPU = -2
116
116
  Auto = -1
117
117
  # and more gpu id or flag...
118
118
 
119
119
 
120
- class MaaInferenceExecutionProviderEnum:
120
+ class MaaInferenceExecutionProviderEnum(IntEnum):
121
121
  # I don't recommend setting up MaaResOption_InferenceDevice in this case,
122
122
  # because you don't know which EP will be used on different user devices.
123
123
  Auto = 0
@@ -140,7 +140,7 @@ class MaaInferenceExecutionProviderEnum:
140
140
  CUDA = 4
141
141
 
142
142
 
143
- class MaaResOptionEnum:
143
+ class MaaResOptionEnum(IntEnum):
144
144
  Invalid = 0
145
145
 
146
146
  # Use the specified inference device.
@@ -161,7 +161,7 @@ class MaaResOptionEnum:
161
161
  MaaAdbScreencapMethod = ctypes.c_uint64
162
162
 
163
163
 
164
- class MaaAdbScreencapMethodEnum:
164
+ class MaaAdbScreencapMethodEnum(IntEnum):
165
165
  """
166
166
  Use bitwise OR to set the method you need
167
167
  MaaFramework will test their speed and use the fastest one.
@@ -184,7 +184,7 @@ class MaaAdbScreencapMethodEnum:
184
184
  MaaAdbInputMethod = ctypes.c_uint64
185
185
 
186
186
 
187
- class MaaAdbInputMethodEnum:
187
+ class MaaAdbInputMethodEnum(IntEnum):
188
188
  """
189
189
  Use bitwise OR to set the method you need
190
190
  MaaFramework will select the available ones according to priority.
@@ -206,7 +206,7 @@ MaaWin32ScreencapMethod = ctypes.c_uint64
206
206
 
207
207
 
208
208
  # No bitwise OR, just set it
209
- class MaaWin32ScreencapMethodEnum:
209
+ class MaaWin32ScreencapMethodEnum(IntEnum):
210
210
  Null = 0
211
211
 
212
212
  GDI = 1
@@ -218,7 +218,7 @@ MaaWin32InputMethod = ctypes.c_uint64
218
218
 
219
219
 
220
220
  # No bitwise OR, just set it
221
- class MaaWin32InputMethodEnum:
221
+ class MaaWin32InputMethodEnum(IntEnum):
222
222
  Null = 0
223
223
 
224
224
  Seize = 1
@@ -229,7 +229,7 @@ class MaaWin32InputMethodEnum:
229
229
  MaaDbgControllerType = ctypes.c_uint64
230
230
 
231
231
 
232
- class MaaDbgControllerTypeEnum:
232
+ class MaaDbgControllerTypeEnum(IntEnum):
233
233
  Null = 0
234
234
 
235
235
  CarouselImage = 1
maa/library.py CHANGED
@@ -72,7 +72,6 @@ class Library:
72
72
  def framework() -> ctypes.CDLL:
73
73
  if not Library.is_agent_server():
74
74
  if not Library._framework:
75
- print(f"Opening framework library: {Library.framework_libpath}")
76
75
  Library._framework = Library._lib_type(str(Library.framework_libpath))
77
76
 
78
77
  return Library._framework
@@ -82,7 +81,6 @@ class Library:
82
81
  @staticmethod
83
82
  def toolkit() -> ctypes.CDLL:
84
83
  if not Library._toolkit:
85
- print(f"Opening toolkit library: {Library.toolkit_libpath}")
86
84
  Library._toolkit = Library._lib_type(str(Library.toolkit_libpath))
87
85
 
88
86
  return Library._toolkit
@@ -93,7 +91,6 @@ class Library:
93
91
  raise ValueError("Agent server is not available in the current context.")
94
92
 
95
93
  if not Library._agent_client:
96
- print(f"Opening agent client library: {Library.agent_client_libpath}")
97
94
  Library._agent_client = Library._lib_type(
98
95
  str(Library.agent_client_libpath)
99
96
  )
@@ -106,7 +103,6 @@ class Library:
106
103
  raise ValueError("Agent client is not available in the current context.")
107
104
 
108
105
  if not Library._agent_server:
109
- print(f"Opening agent server library: {Library.agent_server_libpath}")
110
106
  Library._agent_server = Library._lib_type(
111
107
  str(Library.agent_server_libpath)
112
108
  )
@@ -2,13 +2,13 @@ import ctypes
2
2
  import json
3
3
  from abc import ABC
4
4
  from typing import Optional, Tuple
5
- from enum import Enum
5
+ from enum import IntEnum
6
6
  from dataclasses import dataclass
7
7
 
8
8
  from .define import MaaNotificationCallback
9
9
 
10
10
 
11
- # class NotificationEvent(Enum):
11
+ # class NotificationEvent(IntEnum):
12
12
  # ResourceLoading = 1
13
13
  # ControllerAction = 2
14
14
  # TaskerTask = 3
@@ -17,7 +17,7 @@ from .define import MaaNotificationCallback
17
17
  # TaskAction = 6
18
18
 
19
19
 
20
- class NotificationType(Enum):
20
+ class NotificationType(IntEnum):
21
21
  Unknown = 0
22
22
  Starting = 1
23
23
  Succeeded = 2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: MaaFw
3
- Version: 4.0.0a2
3
+ Version: 4.0.0b2
4
4
  Summary: An automation black-box testing framework based on image recognition
5
5
  Author: MaaXYZ
6
6
  Project-URL: Homepage, https://github.com/MaaXYZ/MaaFramework
@@ -8,6 +8,7 @@ Requires-Python: >=3.9
8
8
  Description-Content-Type: text/markdown
9
9
  License-File: LICENSE.md
10
10
  Requires-Dist: numpy
11
+ Requires-Dist: strenum
11
12
  Requires-Dist: MaaAgentBinary
12
13
 
13
14
  <!-- markdownlint-disable MD033 MD041 -->
@@ -1,34 +1,34 @@
1
1
  maa/__init__.py,sha256=t2Z9yJWrSZfH16xYN67bKpiPEHDf7iaiw4wi0PjmU8U,250
2
- maa/agent_client.py,sha256=M7h0bZ6KQdCIeTMNtVKRnSDP2-NWBlA8WON41ByHDI4,2549
2
+ maa/agent_client.py,sha256=MGjwVCM_Y60O2pJJn5iCxh0ymg-ebOWlDw2euSaZSu0,2855
3
3
  maa/buffer.py,sha256=XFr1MnWt-xmZkhQ_2ZzGfiqSJJwmphY4U07EEzMNYQc,16544
4
4
  maa/context.py,sha256=hOxo7GArAmdBwMGHPqM1I2rtNE5N6WR1QwPOLxZgSvU,5754
5
5
  maa/controller.py,sha256=V9ALn24vQX-mWngZbuapBcv-_HNHCtUwHXa3Em2X13s,22517
6
6
  maa/custom_action.py,sha256=V-kJ-5ahcImnzrZBbAH_RJqoiQ7RjBT39ffdSOi9_c4,2495
7
7
  maa/custom_recognition.py,sha256=o2k2tM-NstcDpivXPdoritI3laUN1NQl3Yq1M6RkNcE,3055
8
- maa/define.py,sha256=32xhHQ2gYXQ4pVamLfW6lO5wCA2-9J8KVmr47ZYKde8,13251
8
+ maa/define.py,sha256=qec4GQkYi6AtorJ1ix880Fz67bpZULJOV3VpZEDd2Es,13341
9
9
  maa/job.py,sha256=MUI5T2X9ON9c7Dl6yo_0pp8Ulpn25XOD_uEdGm2k-TA,1231
10
- maa/library.py,sha256=i-YpxpmU-G_AwKdnRMnSSSRXiKDSwbwYdn9IQf1OLJc,4211
11
- maa/notification_handler.py,sha256=1sFukH3R5l9Fp73CP7DV8fv6gTYge_kb6foSDNcNERY,5251
10
+ maa/library.py,sha256=9af7ncHUk33N5JcacaAk87JLKkP3atu-J8wf-CvfYhw,3891
11
+ maa/notification_handler.py,sha256=563C8mcdmx3f3Q5cqs_lY219CMD_QX1euajc6-ec8sg,5260
12
12
  maa/resource.py,sha256=RgHP-SAxwQRGvDOcC0oTYfEE8bOxs-llscgtBKNHRhk,9909
13
13
  maa/tasker.py,sha256=Hgi1Pbq20rKnTM3fU5yZP_QjetYNOpov7YulatPWAPI,14551
14
14
  maa/toolkit.py,sha256=H7P58dPLKzEm_aZMsDJ98IaMZnTE-hcFgK8MKnN0F6g,11381
15
15
  maa/agent/__init__.py,sha256=K4vyyD6YgLR6PEQl86t4oKP4eViCdNr3Br94dNk8YjM,257
16
16
  maa/agent/agent_server.py,sha256=e0yE_ffWJlTPydJbYLK9OhCM5fVVlZQIcvEQMjB5V68,3636
17
- maa/bin/libMaaAdbControlUnit.dylib,sha256=QXLpSeMY0WF7EJy217ZAj69yz006BlujOEZgLL_t18s,836064
18
- maa/bin/libMaaAgentClient.dylib,sha256=XcPApO-6OAiDPBC6vvKDq5GAPeFPVlgAP7G9TPWUJuo,1559552
19
- maa/bin/libMaaAgentServer.dylib,sha256=kp8mG7z2q-AiHMMJ70xJTeg2A7wdhxWCv36HZgUR3rc,1742624
20
- maa/bin/libMaaDbgControlUnit.dylib,sha256=5gqf7g8LT-1onqfVlMs6e_Fvq4G09Mu8G89DtbDJLXE,408352
21
- maa/bin/libMaaFramework.dylib,sha256=4c7aP10aI20ZUEvv-ei1ltjyUmR_sz0gqbmW886AZGs,2612592
22
- maa/bin/libMaaToolkit.dylib,sha256=68deGBHxBGwM25KDK1OXdtaNk-ECaq1dkGlVm2JjLuY,1041440
23
- maa/bin/libMaaUtils.dylib,sha256=t4FSHlJRlC0nAYAY44tn5I6XwCaMXW1jdcP5Zf1qcjI,666192
17
+ maa/bin/libMaaAdbControlUnit.dylib,sha256=aGQOeec8bYZlxEpg8J6Tg51WaC8vqScYKFt0vzbKd_k,836064
18
+ maa/bin/libMaaAgentClient.dylib,sha256=cBXY78Hj9MtLYODngK9-EGDjCN854tV8WB1SN_ISlNM,1560672
19
+ maa/bin/libMaaAgentServer.dylib,sha256=XnxRPi8k8cen67uHf2v3murU8qmPgom9fAW7VwzZw68,1742912
20
+ maa/bin/libMaaDbgControlUnit.dylib,sha256=hCTrT3QA2nmxpdWuWriO325OifmFubB6vED9wqB2ukI,408352
21
+ maa/bin/libMaaFramework.dylib,sha256=31s3rUeLyQL5RN_W_p-vZxwmQ6TbqhbXFeQDyfpL0pE,2612592
22
+ maa/bin/libMaaToolkit.dylib,sha256=ApB0jEIdOaReymbEw2nLfeyv0sLFSGPEu9rVVY-ocpU,1041776
23
+ maa/bin/libMaaUtils.dylib,sha256=BO6aB2Hk4MlrPzHJ_yerbUf49I66GwcCTN5z9EEtb5A,666608
24
24
  maa/bin/libc++.1.dylib,sha256=JgkIYa1p2V7iuU82soZKtsjGiQMbrY7PIZFTXvGTTiU,1119312
25
25
  maa/bin/libc++abi.1.dylib,sha256=pZ-bCGTv8rVWFb4mXEGZo72NazBPQBRoFebx61kC3nM,349792
26
26
  maa/bin/libfastdeploy_ppocr.dylib,sha256=tSvJPzuSveJXfcZKouwhQvU99Mp1WNFJKVvG1Llobqs,5892048
27
27
  maa/bin/libonnxruntime.1.19.2.dylib,sha256=f8EBJ8zYzL1YyofthTy0ochZgofp3yrSZxAbFWZXoXk,20095056
28
28
  maa/bin/libopencv_world4.4.8.0.dylib,sha256=4p4JxFEzDj3aIjEmwJ5xU6swYWwC-T2hMpwCIosxV7M,17058736
29
29
  maa/bin/libunwind.1.dylib,sha256=J7xL-Nmf8RnImMEUVQhrqJBiAJg5pTFQMW9wlhQrudc,110656
30
- maafw-4.0.0a2.dist-info/LICENSE.md,sha256=RG51X65V_wNLuyG-RGcLXxFsKyZnlH5wNvK_5mMlOag,7560
31
- maafw-4.0.0a2.dist-info/METADATA,sha256=vAek11gehEac-cFzrKsRBDnzfs7d66zS2U5gOTqzMOY,13054
32
- maafw-4.0.0a2.dist-info/WHEEL,sha256=1CApOnkFuWZEkhR9WmDDOaS63zUq6l6hzbJnHzzTYno,104
33
- maafw-4.0.0a2.dist-info/top_level.txt,sha256=G8r2L__aYaMq4S3R70G6NsfEROiVp08kUcWvATzk2J8,4
34
- maafw-4.0.0a2.dist-info/RECORD,,
30
+ maafw-4.0.0b2.dist-info/LICENSE.md,sha256=RG51X65V_wNLuyG-RGcLXxFsKyZnlH5wNvK_5mMlOag,7560
31
+ maafw-4.0.0b2.dist-info/METADATA,sha256=V8vNGvij2MDh5lQk0NXbeIMf3IxXt5YK04_iLEzQInE,13077
32
+ maafw-4.0.0b2.dist-info/WHEEL,sha256=1CApOnkFuWZEkhR9WmDDOaS63zUq6l6hzbJnHzzTYno,104
33
+ maafw-4.0.0b2.dist-info/top_level.txt,sha256=G8r2L__aYaMq4S3R70G6NsfEROiVp08kUcWvATzk2J8,4
34
+ maafw-4.0.0b2.dist-info/RECORD,,