clerk-sdk 0.4.3__tar.gz → 0.4.5__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.
Files changed (62) hide show
  1. {clerk_sdk-0.4.3/clerk_sdk.egg-info → clerk_sdk-0.4.5}/PKG-INFO +1 -1
  2. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/client.py +3 -3
  3. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/client_actor/model.py +13 -16
  4. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_actions/actions.py +24 -24
  5. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_actions/base.py +2 -2
  6. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5/clerk_sdk.egg-info}/PKG-INFO +1 -1
  7. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/setup.py +1 -1
  8. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/LICENSE +0 -0
  9. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/MANIFEST.in +0 -0
  10. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/README.md +0 -0
  11. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/__init__.py +0 -0
  12. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/base.py +0 -0
  13. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/client.py +0 -0
  14. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/decorator/__init__.py +0 -0
  15. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/decorator/models.py +0 -0
  16. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/decorator/task_decorator.py +0 -0
  17. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/exceptions/__init__.py +0 -0
  18. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/exceptions/exceptions.py +0 -0
  19. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/exceptions/remote_device.py +0 -0
  20. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/__init__.py +0 -0
  21. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/action_model/__init__.py +0 -0
  22. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/action_model/model.py +0 -0
  23. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/action_model/utils.py +0 -0
  24. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/client_actor/__init__.py +0 -0
  25. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/client_actor/client_actor.py +0 -0
  26. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/client_actor/exception.py +0 -0
  27. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/decorators/__init__.py +0 -0
  28. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/decorators/gui_automation.py +0 -0
  29. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/exceptions/__init__.py +0 -0
  30. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/exceptions/agent_manager.py +0 -0
  31. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/exceptions/modality/__init__.py +0 -0
  32. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/exceptions/modality/exc.py +0 -0
  33. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/exceptions/websocket.py +0 -0
  34. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/requirements.txt +0 -0
  35. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_actions/__init__.py +0 -0
  36. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_actions/support.py +0 -0
  37. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_state_inspector/__init__.py +0 -0
  38. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_state_inspector/gui_vision.py +0 -0
  39. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_state_inspector/models.py +0 -0
  40. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_state_machine/__init__.py +0 -0
  41. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_state_machine/ai_recovery.py +0 -0
  42. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_state_machine/decorators.py +0 -0
  43. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_state_machine/exceptions.py +0 -0
  44. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_state_machine/models.py +0 -0
  45. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/gui_automation/ui_state_machine/state_machine.py +0 -0
  46. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/models/__init__.py +0 -0
  47. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/models/document.py +0 -0
  48. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/models/document_statuses.py +0 -0
  49. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/models/file.py +0 -0
  50. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/models/remote_device.py +0 -0
  51. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/models/response_model.py +0 -0
  52. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/models/ui_operator.py +0 -0
  53. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/utils/__init__.py +0 -0
  54. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/utils/logger.py +0 -0
  55. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk/utils/save_artifact.py +0 -0
  56. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk_sdk.egg-info/SOURCES.txt +0 -0
  57. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk_sdk.egg-info/dependency_links.txt +0 -0
  58. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk_sdk.egg-info/requires.txt +0 -0
  59. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/clerk_sdk.egg-info/top_level.txt +0 -0
  60. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/pyproject.toml +0 -0
  61. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/requirements.txt +0 -0
  62. {clerk_sdk-0.4.3 → clerk_sdk-0.4.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clerk-sdk
3
- Version: 0.4.3
3
+ Version: 0.4.5
4
4
  Summary: Library for interacting with Clerk
5
5
  Home-page: https://github.com/F-ONE-Group/clerk_pypi
6
6
  Author: F-ONE Group
@@ -16,7 +16,7 @@ from clerk.models.ui_operator import UiOperatorTask
16
16
 
17
17
  class RPAClerk(BaseClerk):
18
18
 
19
- root_endpoint = "/gui_automation"
19
+ root_endpoint: str | None = "/gui_automation"
20
20
 
21
21
  def allocate_remote_device(self, group_name: str, run_id: str):
22
22
  endpoint = "/remote_device/allocate"
@@ -59,7 +59,7 @@ class RPAClerk(BaseClerk):
59
59
 
60
60
 
61
61
  class GUIVisionClerk(BaseClerk):
62
- root_endpoint = "/gui_automation/vision"
62
+ root_endpoint: str | None = "/gui_automation/vision"
63
63
 
64
64
  def find_target(self, screen_b64: str, use_ocr: bool, target_prompt: str):
65
65
  endpoint = "/find_target"
@@ -140,7 +140,7 @@ class GUIVisionClerk(BaseClerk):
140
140
 
141
141
 
142
142
  class CourseCorrectorClerk(BaseClerk):
143
- root_endpoint = "/gui_automation/course_correction"
143
+ root_endpoint: str | None = "/gui_automation/course_correction"
144
144
 
145
145
  def get_corrective_actions(
146
146
  self,
@@ -1,22 +1,20 @@
1
- from typing import Any, List, Literal, Optional, TypeAlias, Union
1
+ from typing import Any, List, Literal, Optional, Union
2
2
  from pydantic import BaseModel, Field
3
3
  from enum import Enum
4
4
 
5
- from clerk.gui_automation.ui_actions.base import ActionTypes
6
5
 
7
-
8
- # ActionTypes = Literal[
9
- # "left_click",
10
- # "right_click",
11
- # "middle_click",
12
- # "double_click",
13
- # "send_keys",
14
- # "press_keys",
15
- # "hot_keys",
16
- # "paste_text",
17
- # "get_text",
18
- # "scroll",
19
- # ]
6
+ ActionTypes = Literal[
7
+ "left_click",
8
+ "right_click",
9
+ "middle_click",
10
+ "double_click",
11
+ "send_keys",
12
+ "press_keys",
13
+ "hot_keys",
14
+ "paste_text",
15
+ "get_text",
16
+ "scroll",
17
+ ]
20
18
 
21
19
 
22
20
  class ActionStates(Enum):
@@ -79,7 +77,6 @@ class WindowExecutePayload(BaseModel):
79
77
  "close_window",
80
78
  "activate_window",
81
79
  ]
82
-
83
80
  window_name: str
84
81
  timeout: int = Field(default=10)
85
82
 
@@ -45,7 +45,7 @@ class File(BaseModel):
45
45
 
46
46
  @field_validator("content", mode="before")
47
47
  @classmethod
48
- def convert_to_bytes(cls, v: str | bytes) -> bytes:
48
+ def convert_to_bytes(cls, v) -> bytes:
49
49
  if isinstance(v, str):
50
50
  from base64 import b64decode
51
51
 
@@ -75,7 +75,7 @@ class LeftClick(BaseAction):
75
75
  LeftClick(target="Suche").above("Kalender").do()
76
76
  """
77
77
 
78
- action_type = "left_click"
78
+ action_type: Literal["left_click"] = "left_click"
79
79
 
80
80
  @backoff.on_exception(
81
81
  backoff.expo,
@@ -100,7 +100,7 @@ class LeftClick(BaseAction):
100
100
 
101
101
  @property
102
102
  def actionable_string(self):
103
- return f"LeftClick(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchors}').do()"
103
+ return f"LeftClick(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchor}', relation='{self.relation}').do()"
104
104
 
105
105
 
106
106
  class RightClick(BaseAction):
@@ -118,7 +118,7 @@ class RightClick(BaseAction):
118
118
  RightClick(target="Suche").above("Kalender").do()
119
119
  """
120
120
 
121
- action_type = "right_click"
121
+ action_type: Literal["right_click"] = "right_click"
122
122
 
123
123
  @backoff.on_exception(
124
124
  backoff.expo,
@@ -143,7 +143,7 @@ class RightClick(BaseAction):
143
143
 
144
144
  @property
145
145
  def actionable_string(self):
146
- return f"RightClick(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchors}').do()"
146
+ return f"RightClick(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchor}', relation='{self.relation}').do()"
147
147
 
148
148
 
149
149
  class MiddleClickAction(BaseAction):
@@ -161,7 +161,7 @@ class MiddleClickAction(BaseAction):
161
161
  MiddleClickAction(target="Suche").above("Kalender").do()
162
162
  """
163
163
 
164
- action_type = "middle_click"
164
+ action_type: Literal["middle_click"] = "middle_click"
165
165
 
166
166
  @backoff.on_exception(
167
167
  backoff.expo,
@@ -186,7 +186,7 @@ class MiddleClickAction(BaseAction):
186
186
 
187
187
  @property
188
188
  def actionable_string(self):
189
- return f"MiddleClickAction(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchors}').do()"
189
+ return f"MiddleClickAction(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchor}', relation='{self.relation}').do()"
190
190
 
191
191
 
192
192
  class DoubleClick(BaseAction):
@@ -204,7 +204,7 @@ class DoubleClick(BaseAction):
204
204
  DoubleClick(target="Suche").above("Kalender").do()
205
205
  """
206
206
 
207
- action_type = "double_click"
207
+ action_type: Literal["double_click"] = "double_click"
208
208
 
209
209
  @backoff.on_exception(
210
210
  backoff.expo,
@@ -229,7 +229,7 @@ class DoubleClick(BaseAction):
229
229
 
230
230
  @property
231
231
  def actionable_string(self):
232
- return f"DoubleClick(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchors}').do()"
232
+ return f"DoubleClick(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchor}', relation='{self.relation}').do()"
233
233
 
234
234
 
235
235
  class Scroll(BaseAction):
@@ -249,7 +249,7 @@ class Scroll(BaseAction):
249
249
  DoubleClick(target="Suche").above("Kalender").do()
250
250
  """
251
251
 
252
- action_type = "scroll"
252
+ action_type: Literal["scroll"] = "scroll"
253
253
  clicks: int
254
254
  click_coords: List[int] = Field(default=[])
255
255
 
@@ -333,7 +333,7 @@ class SendKeys(BaseAction):
333
333
 
334
334
  @property
335
335
  def actionable_string(self):
336
- return f"SendKeys(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchors}', keys='{self.keys}').do()"
336
+ return f"SendKeys(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchor}', relation='{self.relation}', keys='{self.keys}').do()"
337
337
 
338
338
 
339
339
  class PressKeys(BaseAction):
@@ -353,7 +353,7 @@ class PressKeys(BaseAction):
353
353
  PressKeys(keys='ctrl+shift+esc').do()
354
354
  """
355
355
 
356
- action_type = "press_keys"
356
+ action_type: ActionTypes = "press_keys"
357
357
  keys: str
358
358
 
359
359
  def do(self):
@@ -366,7 +366,7 @@ class PressKeys(BaseAction):
366
366
 
367
367
  @property
368
368
  def actionable_string(self):
369
- return f"PressKeys(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchors}', keys='{self.keys}').do()"
369
+ return f"PressKeys(action_type='{self.action_type}', target='{self.target}', anchor='{self.anchor}', relation='{self.relation}', keys='{self.keys}').do()"
370
370
 
371
371
 
372
372
  class WaitFor(BaseAction):
@@ -385,7 +385,7 @@ class WaitFor(BaseAction):
385
385
  WaitFor("element").do(timeout=60)
386
386
  """
387
387
 
388
- action_type = "wait_for"
388
+ action_type: Literal["wait_for"] = "wait_for"
389
389
  retry_timeout: float = 0.5
390
390
  is_awaited: bool = True
391
391
 
@@ -450,7 +450,7 @@ class OpenApplication(BaseAction):
450
450
  OpenApplication(app_path="/path/to/application.exe", app_window_name="Application Window").do()
451
451
  """
452
452
 
453
- action_type = "open_app"
453
+ action_type: Literal["open_app"] = "open_app"
454
454
  app_path: str = Field(description="Absolute path of the application")
455
455
  app_window_name: str = Field(
456
456
  description="Name of the application window once open. Wildcard logic enabled."
@@ -479,7 +479,7 @@ class ForceCloseApplication(BaseAction):
479
479
  Executes the action to force close the application by creating and performing an ApplicationExecutePayload with the specified process name.
480
480
  """
481
481
 
482
- action_type = "force_close_app"
482
+ action_type: Literal["force_close_app"] = "force_close_app"
483
483
  process_name: str = Field(
484
484
  description="Process name from task manager. Example: process.exe"
485
485
  )
@@ -509,7 +509,7 @@ class SaveFiles(BaseAction):
509
509
  SaveFiles(save_location="/path/to/", files=["/path/to/file_1", "/path/to/file_2"]).do()
510
510
  """
511
511
 
512
- action_type = "save_files"
512
+ action_type: ActionTypes = "save_files"
513
513
  save_location: str
514
514
  files: Union[List[str], List[FileDetails]]
515
515
 
@@ -580,7 +580,7 @@ class GetFile(BaseAction):
580
580
  GetFile(file_location="/path/to/file_1").do()
581
581
  """
582
582
 
583
- action_type = "get_file"
583
+ action_type: Literal["get_file"] = "get_file"
584
584
  file_location: str
585
585
 
586
586
  def do(self) -> File:
@@ -605,7 +605,7 @@ class MaximizeWindow(BaseAction):
605
605
  MaximizeWindow(window_name="MyWindow").do()
606
606
  """
607
607
 
608
- action_type = "maximize_window"
608
+ action_type: Literal["maximize_window"] = "maximize_window"
609
609
  window_name: str
610
610
 
611
611
  def do(self, timeout: int = 10):
@@ -630,7 +630,7 @@ class MinimizeWindow(BaseAction):
630
630
  MinimizeWindow(window_name="MyWindow").do()
631
631
  """
632
632
 
633
- action_type = "minimize_window"
633
+ action_type: Literal["minimize_window"] = "minimize_window"
634
634
  window_name: str
635
635
 
636
636
  def do(self, timeout: int = 10):
@@ -655,7 +655,7 @@ class CloseWindow(BaseAction):
655
655
  CloseWindow(window_name="MyWindow").do()
656
656
  """
657
657
 
658
- action_type = "close_window"
658
+ action_type: Literal["close_window"] = "close_window"
659
659
  window_name: str
660
660
 
661
661
  def do(self, timeout: int = 10):
@@ -680,7 +680,7 @@ class ActivateWindow(BaseAction):
680
680
  ActivateWindow(window_name="MyWindow").do()
681
681
  """
682
682
 
683
- action_type = "activate_window"
683
+ action_type: Literal["activate_window"] = "activate_window"
684
684
  window_name: str
685
685
 
686
686
  def do(self, timeout: int = 10):
@@ -709,7 +709,7 @@ class GetText(BaseAction):
709
709
 
710
710
  """
711
711
 
712
- action_type = "get_text"
712
+ action_type: Literal["get_text"] = "get_text"
713
713
 
714
714
  @backoff.on_exception(
715
715
  backoff.expo,
@@ -752,7 +752,7 @@ class PasteText(BaseAction):
752
752
 
753
753
  """
754
754
 
755
- action_type = "paste_text"
755
+ action_type: Literal["paste_text"] = "paste_text"
756
756
  keys: Union[str, List[str]]
757
757
  followed_by: Optional[str] = Field(default=None)
758
758
 
@@ -1,4 +1,4 @@
1
- from typing import Literal, Self, TypeAlias, Union, List, Optional
1
+ from typing import Literal, Self, Union, List, Optional
2
2
  from pydantic import BaseModel, Field, model_validator
3
3
  from ..client_actor import get_screen
4
4
  from ..exceptions.modality.exc import TargetModalityError
@@ -24,7 +24,7 @@ def to_full_img_path(img: Union[str, ImageB64]) -> str:
24
24
  return os.path.join(TARGET_IMAGES_PATH, img)
25
25
 
26
26
 
27
- ActionTypes: TypeAlias = Literal[
27
+ ActionTypes = Literal[
28
28
  "left_click",
29
29
  "right_click",
30
30
  "middle_click",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clerk-sdk
3
- Version: 0.4.3
3
+ Version: 0.4.5
4
4
  Summary: Library for interacting with Clerk
5
5
  Home-page: https://github.com/F-ONE-Group/clerk_pypi
6
6
  Author: F-ONE Group
@@ -13,7 +13,7 @@ gui_requirements = get_requirements("./clerk/gui_automation")
13
13
 
14
14
  setup(
15
15
  name="clerk-sdk",
16
- version="0.4.3",
16
+ version="0.4.5",
17
17
  description="Library for interacting with Clerk",
18
18
  long_description=open("README.md").read(),
19
19
  long_description_content_type="text/markdown",
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