11# AUTOGENERATED by je_auto_control.utils.stubs.generator — do not edit.
22# Regenerate with: python -m je_auto_control.utils.stubs.generator
3- from typing import Any , Dict , List , Optional , Tuple , Union
3+ # ruff: noqa: F401 # generated stub keeps typing imports for forward use
4+ from typing import (
5+ Any , Callable , Dict , List , Mapping , Optional ,
6+ Sequence , Tuple , Union ,
7+ )
48
59def AC_a11y_click (name : str | None = ..., role : str | None = ..., app_name : str | None = ...) -> bool :
610 """Click the center of the first element matching the filters."""
711
12+ def AC_a11y_dump (app_name : str | None = ..., max_results : int = ...) -> Dict [str , Any ]:
13+ """Executor adapter: dump the accessibility tree as nested dict."""
14+
815def AC_a11y_find (name : str | None = ..., role : str | None = ..., app_name : str | None = ...) -> dict | None :
916 """Executor adapter: find an accessibility element, return its dict."""
1017
1118def AC_a11y_list (app_name : str | None = ..., max_results : int = ...) -> List [dict ]:
1219 """Executor adapter: list accessibility elements as plain dicts."""
1320
21+ def AC_a11y_record_events () -> List [Dict [str , Any ]]:
22+ """Executor adapter: peek at events without stopping the recorder."""
23+
24+ def AC_a11y_record_start (app_name : str | None = ..., poll_interval_s : float = ..., min_movement_px : int = ...) -> Dict [str , Any ]:
25+ """Executor adapter: start the singleton accessibility recorder."""
26+
27+ def AC_a11y_record_stop () -> List [Dict [str , Any ]]:
28+ """Executor adapter: stop the recorder and return the captured events."""
29+
30+ def AC_ab_best_strategy (target_id : str ) -> Dict [str , Any ]:
31+ ...
32+
33+ def AC_ab_clear () -> Dict [str , Any ]:
34+ ...
35+
36+ def AC_ab_locate (target_id : str , strategies : Dict [str , Dict [str , Any ]], max_parallel : int = ..., record : bool = ...) -> Dict [str , Any ]:
37+ """Executor adapter: race N locator strategies for the same target."""
38+
39+ def AC_ab_report (target_id : str ) -> Dict [str , Any ]:
40+ ...
41+
1442def AC_add_package_to_callback_executor (package : str ) -> None :
1543 """將套件成員加入 CallbackExecutor"""
1644
@@ -77,7 +105,7 @@ def AC_check_key_is_press(keycode: int | str) -> bool | None:
77105def AC_click_mouse (mouse_keycode : int | str , x : int = ..., y : int = ...) -> Tuple [int , int , int ]:
78106 """在指定座標按下並放開滑鼠按鍵"""
79107
80- def AC_click_text (target : str , mouse_keycode : int | str = ..., lang : str = ..., region : Sequence [int ] | None = ..., min_confidence : float = ..., case_sensitive : bool = ..., backend : str | je_auto_control . utils . ocr . backends . base . OCRBackend | None = ...) -> Tuple [int , int ]:
108+ def AC_click_text (target : str , mouse_keycode : int | str = ..., lang : str = ..., region : Sequence [int ] | None = ..., min_confidence : float = ..., case_sensitive : bool = ..., backend : Any = ...) -> Tuple [int , int ]:
81109 """Locate ``target`` text and click its centre."""
82110
83111def AC_clipboard_get () -> str :
@@ -98,6 +126,18 @@ def AC_config_export() -> Dict[str, Any]:
98126def AC_config_import (bundle : Dict [str , Any ], dry_run : bool = ...) -> Dict [str , Any ]:
99127 """Executor adapter: apply a config bundle dict to the user config root."""
100128
129+ def AC_costs_clear () -> Dict [str , Any ]:
130+ ...
131+
132+ def AC_costs_list (limit : int = ...) -> List [Dict [str , Any ]]:
133+ ...
134+
135+ def AC_costs_record (provider : str , model : str , input_tokens : int , output_tokens : int , label : str | None = ..., run_id : str | None = ..., user : str | None = ...) -> Dict [str , Any ]:
136+ """Executor adapter: append one LLM call to the cost-telemetry log."""
137+
138+ def AC_costs_summary (limit : int = ...) -> Dict [str , Any ]:
139+ """Executor adapter: aggregate cost events by model / provider / day."""
140+
101141def AC_create_project (project_path : str = ..., parent_name : str = ...) -> None :
102142 """Create project directory structure and templates."""
103143
@@ -122,7 +162,7 @@ def AC_email_trigger_start() -> Dict[str, Any]:
122162def AC_email_trigger_stop () -> Dict [str , Any ]:
123163 ...
124164
125- def AC_execute_action (action_list : list | dict , raise_on_error : bool = ..., _validated : bool = ..., dry_run : bool = ..., step_callback : Callable [[list ], NoneType ] | None = ...) -> Dict [str , str ]:
165+ def AC_execute_action (action_list : list | dict , raise_on_error : bool = ..., _validated : bool = ..., dry_run : bool = ..., step_callback : Callable [[list ], None ] | None = ...) -> Dict [str , str ]:
126166 """執行 action list"""
127167
128168def AC_execute_files (execute_files_list : list ) -> List [Dict [str , str ]]:
@@ -131,6 +171,15 @@ def AC_execute_files(execute_files_list: list) -> List[Dict[str, str]]:
131171def AC_execute_process (exe_path : str ) -> None :
132172 """Start an external executable file."""
133173
174+ def AC_failure_hook_clear () -> Dict [str , Any ]:
175+ ...
176+
177+ def AC_failure_hook_fire (source : str , source_id : str , error_text : str = ..., script_path : str | None = ..., screenshot_path : str | None = ..., log_tail : str = ..., metadata : Dict [str , Any ] | None = ...) -> List [Dict [str , Any ]]:
178+ """Executor adapter: file a ticket through every registered backend."""
179+
180+ def AC_failure_hook_list () -> List [Dict [str , Any ]]:
181+ ...
182+
134183def AC_find_text_regex (pattern : str , lang : str = ..., region : List [int ] | None = ..., min_confidence : float = ..., flags : int = ...) -> List [dict ]:
135184 """Executor adapter: regex OCR search returning JSON-friendly dicts."""
136185
@@ -230,7 +279,7 @@ def AC_locate_and_click(image: Any, mouse_keycode: int | str, detect_threshold:
230279def AC_locate_image_center (image : Any , detect_threshold : float = ..., draw_image : bool = ...) -> Tuple [int , int ]:
231280 """找出單一影像並回傳中心座標"""
232281
233- def AC_locate_text (target : str , lang : str = ..., region : Sequence [int ] | None = ..., min_confidence : float = ..., case_sensitive : bool = ..., backend : str | je_auto_control . utils . ocr . backends . base . OCRBackend | None = ...) -> Tuple [int , int ]:
282+ def AC_locate_text (target : str , lang : str = ..., region : Sequence [int ] | None = ..., min_confidence : float = ..., case_sensitive : bool = ..., backend : Any = ...) -> Tuple [int , int ]:
234283 """Return the centre (x, y) of the first match; raise if not found."""
235284
236285def AC_mouse_left (x : int | None = ..., y : int | None = ...) -> Tuple [int , int , int ]:
@@ -374,10 +423,10 @@ def AC_set_record_enable(set_enable: bool = ...) -> None:
374423def AC_shell_command (shell_command : str | List [str ]) -> None :
375424 """Execute shell command with shell=False."""
376425
377- def AC_start_mcp_http_server (host : str = ..., port : int = ..., mcp : je_auto_control . utils . mcp_server . server . MCPServer | None = ..., auth_token : str | None = ..., ssl_context : ssl . SSLContext | None = ...) -> HttpMCPServer :
426+ def AC_start_mcp_http_server (host : str = ..., port : int = ..., mcp : Any = ..., auth_token : str | None = ..., ssl_context : Any = ...) -> Any :
378427 """Start and return an :class:`HttpMCPServer`; convenience wrapper."""
379428
380- def AC_start_mcp_server () -> MCPServer :
429+ def AC_start_mcp_server () -> Any :
381430 """Start a stdio MCP server in the foreground; blocks until EOF."""
382431
383432def AC_start_remote_host (token : str , bind : str = ..., port : int = ..., fps : float = ..., quality : int = ..., region : List [int ] | None = ..., max_clients : int = ...) -> Dict [str , Any ]:
@@ -419,7 +468,7 @@ def AC_usb_watch_start(poll_interval_s: float = ...) -> Dict[str, Any]:
419468def AC_usb_watch_stop () -> Dict [str , Any ]:
420469 ...
421470
422- def AC_vlm_click (description : str , screen_region : List [int ] | None = ..., model : str | None = ..., backend : je_auto_control . utils . vision . backends . base . VLMBackend | None = ...) -> bool :
471+ def AC_vlm_click (description : str , screen_region : List [int ] | None = ..., model : str | None = ..., backend : Any = ...) -> bool :
423472 """Locate by description, then click the center of the match."""
424473
425474def AC_vlm_locate (description : str , screen_region : List [int ] | None = ..., model : str | None = ...) -> List [int ] | None :
@@ -434,7 +483,7 @@ def AC_wait_region_idle(region: List[int], timeout_s: float = ..., poll_interval
434483def AC_wait_screen_stable (region : List [int ] | None = ..., timeout_s : float = ..., poll_interval_s : float = ..., stable_for_s : float = ..., max_pixel_diff : int = ...) -> Dict [str , Any ]:
435484 """Executor adapter: smart wait for the screen to stop moving."""
436485
437- def AC_wait_text (target : str , lang : str = ..., region : Sequence [int ] | None = ..., timeout : float = ..., poll : float = ..., min_confidence : float = ..., case_sensitive : bool = ..., backend : str | je_auto_control . utils . ocr . backends . base . OCRBackend | None = ...) -> Tuple [int , int ]:
486+ def AC_wait_text (target : str , lang : str = ..., region : Sequence [int ] | None = ..., timeout : float = ..., poll : float = ..., min_confidence : float = ..., case_sensitive : bool = ..., backend : Any = ...) -> Tuple [int , int ]:
438487 """Poll until ``target`` appears on screen; raise on timeout."""
439488
440489def AC_wait_window (title_substring : str , timeout : float = ..., poll : float = ..., case_sensitive : bool = ...) -> int :
0 commit comments