MaaFw 4.4.0a1__py3-none-win_arm64.whl → 4.4.0a4__py3-none-win_arm64.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
@@ -57,6 +57,13 @@ class AgentClient:
57
57
  def connected(self) -> bool:
58
58
  return bool(Library.agent_client().MaaAgentClientConnected(self._handle))
59
59
 
60
+ @property
61
+ def alive(self) -> bool:
62
+ return bool(Library.agent_client().MaaAgentClientAlive(self._handle))
63
+
64
+ def set_timeout(self, milliseconds: int) -> bool:
65
+ return bool(Library.agent_client().MaaAgentClientSetTimeout(self._handle, ctypes.c_int64(milliseconds)))
66
+
60
67
  _api_properties_initialized: bool = False
61
68
 
62
69
  @staticmethod
@@ -103,3 +110,14 @@ class AgentClient:
103
110
  Library.agent_client().MaaAgentClientConnected.argtypes = [
104
111
  MaaAgentClientHandle,
105
112
  ]
113
+
114
+ Library.agent_client().MaaAgentClientAlive.restype = MaaBool
115
+ Library.agent_client().MaaAgentClientAlive.argtypes = [
116
+ MaaAgentClientHandle,
117
+ ]
118
+
119
+ Library.agent_client().MaaAgentClientSetTimeout.restype = MaaBool
120
+ Library.agent_client().MaaAgentClientSetTimeout.argtypes = [
121
+ MaaAgentClientHandle,
122
+ ctypes.c_int64,
123
+ ]
Binary file
Binary file
Binary file
Binary file
maa/bin/MaaFramework.dll CHANGED
Binary file
maa/bin/MaaToolkit.dll CHANGED
Binary file
maa/bin/MaaUtils.dll CHANGED
Binary file
Binary file
maa/custom_action.py CHANGED
@@ -65,8 +65,6 @@ class CustomAction(ABC):
65
65
  context = Context(c_context)
66
66
  task_detail = context.tasker.get_task_detail(int(c_task_id))
67
67
  reco_detail = context.tasker.get_recognition_detail(int(c_reco_id))
68
- if not task_detail or not reco_detail:
69
- return int(False)
70
68
 
71
69
  box = RectBuffer(c_box).get()
72
70
 
maa/custom_recognition.py CHANGED
@@ -67,8 +67,6 @@ class CustomRecognition(ABC):
67
67
 
68
68
  context = Context(c_context)
69
69
  task_detail = context.tasker.get_task_detail(int(c_task_id))
70
- if not task_detail:
71
- return int(False)
72
70
 
73
71
  image = ImageBuffer(c_image).get()
74
72
 
maa/library.py CHANGED
@@ -2,6 +2,7 @@ import ctypes
2
2
  import ctypes.util
3
3
  import pathlib
4
4
  import platform
5
+ from typing import Optional
5
6
 
6
7
  from .define import *
7
8
 
@@ -9,10 +10,10 @@ from .define import *
9
10
  class Library:
10
11
  _is_agent_server: bool = False
11
12
 
12
- _framework: ctypes.CDLL = None
13
- _toolkit: ctypes.CDLL = None
14
- _agent_client: ctypes.CDLL = None
15
- _agent_server: ctypes.CDLL = None
13
+ _framework: Optional[ctypes.CDLL] = None
14
+ _toolkit: Optional[ctypes.CDLL] = None
15
+ _agent_client: Optional[ctypes.CDLL] = None
16
+ _agent_server: Optional[ctypes.CDLL] = None
16
17
  _lib_type = None
17
18
 
18
19
  @staticmethod
@@ -55,7 +56,7 @@ class Library:
55
56
 
56
57
  platform_type = platform.system().lower()
57
58
 
58
- if platform_type == "windows":
59
+ if platform_type == WINDOWS:
59
60
  Library._lib_type = ctypes.WinDLL
60
61
  else:
61
62
  Library._lib_type = ctypes.CDLL
@@ -72,7 +73,7 @@ class Library:
72
73
  def framework() -> ctypes.CDLL:
73
74
  if not Library.is_agent_server():
74
75
  if not Library._framework:
75
- Library._framework = Library._lib_type(str(Library.framework_libpath))
76
+ Library._framework = Library._lib_type(str(Library.framework_libpath)) # type: ignore
76
77
 
77
78
  return Library._framework
78
79
  else:
@@ -81,7 +82,7 @@ class Library:
81
82
  @staticmethod
82
83
  def toolkit() -> ctypes.CDLL:
83
84
  if not Library._toolkit:
84
- Library._toolkit = Library._lib_type(str(Library.toolkit_libpath))
85
+ Library._toolkit = Library._lib_type(str(Library.toolkit_libpath)) # type: ignore
85
86
 
86
87
  return Library._toolkit
87
88
 
@@ -91,9 +92,7 @@ class Library:
91
92
  raise ValueError("Agent server is not available in the current context.")
92
93
 
93
94
  if not Library._agent_client:
94
- Library._agent_client = Library._lib_type(
95
- str(Library.agent_client_libpath)
96
- )
95
+ Library._agent_client = Library._lib_type(str(Library.agent_client_libpath)) # type: ignore
97
96
 
98
97
  return Library._agent_client
99
98
 
@@ -103,9 +102,7 @@ class Library:
103
102
  raise ValueError("Agent client is not available in the current context.")
104
103
 
105
104
  if not Library._agent_server:
106
- Library._agent_server = Library._lib_type(
107
- str(Library.agent_server_libpath)
108
- )
105
+ Library._agent_server = Library._lib_type(str(Library.agent_server_libpath)) # type: ignore
109
106
 
110
107
  return Library._agent_server
111
108
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MaaFw
3
- Version: 4.4.0a1
3
+ Version: 4.4.0a4
4
4
  Summary: An automation black-box testing framework based on image recognition
5
5
  Project-URL: Homepage, https://github.com/MaaXYZ/MaaFramework
6
6
  Author: MaaXYZ
@@ -1,13 +1,13 @@
1
1
  maa/__init__.py,sha256=t2Z9yJWrSZfH16xYN67bKpiPEHDf7iaiw4wi0PjmU8U,250
2
- maa/agent_client.py,sha256=vrL1pyqYyK2CQePbMbCQraZnzx0rPaYWK4G8D9qU__Y,3365
2
+ maa/agent_client.py,sha256=qx1-3VGp97JB_UMlbkvK-O_GTigbdqD6U4gGKi2yQW4,4049
3
3
  maa/buffer.py,sha256=XFr1MnWt-xmZkhQ_2ZzGfiqSJJwmphY4U07EEzMNYQc,16544
4
4
  maa/context.py,sha256=dYCvRNqq2iCL8lIyp2TkZorGB5KNI34L3pGzlpdL7co,6454
5
5
  maa/controller.py,sha256=V9ALn24vQX-mWngZbuapBcv-_HNHCtUwHXa3Em2X13s,22517
6
- maa/custom_action.py,sha256=V-kJ-5ahcImnzrZBbAH_RJqoiQ7RjBT39ffdSOi9_c4,2495
7
- maa/custom_recognition.py,sha256=P8Kfh4PWoQXyw7loE-9zv_VCD2HUcE6qkIXCK_Ye9a4,3372
6
+ maa/custom_action.py,sha256=Jn4W1Jc8E35R6l_z2Co7cgNVYBQm0Xi_XD8uLvZI93A,2418
7
+ maa/custom_recognition.py,sha256=llIVKsFtqA-J6pAOMSlROWpM6ZZfKc69I_ORWTnjIqg,3314
8
8
  maa/define.py,sha256=qec4GQkYi6AtorJ1ix880Fz67bpZULJOV3VpZEDd2Es,13341
9
9
  maa/job.py,sha256=MUI5T2X9ON9c7Dl6yo_0pp8Ulpn25XOD_uEdGm2k-TA,1231
10
- maa/library.py,sha256=9af7ncHUk33N5JcacaAk87JLKkP3atu-J8wf-CvfYhw,3891
10
+ maa/library.py,sha256=u6gbEHDV3I0y69-ZoBo1p6-bAtP4jqSQa4FICuzaw3U,3961
11
11
  maa/notification_handler.py,sha256=LFJY6YqF9fJSkRsvpmj6ZL5DexMN_cEOj-HmpWpB9o0,5442
12
12
  maa/resource.py,sha256=sCGAK1FFjZCaf01t_FPdtl4pMDQsybhEjmafp9XfITA,12222
13
13
  maa/tasker.py,sha256=cAkYW8Mu5rAgsPlSGacTjJ830sF2yFtvlmXRvIJt-A4,14811
@@ -15,18 +15,18 @@ 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
17
  maa/bin/DirectML.dll,sha256=nJ5tgiVhxsQbkOaZSz6IV88dZtv7HgxMeZx8ibTpLaE,18527776
18
- maa/bin/MaaAdbControlUnit.dll,sha256=fGwCNEUlKRmdMecHmEVT7fh5tKRREm9ftl_m2egNy2c,1326080
19
- maa/bin/MaaAgentClient.dll,sha256=Mx4AEhHmfKhzd3bvw2U5izQv4Qp4okB-tWf3s0U-CU8,1967616
20
- maa/bin/MaaAgentServer.dll,sha256=HqnVxoLfnFd3rbq8gCcER2tznA9GEf9Rp9MAF21hZp4,2221056
21
- maa/bin/MaaDbgControlUnit.dll,sha256=M9zC8Bo-2jYTB8ikf3Bmvm_qwQLFqfHBHkC258T4HA8,775680
22
- maa/bin/MaaFramework.dll,sha256=FvGZKQretqg7z5wFcvF0dDyI3fQrMAUNvX6OS973owk,2813952
23
- maa/bin/MaaToolkit.dll,sha256=1kKWw5XZERGZRodzlYQ321V48tqq6KQcGqdwj63az-A,1308672
24
- maa/bin/MaaUtils.dll,sha256=Bie31fDgQQRUW9PWgQs75hyW-dbWLF2GnMz-xu29QoU,1008640
25
- maa/bin/MaaWin32ControlUnit.dll,sha256=kT08E2A7nRaIFTPDljnkYc8akDo76mbbU7tGsstYoXE,1558016
18
+ maa/bin/MaaAdbControlUnit.dll,sha256=OldGWw-VXTDxQQbVT2B1sfPVy_RkODW8nyTyHuKI4AM,1326080
19
+ maa/bin/MaaAgentClient.dll,sha256=n5qg6J6tXULM5Y3edU7iekPDsKg-Jxh8Msv-O7rqlGU,1973760
20
+ maa/bin/MaaAgentServer.dll,sha256=JmbG5V48RigggnqR_eG5NqdKZlO0HyQEM6zVfA1YtIA,2224640
21
+ maa/bin/MaaDbgControlUnit.dll,sha256=O_TqJr5jgosh9z3DvoaiKpPUwDcV3LEuSnJOPASVGY8,775680
22
+ maa/bin/MaaFramework.dll,sha256=EqDsD-WUSWJxjA0LeD3GLyQvg2x9NaKzMimWkDRDGAk,2802688
23
+ maa/bin/MaaToolkit.dll,sha256=uLSfiaWE_bV1rfYHHi1VLkZScuZGQcKsi4izv__DgOw,1308672
24
+ maa/bin/MaaUtils.dll,sha256=8-6D7cg-xXZ5cPRaxD32N1-Zj8EqxNW8fShKAiCraZ0,1008640
25
+ maa/bin/MaaWin32ControlUnit.dll,sha256=HLIyLU3o2BpvMqrDsKyoWF6WZfRCZcl54gTsWljOXt8,1558016
26
26
  maa/bin/fastdeploy_ppocr_maa.dll,sha256=HowKaHyB31cTK8ZoPAgxlPQOEKUM_jEJoCvyku5hj6k,1168384
27
27
  maa/bin/onnxruntime_maa.dll,sha256=rlFVEdC1cB6Yc4EbYuvoyGOr9o941NbLaOzwkaghAVo,19161600
28
28
  maa/bin/opencv_world4_maa.dll,sha256=-RoYA6M1PHqnM0Yc-SpKY07rk1mx7PNH6CuxkutS9yw,18250752
29
- maafw-4.4.0a1.dist-info/licenses/LICENSE.md,sha256=RG51X65V_wNLuyG-RGcLXxFsKyZnlH5wNvK_5mMlOag,7560
30
- maafw-4.4.0a1.dist-info/METADATA,sha256=xa4JvFXgE_yE54gdMqBLEL464Zrm9GGoHlCSk5144yE,24356
31
- maafw-4.4.0a1.dist-info/WHEEL,sha256=CUnyDJaykcVTxcKkonAaC86WeSAkytRwcxeIq_huwCo,93
32
- maafw-4.4.0a1.dist-info/RECORD,,
29
+ maafw-4.4.0a4.dist-info/licenses/LICENSE.md,sha256=RG51X65V_wNLuyG-RGcLXxFsKyZnlH5wNvK_5mMlOag,7560
30
+ maafw-4.4.0a4.dist-info/METADATA,sha256=cdASCKwmYXGrTcWLSD0CQgfsNX2bknZyrCl-nhydmLA,24356
31
+ maafw-4.4.0a4.dist-info/WHEEL,sha256=CUnyDJaykcVTxcKkonAaC86WeSAkytRwcxeIq_huwCo,93
32
+ maafw-4.4.0a4.dist-info/RECORD,,