Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix: stop generating fill_form() in adaptive caching for non-ATS workflows (#5497)
pedrohsdbded96464241e
diff --git a/docs/changelog.mdx b/docs/changelog.mdxindex 329e83fde..095d7c49b 100644--- a/docs/changelog.mdx+++ b/docs/changelog.mdx@@ -25,36 +25,6 @@ keywords:<h1 className="cl-title">Changelog</h1><p className="cl-subtitle">New features, improvements, and fixes in Skyvern</p>-<Update label="Week of April 14, 2026" description="Undo/redo in workflow editor, PDF download and editor bug fixes">--## New features--- **Undo/Redo in Workflow Editor** — The workflow canvas now supports undo and redo via Cmd/Ctrl+Z and Cmd/Ctrl+Shift+Z (or toolbar buttons). Up to 50 canvas snapshots are tracked, and native per-field undo inside text inputs is preserved. ([#5484](https://github.com/Skyvern-AI/skyvern/pull/5484))--## Bug fixes--- Fixed PDF downloads in CloakBrowser where the AI selecting "Open" instead of "Download file" caused failures; the print-to-file path is now used as a reliable fallback on affected portals.-- The workflow editor now shows a warning when an `error_code_mapping` key contains leading or trailing whitespace, which previously caused error conditions to silently never match at runtime. ([#5487](https://github.com/Skyvern-AI/skyvern/pull/5487))--</Update>--<Update label="Week of April 7, 2026" description="Loop output fixes, navigation reliability, shadow DOM and credential improvements">--## Improvements--- **Consistent Pagination Styling** — The "Items per page" dropdown on the Run History page now matches the styling on the Workflow Runs page for a uniform experience. ([#5480](https://github.com/Skyvern-AI/skyvern/pull/5480))--## Bug fixes--- Fixed MCP-edited workflows dropping external credential bindings (OnePassword, Bitwarden, Azure Vault) on login blocks after a workflow update, which caused login failures on re-run. ([#5479](https://github.com/Skyvern-AI/skyvern/pull/5479))-- Fixed database timeouts when loading workflow run details for large runs with many tasks and steps; step counts are now fetched with a single aggregate query.-- Fixed a bug in workflow loops where downloaded files accumulated across iterations, producing incorrect cumulative ZIP archives instead of per-iteration ones. ([#5477](https://github.com/Skyvern-AI/skyvern/pull/5477))-- Fixed loop block output leaking across iterations, where data from a prior iteration could overwrite the current iteration's results in downstream parameter references. ([#5475](https://github.com/Skyvern-AI/skyvern/pull/5475))-- Navigation errors are now classified as permanent, proxy-sensitive, or transient; permanent errors (e.g. invalid URL) no longer retry, reducing wasted time on unrecoverable failures.-- Fixed combobox/dropdown fields in shadow DOM component libraries failing to discover options; a full page re-scrape diff is now used as a fallback when the observed shadow root doesn't reveal options. ([#5471](https://github.com/Skyvern-AI/skyvern/pull/5471))--</Update>-<Update label="v1.0.22 — February 26, 2026" description="Adaptive caching, Workflow Trigger block, CLI signup, and more">## New featuresdiff --git a/fern/docs/changelog.mdx b/fern/docs/changelog.mdxindex a7abbd7dc..4841b0e53 100644--- a/fern/docs/changelog.mdx+++ b/fern/docs/changelog.mdx@@ -7,8 +7,6 @@ mode: custom<div className="cl-page"><div className="cl-sidebar"><p className="cl-sidebar-title">TIMELINE</p>- <a href="#week-of-april-14%2C-2026" className="cl-sidebar-link">Week of Apr 14, 2026</a>- <a href="#week-of-april-7%2C-2026" className="cl-sidebar-link">Week of Apr 7, 2026</a><a href="#week-of-march-30%2C-2026" className="cl-sidebar-link">Week of Mar 30, 2026</a><a href="#v1-0-22-—-february-26%2C-2026" className="cl-sidebar-link">v1.0.22 — Feb 26, 2026</a><a href="#v1-0-21-—-february-24%2C-2026" className="cl-sidebar-link">v1.0.21 — Feb 24, 2026</a>@@ -22,36 +20,6 @@ mode: custom<h1 className="cl-title">Changelog</h1><p className="cl-subtitle">New features, improvements, and fixes in Skyvern</p>-<Update label="Week of April 14, 2026" description="Undo/redo in workflow editor, PDF download and editor bug fixes">--## New features--- **Undo/Redo in Workflow Editor** — The workflow canvas now supports undo and redo via Cmd/Ctrl+Z and Cmd/Ctrl+Shift+Z (or toolbar buttons). Up to 50 canvas snapshots are tracked, and native per-field undo inside text inputs is preserved. ([#5484](https://github.com/Skyvern-AI/skyvern/pull/5484))--## Bug fixes--- Fixed PDF downloads in CloakBrowser where the AI selecting "Open" instead of "Download file" caused failures; the print-to-file path is now used as a reliable fallback on affected portals.-- The workflow editor now shows a warning when an `error_code_mapping` key contains leading or trailing whitespace, which previously caused error conditions to silently never match at runtime. ([#5487](https://github.com/Skyvern-AI/skyvern/pull/5487))--</Update>--<Update label="Week of April 7, 2026" description="Loop output fixes, navigation reliability, shadow DOM and credential improvements">--## Improvements--- **Consistent Pagination Styling** — The "Items per page" dropdown on the Run History page now matches the styling on the Workflow Runs page for a uniform experience. ([#5480](https://github.com/Skyvern-AI/skyvern/pull/5480))--## Bug fixes--- Fixed MCP-edited workflows dropping external credential bindings (OnePassword, Bitwarden, Azure Vault) on login blocks after a workflow update, which caused login failures on re-run. ([#5479](https://github.com/Skyvern-AI/skyvern/pull/5479))-- Fixed database timeouts when loading workflow run details for large runs with many tasks and steps; step counts are now fetched with a single aggregate query.-- Fixed a bug in workflow loops where downloaded files accumulated across iterations, producing incorrect cumulative ZIP archives instead of per-iteration ones. ([#5477](https://github.com/Skyvern-AI/skyvern/pull/5477))-- Fixed loop block output leaking across iterations, where data from a prior iteration could overwrite the current iteration's results in downstream parameter references. ([#5475](https://github.com/Skyvern-AI/skyvern/pull/5475))-- Navigation errors are now classified as permanent, proxy-sensitive, or transient; permanent errors (e.g. invalid URL) no longer retry, reducing wasted time on unrecoverable failures.-- Fixed combobox/dropdown fields in shadow DOM component libraries failing to discover options; a full page re-scrape diff is now used as a fallback when the observed shadow root doesn't reveal options. ([#5471](https://github.com/Skyvern-AI/skyvern/pull/5471))--</Update>-<Update label="Week of March 30, 2026" description="MCP batch tools, smarter caching, and script self-healing improvements">## New featuresdiff --git a/pyproject.toml b/pyproject.tomlindex 90b3c36af..1145f40e9 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -1,6 +1,6 @@[project]name = "skyvern"-version = "1.0.30"+version = "1.0.31"description = ""authors = [{ name = "Skyvern AI", email = "[email protected]" }]requires-python = ">=3.11,<3.14"diff --git a/skyvern/client/__init__.py b/skyvern/client/__init__.pyindex 69cae3beb..5211c3a5d 100644--- a/skyvern/client/__init__.py+++ b/skyvern/client/__init__.py@@ -94,6 +94,7 @@ if typing.TYPE_CHECKING:CredentialTypeOutput,CredentialVaultType,CreditCardCredentialResponse,+ DeleteScheduleResponse,DownloadToS3Block,DownloadToS3BlockYaml,Extensions,@@ -284,6 +285,8 @@ if typing.TYPE_CHECKING:NonEmptyPasswordCredential,OnePasswordCredentialParameter,OnePasswordCredentialParameterYaml,+ OrganizationScheduleItem,+ OrganizationScheduleListResponse,OtpType,OutputParameter,OutputParameterYaml,@@ -530,6 +533,10 @@ if typing.TYPE_CHECKING:WorkflowRunTimeline,WorkflowRunTimelineType,WorkflowRunTriggerType,+ WorkflowSchedule,+ WorkflowScheduleListResponse,+ WorkflowScheduleResponse,+ WorkflowScheduleUpsertRequest,WorkflowStatus,WorkflowTriggerBlock,WorkflowTriggerBlockParametersItem,@@ -547,9 +554,10 @@ if typing.TYPE_CHECKING:WorkflowTriggerBlockYaml,)from .errors import BadRequestError, ConflictError, ForbiddenError, NotFoundError, UnprocessableEntityError- from . import artifacts, scripts+ from . import artifacts, schedules, scriptsfrom .client import AsyncSkyvern, Skyvernfrom .environment import SkyvernEnvironment+ from .schedules import SchedulesListAllRequestStatusfrom .version import __version___dynamic_imports: typing.Dict[str, str] = {"ActAction": ".types",@@ -642,6 +650,7 @@ _dynamic_imports: typing.Dict[str, str] = {"CredentialTypeOutput": ".types","CredentialVaultType": ".types","CreditCardCredentialResponse": ".types",+ "DeleteScheduleResponse": ".types","DownloadToS3Block": ".types","DownloadToS3BlockYaml": ".types","Extensions": ".types",@@ -834,6 +843,8 @@ _dynamic_imports: typing.Dict[str, str] = {"NotFoundError": ".errors","OnePasswordCredentialParameter": ".types","OnePasswordCredentialParameterYaml": ".types",+ "OrganizationScheduleItem": ".types",+ "OrganizationScheduleListResponse": ".types","OtpType": ".types","OutputParameter": ".types","OutputParameterYaml": ".types",@@ -873,6 +884,7 @@ _dynamic_imports: typing.Dict[str, str] = {"RunSdkActionRequestAction_Validate": ".types","RunSdkActionResponse": ".types","RunStatus": ".types",+ "SchedulesListAllRequestStatus": ".schedules","Script": ".types","ScriptFileCreate": ".types","ScriptRunResponse": ".types",@@ -1083,6 +1095,10 @@ _dynamic_imports: typing.Dict[str, str] = {"WorkflowRunTimeline": ".types","WorkflowRunTimelineType": ".types","WorkflowRunTriggerType": ".types",+ "WorkflowSchedule": ".types",+ "WorkflowScheduleListResponse": ".types",+ "WorkflowScheduleResponse": ".types",+ "WorkflowScheduleUpsertRequest": ".types","WorkflowStatus": ".types","WorkflowTriggerBlock": ".types","WorkflowTriggerBlockParametersItem": ".types",@@ -1100,6 +1116,7 @@ _dynamic_imports: typing.Dict[str, str] = {"WorkflowTriggerBlockYaml": ".types","__version__": ".version","artifacts": ".artifacts",+ "schedules": ".schedules","scripts": ".scripts",}@@ -1216,6 +1233,7 @@ __all__ = ["CredentialTypeOutput","CredentialVaultType","CreditCardCredentialResponse",+ "DeleteScheduleResponse","DownloadToS3Block","DownloadToS3BlockYaml","Extensions",@@ -1408,6 +1426,8 @@ __all__ = ["NotFoundError","OnePasswordCredentialParameter","OnePasswordCredentialParameterYaml",+ "OrganizationScheduleItem",+ "OrganizationScheduleListResponse","OtpType","OutputParameter","OutputParameterYaml",@@ -1447,6 +1467,7 @@ __all__ = ["RunSdkActionRequestAction_Validate","RunSdkActionResponse","RunStatus",+ "SchedulesListAllRequestStatus","Script","ScriptFileCreate","ScriptRunResponse",@@ -1657,6 +1678,10 @@ __all__ = ["WorkflowRunTimeline","WorkflowRunTimelineType","WorkflowRunTriggerType",+ "WorkflowSchedule",+ "WorkflowScheduleListResponse",+ "WorkflowScheduleResponse",+ "WorkflowScheduleUpsertRequest","WorkflowStatus","WorkflowTriggerBlock","WorkflowTriggerBlockParametersItem",@@ -1674,5 +1699,6 @@ __all__ = ["WorkflowTriggerBlockYaml","__version__","artifacts",+ "schedules","scripts",]diff --git a/skyvern/client/client.py b/skyvern/client/client.pyindex f04e31881..932b311d2 100644--- a/skyvern/client/client.py+++ b/skyvern/client/client.py@@ -6,7 +6,6 @@ import datetime as dtimport typingimport httpx-from . import corefrom .core.client_wrapper import AsyncClientWrapper, SyncClientWrapperfrom .core.request_options import RequestOptionsfrom .environment import SkyvernEnvironment@@ -51,6 +50,7 @@ from .types.workflow_status import WorkflowStatusif typing.TYPE_CHECKING:from .artifacts.client import ArtifactsClient, AsyncArtifactsClient+ from .schedules.client import AsyncSchedulesClient, SchedulesClientfrom .scripts.client import AsyncScriptsClient, ScriptsClient# this is used as the default value for optional parametersOMIT = typing.cast(typing.Any, ...)@@ -124,6 +124,7 @@ class Skyvern:self._raw_client = RawSkyvern(client_wrapper=self._client_wrapper)self._artifacts: typing.Optional[ArtifactsClient] = Noneself._scripts: typing.Optional[ScriptsClient] = None+ self._schedules: typing.Optional[SchedulesClient] = None@propertydef with_raw_response(self) -> RawSkyvern:@@ -178,7 +179,7 @@ class Skyvern:engine : typing.Optional[RunEngine]- The engine that powers the agent task. The default value is `skyvern-2.0`, the latest Skyvern agent that performs pretty well with complex and multi-step tasks. `skyvern-1.0` is good for simple tasks like filling a form, or searching for information on Google. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.+ The engine that powers the agent task. The default value is `skyvern-1.0`, which is good for simple tasks like filling a form, or searching for information on Google. `skyvern-2.0` is the latest Skyvern agent that performs well with complex and multi-step tasks. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.title : typing.Optional[str]The title for the task@@ -1337,14 +1338,11 @@ class Skyvern:)return _response.data- def upload_file(- self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None- ) -> UploadFileResponse:+ def upload_file(self, *, file: str, request_options: typing.Optional[RequestOptions] = None) -> UploadFileResponse:"""Parameters----------- file : core.File- See core.File for more documentation+ file : strrequest_options : typing.Optional[RequestOptions]Request-specific configuration.@@ -1361,7 +1359,9 @@ class Skyvern:client = Skyvern(api_key="YOUR_API_KEY",)- client.upload_file()+ client.upload_file(+ file="file",+ )"""_response = self._raw_client.upload_file(file=file, request_options=request_options)return _response.data@@ -2492,6 +2492,14 @@ class Skyvern:self._scripts = ScriptsClient(client_wrapper=self._client_wrapper)return self._scripts+ @property+ def schedules(self):+ if self._schedules is None:+ from .schedules.client import SchedulesClient # noqa: E402++ self._schedules = SchedulesClient(client_wrapper=self._client_wrapper)+ return self._schedules+class AsyncSkyvern:"""@@ -2561,6 +2569,7 @@ class AsyncSkyvern:self._raw_client = AsyncRawSkyvern(client_wrapper=self._client_wrapper)self._artifacts: typing.Optional[AsyncArtifactsClient] = Noneself._scripts: typing.Optional[AsyncScriptsClient] = None+ self._schedules: typing.Optional[AsyncSchedulesClient] = None@propertydef with_raw_response(self) -> AsyncRawSkyvern:@@ -2615,7 +2624,7 @@ class AsyncSkyvern:engine : typing.Optional[RunEngine]- The engine that powers the agent task. The default value is `skyvern-2.0`, the latest Skyvern agent that performs pretty well with complex and multi-step tasks. `skyvern-1.0` is good for simple tasks like filling a form, or searching for information on Google. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.+ The engine that powers the agent task. The default value is `skyvern-1.0`, which is good for simple tasks like filling a form, or searching for information on Google. `skyvern-2.0` is the latest Skyvern agent that performs well with complex and multi-step tasks. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.title : typing.Optional[str]The title for the task@@ -3943,13 +3952,12 @@ class AsyncSkyvern:return _response.dataasync def upload_file(- self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None+ self, *, file: str, request_options: typing.Optional[RequestOptions] = None) -> UploadFileResponse:"""Parameters----------- file : core.File- See core.File for more documentation+ file : strrequest_options : typing.Optional[RequestOptions]Request-specific configuration.@@ -3971,7 +3979,9 @@ class AsyncSkyvern:async def main() -> None:- await client.upload_file()+ await client.upload_file(+ file="file",+ )asyncio.run(main())@@ -5275,6 +5285,14 @@ class AsyncSkyvern:self._scripts = AsyncScriptsClient(client_wrapper=self._client_wrapper)return self._scripts+ @property+ def schedules(self):+ if self._schedules is None:+ from .schedules.client import AsyncSchedulesClient # noqa: E402++ self._schedules = AsyncSchedulesClient(client_wrapper=self._client_wrapper)+ return self._schedules+def _get_base_url(*, base_url: typing.Optional[str] = None, environment: SkyvernEnvironment) -> str:if base_url is not None:diff --git a/skyvern/client/core/client_wrapper.py b/skyvern/client/core/client_wrapper.pyindex b9b5566d2..222726377 100644--- a/skyvern/client/core/client_wrapper.py+++ b/skyvern/client/core/client_wrapper.py@@ -22,10 +22,10 @@ class BaseClientWrapper:def get_headers(self) -> typing.Dict[str, str]:headers: typing.Dict[str, str] = {- "User-Agent": "skyvern/1.0.30",+ "User-Agent": "skyvern/1.0.31","X-Fern-Language": "Python","X-Fern-SDK-Name": "skyvern",- "X-Fern-SDK-Version": "1.0.30",+ "X-Fern-SDK-Version": "1.0.31",**(self.get_custom_headers() or {}),}if self._api_key is not None:diff --git a/skyvern/client/raw_client.py b/skyvern/client/raw_client.pyindex 6c549a9ee..3ad0862cb 100644--- a/skyvern/client/raw_client.py+++ b/skyvern/client/raw_client.py@@ -4,7 +4,6 @@ import datetime as dtimport typingfrom json.decoder import JSONDecodeError-from . import corefrom .core.api_error import ApiErrorfrom .core.client_wrapper import AsyncClientWrapper, SyncClientWrapperfrom .core.http_response import AsyncHttpResponse, HttpResponse@@ -105,7 +104,7 @@ class RawSkyvern:engine : typing.Optional[RunEngine]- The engine that powers the agent task. The default value is `skyvern-2.0`, the latest Skyvern agent that performs pretty well with complex and multi-step tasks. `skyvern-1.0` is good for simple tasks like filling a form, or searching for information on Google. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.+ The engine that powers the agent task. The default value is `skyvern-1.0`, which is good for simple tasks like filling a form, or searching for information on Google. `skyvern-2.0` is the latest Skyvern agent that performs well with complex and multi-step tasks. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.title : typing.Optional[str]The title for the task@@ -1794,13 +1793,12 @@ class RawSkyvern:raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)def upload_file(- self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None+ self, *, file: str, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[UploadFileResponse]:"""Parameters----------- file : core.File- See core.File for more documentation+ file : strrequest_options : typing.Optional[RequestOptions]Request-specific configuration.@@ -1813,10 +1811,10 @@ class RawSkyvern:_response = self._client_wrapper.httpx_client.request("v1/upload_file",method="POST",- data={},- files={+ data={"file": file,},+ files={},request_options=request_options,omit=OMIT,force_multipart=True,@@ -3510,7 +3508,7 @@ class AsyncRawSkyvern:engine : typing.Optional[RunEngine]- The engine that powers the agent task. The default value is `skyvern-2.0`, the latest Skyvern agent that performs pretty well with complex and multi-step tasks. `skyvern-1.0` is good for simple tasks like filling a form, or searching for information on Google. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.+ The engine that powers the agent task. The default value is `skyvern-1.0`, which is good for simple tasks like filling a form, or searching for information on Google. `skyvern-2.0` is the latest Skyvern agent that performs well with complex and multi-step tasks. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.title : typing.Optional[str]The title for the task@@ -5199,13 +5197,12 @@ class AsyncRawSkyvern:raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)async def upload_file(- self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None+ self, *, file: str, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[UploadFileResponse]:"""Parameters----------- file : core.File- See core.File for more documentation+ file : strrequest_options : typing.Optional[RequestOptions]Request-specific configuration.@@ -5218,10 +5215,10 @@ class AsyncRawSkyvern:_response = await self._client_wrapper.httpx_client.request("v1/upload_file",method="POST",- data={},- files={+ data={"file": file,},+ files={},request_options=request_options,omit=OMIT,force_multipart=True,diff --git a/skyvern/client/schedules/__init__.py b/skyvern/client/schedules/__init__.pynew file mode 100644index 000000000..12978240e--- /dev/null+++ b/skyvern/client/schedules/__init__.py@@ -0,0 +1,34 @@+# This file was auto-generated by Fern from our API Definition.++# isort: skip_file++import typing+from importlib import import_module++if typing.TYPE_CHECKING:+ from .types import SchedulesListAllRequestStatus+_dynamic_imports: typing.Dict[str, str] = {"SchedulesListAllRequestStatus": ".types"}+++def __getattr__(attr_name: str) -> typing.Any:+ module_name = _dynamic_imports.get(attr_name)+ if module_name is None:+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")+ try:+ module = import_module(module_name, __package__)+ if module_name == f".{attr_name}":+ return module+ else:+ return getattr(module, attr_name)+ except ImportError as e:+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e+ except AttributeError as e:+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e+++def __dir__():+ lazy_attrs = list(_dynamic_imports.keys())+ return sorted(lazy_attrs)+++__all__ = ["SchedulesListAllRequestStatus"]diff --git a/skyvern/client/schedules/client.py b/skyvern/client/schedules/client.pynew file mode 100644index 000000000..f3ad4a267--- /dev/null+++ b/skyvern/client/schedules/client.py@@ -0,0 +1,837 @@+# This file was auto-generated by Fern from our API Definition.++import typing++from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper+from ..core.request_options import RequestOptions+from ..types.delete_schedule_response import DeleteScheduleResponse+from ..types.organization_schedule_list_response import OrganizationScheduleListResponse+from ..types.workflow_schedule_list_response import WorkflowScheduleListResponse+from ..types.workflow_schedule_response import WorkflowScheduleResponse+from .raw_client import AsyncRawSchedulesClient, RawSchedulesClient+from .types.schedules_list_all_request_status import SchedulesListAllRequestStatus++# this is used as the default value for optional parameters+OMIT = typing.cast(typing.Any, ...)+++class SchedulesClient:+ def __init__(self, *, client_wrapper: SyncClientWrapper):+ self._raw_client = RawSchedulesClient(client_wrapper=client_wrapper)++ @property+ def with_raw_response(self) -> RawSchedulesClient:+ """+ Retrieves a raw implementation of this client that returns raw responses.++ Returns+ -------+ RawSchedulesClient+ """+ return self._raw_client++ def list_all(+ self,+ *,+ page: typing.Optional[int] = None,+ page_size: typing.Optional[int] = None,+ status: typing.Optional[SchedulesListAllRequestStatus] = None,+ search: typing.Optional[str] = None,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> OrganizationScheduleListResponse:+ """+ Parameters+ ----------+ page : typing.Optional[int]++ page_size : typing.Optional[int]++ status : typing.Optional[SchedulesListAllRequestStatus]+ Filter by status: 'active' or 'paused'++ search : typing.Optional[str]+ Search by workflow title or schedule name++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ OrganizationScheduleListResponse+ Successful Response++ Examples+ --------+ from skyvern import Skyvern++ client = Skyvern(+ api_key="YOUR_API_KEY",+ )+ client.schedules.list_all(+ page=1,+ page_size=1,+ status="active",+ search="search",+ )+ """+ _response = self._raw_client.list_all(+ page=page, page_size=page_size, status=status, search=search, request_options=request_options+ )+ return _response.data++ def list(+ self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None+ ) -> WorkflowScheduleListResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleListResponse+ Successful Response++ Examples+ --------+ from skyvern import Skyvern++ client = Skyvern(+ api_key="YOUR_API_KEY",+ )+ client.schedules.list(+ workflow_permanent_id="workflow_permanent_id",+ )+ """+ _response = self._raw_client.list(workflow_permanent_id, request_options=request_options)+ return _response.data++ def create(+ self,+ workflow_permanent_id: str,+ *,+ cron_expression: str,+ timezone: str,+ enabled: typing.Optional[bool] = OMIT,+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,+ name: typing.Optional[str] = OMIT,+ description: typing.Optional[str] = OMIT,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> WorkflowScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ cron_expression : str++ timezone : str++ enabled : typing.Optional[bool]++ parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]++ name : typing.Optional[str]++ description : typing.Optional[str]++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleResponse+ Successful Response++ Examples+ --------+ from skyvern import Skyvern++ client = Skyvern(+ api_key="YOUR_API_KEY",+ )+ client.schedules.create(+ workflow_permanent_id="workflow_permanent_id",+ cron_expression="cron_expression",+ timezone="timezone",+ )+ """+ _response = self._raw_client.create(+ workflow_permanent_id,+ cron_expression=cron_expression,+ timezone=timezone,+ enabled=enabled,+ parameters=parameters,+ name=name,+ description=description,+ request_options=request_options,+ )+ return _response.data++ def get(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> WorkflowScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleResponse+ Successful Response++ Examples+ --------+ from skyvern import Skyvern++ client = Skyvern(+ api_key="YOUR_API_KEY",+ )+ client.schedules.get(+ workflow_permanent_id="workflow_permanent_id",+ workflow_schedule_id="workflow_schedule_id",+ )+ """+ _response = self._raw_client.get(workflow_permanent_id, workflow_schedule_id, request_options=request_options)+ return _response.data++ def update(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ cron_expression: str,+ timezone: str,+ enabled: typing.Optional[bool] = OMIT,+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,+ name: typing.Optional[str] = OMIT,+ description: typing.Optional[str] = OMIT,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> WorkflowScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ cron_expression : str++ timezone : str++ enabled : typing.Optional[bool]++ parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]++ name : typing.Optional[str]++ description : typing.Optional[str]++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleResponse+ Successful Response++ Examples+ --------+ from skyvern import Skyvern++ client = Skyvern(+ api_key="YOUR_API_KEY",+ )+ client.schedules.update(+ workflow_permanent_id="workflow_permanent_id",+ workflow_schedule_id="workflow_schedule_id",+ cron_expression="cron_expression",+ timezone="timezone",+ )+ """+ _response = self._raw_client.update(+ workflow_permanent_id,+ workflow_schedule_id,+ cron_expression=cron_expression,+ timezone=timezone,+ enabled=enabled,+ parameters=parameters,+ name=name,+ description=description,+ request_options=request_options,+ )+ return _response.data++ def delete(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> DeleteScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ DeleteScheduleResponse+ Successful Response++ Examples+ --------+ from skyvern import Skyvern++ client = Skyvern(+ api_key="YOUR_API_KEY",+ )+ client.schedules.delete(+ workflow_permanent_id="workflow_permanent_id",+ workflow_schedule_id="workflow_schedule_id",+ )+ """+ _response = self._raw_client.delete(+ workflow_permanent_id, workflow_schedule_id, request_options=request_options+ )+ return _response.data++ def enable(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> WorkflowScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleResponse+ Successful Response++ Examples+ --------+ from skyvern import Skyvern++ client = Skyvern(+ api_key="YOUR_API_KEY",+ )+ client.schedules.enable(+ workflow_permanent_id="workflow_permanent_id",+ workflow_schedule_id="workflow_schedule_id",+ )+ """+ _response = self._raw_client.enable(+ workflow_permanent_id, workflow_schedule_id, request_options=request_options+ )+ return _response.data++ def disable(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> WorkflowScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleResponse+ Successful Response++ Examples+ --------+ from skyvern import Skyvern++ client = Skyvern(+ api_key="YOUR_API_KEY",+ )+ client.schedules.disable(+ workflow_permanent_id="workflow_permanent_id",+ workflow_schedule_id="workflow_schedule_id",+ )+ """+ _response = self._raw_client.disable(+ workflow_permanent_id, workflow_schedule_id, request_options=request_options+ )+ return _response.data+++class AsyncSchedulesClient:+ def __init__(self, *, client_wrapper: AsyncClientWrapper):+ self._raw_client = AsyncRawSchedulesClient(client_wrapper=client_wrapper)++ @property+ def with_raw_response(self) -> AsyncRawSchedulesClient:+ """+ Retrieves a raw implementation of this client that returns raw responses.++ Returns+ -------+ AsyncRawSchedulesClient+ """+ return self._raw_client++ async def list_all(+ self,+ *,+ page: typing.Optional[int] = None,+ page_size: typing.Optional[int] = None,+ status: typing.Optional[SchedulesListAllRequestStatus] = None,+ search: typing.Optional[str] = None,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> OrganizationScheduleListResponse:+ """+ Parameters+ ----------+ page : typing.Optional[int]++ page_size : typing.Optional[int]++ status : typing.Optional[SchedulesListAllRequestStatus]+ Filter by status: 'active' or 'paused'++ search : typing.Optional[str]+ Search by workflow title or schedule name++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ OrganizationScheduleListResponse+ Successful Response++ Examples+ --------+ import asyncio++ from skyvern import AsyncSkyvern++ client = AsyncSkyvern(+ api_key="YOUR_API_KEY",+ )+++ async def main() -> None:+ await client.schedules.list_all(+ page=1,+ page_size=1,+ status="active",+ search="search",+ )+++ asyncio.run(main())+ """+ _response = await self._raw_client.list_all(+ page=page, page_size=page_size, status=status, search=search, request_options=request_options+ )+ return _response.data++ async def list(+ self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None+ ) -> WorkflowScheduleListResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleListResponse+ Successful Response++ Examples+ --------+ import asyncio++ from skyvern import AsyncSkyvern++ client = AsyncSkyvern(+ api_key="YOUR_API_KEY",+ )+++ async def main() -> None:+ await client.schedules.list(+ workflow_permanent_id="workflow_permanent_id",+ )+++ asyncio.run(main())+ """+ _response = await self._raw_client.list(workflow_permanent_id, request_options=request_options)+ return _response.data++ async def create(+ self,+ workflow_permanent_id: str,+ *,+ cron_expression: str,+ timezone: str,+ enabled: typing.Optional[bool] = OMIT,+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,+ name: typing.Optional[str] = OMIT,+ description: typing.Optional[str] = OMIT,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> WorkflowScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ cron_expression : str++ timezone : str++ enabled : typing.Optional[bool]++ parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]++ name : typing.Optional[str]++ description : typing.Optional[str]++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleResponse+ Successful Response++ Examples+ --------+ import asyncio++ from skyvern import AsyncSkyvern++ client = AsyncSkyvern(+ api_key="YOUR_API_KEY",+ )+++ async def main() -> None:+ await client.schedules.create(+ workflow_permanent_id="workflow_permanent_id",+ cron_expression="cron_expression",+ timezone="timezone",+ )+++ asyncio.run(main())+ """+ _response = await self._raw_client.create(+ workflow_permanent_id,+ cron_expression=cron_expression,+ timezone=timezone,+ enabled=enabled,+ parameters=parameters,+ name=name,+ description=description,+ request_options=request_options,+ )+ return _response.data++ async def get(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> WorkflowScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleResponse+ Successful Response++ Examples+ --------+ import asyncio++ from skyvern import AsyncSkyvern++ client = AsyncSkyvern(+ api_key="YOUR_API_KEY",+ )+++ async def main() -> None:+ await client.schedules.get(+ workflow_permanent_id="workflow_permanent_id",+ workflow_schedule_id="workflow_schedule_id",+ )+++ asyncio.run(main())+ """+ _response = await self._raw_client.get(+ workflow_permanent_id, workflow_schedule_id, request_options=request_options+ )+ return _response.data++ async def update(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ cron_expression: str,+ timezone: str,+ enabled: typing.Optional[bool] = OMIT,+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,+ name: typing.Optional[str] = OMIT,+ description: typing.Optional[str] = OMIT,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> WorkflowScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ cron_expression : str++ timezone : str++ enabled : typing.Optional[bool]++ parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]++ name : typing.Optional[str]++ description : typing.Optional[str]++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleResponse+ Successful Response++ Examples+ --------+ import asyncio++ from skyvern import AsyncSkyvern++ client = AsyncSkyvern(+ api_key="YOUR_API_KEY",+ )+++ async def main() -> None:+ await client.schedules.update(+ workflow_permanent_id="workflow_permanent_id",+ workflow_schedule_id="workflow_schedule_id",+ cron_expression="cron_expression",+ timezone="timezone",+ )+++ asyncio.run(main())+ """+ _response = await self._raw_client.update(+ workflow_permanent_id,+ workflow_schedule_id,+ cron_expression=cron_expression,+ timezone=timezone,+ enabled=enabled,+ parameters=parameters,+ name=name,+ description=description,+ request_options=request_options,+ )+ return _response.data++ async def delete(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> DeleteScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ DeleteScheduleResponse+ Successful Response++ Examples+ --------+ import asyncio++ from skyvern import AsyncSkyvern++ client = AsyncSkyvern(+ api_key="YOUR_API_KEY",+ )+++ async def main() -> None:+ await client.schedules.delete(+ workflow_permanent_id="workflow_permanent_id",+ workflow_schedule_id="workflow_schedule_id",+ )+++ asyncio.run(main())+ """+ _response = await self._raw_client.delete(+ workflow_permanent_id, workflow_schedule_id, request_options=request_options+ )+ return _response.data++ async def enable(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> WorkflowScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleResponse+ Successful Response++ Examples+ --------+ import asyncio++ from skyvern import AsyncSkyvern++ client = AsyncSkyvern(+ api_key="YOUR_API_KEY",+ )+++ async def main() -> None:+ await client.schedules.enable(+ workflow_permanent_id="workflow_permanent_id",+ workflow_schedule_id="workflow_schedule_id",+ )+++ asyncio.run(main())+ """+ _response = await self._raw_client.enable(+ workflow_permanent_id, workflow_schedule_id, request_options=request_options+ )+ return _response.data++ async def disable(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> WorkflowScheduleResponse:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ WorkflowScheduleResponse+ Successful Response++ Examples+ --------+ import asyncio++ from skyvern import AsyncSkyvern++ client = AsyncSkyvern(+ api_key="YOUR_API_KEY",+ )+++ async def main() -> None:+ await client.schedules.disable(+ workflow_permanent_id="workflow_permanent_id",+ workflow_schedule_id="workflow_schedule_id",+ )+++ asyncio.run(main())+ """+ _response = await self._raw_client.disable(+ workflow_permanent_id, workflow_schedule_id, request_options=request_options+ )+ return _response.datadiff --git a/skyvern/client/schedules/raw_client.py b/skyvern/client/schedules/raw_client.pynew file mode 100644index 000000000..cf9ebfb29--- /dev/null+++ b/skyvern/client/schedules/raw_client.py@@ -0,0 +1,1008 @@+# This file was auto-generated by Fern from our API Definition.++import typing+from json.decoder import JSONDecodeError++from ..core.api_error import ApiError+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper+from ..core.http_response import AsyncHttpResponse, HttpResponse+from ..core.jsonable_encoder import jsonable_encoder+from ..core.pydantic_utilities import parse_obj_as+from ..core.request_options import RequestOptions+from ..errors.unprocessable_entity_error import UnprocessableEntityError+from ..types.delete_schedule_response import DeleteScheduleResponse+from ..types.organization_schedule_list_response import OrganizationScheduleListResponse+from ..types.workflow_schedule_list_response import WorkflowScheduleListResponse+from ..types.workflow_schedule_response import WorkflowScheduleResponse+from .types.schedules_list_all_request_status import SchedulesListAllRequestStatus++# this is used as the default value for optional parameters+OMIT = typing.cast(typing.Any, ...)+++class RawSchedulesClient:+ def __init__(self, *, client_wrapper: SyncClientWrapper):+ self._client_wrapper = client_wrapper++ def list_all(+ self,+ *,+ page: typing.Optional[int] = None,+ page_size: typing.Optional[int] = None,+ status: typing.Optional[SchedulesListAllRequestStatus] = None,+ search: typing.Optional[str] = None,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> HttpResponse[OrganizationScheduleListResponse]:+ """+ Parameters+ ----------+ page : typing.Optional[int]++ page_size : typing.Optional[int]++ status : typing.Optional[SchedulesListAllRequestStatus]+ Filter by status: 'active' or 'paused'++ search : typing.Optional[str]+ Search by workflow title or schedule name++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ HttpResponse[OrganizationScheduleListResponse]+ Successful Response+ """+ _response = self._client_wrapper.httpx_client.request(+ "v1/schedules",+ method="GET",+ params={+ "page": page,+ "page_size": page_size,+ "status": status,+ "search": search,+ },+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ OrganizationScheduleListResponse,+ parse_obj_as(+ type_=OrganizationScheduleListResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return HttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ def list(+ self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None+ ) -> HttpResponse[WorkflowScheduleListResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ HttpResponse[WorkflowScheduleListResponse]+ Successful Response+ """+ _response = self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules",+ method="GET",+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleListResponse,+ parse_obj_as(+ type_=WorkflowScheduleListResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return HttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ def create(+ self,+ workflow_permanent_id: str,+ *,+ cron_expression: str,+ timezone: str,+ enabled: typing.Optional[bool] = OMIT,+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,+ name: typing.Optional[str] = OMIT,+ description: typing.Optional[str] = OMIT,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> HttpResponse[WorkflowScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ cron_expression : str++ timezone : str++ enabled : typing.Optional[bool]++ parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]++ name : typing.Optional[str]++ description : typing.Optional[str]++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ HttpResponse[WorkflowScheduleResponse]+ Successful Response+ """+ _response = self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules",+ method="POST",+ json={+ "cron_expression": cron_expression,+ "timezone": timezone,+ "enabled": enabled,+ "parameters": parameters,+ "name": name,+ "description": description,+ },+ headers={+ "content-type": "application/json",+ },+ request_options=request_options,+ omit=OMIT,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleResponse,+ parse_obj_as(+ type_=WorkflowScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return HttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ def get(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> HttpResponse[WorkflowScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ HttpResponse[WorkflowScheduleResponse]+ Successful Response+ """+ _response = self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",+ method="GET",+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleResponse,+ parse_obj_as(+ type_=WorkflowScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return HttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ def update(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ cron_expression: str,+ timezone: str,+ enabled: typing.Optional[bool] = OMIT,+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,+ name: typing.Optional[str] = OMIT,+ description: typing.Optional[str] = OMIT,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> HttpResponse[WorkflowScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ cron_expression : str++ timezone : str++ enabled : typing.Optional[bool]++ parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]++ name : typing.Optional[str]++ description : typing.Optional[str]++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ HttpResponse[WorkflowScheduleResponse]+ Successful Response+ """+ _response = self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",+ method="PUT",+ json={+ "cron_expression": cron_expression,+ "timezone": timezone,+ "enabled": enabled,+ "parameters": parameters,+ "name": name,+ "description": description,+ },+ headers={+ "content-type": "application/json",+ },+ request_options=request_options,+ omit=OMIT,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleResponse,+ parse_obj_as(+ type_=WorkflowScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return HttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ def delete(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> HttpResponse[DeleteScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ HttpResponse[DeleteScheduleResponse]+ Successful Response+ """+ _response = self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",+ method="DELETE",+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ DeleteScheduleResponse,+ parse_obj_as(+ type_=DeleteScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return HttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ def enable(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> HttpResponse[WorkflowScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ HttpResponse[WorkflowScheduleResponse]+ Successful Response+ """+ _response = self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/enable",+ method="POST",+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleResponse,+ parse_obj_as(+ type_=WorkflowScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return HttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ def disable(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> HttpResponse[WorkflowScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ HttpResponse[WorkflowScheduleResponse]+ Successful Response+ """+ _response = self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/disable",+ method="POST",+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleResponse,+ parse_obj_as(+ type_=WorkflowScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return HttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)+++class AsyncRawSchedulesClient:+ def __init__(self, *, client_wrapper: AsyncClientWrapper):+ self._client_wrapper = client_wrapper++ async def list_all(+ self,+ *,+ page: typing.Optional[int] = None,+ page_size: typing.Optional[int] = None,+ status: typing.Optional[SchedulesListAllRequestStatus] = None,+ search: typing.Optional[str] = None,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> AsyncHttpResponse[OrganizationScheduleListResponse]:+ """+ Parameters+ ----------+ page : typing.Optional[int]++ page_size : typing.Optional[int]++ status : typing.Optional[SchedulesListAllRequestStatus]+ Filter by status: 'active' or 'paused'++ search : typing.Optional[str]+ Search by workflow title or schedule name++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ AsyncHttpResponse[OrganizationScheduleListResponse]+ Successful Response+ """+ _response = await self._client_wrapper.httpx_client.request(+ "v1/schedules",+ method="GET",+ params={+ "page": page,+ "page_size": page_size,+ "status": status,+ "search": search,+ },+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ OrganizationScheduleListResponse,+ parse_obj_as(+ type_=OrganizationScheduleListResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return AsyncHttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ async def list(+ self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None+ ) -> AsyncHttpResponse[WorkflowScheduleListResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ AsyncHttpResponse[WorkflowScheduleListResponse]+ Successful Response+ """+ _response = await self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules",+ method="GET",+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleListResponse,+ parse_obj_as(+ type_=WorkflowScheduleListResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return AsyncHttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ async def create(+ self,+ workflow_permanent_id: str,+ *,+ cron_expression: str,+ timezone: str,+ enabled: typing.Optional[bool] = OMIT,+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,+ name: typing.Optional[str] = OMIT,+ description: typing.Optional[str] = OMIT,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> AsyncHttpResponse[WorkflowScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ cron_expression : str++ timezone : str++ enabled : typing.Optional[bool]++ parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]++ name : typing.Optional[str]++ description : typing.Optional[str]++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ AsyncHttpResponse[WorkflowScheduleResponse]+ Successful Response+ """+ _response = await self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules",+ method="POST",+ json={+ "cron_expression": cron_expression,+ "timezone": timezone,+ "enabled": enabled,+ "parameters": parameters,+ "name": name,+ "description": description,+ },+ headers={+ "content-type": "application/json",+ },+ request_options=request_options,+ omit=OMIT,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleResponse,+ parse_obj_as(+ type_=WorkflowScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return AsyncHttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ async def get(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> AsyncHttpResponse[WorkflowScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ AsyncHttpResponse[WorkflowScheduleResponse]+ Successful Response+ """+ _response = await self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",+ method="GET",+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleResponse,+ parse_obj_as(+ type_=WorkflowScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return AsyncHttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ async def update(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ cron_expression: str,+ timezone: str,+ enabled: typing.Optional[bool] = OMIT,+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,+ name: typing.Optional[str] = OMIT,+ description: typing.Optional[str] = OMIT,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> AsyncHttpResponse[WorkflowScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ cron_expression : str++ timezone : str++ enabled : typing.Optional[bool]++ parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]++ name : typing.Optional[str]++ description : typing.Optional[str]++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ AsyncHttpResponse[WorkflowScheduleResponse]+ Successful Response+ """+ _response = await self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",+ method="PUT",+ json={+ "cron_expression": cron_expression,+ "timezone": timezone,+ "enabled": enabled,+ "parameters": parameters,+ "name": name,+ "description": description,+ },+ headers={+ "content-type": "application/json",+ },+ request_options=request_options,+ omit=OMIT,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleResponse,+ parse_obj_as(+ type_=WorkflowScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return AsyncHttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ async def delete(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> AsyncHttpResponse[DeleteScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ AsyncHttpResponse[DeleteScheduleResponse]+ Successful Response+ """+ _response = await self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",+ method="DELETE",+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ DeleteScheduleResponse,+ parse_obj_as(+ type_=DeleteScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return AsyncHttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ async def enable(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> AsyncHttpResponse[WorkflowScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ AsyncHttpResponse[WorkflowScheduleResponse]+ Successful Response+ """+ _response = await self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/enable",+ method="POST",+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleResponse,+ parse_obj_as(+ type_=WorkflowScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return AsyncHttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)++ async def disable(+ self,+ workflow_permanent_id: str,+ workflow_schedule_id: str,+ *,+ request_options: typing.Optional[RequestOptions] = None,+ ) -> AsyncHttpResponse[WorkflowScheduleResponse]:+ """+ Parameters+ ----------+ workflow_permanent_id : str++ workflow_schedule_id : str++ request_options : typing.Optional[RequestOptions]+ Request-specific configuration.++ Returns+ -------+ AsyncHttpResponse[WorkflowScheduleResponse]+ Successful Response+ """+ _response = await self._client_wrapper.httpx_client.request(+ f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/disable",+ method="POST",+ request_options=request_options,+ )+ try:+ if 200 <= _response.status_code < 300:+ _data = typing.cast(+ WorkflowScheduleResponse,+ parse_obj_as(+ type_=WorkflowScheduleResponse, # type: ignore+ object_=_response.json(),+ ),+ )+ return AsyncHttpResponse(response=_response, data=_data)+ if _response.status_code == 422:+ raise UnprocessableEntityError(+ headers=dict(_response.headers),+ body=typing.cast(+ typing.Optional[typing.Any],+ parse_obj_as(+ type_=typing.Optional[typing.Any], # type: ignore+ object_=_response.json(),+ ),+ ),+ )+ _response_json = _response.json()+ except JSONDecodeError:+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)diff --git a/skyvern/client/schedules/types/__init__.py b/skyvern/client/schedules/types/__init__.pynew file mode 100644index 000000000..9e416f0d7--- /dev/null+++ b/skyvern/client/schedules/types/__init__.py@@ -0,0 +1,34 @@+# This file was auto-generated by Fern from our API Definition.++# isort: skip_file++import typing+from importlib import import_module++if typing.TYPE_CHECKING:+ from .schedules_list_all_request_status import SchedulesListAllRequestStatus+_dynamic_imports: typing.Dict[str, str] = {"SchedulesListAllRequestStatus": ".schedules_list_all_request_status"}+++def __getattr__(attr_name: str) -> typing.Any:+ module_name = _dynamic_imports.get(attr_name)+ if module_name is None:+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")+ try:+ module = import_module(module_name, __package__)+ if module_name == f".{attr_name}":+ return module+ else:+ return getattr(module, attr_name)+ except ImportError as e:+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e+ except AttributeError as e:+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e+++def __dir__():+ lazy_attrs = list(_dynamic_imports.keys())+ return sorted(lazy_attrs)+++__all__ = ["SchedulesListAllRequestStatus"]diff --git a/skyvern/client/schedules/types/schedules_list_all_request_status.py b/skyvern/client/schedules/types/schedules_list_all_request_status.pynew file mode 100644index 000000000..dfc27397f--- /dev/null+++ b/skyvern/client/schedules/types/schedules_list_all_request_status.py@@ -0,0 +1,5 @@+# This file was auto-generated by Fern from our API Definition.++import typing++SchedulesListAllRequestStatus = typing.Union[typing.Literal["active", "paused"], typing.Any]diff --git a/skyvern/client/types/__init__.py b/skyvern/client/types/__init__.pyindex fa92f0cca..0dcb271c3 100644--- a/skyvern/client/types/__init__.py+++ b/skyvern/client/types/__init__.py@@ -101,6 +101,7 @@ if typing.TYPE_CHECKING:from .credential_type_output import CredentialTypeOutputfrom .credential_vault_type import CredentialVaultTypefrom .credit_card_credential_response import CreditCardCredentialResponse+ from .delete_schedule_response import DeleteScheduleResponsefrom .download_to_s3block import DownloadToS3Blockfrom .download_to_s3block_yaml import DownloadToS3BlockYamlfrom .extensions import Extensions@@ -311,6 +312,8 @@ if typing.TYPE_CHECKING:from .non_empty_password_credential import NonEmptyPasswordCredentialfrom .one_password_credential_parameter import OnePasswordCredentialParameterfrom .one_password_credential_parameter_yaml import OnePasswordCredentialParameterYaml+ from .organization_schedule_item import OrganizationScheduleItem+ from .organization_schedule_list_response import OrganizationScheduleListResponsefrom .otp_type import OtpTypefrom .output_parameter import OutputParameterfrom .output_parameter_yaml import OutputParameterYaml@@ -579,6 +582,10 @@ if typing.TYPE_CHECKING:from .workflow_run_timeline import WorkflowRunTimelinefrom .workflow_run_timeline_type import WorkflowRunTimelineTypefrom .workflow_run_trigger_type import WorkflowRunTriggerType+ from .workflow_schedule import WorkflowSchedule+ from .workflow_schedule_list_response import WorkflowScheduleListResponse+ from .workflow_schedule_response import WorkflowScheduleResponse+ from .workflow_schedule_upsert_request import WorkflowScheduleUpsertRequestfrom .workflow_status import WorkflowStatusfrom .workflow_trigger_block import WorkflowTriggerBlockfrom .workflow_trigger_block_parameters_item import (@@ -684,6 +691,7 @@ _dynamic_imports: typing.Dict[str, str] = {"CredentialTypeOutput": ".credential_type_output","CredentialVaultType": ".credential_vault_type","CreditCardCredentialResponse": ".credit_card_credential_response",+ "DeleteScheduleResponse": ".delete_schedule_response","DownloadToS3Block": ".download_to_s3block","DownloadToS3BlockYaml": ".download_to_s3block_yaml","Extensions": ".extensions",@@ -874,6 +882,8 @@ _dynamic_imports: typing.Dict[str, str] = {"NonEmptyPasswordCredential": ".non_empty_password_credential","OnePasswordCredentialParameter": ".one_password_credential_parameter","OnePasswordCredentialParameterYaml": ".one_password_credential_parameter_yaml",+ "OrganizationScheduleItem": ".organization_schedule_item",+ "OrganizationScheduleListResponse": ".organization_schedule_list_response","OtpType": ".otp_type","OutputParameter": ".output_parameter","OutputParameterYaml": ".output_parameter_yaml",@@ -1120,6 +1130,10 @@ _dynamic_imports: typing.Dict[str, str] = {"WorkflowRunTimeline": ".workflow_run_timeline","WorkflowRunTimelineType": ".workflow_run_timeline_type","WorkflowRunTriggerType": ".workflow_run_trigger_type",+ "WorkflowSchedule": ".workflow_schedule",+ "WorkflowScheduleListResponse": ".workflow_schedule_list_response",+ "WorkflowScheduleResponse": ".workflow_schedule_response",+ "WorkflowScheduleUpsertRequest": ".workflow_schedule_upsert_request","WorkflowStatus": ".workflow_status","WorkflowTriggerBlock": ".workflow_trigger_block","WorkflowTriggerBlockParametersItem": ".workflow_trigger_block_parameters_item",@@ -1247,6 +1261,7 @@ __all__ = ["CredentialTypeOutput","CredentialVaultType","CreditCardCredentialResponse",+ "DeleteScheduleResponse","DownloadToS3Block","DownloadToS3BlockYaml","Extensions",@@ -1437,6 +1452,8 @@ __all__ = ["NonEmptyPasswordCredential","OnePasswordCredentialParameter","OnePasswordCredentialParameterYaml",+ "OrganizationScheduleItem",+ "OrganizationScheduleListResponse","OtpType","OutputParameter","OutputParameterYaml",@@ -1683,6 +1700,10 @@ __all__ = ["WorkflowRunTimeline","WorkflowRunTimelineType","WorkflowRunTriggerType",+ "WorkflowSchedule",+ "WorkflowScheduleListResponse",+ "WorkflowScheduleResponse",+ "WorkflowScheduleUpsertRequest","WorkflowStatus","WorkflowTriggerBlock","WorkflowTriggerBlockParametersItem",diff --git a/skyvern/client/types/delete_schedule_response.py b/skyvern/client/types/delete_schedule_response.pynew file mode 100644index 000000000..f56594901--- /dev/null+++ b/skyvern/client/types/delete_schedule_response.py@@ -0,0 +1,19 @@+# This file was auto-generated by Fern from our API Definition.++import typing++import pydantic+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel+++class DeleteScheduleResponse(UniversalBaseModel):+ ok: bool++ if IS_PYDANTIC_V2:+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2+ else:++ class Config:+ frozen = True+ smart_union = True+ extra = pydantic.Extra.allowdiff --git a/skyvern/client/types/organization_schedule_item.py b/skyvern/client/types/organization_schedule_item.pynew file mode 100644index 000000000..d288100ad--- /dev/null+++ b/skyvern/client/types/organization_schedule_item.py@@ -0,0 +1,41 @@+# This file was auto-generated by Fern from our API Definition.++import datetime as dt+import typing++import pydantic+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel+++class OrganizationScheduleItem(UniversalBaseModel):+ """+ Compact schedule projection for the org-wide list endpoint.++ Intentionally omits `backend_schedule_id` — the list view is for browsing+ schedules in the dashboard, not for managing the underlying execution-backend+ binding. Callers that need the backend id should fetch the individual+ schedule via the per-workflow get endpoint.+ """++ workflow_schedule_id: str+ organization_id: str+ workflow_permanent_id: str+ workflow_title: str+ cron_expression: str+ timezone: str+ enabled: bool+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None+ name: typing.Optional[str] = None+ description: typing.Optional[str] = None+ next_run: typing.Optional[dt.datetime] = None+ created_at: dt.datetime+ modified_at: dt.datetime++ if IS_PYDANTIC_V2:+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2+ else:++ class Config:+ frozen = True+ smart_union = True+ extra = pydantic.Extra.allowdiff --git a/skyvern/client/types/organization_schedule_list_response.py b/skyvern/client/types/organization_schedule_list_response.pynew file mode 100644index 000000000..05f63e739--- /dev/null+++ b/skyvern/client/types/organization_schedule_list_response.py@@ -0,0 +1,23 @@+# This file was auto-generated by Fern from our API Definition.++import typing++import pydantic+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel+from .organization_schedule_item import OrganizationScheduleItem+++class OrganizationScheduleListResponse(UniversalBaseModel):+ schedules: typing.List[OrganizationScheduleItem]+ total_count: int+ page: int+ page_size: int++ if IS_PYDANTIC_V2:+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2+ else:++ class Config:+ frozen = True+ smart_union = True+ extra = pydantic.Extra.allowdiff --git a/skyvern/client/types/task_run_request.py b/skyvern/client/types/task_run_request.pyindex c1ad5d73b..a85b7a910 100644--- a/skyvern/client/types/task_run_request.py+++ b/skyvern/client/types/task_run_request.py@@ -25,7 +25,7 @@ class TaskRunRequest(UniversalBaseModel):engine: typing.Optional[RunEngine] = pydantic.Field(default=None)"""- The engine that powers the agent task. The default value is `skyvern-2.0`, the latest Skyvern agent that performs pretty well with complex and multi-step tasks. `skyvern-1.0` is good for simple tasks like filling a form, or searching for information on Google. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool.+ The engine that powers the agent task. The default value is `skyvern-1.0`, which is good for simple tasks like filling a form, or searching for information on Google. `skyvern-2.0` is the latest Skyvern agent that performs well with complex and multi-step tasks. The `openai-cua` engine uses OpenAI's CUA model. The `anthropic-cua` uses Anthropic's Claude Sonnet 3.7 model with the computer use tool."""title: typing.Optional[str] = pydantic.Field(default=None)diff --git a/skyvern/client/types/workflow_schedule.py b/skyvern/client/types/workflow_schedule.pynew file mode 100644index 000000000..1f4303095--- /dev/null+++ b/skyvern/client/types/workflow_schedule.py@@ -0,0 +1,32 @@+# This file was auto-generated by Fern from our API Definition.++import datetime as dt+import typing++import pydantic+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel+++class WorkflowSchedule(UniversalBaseModel):+ workflow_schedule_id: str+ organization_id: str+ workflow_permanent_id: str+ cron_expression: str+ timezone: str+ enabled: bool+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None+ temporal_schedule_id: typing.Optional[str] = None+ name: typing.Optional[str] = None+ description: typing.Optional[str] = None+ created_at: dt.datetime+ modified_at: dt.datetime+ deleted_at: typing.Optional[dt.datetime] = None++ if IS_PYDANTIC_V2:+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2+ else:++ class Config:+ frozen = True+ smart_union = True+ extra = pydantic.Extra.allowdiff --git a/skyvern/client/types/workflow_schedule_list_response.py b/skyvern/client/types/workflow_schedule_list_response.pynew file mode 100644index 000000000..63323b43a--- /dev/null+++ b/skyvern/client/types/workflow_schedule_list_response.py@@ -0,0 +1,20 @@+# This file was auto-generated by Fern from our API Definition.++import typing++import pydantic+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel+from .workflow_schedule import WorkflowSchedule+++class WorkflowScheduleListResponse(UniversalBaseModel):+ schedules: typing.List[WorkflowSchedule]++ if IS_PYDANTIC_V2:+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2+ else:++ class Config:+ frozen = True+ smart_union = True+ extra = pydantic.Extra.allowdiff --git a/skyvern/client/types/workflow_schedule_response.py b/skyvern/client/types/workflow_schedule_response.pynew file mode 100644index 000000000..87d721066--- /dev/null+++ b/skyvern/client/types/workflow_schedule_response.py@@ -0,0 +1,22 @@+# This file was auto-generated by Fern from our API Definition.++import datetime as dt+import typing++import pydantic+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel+from .workflow_schedule import WorkflowSchedule+++class WorkflowScheduleResponse(UniversalBaseModel):+ schedule: WorkflowSchedule+ next_runs: typing.Optional[typing.List[dt.datetime]] = None++ if IS_PYDANTIC_V2:+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2+ else:++ class Config:+ frozen = True+ smart_union = True+ extra = pydantic.Extra.allowdiff --git a/skyvern/client/types/workflow_schedule_upsert_request.py b/skyvern/client/types/workflow_schedule_upsert_request.pynew file mode 100644index 000000000..72bbdece7--- /dev/null+++ b/skyvern/client/types/workflow_schedule_upsert_request.py@@ -0,0 +1,24 @@+# This file was auto-generated by Fern from our API Definition.++import typing++import pydantic+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel+++class WorkflowScheduleUpsertRequest(UniversalBaseModel):+ cron_expression: str+ timezone: str+ enabled: typing.Optional[bool] = None+ parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None+ name: typing.Optional[str] = None+ description: typing.Optional[str] = None++ if IS_PYDANTIC_V2:+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2+ else:++ class Config:+ frozen = True+ smart_union = True+ extra = pydantic.Extra.allowdiff --git a/skyvern/core/script_generations/generate_script.py b/skyvern/core/script_generations/generate_script.pyindex ccf7b5cbe..30578a71e 100644--- a/skyvern/core/script_generations/generate_script.py+++ b/skyvern/core/script_generations/generate_script.py@@ -780,10 +780,15 @@ def _action_to_stmt(label = option.get("label")value = value or labelif value:- # TODO: consider supporting fallback mode for select_option actions- # ai_mode = GENERATE_CODE_AI_MODE_FALLBACK- # if _requires_mini_agent(act):- ai_mode = GENERATE_CODE_AI_MODE_PROACTIVE+ # Mirror the click branch: with semantic selectors we have a real+ # CSS selector + value, so try the selector path first and fall+ # back to AI only if it misses. Without semantic selectors the+ # selector is an xpath harvested from iteration 0 and unlikely to+ # be reliable, so go straight to AI.+ if use_semantic_selectors:+ ai_mode = GENERATE_CODE_AI_MODE_FALLBACK+ else:+ ai_mode = GENERATE_CODE_AI_MODE_PROACTIVEif act.get("field_name"):option_value = cst.Subscript(value=cst.Attribute(@@ -1030,58 +1035,6 @@ def _collect_block_input_fields(return all_fields-def _is_form_filling_block(- actions: list[dict[str, Any]],-) -> bool:- """Check if a block's actions indicate a form-filling pattern (4+ input/select actions)."""- form_action_count = sum(- 1 for a in actions if a.get("action_type") in (ActionType.INPUT_TEXT, ActionType.SELECT_OPTION)- )- return form_action_count >= 4---def _build_form_filling_block_fn(- block: dict[str, Any],- actions: list[dict[str, Any]],- value_to_param: dict[str, str] | None = None,-) -> FunctionDef:- """Generate a form-filling block function that uses page.fill_form().-- Produces a simple function that calls page.fill_form(context.parameters)- which internally uses LLM-based field mapping (extract → map → fill).- """- name = safe_name(block.get("label") or block.get("title") or f"block_{block.get('workflow_run_block_id')}")- cache_key = block.get("label") or block.get("title") or f"block_{block.get('workflow_run_block_id')}"-- navigation_goal = block.get("navigation_goal") or "Fill out the form"-- # Include page.goto(url) if the block has a URL, just like _build_block_fn does.- # Templated URLs (e.g. {{ outer_loop.current_value.url }}) are wrapped in- # skyvern.render_template() so they resolve at runtime.- goto_line = ""- if block.get("url"):- url_str = block["url"]- if isinstance(url_str, str) and "{{" in url_str and "}}" in url_str:- goto_line = f" await page.goto(skyvern.render_template({repr(url_str)}))\n"- else:- goto_line = f" await page.goto({repr(url_str)})\n"-- func_code = (- f"async def {name}(page: SkyvernPage, context: RunContext):\n"- f"{goto_line}"- f" await page.fill_form(context.parameters, prompt={repr(navigation_goal)})\n"- )-- # Parse and add decorator- parsed = cst.parse_module(func_code)- func_def = parsed.body[0]- assert isinstance(func_def, FunctionDef)-- # Add the @skyvern.cached decorator- decorated = func_def.with_changes(decorators=[make_decorator(cache_key, block)])- return decorated--def _detect_block_ats_platform(block: dict[str, Any], all_blocks: list[dict[str, Any]] | None = None) -> str | None:"""Check if a block belongs to a known platform with optimized scripts.@@ -1132,9 +1085,11 @@ def _build_block_fn()return pipeline_fn- # Check if this block is form-filling (4+ input_text/select actions)- if use_semantic_selectors and _is_form_filling_block(actions):- return _build_form_filling_block_fn(block, actions, value_to_param)+ # NOTE: page.fill_form() is intentionally NOT generated here. fill_form+ # delegates entirely to AI at runtime, defeating the purpose of caching.+ # ATS workflows use their own optimized pipeline via the+ # _detect_block_ats_platform → build_ats_pipeline_block_fn path above.+ # See PR #10043 (reviewer restriction) and PR #10195 (this change).name = safe_name(block.get("label") or block.get("title") or f"block_{block.get('workflow_run_block_id')}")cache_key = block.get("label") or block.get("title") or f"block_{block.get('workflow_run_block_id')}"diff --git a/skyvern/webeye/browser_factory.py b/skyvern/webeye/browser_factory.pyindex db554e3aa..913f75c73 100644--- a/skyvern/webeye/browser_factory.py+++ b/skyvern/webeye/browser_factory.py@@ -426,6 +426,51 @@ def _get_proxy_server_creds(proxy: str) -> dict:return {}+def _is_display_server_error(error: Exception) -> bool:+ """Return True if the worker cannot initialize the browser display/graphics stack.++ These errors appear when a headed browser is launched on a worker node+ without a usable display/graphics environment. Retrying with a fresh profile+ will not help — the fix is environment-side (display/EGL/SwiftShader support)+ rather than profile-side.+ """+ error_str = str(error).lower()+ display_indicators = [+ "missing x server",+ "xserver running",+ "no display",+ "$display",+ "the platform failed to initialize",+ "no suitable egl configs found",+ "failed to get config for surface",+ "collectgraphicsinfo failed",+ "glcontext::createoffscreenglsurface failed",+ "exiting gpu process due to errors during initialization",+ ]+ return any(indicator in error_str for indicator in display_indicators)+++def _is_browser_profile_corruption_error(error: Exception) -> bool:+ """Return True if the error is consistent with a corrupted or bloated browser profile.++ These errors appear when launch_persistent_context fails to start Chrome because+ the user_data_dir is in a bad state (corrupted files, oversized cache, lock files+ from a prior crash, etc.). The error text comes from Playwright's CDP driver.+ """+ if _is_display_server_error(error):+ return False++ error_str = str(error).lower()+ corruption_indicators = [+ "connection closed while reading from the driver",+ "target closed",+ "browser has been closed",+ "failed to launch",+ "unable to open database",+ ]+ return any(indicator in error_str for indicator in corruption_indicators)++def _get_cdp_port(kwargs: dict) -> int | None:raw_cdp_port = kwargs.get("cdp_port")if isinstance(raw_cdp_port, (int, str)):@@ -479,6 +524,7 @@ async def _create_headless_chromium(browser_profile_id = cast(str | None, kwargs.get("browser_profile_id"))organization_id_for_profile = cast(str | None, kwargs.get("organization_id"))user_data_dir: str | None = None+ loaded_from_saved_profile = Falseif browser_profile_id and organization_id_for_profile:profile_dir = await app.STORAGE.retrieve_browser_profile(@@ -487,6 +533,7 @@ async def _create_headless_chromium()if profile_dir:user_data_dir = profile_dir+ loaded_from_saved_profile = TrueLOG.info("Using browser profile",browser_profile_id=browser_profile_id,@@ -522,7 +569,29 @@ async def _create_headless_chromium(har_path=browser_args["record_har_path"],browser_session_dir=user_data_dir,)- browser_context = await playwright.chromium.launch_persistent_context(**browser_args)+ try:+ browser_context = await playwright.chromium.launch_persistent_context(**browser_args)+ except Exception as launch_error:+ if loaded_from_saved_profile and _is_browser_profile_corruption_error(launch_error):+ LOG.warning(+ "Browser launch failed with saved profile — profile may be corrupted, falling back to fresh profile",+ browser_profile_id=browser_profile_id,+ organization_id=organization_id_for_profile,+ error=str(launch_error),+ )+ fallback_dir = make_temp_directory(prefix="skyvern_browser_")+ BrowserContextFactory.update_chromium_browser_preferences(+ user_data_dir=fallback_dir,+ download_dir=download_dir,+ )+ browser_args["user_data_dir"] = fallback_dir+ browser_artifacts = BrowserContextFactory.build_browser_artifacts(+ har_path=browser_args["record_har_path"],+ browser_session_dir=fallback_dir,+ )+ browser_context = await playwright.chromium.launch_persistent_context(**browser_args)+ else:+ raisereturn browser_context, browser_artifacts, None@@ -544,6 +613,7 @@ async def _create_headful_chromium(browser_profile_id = cast(str | None, kwargs.get("browser_profile_id"))organization_id_for_profile = cast(str | None, kwargs.get("organization_id"))user_data_dir: str | None = None+ loaded_from_saved_profile = Falseif browser_profile_id and organization_id_for_profile:profile_dir = await app.STORAGE.retrieve_browser_profile(@@ -552,6 +622,7 @@ async def _create_headful_chromium()if profile_dir:user_data_dir = profile_dir+ loaded_from_saved_profile = TrueLOG.info("Using browser profile",browser_profile_id=browser_profile_id,@@ -587,7 +658,29 @@ async def _create_headful_chromium(har_path=browser_args["record_har_path"],browser_session_dir=user_data_dir,)- browser_context = await playwright.chromium.launch_persistent_context(**browser_args)+ try:+ browser_context = await playwright.chromium.launch_persistent_context(**browser_args)+ except Exception as launch_error:+ if loaded_from_saved_profile and _is_browser_profile_corruption_error(launch_error):+ LOG.warning(+ "Browser launch failed with saved profile — profile may be corrupted, falling back to fresh profile",+ browser_profile_id=browser_profile_id,+ organization_id=organization_id_for_profile,+ error=str(launch_error),+ )+ fallback_dir = make_temp_directory(prefix="skyvern_browser_")+ BrowserContextFactory.update_chromium_browser_preferences(+ user_data_dir=fallback_dir,+ download_dir=download_dir,+ )+ browser_args["user_data_dir"] = fallback_dir+ browser_artifacts = BrowserContextFactory.build_browser_artifacts(+ har_path=browser_args["record_har_path"],+ browser_session_dir=fallback_dir,+ )+ browser_context = await playwright.chromium.launch_persistent_context(**browser_args)+ else:+ raisereturn browser_context, browser_artifacts, Nonediff --git a/tests/unit/test_browser_profile_corruption_detection.py b/tests/unit/test_browser_profile_corruption_detection.pynew file mode 100644index 000000000..678adab45--- /dev/null+++ b/tests/unit/test_browser_profile_corruption_detection.py@@ -0,0 +1,107 @@+"""Tests for browser launch error classification in browser_factory.py."""++from skyvern.webeye.browser_factory import (+ _is_browser_profile_corruption_error,+ _is_display_server_error,+)++# -- _is_display_server_error ------------------------------------------------+++class TestIsDisplayServerError:+ """Detect browser launch environment errors so we skip the profile-corruption retry."""++ def test_missing_x_server_message(self) -> None:+ error = Exception(+ "BrowserType.launch_persistent_context: Target page, context or browser has been closed\n\n"+ "Browser logs:\n"+ "Looks like you launched a headed browser without having a XServer running.\n"+ "Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright."+ )+ assert _is_display_server_error(error) is True++ def test_missing_x_server_with_display_var(self) -> None:+ error = Exception("[err] Missing X server or $DISPLAY")+ assert _is_display_server_error(error) is True++ def test_platform_failed_to_initialize(self) -> None:+ error = Exception("[err] ui/aura/env.cc: The platform failed to initialize. Exiting.")+ assert _is_display_server_error(error) is True++ def test_egl_config_failure(self) -> None:+ error = Exception(+ "[err] [297028:297028:0407/015340.854525:ERROR:ui/gl/gl_surface_egl.cc:1013] No suitable EGL configs found for initialization."+ )+ assert _is_display_server_error(error) is True++ def test_gpu_process_initialization_failure(self) -> None:+ error = Exception(+ "[err] [297028:297028:0407/015340.854713:ERROR:gpu/ipc/service/gpu_init.cc:118] CollectGraphicsInfo failed."+ )+ assert _is_display_server_error(error) is True++ def test_no_display_env(self) -> None:+ error = Exception("No display environment variable set")+ assert _is_display_server_error(error) is True++ def test_actual_corruption_is_not_display_error(self) -> None:+ error = Exception("unable to open database file")+ assert _is_display_server_error(error) is False++ def test_target_closed_without_display_context(self) -> None:+ error = Exception("Target page, context or browser has been closed")+ assert _is_display_server_error(error) is False++ def test_generic_error_is_not_display_error(self) -> None:+ error = Exception("something completely unrelated went wrong")+ assert _is_display_server_error(error) is False+++# -- _is_browser_profile_corruption_error ------------------------------------+++class TestIsBrowserProfileCorruptionError:+ """Profile corruption detection must NOT match display-server errors."""++ def test_xserver_error_not_classified_as_corruption(self) -> None:+ error = Exception(+ "BrowserType.launch_persistent_context: Target page, context or browser has been closed\n\n"+ "Browser logs:\n"+ "Looks like you launched a headed browser without having a XServer running.\n"+ "[err] Missing X server or $DISPLAY\n"+ "[err] ui/aura/env.cc: The platform failed to initialize. Exiting."+ )+ assert _is_browser_profile_corruption_error(error) is False++ def test_egl_error_not_classified_as_corruption(self) -> None:+ error = Exception(+ "BrowserType.launch_persistent_context: Target page, context or browser has been closed\n\n"+ "[err] [297028:297028:0407/015340.854525:ERROR:ui/gl/gl_surface_egl.cc:1013] No suitable EGL configs found for initialization.\n"+ "[err] [297028:297028:0407/015340.854713:ERROR:gpu/ipc/service/gpu_init.cc:118] CollectGraphicsInfo failed."+ )+ assert _is_browser_profile_corruption_error(error) is False++ def test_target_closed_without_xserver_is_corruption(self) -> None:+ """A plain 'target closed' without XServer context is still corruption."""+ error = Exception("target closed")+ assert _is_browser_profile_corruption_error(error) is True++ def test_connection_closed_while_reading(self) -> None:+ error = Exception("connection closed while reading from the driver")+ assert _is_browser_profile_corruption_error(error) is True++ def test_browser_has_been_closed(self) -> None:+ error = Exception("browser has been closed")+ assert _is_browser_profile_corruption_error(error) is True++ def test_failed_to_launch(self) -> None:+ error = Exception("failed to launch chromium")+ assert _is_browser_profile_corruption_error(error) is True++ def test_unable_to_open_database(self) -> None:+ error = Exception("unable to open database file")+ assert _is_browser_profile_corruption_error(error) is True++ def test_unrelated_error_is_not_corruption(self) -> None:+ error = Exception("network timeout after 30 seconds")+ assert _is_browser_profile_corruption_error(error) is Falsediff --git a/tests/unit/test_no_fill_form_in_adaptive_codegen.py b/tests/unit/test_no_fill_form_in_adaptive_codegen.pynew file mode 100644index 000000000..92edc0f07--- /dev/null+++ b/tests/unit/test_no_fill_form_in_adaptive_codegen.py@@ -0,0 +1,109 @@+"""Regression test: adaptive caching must never generate page.fill_form().++fill_form() delegates entirely to AI at runtime, defeating the purpose of+caching. It is only appropriate for ATS static scripts (built via a+separate pipeline). See PR #10043 and PR #10195.+"""++from unittest.mock import MagicMock, patch++import libcst as cst++from skyvern.core.script_generations.generate_script import _build_block_fn+++def _make_form_block(label: str = "fill_application") -> dict:+ return {+ "label": label,+ "block_type": "navigation",+ "url": "https://example.com/apply",+ "navigation_goal": "Fill out the application form with the provided information",+ }+++def _make_input_action(field_name: str, value: str = "test") -> dict:+ return {+ "action_type": "input_text",+ "xpath": f"/html/body/form/input[@name='{field_name}']",+ "element_id": f"elem_{field_name}",+ "reasoning": f"Fill the {field_name} field",+ "text": value,+ }+++def _make_select_action(field_name: str) -> dict:+ return {+ "action_type": "select_option",+ "xpath": f"/html/body/form/select[@name='{field_name}']",+ "element_id": f"elem_{field_name}",+ "reasoning": f"Select {field_name}",+ "option": {"label": "Option A", "value": "a"},+ }+++class TestNoFillFormInAdaptiveCodegen:+ def test_block_with_many_form_actions_does_not_generate_fill_form(self) -> None:+ """A block with 4+ input/select actions must generate explicit+ page.fill/page.click calls, NOT page.fill_form()."""+ block = _make_form_block()+ actions = [+ _make_input_action("first_name", "John"),+ _make_input_action("last_name", "Doe"),+ _make_input_action("email", "[email protected]"),+ _make_input_action("phone", "555-1234"),+ _make_select_action("country"),+ ]++ with patch("skyvern.core.script_generations.generate_script.app") as mock_app:+ mock_app.AGENT_FUNCTION.build_ats_pipeline_block_fn = MagicMock(return_value=None)+ func_def = _build_block_fn(+ block=block,+ actions=actions,+ use_semantic_selectors=True,+ )++ code = cst.parse_module("").code_for_node(func_def)+ assert "fill_form" not in code, (+ "Adaptive caching generated fill_form() for a non-ATS block. "+ "fill_form delegates to AI at runtime and defeats caching."+ )+ # Should have explicit page.fill or page.click calls instead+ assert "page.fill(" in code or "page.click(" in code++ def test_select_option_uses_fallback_not_proactive_with_semantic_selectors(self) -> None:+ """When adaptive caching (use_semantic_selectors=True) generates a+ select_option call with a value, it must use ai='fallback' so the+ selector is tried first. ai='proactive' would route straight to the+ LLM every run, defeating caching for blocks with dropdowns."""+ block = _make_form_block()+ actions = [+ _make_input_action("first_name"),+ _make_input_action("last_name"),+ _make_input_action("email"),+ _make_input_action("phone"),+ _make_select_action("country"),+ ]++ with patch("skyvern.core.script_generations.generate_script.app") as mock_app:+ mock_app.AGENT_FUNCTION.build_ats_pipeline_block_fn = MagicMock(return_value=None)+ func_def = _build_block_fn(+ block=block,+ actions=actions,+ use_semantic_selectors=True,+ )++ code = cst.parse_module("").code_for_node(func_def)+ # The generated select_option call should use ai='fallback', not 'proactive'.+ # 'proactive' routes straight to ai_select_option() without trying the+ # selector, which makes every run an LLM call.+ assert "page.select_option(" in code+ # Isolate the select_option call's body so this test doesn't accidentally+ # pass on a `page.fill(..., ai='fallback', ...)` earlier in the function.+ select_start = code.index("page.select_option(")+ select_block = code[select_start : code.index(")", select_start) + 1]+ # Normalize whitespace around `=` so `ai = 'fallback'` and `ai='fallback'` both match.+ normalized = select_block.replace(" = ", "=")+ assert "ai='fallback'" in normalized, (+ "select_option with a value must use ai='fallback' under adaptive "+ "caching — 'proactive' defeats the selector path. Got:\n" + select_block+ )diff --git a/uv.lock b/uv.lockindex d6b75fb0b..76dd4d32c 100644--- a/uv.lock+++ b/uv.lock@@ -14,7 +14,7 @@ resolution-markers = [][options]-exclude-newer = "2026-04-01T23:52:18.918144411Z"+exclude-newer = "2026-04-07T17:49:42.509853Z"exclude-newer-span = "P7D"[manifest]@@ -5523,7 +5523,7 @@ wheels = [[[package]]name = "skyvern"-version = "1.0.30"+version = "1.0.31"source = { editable = "." }dependencies = [{ name = "aioboto3" },