add new tool: to_captcha

This commit is contained in:
VladislavIlin7 2026-05-17 01:03:55 +03:00
parent 8f86dbbdac
commit 4852345bf6
12 changed files with 716 additions and 35 deletions

View file

@ -26,3 +26,22 @@ class TaskServiceProtocol(Protocol):
async def subscribe_run_stream(self, run_id: str) -> Queue[dict[str, Any]] | None: ...
async def unsubscribe_run_stream(self, run_id: str, queue: Queue[dict[str, Any]]) -> None: ...
async def notify_captcha(
self,
task_id: str,
kind: str | None,
reason: str | None,
view_url: str | None,
timeout_seconds: int,
) -> TaskRecord | None: ...
async def mark_captcha_solved(self, task_id: str, detector: str | None = None) -> TaskRecord | None: ...
async def extend_captcha(self, task_id: str, extra_seconds: int) -> TaskRecord | None: ...
async def abort_captcha(self, task_id: str, reason: str | None = None) -> TaskRecord | None: ...
async def prompt_captcha_timeout(self, task_id: str) -> TaskRecord | None: ...
async def wait_captcha(self, task_id: str, timeout: float) -> TaskRecord | None: ...