Skip to content

Automate browser based workflows with AI

revert: remove browser profile corruption fallback from PR #9865 (#5495)

LawyZheng59adc685ef54
diff --git a/docs/changelog.mdx b/docs/changelog.mdx
index 095d7c49b..329e83fde 100644
--- a/docs/changelog.mdx
+++ b/docs/changelog.mdx
@@ -25,6 +25,36 @@ 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 features
diff --git a/fern/docs/changelog.mdx b/fern/docs/changelog.mdx
index 4841b0e53..a7abbd7dc 100644
--- a/fern/docs/changelog.mdx
+++ b/fern/docs/changelog.mdx
@@ -7,6 +7,8 @@ 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>
@@ -20,6 +22,36 @@ 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 features
diff --git a/pyproject.toml b/pyproject.toml
index 1145f40e9..90b3c36af 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "skyvern"
-version = "1.0.31"
+version = "1.0.30"
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__.py
index 5211c3a5d..69cae3beb 100644
--- a/skyvern/client/__init__.py
+++ b/skyvern/client/__init__.py
@@ -94,7 +94,6 @@ if typing.TYPE_CHECKING:
CredentialTypeOutput,
CredentialVaultType,
CreditCardCredentialResponse,
- DeleteScheduleResponse,
DownloadToS3Block,
DownloadToS3BlockYaml,
Extensions,
@@ -285,8 +284,6 @@ if typing.TYPE_CHECKING:
NonEmptyPasswordCredential,
OnePasswordCredentialParameter,
OnePasswordCredentialParameterYaml,
- OrganizationScheduleItem,
- OrganizationScheduleListResponse,
OtpType,
OutputParameter,
OutputParameterYaml,
@@ -533,10 +530,6 @@ if typing.TYPE_CHECKING:
WorkflowRunTimeline,
WorkflowRunTimelineType,
WorkflowRunTriggerType,
- WorkflowSchedule,
- WorkflowScheduleListResponse,
- WorkflowScheduleResponse,
- WorkflowScheduleUpsertRequest,
WorkflowStatus,
WorkflowTriggerBlock,
WorkflowTriggerBlockParametersItem,
@@ -554,10 +547,9 @@ if typing.TYPE_CHECKING:
WorkflowTriggerBlockYaml,
)
from .errors import BadRequestError, ConflictError, ForbiddenError, NotFoundError, UnprocessableEntityError
- from . import artifacts, schedules, scripts
+ from . import artifacts, scripts
from .client import AsyncSkyvern, Skyvern
from .environment import SkyvernEnvironment
- from .schedules import SchedulesListAllRequestStatus
from .version import __version__
_dynamic_imports: typing.Dict[str, str] = {
"ActAction": ".types",
@@ -650,7 +642,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"CredentialTypeOutput": ".types",
"CredentialVaultType": ".types",
"CreditCardCredentialResponse": ".types",
- "DeleteScheduleResponse": ".types",
"DownloadToS3Block": ".types",
"DownloadToS3BlockYaml": ".types",
"Extensions": ".types",
@@ -843,8 +834,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"NotFoundError": ".errors",
"OnePasswordCredentialParameter": ".types",
"OnePasswordCredentialParameterYaml": ".types",
- "OrganizationScheduleItem": ".types",
- "OrganizationScheduleListResponse": ".types",
"OtpType": ".types",
"OutputParameter": ".types",
"OutputParameterYaml": ".types",
@@ -884,7 +873,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"RunSdkActionRequestAction_Validate": ".types",
"RunSdkActionResponse": ".types",
"RunStatus": ".types",
- "SchedulesListAllRequestStatus": ".schedules",
"Script": ".types",
"ScriptFileCreate": ".types",
"ScriptRunResponse": ".types",
@@ -1095,10 +1083,6 @@ _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",
@@ -1116,7 +1100,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowTriggerBlockYaml": ".types",
"__version__": ".version",
"artifacts": ".artifacts",
- "schedules": ".schedules",
"scripts": ".scripts",
}
@@ -1233,7 +1216,6 @@ __all__ = [
"CredentialTypeOutput",
"CredentialVaultType",
"CreditCardCredentialResponse",
- "DeleteScheduleResponse",
"DownloadToS3Block",
"DownloadToS3BlockYaml",
"Extensions",
@@ -1426,8 +1408,6 @@ __all__ = [
"NotFoundError",
"OnePasswordCredentialParameter",
"OnePasswordCredentialParameterYaml",
- "OrganizationScheduleItem",
- "OrganizationScheduleListResponse",
"OtpType",
"OutputParameter",
"OutputParameterYaml",
@@ -1467,7 +1447,6 @@ __all__ = [
"RunSdkActionRequestAction_Validate",
"RunSdkActionResponse",
"RunStatus",
- "SchedulesListAllRequestStatus",
"Script",
"ScriptFileCreate",
"ScriptRunResponse",
@@ -1678,10 +1657,6 @@ __all__ = [
"WorkflowRunTimeline",
"WorkflowRunTimelineType",
"WorkflowRunTriggerType",
- "WorkflowSchedule",
- "WorkflowScheduleListResponse",
- "WorkflowScheduleResponse",
- "WorkflowScheduleUpsertRequest",
"WorkflowStatus",
"WorkflowTriggerBlock",
"WorkflowTriggerBlockParametersItem",
@@ -1699,6 +1674,5 @@ __all__ = [
"WorkflowTriggerBlockYaml",
"__version__",
"artifacts",
- "schedules",
"scripts",
]
diff --git a/skyvern/client/client.py b/skyvern/client/client.py
index 932b311d2..f04e31881 100644
--- a/skyvern/client/client.py
+++ b/skyvern/client/client.py
@@ -6,6 +6,7 @@ import datetime as dt
import typing
import httpx
+from . import core
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .core.request_options import RequestOptions
from .environment import SkyvernEnvironment
@@ -50,7 +51,6 @@ from .types.workflow_status import WorkflowStatus
if typing.TYPE_CHECKING:
from .artifacts.client import ArtifactsClient, AsyncArtifactsClient
- from .schedules.client import AsyncSchedulesClient, SchedulesClient
from .scripts.client import AsyncScriptsClient, ScriptsClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -124,7 +124,6 @@ class Skyvern:
self._raw_client = RawSkyvern(client_wrapper=self._client_wrapper)
self._artifacts: typing.Optional[ArtifactsClient] = None
self._scripts: typing.Optional[ScriptsClient] = None
- self._schedules: typing.Optional[SchedulesClient] = None
@property
def with_raw_response(self) -> RawSkyvern:
@@ -179,7 +178,7 @@ class Skyvern:
engine : typing.Optional[RunEngine]
- 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.
+ 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.
title : typing.Optional[str]
The title for the task
@@ -1338,11 +1337,14 @@ class Skyvern:
)
return _response.data
- def upload_file(self, *, file: str, request_options: typing.Optional[RequestOptions] = None) -> UploadFileResponse:
+ def upload_file(
+ self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None
+ ) -> UploadFileResponse:
"""
Parameters
----------
- file : str
+ file : core.File
+ See core.File for more documentation
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -1359,9 +1361,7 @@ class Skyvern:
client = Skyvern(
api_key="YOUR_API_KEY",
)
- client.upload_file(
- file="file",
- )
+ client.upload_file()
"""
_response = self._raw_client.upload_file(file=file, request_options=request_options)
return _response.data
@@ -2492,14 +2492,6 @@ 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:
"""
@@ -2569,7 +2561,6 @@ class AsyncSkyvern:
self._raw_client = AsyncRawSkyvern(client_wrapper=self._client_wrapper)
self._artifacts: typing.Optional[AsyncArtifactsClient] = None
self._scripts: typing.Optional[AsyncScriptsClient] = None
- self._schedules: typing.Optional[AsyncSchedulesClient] = None
@property
def with_raw_response(self) -> AsyncRawSkyvern:
@@ -2624,7 +2615,7 @@ class AsyncSkyvern:
engine : typing.Optional[RunEngine]
- 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.
+ 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.
title : typing.Optional[str]
The title for the task
@@ -3952,12 +3943,13 @@ class AsyncSkyvern:
return _response.data
async def upload_file(
- self, *, file: str, request_options: typing.Optional[RequestOptions] = None
+ self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None
) -> UploadFileResponse:
"""
Parameters
----------
- file : str
+ file : core.File
+ See core.File for more documentation
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -3979,9 +3971,7 @@ class AsyncSkyvern:
async def main() -> None:
- await client.upload_file(
- file="file",
- )
+ await client.upload_file()
asyncio.run(main())
@@ -5285,14 +5275,6 @@ 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.py
index 222726377..b9b5566d2 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.31",
+ "User-Agent": "skyvern/1.0.30",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "skyvern",
- "X-Fern-SDK-Version": "1.0.31",
+ "X-Fern-SDK-Version": "1.0.30",
**(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.py
index 3ad0862cb..6c549a9ee 100644
--- a/skyvern/client/raw_client.py
+++ b/skyvern/client/raw_client.py
@@ -4,6 +4,7 @@ import datetime as dt
import typing
from json.decoder import JSONDecodeError
+from . import core
from .core.api_error import ApiError
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .core.http_response import AsyncHttpResponse, HttpResponse
@@ -104,7 +105,7 @@ class RawSkyvern:
engine : typing.Optional[RunEngine]
- 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.
+ 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.
title : typing.Optional[str]
The title for the task
@@ -1793,12 +1794,13 @@ class RawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def upload_file(
- self, *, file: str, request_options: typing.Optional[RequestOptions] = None
+ self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[UploadFileResponse]:
"""
Parameters
----------
- file : str
+ file : core.File
+ See core.File for more documentation
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -1811,10 +1813,10 @@ class RawSkyvern:
_response = self._client_wrapper.httpx_client.request(
"v1/upload_file",
method="POST",
- data={
+ data={},
+ files={
"file": file,
},
- files={},
request_options=request_options,
omit=OMIT,
force_multipart=True,
@@ -3508,7 +3510,7 @@ class AsyncRawSkyvern:
engine : typing.Optional[RunEngine]
- 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.
+ 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.
title : typing.Optional[str]
The title for the task
@@ -5197,12 +5199,13 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def upload_file(
- self, *, file: str, request_options: typing.Optional[RequestOptions] = None
+ self, *, file: core.File, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[UploadFileResponse]:
"""
Parameters
----------
- file : str
+ file : core.File
+ See core.File for more documentation
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -5215,10 +5218,10 @@ class AsyncRawSkyvern:
_response = await self._client_wrapper.httpx_client.request(
"v1/upload_file",
method="POST",
- data={
+ data={},
+ files={
"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__.py
deleted file mode 100644
index 12978240e..000000000
--- a/skyvern/client/schedules/__init__.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# 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.py
deleted file mode 100644
index f3ad4a267..000000000
--- a/skyvern/client/schedules/client.py
+++ /dev/null
@@ -1,837 +0,0 @@
-# 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.data
diff --git a/skyvern/client/schedules/raw_client.py b/skyvern/client/schedules/raw_client.py
deleted file mode 100644
index cf9ebfb29..000000000
--- a/skyvern/client/schedules/raw_client.py
+++ /dev/null
@@ -1,1008 +0,0 @@
-# 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__.py
deleted file mode 100644
index 9e416f0d7..000000000
--- a/skyvern/client/schedules/types/__init__.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# 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.py
deleted file mode 100644
index dfc27397f..000000000
--- a/skyvern/client/schedules/types/schedules_list_all_request_status.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# 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__.py
index 0dcb271c3..fa92f0cca 100644
--- a/skyvern/client/types/__init__.py
+++ b/skyvern/client/types/__init__.py
@@ -101,7 +101,6 @@ if typing.TYPE_CHECKING:
from .credential_type_output import CredentialTypeOutput
from .credential_vault_type import CredentialVaultType
from .credit_card_credential_response import CreditCardCredentialResponse
- from .delete_schedule_response import DeleteScheduleResponse
from .download_to_s3block import DownloadToS3Block
from .download_to_s3block_yaml import DownloadToS3BlockYaml
from .extensions import Extensions
@@ -312,8 +311,6 @@ if typing.TYPE_CHECKING:
from .non_empty_password_credential import NonEmptyPasswordCredential
from .one_password_credential_parameter import OnePasswordCredentialParameter
from .one_password_credential_parameter_yaml import OnePasswordCredentialParameterYaml
- from .organization_schedule_item import OrganizationScheduleItem
- from .organization_schedule_list_response import OrganizationScheduleListResponse
from .otp_type import OtpType
from .output_parameter import OutputParameter
from .output_parameter_yaml import OutputParameterYaml
@@ -582,10 +579,6 @@ if typing.TYPE_CHECKING:
from .workflow_run_timeline import WorkflowRunTimeline
from .workflow_run_timeline_type import WorkflowRunTimelineType
from .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 WorkflowScheduleUpsertRequest
from .workflow_status import WorkflowStatus
from .workflow_trigger_block import WorkflowTriggerBlock
from .workflow_trigger_block_parameters_item import (
@@ -691,7 +684,6 @@ _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",
@@ -882,8 +874,6 @@ _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",
@@ -1130,10 +1120,6 @@ _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",
@@ -1261,7 +1247,6 @@ __all__ = [
"CredentialTypeOutput",
"CredentialVaultType",
"CreditCardCredentialResponse",
- "DeleteScheduleResponse",
"DownloadToS3Block",
"DownloadToS3BlockYaml",
"Extensions",
@@ -1452,8 +1437,6 @@ __all__ = [
"NonEmptyPasswordCredential",
"OnePasswordCredentialParameter",
"OnePasswordCredentialParameterYaml",
- "OrganizationScheduleItem",
- "OrganizationScheduleListResponse",
"OtpType",
"OutputParameter",
"OutputParameterYaml",
@@ -1700,10 +1683,6 @@ __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.py
deleted file mode 100644
index f56594901..000000000
--- a/skyvern/client/types/delete_schedule_response.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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.allow
diff --git a/skyvern/client/types/organization_schedule_item.py b/skyvern/client/types/organization_schedule_item.py
deleted file mode 100644
index d288100ad..000000000
--- a/skyvern/client/types/organization_schedule_item.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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.allow
diff --git a/skyvern/client/types/organization_schedule_list_response.py b/skyvern/client/types/organization_schedule_list_response.py
deleted file mode 100644
index 05f63e739..000000000
--- a/skyvern/client/types/organization_schedule_list_response.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.allow
diff --git a/skyvern/client/types/task_run_request.py b/skyvern/client/types/task_run_request.py
index a85b7a910..c1ad5d73b 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-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.
+ 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.
"""
title: typing.Optional[str] = pydantic.Field(default=None)
diff --git a/skyvern/client/types/workflow_schedule.py b/skyvern/client/types/workflow_schedule.py
deleted file mode 100644
index 1f4303095..000000000
--- a/skyvern/client/types/workflow_schedule.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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.allow
diff --git a/skyvern/client/types/workflow_schedule_list_response.py b/skyvern/client/types/workflow_schedule_list_response.py
deleted file mode 100644
index 63323b43a..000000000
--- a/skyvern/client/types/workflow_schedule_list_response.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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.allow
diff --git a/skyvern/client/types/workflow_schedule_response.py b/skyvern/client/types/workflow_schedule_response.py
deleted file mode 100644
index 87d721066..000000000
--- a/skyvern/client/types/workflow_schedule_response.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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.allow
diff --git a/skyvern/client/types/workflow_schedule_upsert_request.py b/skyvern/client/types/workflow_schedule_upsert_request.py
deleted file mode 100644
index 72bbdece7..000000000
--- a/skyvern/client/types/workflow_schedule_upsert_request.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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.allow
diff --git a/skyvern/webeye/browser_factory.py b/skyvern/webeye/browser_factory.py
index 913f75c73..db554e3aa 100644
--- a/skyvern/webeye/browser_factory.py
+++ b/skyvern/webeye/browser_factory.py
@@ -426,51 +426,6 @@ 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)):
@@ -524,7 +479,6 @@ 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 = False
if browser_profile_id and organization_id_for_profile:
profile_dir = await app.STORAGE.retrieve_browser_profile(
@@ -533,7 +487,6 @@ async def _create_headless_chromium(
)
if profile_dir:
user_data_dir = profile_dir
- loaded_from_saved_profile = True
LOG.info(
"Using browser profile",
browser_profile_id=browser_profile_id,
@@ -569,29 +522,7 @@ async def _create_headless_chromium(
har_path=browser_args["record_har_path"],
browser_session_dir=user_data_dir,
)
- 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:
- raise
+ browser_context = await playwright.chromium.launch_persistent_context(**browser_args)
return browser_context, browser_artifacts, None
@@ -613,7 +544,6 @@ 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 = False
if browser_profile_id and organization_id_for_profile:
profile_dir = await app.STORAGE.retrieve_browser_profile(
@@ -622,7 +552,6 @@ async def _create_headful_chromium(
)
if profile_dir:
user_data_dir = profile_dir
- loaded_from_saved_profile = True
LOG.info(
"Using browser profile",
browser_profile_id=browser_profile_id,
@@ -658,29 +587,7 @@ async def _create_headful_chromium(
har_path=browser_args["record_har_path"],
browser_session_dir=user_data_dir,
)
- 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:
- raise
+ browser_context = await playwright.chromium.launch_persistent_context(**browser_args)
return browser_context, browser_artifacts, None
diff --git a/tests/unit/test_browser_profile_corruption_detection.py b/tests/unit/test_browser_profile_corruption_detection.py
deleted file mode 100644
index 678adab45..000000000
--- a/tests/unit/test_browser_profile_corruption_detection.py
+++ /dev/null
@@ -1,107 +0,0 @@
-"""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 False
diff --git a/uv.lock b/uv.lock
index 76dd4d32c..d6b75fb0b 100644
--- a/uv.lock
+++ b/uv.lock
@@ -14,7 +14,7 @@ resolution-markers = [
]
[options]
-exclude-newer = "2026-04-07T17:49:42.509853Z"
+exclude-newer = "2026-04-01T23:52:18.918144411Z"
exclude-newer-span = "P7D"
[manifest]
@@ -5523,7 +5523,7 @@ wheels = [
[[package]]
name = "skyvern"
-version = "1.0.31"
+version = "1.0.30"
source = { editable = "." }
dependencies = [
{ name = "aioboto3" },