Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix(SKY-10327): detect PDF embeds in multi-frame pages (#6164)
LawyZhengd548ff1f688f
diff --git a/docs/developers/getting-started/quickstart.mdx b/docs/developers/getting-started/quickstart.mdxindex 69ea0fed9..602afef32 100644--- a/docs/developers/getting-started/quickstart.mdx+++ b/docs/developers/getting-started/quickstart.mdx@@ -42,7 +42,7 @@ npm install @skyvern/client</CodeGroup><Info>-`pip install skyvern` is the lightweight Python SDK for Skyvern Cloud and remote API usage. If you are using embedded local mode with `Skyvern.local()` or `launch_local_browser()`, install the local extra: `pip install "skyvern[local]"`. For a local Skyvern server with the packaged web UI, use `pip install "skyvern[all]"`. For advanced partial installs, `skyvern[server]` installs only the local server stack and `skyvern[ui]` installs only the packaged UI assets.+`pip install skyvern` is the lightweight Python SDK for Skyvern Cloud and remote API usage. If you are using embedded local mode with `Skyvern.local()` or `launch_local_browser()`, install the local extra: `pip install "skyvern[local]"`. For a local Skyvern server, self-hosted instance, or local stdio MCP, install the server extra instead: `pip install "skyvern[server]"`. For full local setup with migrations and the web UI, use Docker Compose or a source checkout.</Info><Accordion title="Troubleshooting: Python version errors">@@ -196,12 +196,13 @@ This is invaluable for debugging and understanding how Skyvern interprets your pYou can run Skyvern with a browser on your own machine. This is useful for development, debugging, or automating internal tools on your local network.**Prerequisites:**-- Skyvern local server + packaged UI extra installed (`pip install "skyvern[all]"`)-- If you intentionally installed only `skyvern[server]`, add the packaged UI with `pip install "skyvern[ui]"`. If it is missing, `skyvern run ui` can install it interactively; use `skyvern run ui --install-ui` for non-interactive UI-only setup.+- Skyvern server extra installed (`pip install "skyvern[server]"`)+- Source checkout or Docker Compose for guided quickstart and database migrations+- PostgreSQL database (local install or Docker)- An LLM API key (OpenAI, Anthropic, Azure OpenAI, Gemini, Ollama, or any OpenAI-compatible provider)<Note>-The pip quickstart uses SQLite at `~/.skyvern/data.db` by default, so Docker and Postgres are optional. Use `skyvern quickstart --postgres` to start a local Postgres container, or `skyvern quickstart --database-string=...` for an existing database.+Docker is optional. If you have PostgreSQL installed locally, Skyvern will detect and use it automatically. Use `skyvern init --no-postgres` to skip database setup entirely if you're managing PostgreSQL separately. The PyPI wheel installs the local-server dependencies, but guided quickstart currently needs repository migration files from a source checkout.</Note>### Set up local Skyvern@@ -220,7 +221,7 @@ skyvern initThis interactive wizard will:-1. Set up your database (SQLite by default, Postgres if requested)+1. Set up your database (detects local PostgreSQL or uses Docker)2. Configure your LLM provider3. Choose browser mode (headless, headful, or connect to existing Chrome)4. Generate local API credentialsdiff --git a/docs/developers/self-hosted/overview.mdx b/docs/developers/self-hosted/overview.mdxindex e92f99d97..830290e71 100644--- a/docs/developers/self-hosted/overview.mdx+++ b/docs/developers/self-hosted/overview.mdx@@ -89,11 +89,11 @@ Before deploying, ensure you have:PostgreSQL 14+ is included in the Docker Compose setup. If you prefer an external database, configure `DATABASE_STRING` to point to your own instance.-For local server commands with the packaged web UI from PyPI, install `pip install "skyvern[all]"`. The pip quickstart uses SQLite at `~/.skyvern/data.db` by default; pass `--postgres` for a local Postgres container or `--database-string` for an existing database. Use `skyvern[server]` only when you intentionally want the local server stack without the packaged UI, and add `skyvern[ui]` later if needed. The lightweight `pip install skyvern` package is for Skyvern Cloud / remote API SDK usage and does not include the local server stack.+For local server commands from PyPI, install the server extra: `pip install "skyvern[server]"`. The lightweight `pip install skyvern` package is for Skyvern Cloud / remote API SDK usage and does not include the local server stack. Guided quickstart and migrations currently require Docker Compose or a source checkout.For a full self-hosted deployment with the web UI, use Docker Compose. The Compose stack starts the API server, browser runtime, Postgres, and the Skyvern web UI together.-For the source-checkout `pip install ".[server]"` path, the default is also SQLite for local dev. To opt into Postgres for that path, run `skyvern quickstart --postgres` or `skyvern quickstart --database-string=postgresql+psycopg://user:pass@host:5432/dbname`.+For the source-checkout `pip install ".[server]"` path (Option A in the README), the default is a SQLite database at `~/.skyvern/data.db` β zero-config for local dev. To opt into Postgres for that path, run `skyvern quickstart --database-string=postgresql+psycopg://user:pass@host:5432/dbname`.## Choose your deployment methoddiff --git a/docs/sdk-reference/complete-reference.mdx b/docs/sdk-reference/complete-reference.mdxindex 7d3992836..80cd0ef8f 100644--- a/docs/sdk-reference/complete-reference.mdx+++ b/docs/sdk-reference/complete-reference.mdx@@ -33,7 +33,7 @@ npm install @skyvern/client</CodeGroup><Note>-`pip install skyvern` is the lightweight SDK for Skyvern Cloud and remote API calls. Embedded local SDK features such as `Skyvern.local()` and local browser control require `pip install "skyvern[local]"`. For a local server with the packaged web UI and default SQLite database, use `pip install "skyvern[all]"`. Use `skyvern[server]` or `skyvern[ui]` only when you intentionally want one side without the other.+`pip install skyvern` is the lightweight SDK for Skyvern Cloud and remote API calls. Embedded local SDK features such as `Skyvern.local()` and local browser control require `pip install "skyvern[local]"`. Local server and local stdio MCP commands require `pip install "skyvern[server]"`. Guided quickstart and migrations currently require Docker Compose or a source checkout.</Note><CodeGroup>diff --git a/docs/sdk-reference/overview.mdx b/docs/sdk-reference/overview.mdxindex f8341efcd..6d762c536 100644--- a/docs/sdk-reference/overview.mdx+++ b/docs/sdk-reference/overview.mdx@@ -32,7 +32,7 @@ npm install @skyvern/client</CodeGroup><Note>-`pip install skyvern` is the lightweight SDK for Skyvern Cloud and remote API calls. Embedded local SDK features such as `Skyvern.local()` and local browser control require `pip install "skyvern[local]"`. For a local server with the packaged web UI and default SQLite database, use `pip install "skyvern[all]"`. Use `skyvern[server]` or `skyvern[ui]` only when you intentionally want one side without the other.+`pip install skyvern` is the lightweight SDK for Skyvern Cloud and remote API calls. Embedded local SDK features such as `Skyvern.local()` and local browser control require `pip install "skyvern[local]"`. Local server and local stdio MCP commands require `pip install "skyvern[server]"`. Guided quickstart and migrations currently require Docker Compose or a source checkout.</Note>---diff --git a/pyproject.toml b/pyproject.tomlindex 15bd53e9b..88e9ce80c 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -157,86 +157,6 @@ server = ["tornado>=6.5.5","aiosqlite>=0.21.0,<0.23",]-ui = [- # Extras cannot add files to the already-installed skyvern wheel. Keep the- # frontend as a separate same-version distribution containing prebuilt dist- # assets, and let the CLI serve those assets without Node/npm at runtime.- "skyvern-ui==1.0.36",-]-all = [- # Keep this list in sync with the server extra plus skyvern-ui. Python- # package metadata cannot reference another extra from the same project in a- # way that pip reliably expands for all installers.- "skyvern-ui==1.0.36",- "azure-storage-blob>=12.26.0",- "openai>=1.68.2",- "yutori>=0.5.0",- "openai-agents>=0.10.5,<0.15",- "python-dotenv==1.2.2",- "sqlalchemy[mypy]>=2.0.29,<3",- "aiohttp>=3.13.4,<4",- "python-multipart>=0.0.27,<1",- "toml>=0.10.2,<0.11",- "jinja2>=3.1.2,<4",- "uvicorn[standard]>=0.44.0",- "litellm==1.83.14",- "playwright>1.46.0 ; python_version >= '3.12' and python_version < '3.14'",- "playwright==1.46.0 ; python_version >= '3.11' and python_version < '3.12'",- "greenlet>3.0.3 ; python_version >= '3.12' and python_version < '3.14'",- "greenlet==3.0.3 ; python_version >= '3.11' and python_version < '3.12'",- "pillow>=10.2.0",- "starlette-context>=0.3.6,<0.6",- "fastapi>=0.136.1,<0.137",- "psycopg[binary, pool]==3.1.18 ; python_version >= '3.11' and python_version < '3.13'",- "psycopg[binary, pool]>=3.2.2,<3.3.0 ; python_version >= '3.13' and python_version < '3.14'",- "alembic>=1.12.1,<2",- "PyJWT[crypto]>=2.12.0,<3",- "aioboto3>=14.3.0,<15",- "asyncache>=0.3.1,<0.4",- "types-boto3[full]>=1.38.31,<2",- "types-toml>=0.10.8.7,<0.11",- "filetype>=1.2.0,<2",- "fuzzysearch>=0.8,<1",- "aioredlock>=0.7.3,<0.8",- "tldextract>=5.1.2,<6",- "websockets>=12.0,<15.1",- "email-validator>=2.2.0,<3",- "requests-toolbelt>=1.0.0,<2",- "posthog>=3.7.0,<4",- "aiofiles>=24.1.0,<25",- "pyotp>=2.9.0,<3",- "asyncpg>=0.30.0,<0.32",- "json5>=0.13.0,<1",- "json-repair>=0.59.5,<0.60",- "pypdf>=6.7.5,<7",- "pdfplumber>=0.11.0,<0.12",- "fastmcp>=3.2.0,<4",- "psutil>=7.0.0",- "tiktoken>=0.9.0",- "anthropic>=0.97.0,<0.98",- "google-cloud-aiplatform>=1.149.0,<2",- "google-auth>=2.49.2,<3",- "google-auth-oauthlib>=1.3.1,<2",- "onepassword-sdk==0.4.0",- "lark>=1.2.2,<2",- "libcst>=1.8.2,<2",- "curlparser>=0.1.0,<0.2",- "pandas>=2.3.1,<4",- "azure-identity>=1.24.0,<2",- "azure-keyvault-secrets>=4.2.0,<5",- "jsonschema>=4.23.0",- "python-calamine>=0.6.1",- "python-docx>=1.1.0",- "urllib3>=2.7.0",- "zstandard>=0.25.0",- "sse-starlette>=3.4.1,<4",- "opentelemetry-api>=1.41.1,<2",- "croniter>=1.3.8,<4",- "authlib>=1.7.1",- "pyasn1>=0.6.3",- "tornado>=6.5.5",- "aiosqlite>=0.21.0,<0.23",-][dependency-groups]cloud = [@@ -323,9 +243,6 @@ include = [[tool.hatch.build.targets.wheel.force-include]"alembic" = "alembic"-[tool.uv.sources]-skyvern-ui = { path = "packages/skyvern-ui" }-[tool.uv]# Supply chain quarantine: block packages published less than 7 days ago.# Override for urgent cases: uv add <pkg> --exclude-newer ""diff --git a/skyvern/cli/init_command.py b/skyvern/cli/init_command.pyindex 02c4e5ce5..5613cba2d 100644--- a/skyvern/cli/init_command.py+++ b/skyvern/cli/init_command.py@@ -216,8 +216,7 @@ _LOCAL_SERVER_DEPENDENCY_HINT = ("Local Skyvern needs the server dependencies, but this Python environment is missing ""[cyan]{module}[/cyan].\n\n""Run [cyan]{install_command}[/cyan] and then rerun [cyan]skyvern quickstart[/cyan].\n\n"- 'For the local API + UI, use [cyan]pip install "skyvern[all]"[/cyan]. '- "For a full containerized Postgres stack, clone the Skyvern repository and use Docker Compose."+ "For the full UI + API + Postgres stack, clone the Skyvern repository and use Docker Compose.")@@ -325,26 +324,6 @@ async def _setup_local_organization_from_database() -> str:return await setup_local_organization_from_database_string(settings.DATABASE_STRING)-def _use_default_sqlite_database(*, env_path: Path | str | None = None) -> None:- from skyvern.config import _default_database_string # noqa: PLC0415-- database_url = _default_database_string()- console.print(- Panel(- "[bold cyan]SQLite Database Setup[/bold cyan]\n\n"- f"Using the default SQLite database at [cyan]{database_url}[/cyan].\n"- "To use Postgres instead, pass [cyan]--postgres[/cyan] to start a local container "- "or [cyan]--database-string[/cyan] for an existing database.",- border_style="blue",- )- )- capture_setup_event(- "database-skip",- success=True,- extra_data={"reason": "sqlite_default", "env_path": str(env_path) if env_path is not None else None},- )--@overloaddef init_env(no_postgres: bool = False,@@ -434,8 +413,6 @@ def init_env(console.print("π [bold blue]Using custom database connection...[/bold blue]")set_env_var("DATABASE_STRING", database_string)console.print(f"β [green]Database connection string set in {backend_env_path}.[/green]")- elif no_postgres:- _use_default_sqlite_database(env_path=backend_env_path)else:setup_postgresql(no_postgres, env_path=backend_env_path)console.print("π [bold blue]Running database migrations...[/bold blue]")@@ -613,12 +590,11 @@ def init_app_factory() -> typer.Typer:@app.callback()def _init_callback(ctx: typer.Context,- no_postgres: bool = typer.Option(False, "--no-postgres", help="Use default SQLite instead of PostgreSQL"),- postgres: bool = typer.Option(False, "--postgres", help="Start or reuse a local PostgreSQL container"),+ no_postgres: bool = typer.Option(False, "--no-postgres", help="Skip starting PostgreSQL container"),database_string: str = typer.Option("","--database-string",- help="Custom database connection string (e.g., postgresql+psycopg://user:password@host:port/dbname).",+ help="Custom database connection string (e.g., postgresql+psycopg://user:password@host:port/dbname). When provided, skips Docker PostgreSQL setup.",),env_scope: str | None = typer.Option(None,@@ -628,10 +604,7 @@ def init_app_factory() -> typer.Typer:) -> None:"""Run full initialization when no subcommand is provided."""if ctx.invoked_subcommand is None:- if postgres and no_postgres:- console.print("[bold red]Use only one of --postgres or --no-postgres.[/bold red]")- raise typer.Exit(1)- init_env(no_postgres=no_postgres or not postgres, database_string=database_string, env_scope=env_scope)+ init_env(no_postgres=no_postgres, database_string=database_string, env_scope=env_scope)@app.command(name="browser")def _init_browser_command() -> None:diff --git a/skyvern/cli/quickstart.py b/skyvern/cli/quickstart.pyindex 6fb4fa74b..022d09587 100644--- a/skyvern/cli/quickstart.py+++ b/skyvern/cli/quickstart.py@@ -19,40 +19,37 @@ from rich.prompt import Confirm, Promptfrom rich.text import Textfrom skyvern.cli.console import console-from skyvern.cli.ui_runtime import has_frontend_runtime-from skyvern.utils.env_paths import EnvScope, parse_env_scope+from skyvern.utils.env_paths import EnvScope, parse_env_scope, resolve_frontend_env_pathquickstart_app = typer.Typer(help="Quickstart command to set up and run Skyvern with one command.")_SKYVERN_COMPOSE_SERVICES = {"postgres", "skyvern", "skyvern-ui"}-def _server_extra_install_target(*, include_ui: bool = True) -> str:+def _server_extra_install_target() -> str:cwd = Path.cwd()if (cwd / "pyproject.toml").is_file() and (cwd / "skyvern").is_dir():return ".[server]"- extra = "all" if include_ui else "server"try:version = importlib.metadata.version("skyvern")except importlib.metadata.PackageNotFoundError:- return f"skyvern[{extra}]"- return f"skyvern[{extra}]=={version}"+ return "skyvern[server]"+ return f"skyvern[server]=={version}"-def _install_server_extra_for_quickstart(*, include_ui: bool = True, assume_yes: bool = False) -> bool:- target = _server_extra_install_target(include_ui=include_ui)- dependency_description = "server dependencies and packaged UI" if include_ui else "server dependencies"+def _install_server_extra_for_quickstart(*, assume_yes: bool = False) -> bool:+ target = _server_extra_install_target()console.print(Panel(- f"Local quickstart needs the {dependency_description}.\n\n"+ "Local quickstart needs the server dependencies.\n\n"f"Install [cyan]{escape(target)}[/cyan] into the current Python environment now?",title="Missing Local Server Dependency",border_style="yellow",))if not assume_yes and not Confirm.ask("Install the missing server dependencies now?", default=True):- _print_server_guidance(include_ui=include_ui)+ _print_server_guidance()return Falseconsole.print(f"π¦ [bold blue]Installing {escape(target)}...[/bold blue]")@@ -63,7 +60,7 @@ def _install_server_extra_for_quickstart(*, include_ui: bool = True, assume_yes:)except subprocess.CalledProcessError as install_error:console.print(f"[bold red]Failed to install {target}: {install_error}[/bold red]")- _print_server_guidance(include_ui=include_ui)+ _print_server_guidance()return Falseimportlib.invalidate_caches()@@ -165,7 +162,7 @@ def _print_quickstart_selector(has_server_extra: bool,) -> None:local_status = "installed" if has_local_extra else 'requires `pip install "skyvern[local]"`'- server_status = "installed" if has_server_extra else 'requires `pip install "skyvern[all]"`'+ server_status = "installed" if has_server_extra else 'requires `pip install "skyvern[server]"`'message = f"""Choose how you want to use Skyvern:1. Cloud/API SDK usage@@ -174,7 +171,7 @@ def _print_quickstart_selector(2. Embedded local Python SDK via skyvern[local]Status: {local_status}-3. Self-hosted local server + web UI via skyvern[all]+3. Self-hosted local server via skyvern[server]Status: {server_status}Default: {default_path.value}@@ -221,19 +218,17 @@ def _select_quickstart_path(def _server_quickstart_flags_requested(*,no_postgres: bool,- postgres: bool,database_string: str,skip_browser_install: bool,server_only: bool,) -> bool:"""Return whether the user supplied options for the Python server setup path."""- return no_postgres or postgres or bool(database_string) or skip_browser_install or server_only+ return no_postgres or bool(database_string) or skip_browser_install or server_onlydef _server_quickstart_options(*,no_postgres: bool,- postgres: bool,database_string: str,skip_browser_install: bool,server_only: bool,@@ -247,7 +242,6 @@ def _server_quickstart_options() -> dict[str, Any]:options: dict[str, Any] = {"no_postgres": no_postgres,- "postgres": postgres,"database_string": database_string,"skip_browser_install": skip_browser_install,"server_only": server_only,@@ -306,19 +300,14 @@ This path does not require Postgres, Docker, migrations, or `skyvern run server`console.print(Panel(Text(message), title="Embedded Local SDK", border_style="cyan"))-def _print_server_guidance(*, include_ui: bool = True) -> None:- install_command = 'pip install "skyvern[all]"' if include_ui else 'pip install "skyvern[server]"'- setup_description = "local server, packaged UI, SQLite database, local API key, and MCP"- if not include_ui:- setup_description = "local server, SQLite database, local API key, and MCP"- message = f"""Self-hosted local server+def _print_server_guidance() -> None:+ message = """Self-hosted local server-Install: {install_command}+Install: pip install "skyvern[server]"Next: python -m skyvern quickstart-This path sets up the {setup_description}.-Use --postgres or --database-string if you want Postgres instead of SQLite.-Use a source checkout / Docker Compose when you need frontend development mode.+This path sets up the local server, database, local API key, and MCP.+Wheel installs run the backend only; use a source checkout or Docker Compose for the local UI."""console.print(Panel(Text(message), title="Self-Hosted Server", border_style="cyan"))@@ -338,7 +327,6 @@ def _run_server_quickstart(database_string: str,skip_browser_install: bool,server_only: bool,- postgres: bool = False,skip_llm_setup: bool = False,configure_mcp: bool | None = None,browser_type: Literal["chromium-headful", "chromium-headless", "cdp-connect"] | None = None,@@ -354,7 +342,7 @@ def _run_server_quickstart(# Initialize Skyvern (pip install path)console.print("\n[bold blue]Initializing Skyvern...[/bold blue]")init_result = init_env(- no_postgres=no_postgres or (not postgres and not database_string),+ no_postgres=no_postgres,database_string=database_string,skip_browser_install=skip_browser_install,mode="local",@@ -398,7 +386,9 @@ def _run_server_quickstart(console.print("\n[bold blue]Starting Skyvern services...[/bold blue]")asyncio.run(start_services(server_only=server_only))else:- start_command = "skyvern run server" if server_only or not has_frontend_runtime() else "skyvern run all"+ start_command = (+ "skyvern run server" if server_only or resolve_frontend_env_path() is None else "skyvern run all"+ )console.print(f"\n[yellow]Skipping service startup. You can start services later with '{start_command}'[/yellow]")@@ -773,12 +763,11 @@ def run_docker_compose_setup() -> None:@quickstart_app.callback(invoke_without_command=True)def quickstart(ctx: typer.Context,- no_postgres: bool = typer.Option(False, "--no-postgres", help="Use default SQLite instead of PostgreSQL"),- postgres: bool = typer.Option(False, "--postgres", help="Start or reuse a local PostgreSQL container"),+ no_postgres: bool = typer.Option(False, "--no-postgres", help="Skip starting PostgreSQL container"),database_string: str = typer.Option("","--database-string",- help="Custom database connection string (e.g., postgresql+psycopg://user:password@host:port/dbname).",+ help="Custom database connection string (e.g., postgresql+psycopg://user:password@host:port/dbname). When provided, skips Docker PostgreSQL setup.",),skip_browser_install: bool = typer.Option(False, "--skip-browser-install", help="Skip Chromium browser installation"@@ -869,22 +858,11 @@ def quickstart())- if postgres and no_postgres:- console.print(- Panel(- "[bold red]Conflicting quickstart options.[/bold red]\n"- "Use only one of [cyan]--postgres[/cyan] or [cyan]--no-postgres[/cyan].",- border_style="red",- )- )- raise typer.Exit(1)-has_server_extra = _has_server_quickstart_extra()# The server extra is a superset of the local embedded runtime dependencies.has_local_extra = has_server_extra or _has_local_quickstart_extra()server_flags_requested = _server_quickstart_flags_requested(no_postgres=no_postgres,- postgres=postgres,database_string=database_string,skip_browser_install=skip_browser_install,server_only=server_only,@@ -980,7 +958,7 @@ def quickstart(console.print("\n[bold blue]Setup Method[/bold blue]")console.print("Docker Compose file detected. Choose your setup method:\n")console.print(" [cyan]1.[/cyan] [green]Docker Compose (Recommended)[/green] - Full containerized setup")- console.print(" [cyan]2.[/cyan] pip install - Local Python setup with SQLite by default\n")+ console.print(" [cyan]2.[/cyan] pip install - Local Python setup with Docker for PostgreSQL only\n")use_docker_compose = Confirm.ask("Would you like to use Docker Compose for the full setup?",@@ -993,22 +971,14 @@ def quickstart(if not _has_server_quickstart_extra():if not yes and not _is_interactive_input():- _print_server_guidance(include_ui=not server_only)+ _print_server_guidance()raise typer.Exit(0)- if (- not _install_server_extra_for_quickstart(include_ui=not server_only, assume_yes=yes)- or not _has_server_quickstart_extra()- ):+ if not _install_server_extra_for_quickstart(assume_yes=yes) or not _has_server_quickstart_extra():raise typer.Exit(1)- elif not server_only and not has_frontend_runtime() and _is_interactive_input():- from skyvern.cli.run_commands import _install_packaged_ui_if_requested # noqa: PLC0415-- _install_packaged_ui_if_requested()_run_server_quickstart(**_server_quickstart_options(no_postgres=no_postgres,- postgres=postgres,database_string=database_string,skip_browser_install=skip_browser_install,server_only=server_only,diff --git a/skyvern/cli/run_commands.py b/skyvern/cli/run_commands.pyindex b9d32dd66..0c0defc0f 100644--- a/skyvern/cli/run_commands.py+++ b/skyvern/cli/run_commands.py@@ -1,55 +1,40 @@import asyncioimport atexit-import importlib-import importlib.metadata-import importlib.utilimport jsonimport loggingimport os-import secrets-import shleximport shutilimport subprocessimport sys-import urllib.parsefrom typing import TYPE_CHECKING, Annotated, List, Literal, Optionalif TYPE_CHECKING:from starlette.types import ASGIApp, Receive, Scope, Send+import psutilimport typer+import uvicornfrom dotenv import set_key-from rich.markup import escapefrom rich.panel import Panelfrom rich.prompt import Confirm+from starlette.middleware import Middleware+from starlette.responses import JSONResponse as StarletteJSONResponse+from starlette.responses import Response as StarletteResponsefrom skyvern._cli_bootstrap import prepare_cli_runtimefrom skyvern.cli.commands._output import output_errorfrom skyvern.cli.commands._tty import is_interactivefrom skyvern.cli.console import consolefrom skyvern.cli.core.result import set_concise_responses-from skyvern.cli.ui_runtime import (- ARTIFACT_PORT,- UI_PACKAGE_NAME,- UI_PORT,- InstalledUiConfig,- artifact_api_base_url_with_token,- has_frontend_runtime,- installed_ui_dist_available,- prepare_installed_ui_dist,- serve_installed_ui,-)from skyvern.utils import detect_osfrom skyvern.utils.env_paths import (EnvIntent,- load_backend_env_files,resolve_backend_env_path,resolve_frontend_env_path,)run_app = typer.Typer(help="Commands to run Skyvern services such as the API server or UI.")_mcp_cleanup_done = False-_LOGGER = logging.getLogger(__name__)def _default_host() -> str:@@ -103,8 +88,6 @@ def get_pids_on_port(port: int) -> List[int]:"""Return a list of PIDs listening on the given port."""pids = []try:- import psutil # noqa: PLC0415-for conn in psutil.net_connections(kind="inet"):if conn.laddr and conn.laddr.port == port and conn.pid:pids.append(conn.pid)@@ -136,8 +119,6 @@ def run_server() -> None:_handle_missing_dep(exc)- import uvicorn # noqa: PLC0415-prepare_cli_runtime(intent=EnvIntent.SERVER)from skyvern.config import settings # noqa: PLC0415@@ -188,271 +169,23 @@ def _handle_port_conflict(port: int, *, force: bool, command_hint: str) -> bool:return True-def _websocket_base_url_for_api_base_url(api_base_url: str) -> str:- parsed = urllib.parse.urlparse(api_base_url)- if parsed.scheme == "https":- return urllib.parse.urlunparse(parsed._replace(scheme="wss"))- if parsed.scheme == "http":- return urllib.parse.urlunparse(parsed._replace(scheme="ws"))- return api_base_url---def _installed_ui_config(- *,- api_base_url: str | None = None,- wss_base_url: str | None = None,- artifact_api_base_url: str | None = None,- skyvern_api_key: str | None = None,- browser_streaming_mode: str | None = None,-) -> InstalledUiConfig:- backend_env_path = resolve_backend_env_path(intent=EnvIntent.SERVER)- if backend_env_path.exists():- load_backend_env_files(intent=EnvIntent.SERVER)- else:- console.print(f"[yellow]Backend .env file not found at {backend_env_path}; using UI defaults.[/yellow]")-- api_port = os.getenv("PORT", "8000")- resolved_api_base_url = (- api_base_url- if api_base_url is not None- else os.getenv("VITE_API_BASE_URL", f"http://localhost:{api_port}/api/v1")- )- resolved_wss_base_url = (- wss_base_url- if wss_base_url is not None- else os.getenv("VITE_WSS_BASE_URL") or _websocket_base_url_for_api_base_url(resolved_api_base_url)- )- resolved_artifact_api_base_url = (- artifact_api_base_url- if artifact_api_base_url is not None- else os.getenv("VITE_ARTIFACT_API_BASE_URL", f"http://localhost:{ARTIFACT_PORT}")- )- resolved_skyvern_api_key = (- skyvern_api_key- if skyvern_api_key is not None- else os.getenv("VITE_SKYVERN_API_KEY", os.getenv("SKYVERN_API_KEY", ""))- )- resolved_browser_streaming_mode = (- browser_streaming_mode- if browser_streaming_mode is not None- else os.getenv("VITE_BROWSER_STREAMING_MODE", os.getenv("BROWSER_STREAMING_MODE", "vnc"))- )- return InstalledUiConfig(- api_base_url=resolved_api_base_url,- wss_base_url=resolved_wss_base_url,- artifact_api_base_url=resolved_artifact_api_base_url,- skyvern_api_key=resolved_skyvern_api_key,- browser_streaming_mode=resolved_browser_streaming_mode,- )---def _ui_install_target() -> str:- try:- skyvern_version = importlib.metadata.version("skyvern")- except importlib.metadata.PackageNotFoundError:- return UI_PACKAGE_NAME- return f"{UI_PACKAGE_NAME}=={skyvern_version}"---def _ui_install_command(install_target: str) -> list[str]:- uv_bin = shutil.which("uv")- if uv_bin and (os.getenv("VIRTUAL_ENV") or os.getenv("UV_PROJECT_ENVIRONMENT")):- return [uv_bin, "pip", "install", install_target]- return [sys.executable, "-m", "pip", "install", install_target]---def _format_command(command: list[str]) -> str:- return " ".join(shlex.quote(part) for part in command)---def _print_missing_ui_assets() -> None:- ui_install_command = escape('pip install "skyvern[ui]"')- all_install_command = escape('pip install "skyvern[all]"')- console.print(- Panel(- "[bold red]ERROR: Skyvern UI assets are not installed.[/bold red]\n\n"- f"Run [cyan]{ui_install_command}[/cyan] for the packaged UI, "- f"or [cyan]{all_install_command}[/cyan] for local server + UI.\n\n"- "For frontend development, run this command from a Skyvern source checkout.",- border_style="red",- )- )---def _install_packaged_ui_if_requested(*, assume_yes: bool = False) -> bool:- install_target = _ui_install_target()- if not assume_yes:- if not is_interactive():- install_command = _format_command(_ui_install_command(install_target))- _LOGGER.warning(- "packaged_ui_install_skipped_non_interactive",- extra={"install_target": install_target, "install_command": install_command},- )- console.print(- Panel(- "[yellow]Packaged Skyvern UI assets are not installed and this shell is "- "non-interactive.[/yellow]\n\n"- f"Automatic install was skipped. Run [cyan]{escape(install_command)}[/cyan] "- "or pass [cyan]--install-ui[/cyan] when you want the CLI to install them.",- title="UI install skipped",- border_style="yellow",- )- )- return False- if not Confirm.ask(f"Install packaged Skyvern UI assets now ({install_target})?", default=True):- return False-- console.print(f"π¦ [bold blue]Installing {install_target}...[/bold blue]")- result = subprocess.run(_ui_install_command(install_target), check=False)- if result.returncode != 0:- console.print(f"[bold red]Failed to install {install_target}.[/bold red]")- return False-- importlib.invalidate_caches()- if installed_ui_dist_available():- console.print("β [green]Packaged Skyvern UI assets installed.[/green]")- return True-- console.print(f"[bold red]Installed {install_target}, but packaged UI assets were not found.[/bold red]")- return False---def _missing_run_all_dependencies() -> list[str]:- required_modules = ["uvicorn", "sqlalchemy", "alembic"]- return [module for module in required_modules if importlib.util.find_spec(module) is None]---def _print_missing_run_all_dependencies(missing_modules: list[str]) -> None:- all_install_command = escape('pip install "skyvern[all]"')- ui_install_command = escape("skyvern run ui --install-ui")- missing = ", ".join(missing_modules)- console.print(- Panel(- "[bold red]ERROR: `skyvern run all` needs the local server dependencies.[/bold red]\n\n"- f"Missing: [yellow]{missing}[/yellow]\n"- f"Run [cyan]{all_install_command}[/cyan] to install the local server and packaged UI together.\n\n"- f"If you only want the packaged UI, run [cyan]{ui_install_command}[/cyan].",- border_style="red",- )- )---def _run_installed_ui(- *,- force: bool,- api_base_url: str | None = None,- wss_base_url: str | None = None,- artifact_api_base_url: str | None = None,- skyvern_api_key: str | None = None,- browser_streaming_mode: str | None = None,-) -> None:- if not _handle_port_conflict(ARTIFACT_PORT, force=force, command_hint="skyvern stop ui"):- return-- artifact_token = secrets.token_urlsafe(24)- config = _installed_ui_config(- api_base_url=api_base_url,- wss_base_url=wss_base_url,- artifact_api_base_url=artifact_api_base_url,- skyvern_api_key=skyvern_api_key,- browser_streaming_mode=browser_streaming_mode,- )- config = InstalledUiConfig(- api_base_url=config.api_base_url,- wss_base_url=config.wss_base_url,- artifact_api_base_url=artifact_api_base_url_with_token(config.artifact_api_base_url, artifact_token),- skyvern_api_key=config.skyvern_api_key,- browser_streaming_mode=config.browser_streaming_mode,- )- dist_dir = prepare_installed_ui_dist(config)- console.print(- Panel(- "[bold green]Starting packaged Skyvern UI...[/bold green]\n\n"- f"UI: [cyan]http://localhost:{UI_PORT}[/cyan]\n"- f"Artifact server: [cyan]http://localhost:{ARTIFACT_PORT}[/cyan]",- border_style="green",- )- )- serve_installed_ui(dist_dir, ui_port=UI_PORT, artifact_port=ARTIFACT_PORT, artifact_token=artifact_token)---def _apply_frontend_env_overrides(- frontend_env_path: os.PathLike[str] | str,- *,- api_base_url: str | None,- wss_base_url: str | None,- artifact_api_base_url: str | None,- skyvern_api_key: str | None,- browser_streaming_mode: str | None,-) -> None:- overrides = {- "VITE_API_BASE_URL": api_base_url,- "VITE_WSS_BASE_URL": wss_base_url,- "VITE_ARTIFACT_API_BASE_URL": artifact_api_base_url,- "VITE_SKYVERN_API_KEY": skyvern_api_key,- "VITE_BROWSER_STREAMING_MODE": browser_streaming_mode,- }- for key, value in overrides.items():- if value is not None:- set_key(frontend_env_path, key, value)--@run_app.command(name="ui")def run_ui(- force: Annotated[- bool, typer.Option("--force", help="Kill existing process on port 8080 without prompting.")- ] = False,- install_ui: Annotated[- bool, typer.Option("--install-ui", help="Install packaged UI assets if they are missing.")- ] = False,- api_url: Annotated[- Optional[str],- typer.Option("--api-url", help="API base URL for the UI, e.g. https://api.skyvern.com/api/v1."),- ] = None,- wss_url: Annotated[- Optional[str],- typer.Option("--wss-url", help="WebSocket API base URL. Defaults to --api-url with ws/wss scheme."),- ] = None,- artifact_api_url: Annotated[- Optional[str],- typer.Option("--artifact-api-url", help="Artifact API base URL for local artifact rendering."),- ] = None,- api_key: Annotated[- Optional[str],- typer.Option("--api-key", help="Skyvern API key to inject into the UI runtime."),- ] = None,- browser_streaming_mode: Annotated[- Optional[str],- typer.Option("--browser-streaming-mode", help="Browser streaming mode for the UI, e.g. vnc or cdp."),- ] = None,+ force: bool = typer.Option(False, "--force", help="Kill existing process on port 8080 without prompting."),) -> None:"""Run the Skyvern UI server.Examples:skyvern run uiskyvern run ui --force- skyvern run ui --install-ui- skyvern run ui --api-url https://api.skyvern.com/api/v1 --api-key sk-..."""console.print(Panel("[bold blue]Starting Skyvern UI Server...[/bold blue]", border_style="blue"))- frontend_env_path = resolve_frontend_env_path()- if frontend_env_path is None:- if not installed_ui_dist_available() and not _install_packaged_ui_if_requested(assume_yes=install_ui):- _print_missing_ui_assets()- return- if not _handle_port_conflict(UI_PORT, force=force, command_hint="skyvern run ui --force"):- return- _run_installed_ui(- force=force,- api_base_url=api_url,- wss_base_url=wss_url,- artifact_api_base_url=artifact_api_url,- skyvern_api_key=api_key,- browser_streaming_mode=browser_streaming_mode,- )+ if not _handle_port_conflict(8080, force=force, command_hint="skyvern run ui --force"):return- if not _handle_port_conflict(UI_PORT, force=force, command_hint="skyvern run ui --force"):+ frontend_env_path = resolve_frontend_env_path()+ if frontend_env_path is None:+ console.print("[bold red]ERROR: Skyvern Frontend directory not found.[/bold red]")returnfrontend_dir = frontend_env_path.parent@@ -472,15 +205,6 @@ def run_ui(else:console.print(f"[red]ERROR: Backend .env file not found at {backend_env_path}[/red]")- _apply_frontend_env_overrides(- frontend_env_path,- api_base_url=api_url,- wss_base_url=wss_url,- artifact_api_base_url=artifact_api_url,- skyvern_api_key=api_key,- browser_streaming_mode=browser_streaming_mode,- )-os.chdir(frontend_dir)try:@@ -605,23 +329,10 @@ def run_docker() -> None:@run_app.command(name="all")-def run_all(- install_ui: Annotated[- bool, typer.Option("--install-ui", help="Install packaged UI assets if they are missing.")- ] = False,-) -> None:+def run_all() -> None:"""Run the Skyvern API server and UI server in parallel."""- missing_dependencies = _missing_run_all_dependencies()- if missing_dependencies:- _print_missing_run_all_dependencies(missing_dependencies)- raise typer.Exit(1)-from skyvern.cli.utils import start_services # noqa: PLC0415- if not has_frontend_runtime():- installed = _install_packaged_ui_if_requested(assume_yes=install_ui)- if install_ui and not installed:- raise typer.Exit(1)asyncio.run(start_services())@@ -692,9 +403,6 @@ class _ServerCardMiddleware:self.card = build_server_card(self.transport_type, endpoint_url)async def __call__(self, scope: "Scope", receive: "Receive", send: "Send") -> None:- from starlette.responses import JSONResponse as StarletteJSONResponse # noqa: PLC0415- from starlette.responses import Response as StarletteResponse # noqa: PLC0415-if scope["type"] == "http" and scope["path"] == "/.well-known/mcp/server-card.json":cors_headers = {"Access-Control-Allow-Origin": "*",@@ -742,8 +450,6 @@ def run_mcp() -> None:"""Run the MCP server with configurable transport for local or remote hosting."""prepare_cli_runtime(intent=EnvIntent.CLOUD)- from starlette.middleware import Middleware # noqa: PLC0415-from skyvern.cli.core.mcp_http_auth import MCPAPIKeyMiddleware # noqa: PLC0415from skyvern.cli.core.session_manager import set_stateless_http_mode # noqa: PLC0415from skyvern.cli.mcp_tools import mcp # noqa: PLC0415diff --git a/skyvern/cli/ui_runtime.py b/skyvern/cli/ui_runtime.pydeleted file mode 100644index a8ccf6561..000000000--- a/skyvern/cli/ui_runtime.py+++ /dev/null@@ -1,453 +0,0 @@-from __future__ import annotations--import json-import os-import posixpath-import re-import shutil-import threading-import urllib.parse-import webbrowser-from dataclasses import dataclass-from http import HTTPStatus-from http.server import BaseHTTPRequestHandler, SimpleHTTPRequestHandler, ThreadingHTTPServer-from importlib import metadata, resources-from importlib.resources.abc import Traversable-from pathlib import Path-from typing import Any--from skyvern.utils.env_paths import resolve_frontend_env_path--UI_PORT = 8080-ARTIFACT_PORT = 9090-UI_PACKAGE_NAME = "skyvern-ui"-UI_PACKAGE_MODULE = "skyvern_ui"-UI_CACHE_ENV_VAR = "SKYVERN_UI_CACHE_DIR"-ARTIFACT_PATH_ROOTS_ENV_VAR = "SKYVERN_ARTIFACT_PATH_ROOTS"-UI_BIND_HOST = "127.0.0.1"-_IMAGE_CONTENT_TYPES = {- ".avif": "image/avif",- ".gif": "image/gif",- ".jpg": "image/jpeg",- ".jpeg": "image/jpeg",- ".png": "image/png",- ".svg": "image/svg+xml",- ".webp": "image/webp",-}-_PRIVATE_DIR_MODE = 0o700-_PRIVATE_FILE_MODE = 0o600---@dataclass(frozen=True)-class InstalledUiConfig:- api_base_url: str- wss_base_url: str- artifact_api_base_url: str- skyvern_api_key: str- browser_streaming_mode: str---def installed_ui_dist() -> Traversable | None:- """Return the installed prebuilt UI dist resource, if skyvern-ui is installed."""- try:- dist = resources.files(UI_PACKAGE_MODULE).joinpath("dist")- except ModuleNotFoundError:- return None-- if not dist.is_dir() or not dist.joinpath("index.html").is_file():- return None- return dist---def installed_ui_dist_available() -> bool:- return installed_ui_dist() is not None---def has_frontend_runtime() -> bool:- """Return whether `skyvern run ui` can start either source or packaged UI."""- return resolve_frontend_env_path() is not None or installed_ui_dist_available()---def installed_ui_version() -> str:- try:- module = __import__(UI_PACKAGE_MODULE)- return str(getattr(module, "__version__"))- except (AttributeError, ModuleNotFoundError):- pass- try:- return metadata.version(UI_PACKAGE_NAME)- except metadata.PackageNotFoundError:- return "unknown"---def _ensure_private_dir(path: Path) -> None:- path.mkdir(parents=True, exist_ok=True, mode=_PRIVATE_DIR_MODE)- path.chmod(_PRIVATE_DIR_MODE)---def _copy_resource_tree(source: Traversable, destination: Path) -> None:- _ensure_private_dir(destination)- for child in source.iterdir():- child_destination = destination / child.name- if child.is_dir():- _copy_resource_tree(child, child_destination)- else:- _ensure_private_dir(child_destination.parent)- child_destination.write_bytes(child.read_bytes())- child_destination.chmod(_PRIVATE_FILE_MODE)---def _ui_cache_root() -> Path:- configured = os.getenv(UI_CACHE_ENV_VAR)- if configured:- return Path(configured).expanduser()- return Path.home() / ".cache" / "skyvern" / "ui"---def _replace_placeholders(dist_dir: Path, replacements: dict[str, str]) -> None:- for asset in dist_dir.rglob("*"):- if not asset.is_file() or asset.suffix not in {".html", ".js", ".css"}:- continue- try:- contents = asset.read_text(encoding="utf-8")- except UnicodeDecodeError:- continue- updated = contents- for placeholder, value in replacements.items():- updated = updated.replace(placeholder, value)- if updated != contents:- asset.write_text(updated, encoding="utf-8")- asset.chmod(_PRIVATE_FILE_MODE)---def prepare_installed_ui_dist(config: InstalledUiConfig) -> Path:- """Copy installed UI assets to a writable cache and inject runtime values."""- source_dist = installed_ui_dist()- if source_dist is None:- raise FileNotFoundError('Prebuilt Skyvern UI assets are not installed. Run `pip install "skyvern[ui]"`.')-- cache_root = _ui_cache_root()- version_cache_dir = cache_root / installed_ui_version()- _ensure_private_dir(cache_root)- _ensure_private_dir(version_cache_dir)-- runtime_dist = version_cache_dir / "runtime"- if runtime_dist.exists():- shutil.rmtree(runtime_dist)- _copy_resource_tree(source_dist, runtime_dist)- _replace_placeholders(- runtime_dist,- {- "__VITE_API_BASE_URL_PLACEHOLDER__": config.api_base_url,- "__VITE_WSS_BASE_URL_PLACEHOLDER__": config.wss_base_url,- "__VITE_ARTIFACT_API_BASE_URL_PLACEHOLDER__": config.artifact_api_base_url,- "__SKYVERN_API_KEY_PLACEHOLDER__": config.skyvern_api_key,- "__VITE_BROWSER_STREAMING_MODE_PLACEHOLDER__": config.browser_streaming_mode,- },- )- return runtime_dist---def artifact_api_base_url_with_token(base_url: str, token: str) -> str:- return f"{base_url.rstrip('/')}/{token}"---def _candidate_artifact_roots() -> list[Path]:- configured_roots = os.getenv(ARTIFACT_PATH_ROOTS_ENV_VAR)- if configured_roots:- return [Path(raw).expanduser() for raw in configured_roots.split(os.pathsep) if raw]-- roots: list[Path] = []- for env_var in ("ARTIFACT_STORAGE_PATH", "TEMP_PATH"):- configured = os.getenv(env_var)- if configured:- roots.append(Path(configured).expanduser())-- skyvern_settings: Any | None- try:- from skyvern.config import settings as skyvern_settings # noqa: PLC0415- except Exception:- skyvern_settings = None- if skyvern_settings is not None:- roots.extend(- [- Path(skyvern_settings.ARTIFACT_STORAGE_PATH).expanduser(),- Path(skyvern_settings.TEMP_PATH).expanduser(),- ]- )-- roots.extend(- [- Path.cwd() / "artifacts",- Path.cwd() / "temp",- Path.home() / ".skyvern" / "artifacts",- Path.home() / ".skyvern" / "temp",- ]- )- return roots---def _configured_artifact_roots() -> tuple[Path, ...]:- roots: list[Path] = []- seen: set[Path] = set()- for root in _candidate_artifact_roots():- resolved = root.resolve(strict=False)- if resolved in seen:- continue- roots.append(resolved)- seen.add(resolved)- return tuple(roots)---def _should_serve_spa_index(request_path: str) -> bool:- if request_path in {"", "/"}:- return False- return posixpath.splitext(request_path.rstrip("/"))[1] == ""---def _validate_tcp_port(port: int) -> int:- if isinstance(port, bool) or not isinstance(port, int) or port <= 0 or port > 65535:- raise ValueError(f"Invalid TCP port: {port!r}")- return port---def _local_ui_origins(ui_port: int) -> tuple[str, str]:- port = _validate_tcp_port(ui_port)- return (f"http://localhost:{port}", f"http://127.0.0.1:{port}")---def _normalize_artifact_path(raw_path: str) -> str | None:- if "\x00" in raw_path or "\r" in raw_path or "\n" in raw_path:- return None- if urllib.parse.urlparse(raw_path).scheme.lower() == "file":- return None- return os.path.realpath(os.path.expanduser(raw_path))---def _image_content_type(path: str) -> str:- return _IMAGE_CONTENT_TYPES.get(os.path.splitext(path)[1].lower(), "application/octet-stream")---class _ReusableThreadingHTTPServer(ThreadingHTTPServer):- allow_reuse_address = True---class _SinglePageAppHandler(SimpleHTTPRequestHandler):- def __init__(self, *args: Any, directory: str, **kwargs: Any) -> None:- super().__init__(*args, directory=directory, **kwargs)-- def log_message(self, format: str, *args: Any) -> None: # noqa: A002- return-- def send_head(self) -> Any:- parsed = urllib.parse.urlparse(self.path)- if self.command in {"GET", "HEAD"} and _should_serve_spa_index(parsed.path):- self.path = "/index.html"- return super().send_head()---class _ArtifactHandler(BaseHTTPRequestHandler):- server_version = "SkyvernArtifactServer/1.0"- artifact_token: str | None = None- artifact_roots: tuple[Path, ...] = ()- ui_port: int = UI_PORT-- def log_message(self, format: str, *args: Any) -> None: # noqa: A002- return-- def end_headers(self) -> None:- cors_origin = self._cors_origin()- if cors_origin is not None:- self.send_header("Access-Control-Allow-Origin", cors_origin)- self.send_header("Vary", "Origin")- self.send_header("Access-Control-Allow-Methods", "GET, OPTIONS")- self.send_header("Access-Control-Allow-Headers", "Range, Content-Type")- self.send_header("Referrer-Policy", "no-referrer")- super().end_headers()-- def do_OPTIONS(self) -> None:- self.send_response(HTTPStatus.NO_CONTENT)- self.end_headers()-- def do_GET(self) -> None:- parsed = urllib.parse.urlparse(self.path)- route_path = self._route_path(parsed.path)- if route_path is None:- self.send_error(HTTPStatus.NOT_FOUND, "Unknown artifact endpoint")- return-- params = urllib.parse.parse_qs(parsed.query)- raw_path = params.get("path", [None])[0]-- if route_path == "/artifact/recording":- self._send_recording(raw_path)- return- if route_path == "/artifact/image":- self._send_file(raw_path)- return- if route_path == "/artifact/json":- self._send_json(raw_path)- return- if route_path == "/artifact/text":- self._send_text(raw_path)- return-- self.send_error(HTTPStatus.NOT_FOUND, "Unknown artifact endpoint")-- def _cors_origin(self) -> str | None:- localhost_origin, loopback_origin = _local_ui_origins(self.ui_port)- request_origin = self.headers.get("Origin")- if request_origin == localhost_origin:- return localhost_origin- if request_origin == loopback_origin:- return loopback_origin- return None-- def _route_path(self, parsed_path: str) -> str | None:- if self.artifact_token is None:- return parsed_path- token_prefix = f"/{self.artifact_token}"- if parsed_path == token_prefix:- return "/"- if not parsed_path.startswith(f"{token_prefix}/"):- return None- return parsed_path[len(token_prefix) :]-- def _send_validated_artifact(self, raw_path: str | None, artifact_kind: str) -> None:- if raw_path is None:- self.send_error(HTTPStatus.BAD_REQUEST, "Missing path")- return- normalized = _normalize_artifact_path(raw_path)- if normalized is None:- self.send_error(HTTPStatus.BAD_REQUEST, "Invalid artifact path")- return- for root in self.artifact_roots:- root_path = os.path.realpath(root)- root_prefix = root_path if root_path.endswith(os.sep) else f"{root_path}{os.sep}"- if normalized.startswith(root_prefix):- try:- with open(normalized, "rb") as stream:- file_size = os.fstat(stream.fileno()).st_size-- if artifact_kind == "recording":- range_header = self.headers.get("Range")- if not range_header:- self.send_error(HTTPStatus.BAD_REQUEST, "Missing range header")- return-- match = re.match(r"bytes=(\d+)-", range_header)- start = int(match.group(1)) if match else 0- if start >= file_size:- self.send_error(HTTPStatus.REQUESTED_RANGE_NOT_SATISFIABLE)- return- end = min(start + 1_000_000, file_size) - 1- content_length = end - start + 1-- self.send_response(HTTPStatus.PARTIAL_CONTENT)- self.send_header("Content-Range", f"bytes {start}-{end}/{file_size}")- self.send_header("Accept-Ranges", "bytes")- self.send_header("Content-Length", str(content_length))- self.send_header("Content-Type", "video/mp4")- self.end_headers()- stream.seek(start)- self.wfile.write(stream.read(content_length))- return- if artifact_kind == "image":- self.send_response(HTTPStatus.OK)- self.send_header("Content-Type", _image_content_type(normalized))- self.send_header("Content-Length", str(file_size))- self.end_headers()- shutil.copyfileobj(stream, self.wfile)- return- if artifact_kind == "json":- try:- payload = json.loads(stream.read().decode("utf-8"))- except Exception:- self.send_error(HTTPStatus.INTERNAL_SERVER_ERROR, "Invalid artifact JSON")- return- encoded = json.dumps(payload).encode("utf-8")- self.send_response(HTTPStatus.OK)- self.send_header("Content-Type", "application/json")- self.send_header("Content-Length", str(len(encoded)))- self.end_headers()- self.wfile.write(encoded)- return- if artifact_kind == "text":- contents = stream.read()- self.send_response(HTTPStatus.OK)- self.send_header("Content-Type", "text/plain; charset=utf-8")- self.send_header("Content-Length", str(len(contents)))- self.end_headers()- self.wfile.write(contents)- return-- self.send_error(HTTPStatus.NOT_FOUND, "Unknown artifact endpoint")- return- except OSError:- self.send_error(HTTPStatus.NOT_FOUND, "Artifact not found")- return-- self.send_error(HTTPStatus.FORBIDDEN, "Artifact path is outside the configured roots")- return-- def _send_recording(self, raw_path: str | None) -> None:- self._send_validated_artifact(raw_path, "recording")-- def _send_file(self, raw_path: str | None) -> None:- self._send_validated_artifact(raw_path, "image")-- def _send_json(self, raw_path: str | None) -> None:- self._send_validated_artifact(raw_path, "json")-- def _send_text(self, raw_path: str | None) -> None:- self._send_validated_artifact(raw_path, "text")---def _artifact_handler_class(- *,- artifact_token: str | None,- artifact_roots: tuple[Path, ...],- ui_port: int,-) -> type[_ArtifactHandler]:- class ConfiguredArtifactHandler(_ArtifactHandler):- pass-- ConfiguredArtifactHandler.artifact_token = artifact_token- ConfiguredArtifactHandler.artifact_roots = artifact_roots- ConfiguredArtifactHandler.ui_port = _validate_tcp_port(ui_port)- return ConfiguredArtifactHandler---def serve_installed_ui(- dist_dir: Path,- *,- ui_port: int = UI_PORT,- artifact_port: int = ARTIFACT_PORT,- artifact_token: str | None = None,-) -> None:- """Serve prebuilt UI assets and local artifact endpoints without Node."""-- def ui_handler(*args: Any, **kwargs: Any) -> _SinglePageAppHandler:- return _SinglePageAppHandler(*args, directory=str(dist_dir), **kwargs)-- artifact_handler = _artifact_handler_class(- artifact_token=artifact_token,- artifact_roots=_configured_artifact_roots(),- ui_port=ui_port,- )- ui_server = _ReusableThreadingHTTPServer((UI_BIND_HOST, ui_port), ui_handler)- artifact_server = _ReusableThreadingHTTPServer((UI_BIND_HOST, artifact_port), artifact_handler)- artifact_thread = threading.Thread(target=artifact_server.serve_forever, daemon=True)- artifact_thread.start()-- try:- webbrowser.open(f"http://localhost:{ui_port}")- ui_server.serve_forever()- except KeyboardInterrupt:- return- finally:- ui_server.shutdown()- ui_server.server_close()- artifact_server.shutdown()- artifact_server.server_close()- artifact_thread.join(timeout=5)diff --git a/skyvern/cli/utils.py b/skyvern/cli/utils.pyindex f1eef549f..9e62f17d7 100644--- a/skyvern/cli/utils.py+++ b/skyvern/cli/utils.py@@ -5,14 +5,12 @@ import sysimport timeimport typer-from rich.markup import escapefrom rich.panel import Panelfrom rich.progress import Progress, SpinnerColumn, TextColumnfrom skyvern.analytics import capture_setup_error, capture_setup_eventfrom skyvern.cli.console import console-from skyvern.cli.ui_runtime import has_frontend_runtime-from skyvern.utils.env_paths import resolve_backend_env_path+from skyvern.utils.env_paths import resolve_backend_env_path, resolve_frontend_env_pathdef wait_for_docker_services(ui_port: int = 8080, api_port: int = 8000, timeout: int = 120) -> bool:@@ -50,14 +48,14 @@ async def start_services(server_only: bool = False) -> None:server_only: If True, only start the server, not the UI."""try:- frontend_available = False if server_only else has_frontend_runtime()- if not server_only and not frontend_available:+ frontend_env_path = None if server_only else resolve_frontend_env_path()+ if not server_only and frontend_env_path is None:server_only = Trueconsole.print(Panel("[yellow]No Skyvern frontend runtime was found in this install.[/yellow]\n\n"- f"Starting the backend API server only. Install [cyan]{escape('skyvern[ui]')}[/cyan] "- "or use a source checkout / Docker Compose when you need the local UI.",+ "Starting the backend API server only. Wheel installs do not include the UI app; "+ "use a source checkout or Docker Compose when you need the local UI.",title="Backend-only install",border_style="yellow",)diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.pyindex 676a9c1b9..1bf63b137 100644--- a/skyvern/webeye/actions/handler.py+++ b/skyvern/webeye/actions/handler.py@@ -1320,7 +1320,14 @@ async def handle_click_action(finally:if incremental_scraped:- await incremental_scraped.stop_listen_dom_increment()+ try:+ await incremental_scraped.stop_listen_dom_increment()+ except Exception:+ LOG.warning(+ "stop_listen_dom_increment failed after click, ignoring",+ exc_info=True,+ element_id=skyvern_element.get_id(),+ )return resultsdiff --git a/skyvern/webeye/scraper/scraped_page.py b/skyvern/webeye/scraper/scraped_page.pyindex c62386a84..30623d181 100644--- a/skyvern/webeye/scraper/scraped_page.py+++ b/skyvern/webeye/scraper/scraped_page.py@@ -217,31 +217,56 @@ class ScrapedPage(BaseModel, ElementTreeBuilder):self._clean_up_func = clean_up_funcself._scrape_exclude = scrape_exclude- def check_pdf_viewer_embed(self) -> str | None:- """- Check if the page contains a PDF viewer embed.- If found, return the src attribute of the embed.- """- if len(self.elements) != 1:- return None-- element = self.elements[0]+ @staticmethod+ def _is_pdf_embed(element: dict) -> str | None:if element.get("tagName", "") != "embed":return None-attributes: dict = element.get("attributes", {})if not attributes:return None-type_attr: str | None = attributes.get("type")- if not type_attr:+ if not type_attr or type_attr.lower() != "application/pdf":return None+ return attributes.get("src", "")- if type_attr.lower() != "application/pdf":- return None+ def check_pdf_viewer_embed(self) -> str | None:+ """+ Check if the page contains a PDF viewer embed.+ If found, return the src attribute of the embed.- LOG.info("Found a PDF viewer page", element=element)- return attributes.get("src", "")+ Detection works at two levels:+ 1. Whole-page: entire page has exactly one element and it is a PDF embed.+ 2. Per-frame: any child frame has exactly one element and it is a PDF embed.+ This covers multi-frame pages (e.g. framesets) where the PDF is loaded+ in one frame while other frames contain navigation elements.+ """+ if len(self.elements) == 1:+ pdf_src = self._is_pdf_embed(self.elements[0])+ if pdf_src is not None:+ LOG.info("Found a PDF viewer page", element=self.elements[0])+ return pdf_src++ if self.id_to_frame_dict:+ frame_elements: dict[str, list[dict]] = {}+ for element in self.elements:+ element_id = element.get("id", "")+ frame_id = self.id_to_frame_dict.get(element_id, "main.frame")+ if frame_id == "main.frame":+ continue+ frame_elements.setdefault(frame_id, []).append(element)++ for frame_id, elements in frame_elements.items():+ if len(elements) == 1:+ pdf_src = self._is_pdf_embed(elements[0])+ if pdf_src is not None:+ LOG.info(+ "Found a PDF viewer embed in frame",+ frame_id=frame_id,+ element=elements[0],+ )+ return pdf_src++ return Noneasync def check_pdf_iframe(self) -> str | None:"""diff --git a/tests/unit/test_init_mcp.py b/tests/unit/test_init_mcp.pyindex dd0473723..0054db577 100644--- a/tests/unit/test_init_mcp.py+++ b/tests/unit/test_init_mcp.py@@ -47,21 +47,5 @@ def test_init_callback_passes_plain_database_string(monkeypatch) -> None:result = CliRunner().invoke(cli_app, ["init"])- assert result.exit_code == 0- assert calls == [(True, "", None)]---def test_init_callback_postgres_flag_preserves_postgres_setup(monkeypatch) -> None:- calls: list[tuple[bool, str, str | None]] = []-- monkeypatch.setattr(- "skyvern.cli.init_command.init_env",- lambda no_postgres=False, database_string="", env_scope=None: calls.append(- (no_postgres, database_string, env_scope)- ),- )-- result = CliRunner().invoke(cli_app, ["init", "--postgres"])-assert result.exit_code == 0assert calls == [(False, "", None)]diff --git a/tests/unit/test_pdf_download_fixes.py b/tests/unit/test_pdf_download_fixes.pyindex 534c3df99..ef32dae8f 100644--- a/tests/unit/test_pdf_download_fixes.py+++ b/tests/unit/test_pdf_download_fixes.py@@ -391,3 +391,76 @@ class TestCheckPdfViewerEmbed:)result = sp.check_pdf_viewer_embed()assert result is None+++class TestCheckPdfViewerEmbedPerFrame:+ def test_pdf_embed_sole_element_in_child_frame(self) -> None:+ """Detects PDF embed when it is the only element in a child frame."""+ data_uri = "data:application/pdf;base64,JVBERi0xLjQ="+ sp = _make_scraped_page(+ elements=[+ {"id": "NAV1", "tagName": "a", "attributes": {"href": "#"}},+ {"id": "NAV2", "tagName": "a", "attributes": {"href": "#"}},+ {"id": "PDF1", "tagName": "embed", "attributes": {"type": "application/pdf", "src": data_uri}},+ ],+ )+ sp.id_to_frame_dict = {"NAV1": "frame_top", "NAV2": "frame_top", "PDF1": "frame_content"}+ result = sp.check_pdf_viewer_embed()+ assert result == data_uri++ def test_pdf_embed_with_other_elements_in_same_frame_returns_none(self) -> None:+ """Returns None when PDF embed shares its frame with other elements (not a PDF viewer frame)."""+ sp = _make_scraped_page(+ elements=[+ {"id": "BTN1", "tagName": "button", "attributes": {}},+ {"id": "PDF1", "tagName": "embed", "attributes": {"type": "application/pdf", "src": "file.pdf"}},+ ],+ )+ sp.id_to_frame_dict = {"BTN1": "frame_a", "PDF1": "frame_a"}+ result = sp.check_pdf_viewer_embed()+ assert result is None++ def test_backward_compat_single_element_page(self) -> None:+ """Single-element page with PDF embed still detected (original behavior)."""+ sp = _make_scraped_page(+ elements=[+ {"id": "E1", "tagName": "embed", "attributes": {"type": "application/pdf", "src": "test.pdf"}},+ ],+ )+ result = sp.check_pdf_viewer_embed()+ assert result == "test.pdf"++ def test_no_id_to_frame_dict_falls_through(self) -> None:+ """Without id_to_frame_dict, multi-element page returns None (no per-frame scan)."""+ sp = _make_scraped_page(+ elements=[+ {"tagName": "a", "attributes": {}},+ {"tagName": "embed", "attributes": {"type": "application/pdf", "src": "file.pdf"}},+ ],+ )+ result = sp.check_pdf_viewer_embed()+ assert result is None++ def test_main_frame_embed_not_detected_by_per_frame_scan(self) -> None:+ """Embed in main.frame is not detected by per-frame scan (but whole-page check catches single-element pages)."""+ sp = _make_scraped_page(+ elements=[+ {"id": "NAV1", "tagName": "a", "attributes": {}},+ {"id": "E1", "tagName": "embed", "attributes": {"type": "application/pdf", "src": "file.pdf"}},+ ],+ )+ sp.id_to_frame_dict = {"NAV1": "frame_top", "E1": "main.frame"}+ result = sp.check_pdf_viewer_embed()+ assert result is None++ def test_multiple_frames_first_pdf_wins(self) -> None:+ """When multiple frames each have a sole PDF embed, first match is returned."""+ sp = _make_scraped_page(+ elements=[+ {"id": "P1", "tagName": "embed", "attributes": {"type": "application/pdf", "src": "first.pdf"}},+ {"id": "P2", "tagName": "embed", "attributes": {"type": "application/pdf", "src": "second.pdf"}},+ ],+ )+ sp.id_to_frame_dict = {"P1": "frame_a", "P2": "frame_b"}+ result = sp.check_pdf_viewer_embed()+ assert result == "first.pdf"diff --git a/tests/unit/test_pyproject_extras.py b/tests/unit/test_pyproject_extras.pydeleted file mode 100644index dc8973fd1..000000000--- a/tests/unit/test_pyproject_extras.py+++ /dev/null@@ -1,24 +0,0 @@-from __future__ import annotations--import tomllib-from pathlib import Path---def _pyproject() -> dict:- return tomllib.loads(Path("pyproject.toml").read_text())---def test_all_extra_stays_in_sync_with_server_plus_ui() -> None:- optional_dependencies = _pyproject()["project"]["optional-dependencies"]-- assert sorted(optional_dependencies["all"]) == sorted(optional_dependencies["server"] + optional_dependencies["ui"])---def test_skyvern_ui_versions_match_root_package() -> None:- root_version = _pyproject()["project"]["version"]- ui_pyproject = tomllib.loads(Path("packages/skyvern-ui/pyproject.toml").read_text())- ui_module = Path("packages/skyvern-ui/skyvern_ui/__init__.py").read_text()-- assert ui_pyproject["project"]["version"] == root_version- assert f'__version__ = "{root_version}"' in ui_module- assert _pyproject()["project"]["optional-dependencies"]["ui"] == [f"skyvern-ui=={root_version}"]diff --git a/tests/unit/test_quickstart.py b/tests/unit/test_quickstart.pyindex 63ae25c40..45d893fac 100644--- a/tests/unit/test_quickstart.py+++ b/tests/unit/test_quickstart.py@@ -186,82 +186,3 @@ def test_bootstrap_skips_rewrite_for_non_localhost_db_string(tmp_path: Path, monassert confirm_calls == [], "should not prompt when DATABASE_STRING does not point to localhost"assert (tmp_path / ".env").read_text() == env_content---def test_run_server_quickstart_uses_sqlite_by_default(monkeypatch: pytest.MonkeyPatch) -> None:- init_calls: list[dict[str, object]] = []-- class InitResult:- run_local = False-- def __bool__(self) -> bool:- return False-- monkeypatch.setattr(- init_command,- "init_env",- lambda **kwargs: init_calls.append(kwargs) or InitResult(),- )-- quickstart._run_server_quickstart(- no_postgres=False,- database_string="",- skip_browser_install=False,- server_only=False,- )-- assert init_calls == [- {- "no_postgres": True,- "database_string": "",- "skip_browser_install": False,- "mode": "local",- "skip_llm_setup": False,- "configure_mcp": None,- "browser_type": None,- "browser_location": None,- "remote_debugging_url": None,- "analytics_id": None,- "return_result": True,- }- ]---def test_run_server_quickstart_can_request_postgres(monkeypatch: pytest.MonkeyPatch) -> None:- init_calls: list[dict[str, object]] = []-- class InitResult:- run_local = False-- def __bool__(self) -> bool:- return False-- monkeypatch.setattr(- init_command,- "init_env",- lambda **kwargs: init_calls.append(kwargs) or InitResult(),- )-- quickstart._run_server_quickstart(- no_postgres=False,- postgres=True,- database_string="",- skip_browser_install=False,- server_only=False,- )-- assert init_calls == [- {- "no_postgres": False,- "database_string": "",- "skip_browser_install": False,- "mode": "local",- "skip_llm_setup": False,- "configure_mcp": None,- "browser_type": None,- "browser_location": None,- "remote_debugging_url": None,- "analytics_id": None,- "return_result": True,- }- ]diff --git a/tests/unit/test_quickstart_browser_install.py b/tests/unit/test_quickstart_browser_install.pyindex 2d0320164..ac43ab377 100644--- a/tests/unit/test_quickstart_browser_install.py+++ b/tests/unit/test_quickstart_browser_install.py@@ -95,20 +95,8 @@ def test_quickstart_does_not_start_services_when_required_browser_is_missing(quickstart_module.quickstart(ctx=None, # type: ignore[arg-type]no_postgres=False,- postgres=False,database_string="",skip_browser_install=False,server_only=False,docker_compose=False,- install_type=None,- env_scope=None,- yes=False,- non_interactive=False,- skip_llm_setup=False,- skip_mcp=False,- browser_type=None,- browser_location=None,- remote_debugging_url=None,- analytics_id=None,- start_services_now=None,)diff --git a/tests/unit/test_quickstart_command.py b/tests/unit/test_quickstart_command.pyindex 32a17bf7d..3d5a87b66 100644--- a/tests/unit/test_quickstart_command.py+++ b/tests/unit/test_quickstart_command.py@@ -425,11 +425,11 @@ def test_quickstart_without_server_extra_prints_install_paths(monkeypatch) -> Noassert result.exit_code == 0assert "Cloud/API SDK usage" in result.outputassert "Embedded local Python SDK via skyvern[local]" in result.output- assert "Self-hosted local server + web UI via skyvern[all]" in result.output+ assert "Self-hosted local server via skyvern[server]" in result.outputassert "Next command: skyvern setup" in result.outputassert "Skyvern(api_key=" in result.outputassert 'pip install "skyvern[local]"' in result.output- assert 'pip install "skyvern[all]"' in result.output+ assert 'pip install "skyvern[server]"' in result.outputassert "Postgres" in result.outputassert "Missing Dependency" not in result.outputassert "Missing:" not in result.output@@ -491,7 +491,7 @@ def test_quickstart_server_flags_select_server_path_without_server_extra(monkeypassert result.exit_code == 0assert "Embedded local Python SDK" not in result.outputassert "Cloud/API SDK usage" not in result.output- assert 'Install: pip install "skyvern[all]"' in result.output+ assert 'Install: pip install "skyvern[server]"' in result.outputassert install_calls == []assert server_calls == []@@ -538,11 +538,10 @@ def test_quickstart_interactive_server_choice_without_server_extra_prints_instalassert result.exit_code == 1assert "Choose a quickstart path" in result.outputassert "Install the missing server dependencies now?" in result.output- assert 'Install: pip install "skyvern[all]"' in result.output+ assert 'Install: pip install "skyvern[server]"' in result.outputassert "Next: python -m skyvern quickstart" in result.output- assert "local server, packaged UI, SQLite database, local API" in result.output- assert "key, and MCP" in result.output- assert "frontend development" in result.output+ assert "local server, database, local API key, and MCP" in result.output+ assert "Wheel installs run the backend only" in result.outputdef test_quickstart_interactive_server_choice_can_install_server_extra(monkeypatch) -> None:@@ -564,65 +563,10 @@ def test_quickstart_interactive_server_choice_can_install_server_extra(monkeypatresult = CliRunner().invoke(quickstart_module.quickstart_app, [], input="3\n")assert result.exit_code == 0- assert install_calls == [{"include_ui": True, "assume_yes": False}]- assert server_calls == [- {- "no_postgres": False,- "postgres": False,- "database_string": "",- "skip_browser_install": False,- "server_only": False,- }- ]---def test_quickstart_existing_server_extra_can_install_ui_before_starting(monkeypatch) -> None:- ui_install_calls = []- server_calls = []-- monkeypatch.setattr(quickstart_module, "check_docker_compose_file", lambda: False)- monkeypatch.setattr(quickstart_module, "_has_local_quickstart_extra", lambda: True)- monkeypatch.setattr(quickstart_module, "_has_server_quickstart_extra", lambda: True)- monkeypatch.setattr(quickstart_module, "_is_interactive_input", lambda: True)- monkeypatch.setattr(quickstart_module, "has_frontend_runtime", lambda: False)- monkeypatch.setattr(- "skyvern.cli.run_commands._install_packaged_ui_if_requested",- lambda: ui_install_calls.append("ui") or True,- )- monkeypatch.setattr(quickstart_module, "_run_server_quickstart", lambda **kwargs: server_calls.append(kwargs))-- result = CliRunner().invoke(quickstart_module.quickstart_app, ["--install-type", "server"])-- assert result.exit_code == 0- assert ui_install_calls == ["ui"]- assert server_calls == [- {- "no_postgres": False,- "postgres": False,- "database_string": "",- "skip_browser_install": False,- "server_only": False,- }- ]---def test_quickstart_postgres_flag_preserves_postgres_setup(monkeypatch) -> None:- server_calls = []-- monkeypatch.setattr(quickstart_module, "check_docker_compose_file", lambda: False)- monkeypatch.setattr(quickstart_module, "_has_local_quickstart_extra", lambda: True)- monkeypatch.setattr(quickstart_module, "_has_server_quickstart_extra", lambda: True)- monkeypatch.setattr(quickstart_module, "_is_interactive_input", lambda: False)- monkeypatch.setattr(quickstart_module, "has_frontend_runtime", lambda: True)- monkeypatch.setattr(quickstart_module, "_run_server_quickstart", lambda **kwargs: server_calls.append(kwargs))-- result = CliRunner().invoke(quickstart_module.quickstart_app, ["--install-type", "server", "--postgres"])-- assert result.exit_code == 0+ assert install_calls == [{"assume_yes": False}]assert server_calls == [{"no_postgres": False,- "postgres": True,"database_string": "","skip_browser_install": False,"server_only": False,@@ -630,21 +574,6 @@ def test_quickstart_postgres_flag_preserves_postgres_setup(monkeypatch) -> None:]-def test_quickstart_rejects_conflicting_postgres_flags(monkeypatch) -> None:- monkeypatch.setattr(- quickstart_module,- "_has_server_quickstart_extra",- lambda: (_ for _ in ()).throw(AssertionError("should not inspect dependencies")),- )-- result = CliRunner().invoke(quickstart_module.quickstart_app, ["--postgres", "--no-postgres"])-- assert result.exit_code == 1- assert "Conflicting quickstart options" in result.output- assert "--postgres" in result.output- assert "--no-postgres" in result.output--def test_quickstart_interactive_choice_accepts_alias(monkeypatch) -> None:monkeypatch.setattr(quickstart_module, "check_docker_compose_file", lambda: False)monkeypatch.setattr(quickstart_module, "_has_local_quickstart_extra", lambda: False)@@ -670,7 +599,7 @@ def test_quickstart_interactive_choice_reprompts_invalid_alias(monkeypatch) -> Nassert "Choose one of: cloud/api, local/embedded, server/self-hosted, 1, 2, or 3." in result.outputassert "Please select a valid option:" not in result.outputassert "Install the missing server dependencies now?" in result.output- assert 'Install: pip install "skyvern[all]"' in result.output+ assert 'Install: pip install "skyvern[server]"' in result.outputdef test_quickstart_interactive_eof_falls_back_to_default(monkeypatch) -> None:@@ -705,7 +634,7 @@ def test_quickstart_server_flags_skip_docker_compose_offer_without_server_extra(monkeypatch.setattr(quickstart_module,"_install_server_extra_for_quickstart",- lambda **kwargs: install_calls.append(kwargs) or True,+ lambda: install_calls.append("install") or True,)monkeypatch.setattr(quickstart_module, "_run_server_quickstart", lambda **kwargs: server_calls.append(kwargs))@@ -798,7 +727,6 @@ def test_quickstart_with_server_extra_preserves_existing_flow(monkeypatch) -> Noassert calls == [{"no_postgres": True,- "postgres": False,"database_string": "postgresql+psycopg://user/db","skip_browser_install": True,"server_only": True,@@ -868,7 +796,7 @@ async def test_start_services_without_frontend_runtime_starts_backend_only(monkeasync def fake_sleep(_seconds: float) -> None:return None- monkeypatch.setattr(utils, "has_frontend_runtime", lambda: False)+ monkeypatch.setattr(utils, "resolve_frontend_env_path", lambda: None)monkeypatch.setattr(utils, "resolve_backend_env_path", lambda **_kwargs: Path(".env"))monkeypatch.setattr(utils.asyncio, "create_subprocess_exec", fake_create_subprocess_exec)monkeypatch.setattr(utils.asyncio, "sleep", fake_sleep)@@ -877,34 +805,3 @@ async def test_start_services_without_frontend_runtime_starts_backend_only(monkeawait utils.start_services()assert commands == [(utils.sys.executable, "-m", "skyvern.cli.commands", "run", "server")]---async def test_start_services_with_packaged_frontend_runtime_starts_ui(monkeypatch) -> None:- import skyvern.cli.utils as utils-- commands = []-- class FakeProcess:- async def wait(self) -> int:- return 0-- async def fake_create_subprocess_exec(*args):- commands.append(args)- return FakeProcess()-- async def fake_sleep(_seconds: float) -> None:- return None-- monkeypatch.setattr(utils, "has_frontend_runtime", lambda: True)- monkeypatch.setattr(utils, "resolve_backend_env_path", lambda **_kwargs: Path(".env"))- monkeypatch.setattr(utils.asyncio, "create_subprocess_exec", fake_create_subprocess_exec)- monkeypatch.setattr(utils.asyncio, "sleep", fake_sleep)- monkeypatch.setattr(utils, "capture_setup_event", lambda *args, **kwargs: None)-- await utils.start_services()-- assert commands == [- (utils.sys.executable, "-m", "skyvern.cli.commands", "run", "server"),- (utils.sys.executable, "-m", "skyvern.cli.commands", "run", "ui"),- ]diff --git a/tests/unit/test_quickstart_server_extra.py b/tests/unit/test_quickstart_server_extra.pyindex 50dea30c7..a23b87dde 100644--- a/tests/unit/test_quickstart_server_extra.py+++ b/tests/unit/test_quickstart_server_extra.py@@ -11,7 +11,7 @@ from skyvern.cli.quickstart import quickstart_appdef test_install_server_extra_assume_yes_skips_prompt(monkeypatch) -> None:commands: list[list[str]] = []- monkeypatch.setattr(quickstart_module, "_server_extra_install_target", lambda **_kwargs: "skyvern[server]==1.2.3")+ monkeypatch.setattr(quickstart_module, "_server_extra_install_target", lambda: "skyvern[server]==1.2.3")monkeypatch.setattr(quickstart_module.Confirm,"ask",diff --git a/tests/unit/test_run_commands_ui.py b/tests/unit/test_run_commands_ui.pydeleted file mode 100644index 6b5839cda..000000000--- a/tests/unit/test_run_commands_ui.py+++ /dev/null@@ -1,377 +0,0 @@-from __future__ import annotations--import importlib-import logging-import subprocess-from pathlib import Path--import pytest-import typer--from skyvern.cli import run_commands---def test_run_ui_without_source_or_packaged_assets_prints_install_hint(monkeypatch, capsys) -> None:- port_checks: list[int] = []-- monkeypatch.setattr(run_commands, "resolve_frontend_env_path", lambda: None)- monkeypatch.setattr(run_commands, "installed_ui_dist_available", lambda: False)- monkeypatch.setattr(run_commands, "is_interactive", lambda: False)- monkeypatch.setattr(- run_commands,- "_handle_port_conflict",- lambda port, **_kwargs: port_checks.append(port) or True,- )-- run_commands.run_ui()-- captured = capsys.readouterr()- assert "Skyvern UI assets are not installed" in captured.out- assert 'pip install "skyvern[ui]"' in captured.out- assert port_checks == []---def test_run_ui_can_install_packaged_assets_interactively(tmp_path, monkeypatch) -> None:- install_commands: list[list[str]] = []- prompts: list[str] = []- cache_invalidated = False- availability = iter([False, True, True])- served = []-- monkeypatch.setattr(run_commands, "resolve_frontend_env_path", lambda: None)- monkeypatch.setattr(run_commands, "installed_ui_dist_available", lambda: next(availability))- monkeypatch.setattr(run_commands, "is_interactive", lambda: True)- monkeypatch.setattr(run_commands, "_ui_install_target", lambda: "skyvern-ui==1.0.36")- monkeypatch.setattr(- run_commands,- "_ui_install_command",- lambda install_target: [run_commands.sys.executable, "-m", "pip", "install", install_target],- )- monkeypatch.setattr(- run_commands.Confirm,- "ask",- lambda message, **_kwargs: prompts.append(message) or True,- )- monkeypatch.setattr(- run_commands,- "_handle_port_conflict",- lambda _port, **_kwargs: True,- )- monkeypatch.setattr(run_commands, "prepare_installed_ui_dist", lambda _config: tmp_path / "runtime")-- def fake_run(command: list[str], **_kwargs):- install_commands.append(command)- return subprocess.CompletedProcess(command, 0)-- def fake_invalidate_caches() -> None:- nonlocal cache_invalidated- cache_invalidated = True-- def fake_serve(dist_dir: Path, *, ui_port: int, artifact_port: int, artifact_token: str | None = None) -> None:- del artifact_token- served.append((dist_dir, ui_port, artifact_port))-- monkeypatch.setattr(run_commands.subprocess, "run", fake_run)- monkeypatch.setattr(run_commands.importlib, "invalidate_caches", fake_invalidate_caches)- monkeypatch.setattr(run_commands, "serve_installed_ui", fake_serve)-- run_commands.run_ui()-- assert prompts == ["Install packaged Skyvern UI assets now (skyvern-ui==1.0.36)?"]- assert install_commands == [[run_commands.sys.executable, "-m", "pip", "install", "skyvern-ui==1.0.36"]]- assert cache_invalidated is True- assert served == [(tmp_path / "runtime", run_commands.UI_PORT, run_commands.ARTIFACT_PORT)]---def test_run_ui_install_ui_flag_skips_interactive_prompt(tmp_path, monkeypatch) -> None:- install_commands: list[list[str]] = []- availability = iter([False, True])- served = []-- monkeypatch.setattr(run_commands, "resolve_frontend_env_path", lambda: None)- monkeypatch.setattr(run_commands, "installed_ui_dist_available", lambda: next(availability))- monkeypatch.setattr(run_commands, "_ui_install_target", lambda: "skyvern-ui==1.0.36")- monkeypatch.setattr(- run_commands,- "_ui_install_command",- lambda install_target: [run_commands.sys.executable, "-m", "pip", "install", install_target],- )- monkeypatch.setattr(- run_commands.Confirm,- "ask",- lambda *_args, **_kwargs: pytest.fail("run ui --install-ui should not prompt"),- )- monkeypatch.setattr(- run_commands,- "_handle_port_conflict",- lambda _port, **_kwargs: True,- )- monkeypatch.setattr(run_commands, "prepare_installed_ui_dist", lambda _config: tmp_path / "runtime")-- def fake_run(command: list[str], **_kwargs):- install_commands.append(command)- return subprocess.CompletedProcess(command, 0)-- def fake_serve(dist_dir: Path, *, ui_port: int, artifact_port: int, artifact_token: str | None = None) -> None:- del artifact_token- served.append((dist_dir, ui_port, artifact_port))-- monkeypatch.setattr(run_commands.subprocess, "run", fake_run)- monkeypatch.setattr(run_commands, "serve_installed_ui", fake_serve)-- run_commands.run_ui(install_ui=True)-- assert install_commands == [[run_commands.sys.executable, "-m", "pip", "install", "skyvern-ui==1.0.36"]]- assert served == [(tmp_path / "runtime", run_commands.UI_PORT, run_commands.ARTIFACT_PORT)]---def test_run_all_can_install_ui_before_starting_services(monkeypatch) -> None:- calls = []-- async def fake_start_services() -> None:- calls.append("start")-- monkeypatch.setattr(run_commands, "has_frontend_runtime", lambda: False)- monkeypatch.setattr(run_commands, "_missing_run_all_dependencies", lambda: [])- monkeypatch.setattr(- run_commands,- "_install_packaged_ui_if_requested",- lambda *, assume_yes: calls.append(("install", assume_yes)) or True,- )- monkeypatch.setattr("skyvern.cli.utils.start_services", fake_start_services)-- run_commands.run_all(install_ui=True)-- assert calls == [("install", True), "start"]---def test_run_all_install_ui_exits_when_explicit_install_fails(monkeypatch) -> None:- calls = []-- async def fake_start_services() -> None:- calls.append("start")-- monkeypatch.setattr(run_commands, "has_frontend_runtime", lambda: False)- monkeypatch.setattr(run_commands, "_missing_run_all_dependencies", lambda: [])- monkeypatch.setattr(- run_commands,- "_install_packaged_ui_if_requested",- lambda *, assume_yes: calls.append(("install", assume_yes)) or False,- )- monkeypatch.setattr("skyvern.cli.utils.start_services", fake_start_services)-- with pytest.raises(typer.Exit) as exc_info:- run_commands.run_all(install_ui=True)-- assert exc_info.value.exit_code == 1- assert calls == [("install", True)]---def test_run_all_without_install_ui_can_degrade_to_backend_only(monkeypatch) -> None:- calls = []-- async def fake_start_services() -> None:- calls.append("start")-- monkeypatch.setattr(run_commands, "has_frontend_runtime", lambda: False)- monkeypatch.setattr(run_commands, "_missing_run_all_dependencies", lambda: [])- monkeypatch.setattr(- run_commands,- "_install_packaged_ui_if_requested",- lambda *, assume_yes: calls.append(("install", assume_yes)) or False,- )- monkeypatch.setattr("skyvern.cli.utils.start_services", fake_start_services)-- run_commands.run_all()-- assert calls == [("install", False), "start"]---def test_install_packaged_ui_warns_when_non_interactive(monkeypatch, capsys, caplog) -> None:- monkeypatch.setattr(run_commands, "is_interactive", lambda: False)- monkeypatch.setattr(run_commands, "_ui_install_target", lambda: "skyvern-ui==1.0.36")- monkeypatch.setattr(- run_commands,- "_ui_install_command",- lambda install_target: [run_commands.sys.executable, "-m", "pip", "install", install_target],- )-- with caplog.at_level(logging.WARNING):- installed = run_commands._install_packaged_ui_if_requested()-- captured = capsys.readouterr()- assert installed is False- assert "Automatic install was skipped" in captured.out- assert any(record.message == "packaged_ui_install_skipped_non_interactive" for record in caplog.records)---def test_run_all_skips_ui_install_when_runtime_exists(monkeypatch) -> None:- calls = []-- async def fake_start_services() -> None:- calls.append("start")-- monkeypatch.setattr(run_commands, "has_frontend_runtime", lambda: True)- monkeypatch.setattr(run_commands, "_missing_run_all_dependencies", lambda: [])- monkeypatch.setattr(- run_commands,- "_install_packaged_ui_if_requested",- lambda *, assume_yes: calls.append(("install", assume_yes)) or True,- )- monkeypatch.setattr("skyvern.cli.utils.start_services", fake_start_services)-- run_commands.run_all()-- assert calls == ["start"]---def test_run_all_without_server_dependencies_prints_all_extra_hint(monkeypatch, capsys) -> None:- monkeypatch.setattr(run_commands, "_missing_run_all_dependencies", lambda: ["uvicorn", "sqlalchemy"])- monkeypatch.setattr(- "skyvern.cli.utils.start_services",- lambda: pytest.fail("run all should not import/start services when server deps are missing"),- )-- with pytest.raises(typer.Exit):- run_commands.run_all(install_ui=True)-- captured = capsys.readouterr()- assert "`skyvern run all` needs the local server dependencies" in captured.out- assert 'pip install "skyvern[all]"' in captured.out- assert "skyvern run ui --install-ui" in captured.out---def test_ui_install_target_matches_installed_skyvern_version(monkeypatch) -> None:- monkeypatch.setattr(run_commands.importlib.metadata, "version", lambda _package: "1.2.3")-- assert run_commands._ui_install_target() == "skyvern-ui==1.2.3"---def test_ui_install_target_falls_back_when_skyvern_metadata_is_missing(monkeypatch) -> None:- def raise_package_not_found(_package: str) -> str:- raise importlib.metadata.PackageNotFoundError-- monkeypatch.setattr(run_commands.importlib.metadata, "version", raise_package_not_found)-- assert run_commands._ui_install_target() == "skyvern-ui"---def test_ui_install_command_prefers_uv_inside_virtualenv(monkeypatch) -> None:- monkeypatch.setenv("VIRTUAL_ENV", "/tmp/.venv")- monkeypatch.setattr(run_commands.shutil, "which", lambda binary: "/usr/local/bin/uv" if binary == "uv" else None)-- assert run_commands._ui_install_command("skyvern-ui==1.0.36") == [- "/usr/local/bin/uv",- "pip",- "install",- "skyvern-ui==1.0.36",- ]---def test_ui_install_command_uses_python_pip_without_uv_virtualenv(monkeypatch) -> None:- monkeypatch.delenv("VIRTUAL_ENV", raising=False)- monkeypatch.delenv("UV_PROJECT_ENVIRONMENT", raising=False)- monkeypatch.setattr(run_commands.shutil, "which", lambda _binary: "/usr/local/bin/uv")-- assert run_commands._ui_install_command("skyvern-ui==1.0.36") == [- run_commands.sys.executable,- "-m",- "pip",- "install",- "skyvern-ui==1.0.36",- ]---def test_installed_ui_config_accepts_frontend_env_vars(tmp_path, monkeypatch) -> None:- monkeypatch.setenv("VITE_API_BASE_URL", "https://api.example.com/api/v1")- monkeypatch.delenv("VITE_WSS_BASE_URL", raising=False)- monkeypatch.setenv("VITE_ARTIFACT_API_BASE_URL", "https://artifacts.example.com")- monkeypatch.setenv("VITE_SKYVERN_API_KEY", "frontend-key")- monkeypatch.setenv("VITE_BROWSER_STREAMING_MODE", "cdp")- monkeypatch.setattr(run_commands, "resolve_backend_env_path", lambda **_kwargs: tmp_path / ".env")-- config = run_commands._installed_ui_config()-- assert config.api_base_url == "https://api.example.com/api/v1"- assert config.wss_base_url == "wss://api.example.com/api/v1"- assert config.artifact_api_base_url == "https://artifacts.example.com"- assert config.skyvern_api_key == "frontend-key"- assert config.browser_streaming_mode == "cdp"---def test_run_ui_with_packaged_assets_serves_python_runtime(tmp_path, monkeypatch) -> None:- port_checks: list[int] = []- prepared_configs = []- served = []-- monkeypatch.setenv("PORT", "8765")- monkeypatch.setenv("SKYVERN_API_KEY", "test-key")- monkeypatch.setenv("BROWSER_STREAMING_MODE", "cdp")- monkeypatch.setattr(run_commands, "resolve_frontend_env_path", lambda: None)- monkeypatch.setattr(run_commands, "installed_ui_dist_available", lambda: True)- monkeypatch.setattr(run_commands, "resolve_backend_env_path", lambda **_kwargs: tmp_path / ".env")- monkeypatch.setattr(run_commands.secrets, "token_urlsafe", lambda _size: "test-token")- monkeypatch.setattr(- run_commands,- "_handle_port_conflict",- lambda port, **_kwargs: port_checks.append(port) or True,- )-- def fake_prepare(config):- prepared_configs.append(config)- return tmp_path / "runtime"-- def fake_serve(dist_dir: Path, *, ui_port: int, artifact_port: int, artifact_token: str | None = None) -> None:- served.append((dist_dir, ui_port, artifact_port, artifact_token))-- monkeypatch.setattr(run_commands, "prepare_installed_ui_dist", fake_prepare)- monkeypatch.setattr(run_commands, "serve_installed_ui", fake_serve)-- run_commands.run_ui()-- assert port_checks == [run_commands.UI_PORT, run_commands.ARTIFACT_PORT]- assert len(prepared_configs) == 1- config = prepared_configs[0]- assert config.api_base_url == "http://localhost:8765/api/v1"- assert config.wss_base_url == "ws://localhost:8765/api/v1"- assert config.artifact_api_base_url == "http://localhost:9090/test-token"- assert config.skyvern_api_key == "test-key"- assert config.browser_streaming_mode == "cdp"- assert served == [(tmp_path / "runtime", run_commands.UI_PORT, run_commands.ARTIFACT_PORT, "test-token")]---def test_run_ui_with_packaged_assets_accepts_remote_api_options(tmp_path, monkeypatch) -> None:- prepared_configs = []- served = []-- monkeypatch.setattr(run_commands, "resolve_frontend_env_path", lambda: None)- monkeypatch.setattr(run_commands, "installed_ui_dist_available", lambda: True)- monkeypatch.setattr(run_commands, "resolve_backend_env_path", lambda **_kwargs: tmp_path / ".env")- monkeypatch.setattr(run_commands.secrets, "token_urlsafe", lambda _size: "test-token")- monkeypatch.setattr(run_commands, "_handle_port_conflict", lambda _port, **_kwargs: True)-- def fake_prepare(config):- prepared_configs.append(config)- return tmp_path / "runtime"-- def fake_serve(dist_dir: Path, *, ui_port: int, artifact_port: int, artifact_token: str | None = None) -> None:- served.append((dist_dir, ui_port, artifact_port, artifact_token))-- monkeypatch.setattr(run_commands, "prepare_installed_ui_dist", fake_prepare)- monkeypatch.setattr(run_commands, "serve_installed_ui", fake_serve)-- run_commands.run_ui(- api_url="https://api.example.com/api/v1",- artifact_api_url="https://artifacts.example.com",- api_key="remote-key",- browser_streaming_mode="cdp",- )-- assert len(prepared_configs) == 1- config = prepared_configs[0]- assert config.api_base_url == "https://api.example.com/api/v1"- assert config.wss_base_url == "wss://api.example.com/api/v1"- assert config.artifact_api_base_url == "https://artifacts.example.com/test-token"- assert config.skyvern_api_key == "remote-key"- assert config.browser_streaming_mode == "cdp"- assert served == [(tmp_path / "runtime", run_commands.UI_PORT, run_commands.ARTIFACT_PORT, "test-token")]diff --git a/tests/unit/test_ui_runtime.py b/tests/unit/test_ui_runtime.pydeleted file mode 100644index 2449fa1f1..000000000--- a/tests/unit/test_ui_runtime.py+++ /dev/null@@ -1,298 +0,0 @@-from __future__ import annotations--import sys-import threading-import urllib.parse-from http.client import HTTPConnection-from http.server import ThreadingHTTPServer-from pathlib import Path--from skyvern.cli import ui_runtime---def _install_fake_ui_package(tmp_path: Path, monkeypatch) -> Path:- package_root = tmp_path / "package"- ui_package = package_root / "skyvern_ui"- asset_dir = ui_package / "dist" / "assets"- asset_dir.mkdir(parents=True)- (ui_package / "__init__.py").write_text('__version__ = "test-version"\n')- (ui_package / "dist" / "index.html").write_text("<html>__VITE_API_BASE_URL_PLACEHOLDER__</html>")- (asset_dir / "app.js").write_text(- "__VITE_WSS_BASE_URL_PLACEHOLDER__ "- "__VITE_ARTIFACT_API_BASE_URL_PLACEHOLDER__ "- "__SKYVERN_API_KEY_PLACEHOLDER__ "- "__VITE_BROWSER_STREAMING_MODE_PLACEHOLDER__"- )- monkeypatch.syspath_prepend(str(package_root))- sys.modules.pop("skyvern_ui", None)- return package_root---def test_installed_ui_dist_detects_package_assets(tmp_path, monkeypatch) -> None:- _install_fake_ui_package(tmp_path, monkeypatch)-- dist = ui_runtime.installed_ui_dist()-- assert dist is not None- assert dist.joinpath("index.html").is_file()---def test_prepare_installed_ui_dist_copies_assets_and_injects_runtime_values(tmp_path, monkeypatch) -> None:- _install_fake_ui_package(tmp_path, monkeypatch)- monkeypatch.setenv(ui_runtime.UI_CACHE_ENV_VAR, str(tmp_path / "cache"))-- runtime_dist = ui_runtime.prepare_installed_ui_dist(- ui_runtime.InstalledUiConfig(- api_base_url="http://localhost:8000/api/v1",- wss_base_url="ws://localhost:8000/api/v1",- artifact_api_base_url="http://localhost:9090",- skyvern_api_key="test-key",- browser_streaming_mode="cdp",- )- )-- assert runtime_dist == tmp_path / "cache" / "test-version" / "runtime"- assert (runtime_dist / "index.html").read_text() == "<html>http://localhost:8000/api/v1</html>"- assert (runtime_dist / "assets" / "app.js").read_text() == (- "ws://localhost:8000/api/v1 http://localhost:9090 test-key cdp"- )- assert (tmp_path / "cache").stat().st_mode & 0o777 == 0o700- assert (tmp_path / "cache" / "test-version").stat().st_mode & 0o777 == 0o700- assert runtime_dist.stat().st_mode & 0o777 == 0o700- assert (runtime_dist / "assets").stat().st_mode & 0o777 == 0o700- assert (runtime_dist / "index.html").stat().st_mode & 0o777 == 0o600- assert (runtime_dist / "assets" / "app.js").stat().st_mode & 0o777 == 0o600---def test_artifact_api_base_url_with_token() -> None:- assert ui_runtime.artifact_api_base_url_with_token("http://localhost:9090/", "secret") == (- "http://localhost:9090/secret"- )---def test_has_frontend_runtime_accepts_source_checkout(monkeypatch) -> None:- monkeypatch.setattr(ui_runtime, "resolve_frontend_env_path", lambda: Path("skyvern-frontend/.env"))- monkeypatch.setattr(ui_runtime, "installed_ui_dist_available", lambda: False)-- assert ui_runtime.has_frontend_runtime() is True---def test_has_frontend_runtime_accepts_installed_package(monkeypatch) -> None:- monkeypatch.setattr(ui_runtime, "resolve_frontend_env_path", lambda: None)- monkeypatch.setattr(ui_runtime, "installed_ui_dist_available", lambda: True)-- assert ui_runtime.has_frontend_runtime() is True---def test_spa_fallback_only_handles_extensionless_routes() -> None:- assert ui_runtime._should_serve_spa_index("/runs/local-task") is True- assert ui_runtime._should_serve_spa_index("/assets/app.js") is False- assert ui_runtime._should_serve_spa_index("/../outside.txt") is False---def test_artifact_handler_options_omits_cors_when_origin_is_missing() -> None:- handler = ui_runtime._artifact_handler_class(- artifact_token="token",- artifact_roots=(),- ui_port=8080,- )- server = ThreadingHTTPServer(("127.0.0.1", 0), handler)- thread = threading.Thread(target=server.serve_forever, daemon=True)- thread.start()-- try:- connection = HTTPConnection("127.0.0.1", server.server_port, timeout=5)- connection.request("OPTIONS", "/artifact/text")- response = connection.getresponse()-- assert response.status == 204- assert response.getheader("Access-Control-Allow-Origin") is None- assert "Range" in (response.getheader("Access-Control-Allow-Headers") or "")- assert response.getheader("Referrer-Policy") == "no-referrer"- finally:- connection.close()- server.shutdown()- server.server_close()- thread.join(timeout=5)---def test_artifact_handler_options_allows_local_ui_origin() -> None:- handler = ui_runtime._artifact_handler_class(- artifact_token="token",- artifact_roots=(),- ui_port=8080,- )- server = ThreadingHTTPServer(("127.0.0.1", 0), handler)- thread = threading.Thread(target=server.serve_forever, daemon=True)- thread.start()-- try:- connection = HTTPConnection("127.0.0.1", server.server_port, timeout=5)- connection.request("OPTIONS", "/artifact/text", headers={"Origin": "http://localhost:8080"})- response = connection.getresponse()-- assert response.status == 204- assert response.getheader("Access-Control-Allow-Origin") == "http://localhost:8080"- assert response.getheader("Referrer-Policy") == "no-referrer"- finally:- connection.close()- server.shutdown()- server.server_close()- thread.join(timeout=5)---def test_artifact_handler_rejects_invalid_ui_port() -> None:- try:- ui_runtime._artifact_handler_class(- artifact_token="token",- artifact_roots=(),- ui_port=0,- )- except ValueError:- return-- raise AssertionError("Expected invalid UI port to be rejected")---def test_artifact_handler_rejects_missing_token(tmp_path) -> None:- artifact = tmp_path / "artifact.txt"- artifact.write_text("secret")- handler = ui_runtime._artifact_handler_class(- artifact_token="token",- artifact_roots=(tmp_path.resolve(),),- ui_port=8080,- )- server = ThreadingHTTPServer(("127.0.0.1", 0), handler)- thread = threading.Thread(target=server.serve_forever, daemon=True)- thread.start()-- try:- connection = HTTPConnection("127.0.0.1", server.server_port, timeout=5)- connection.request("GET", f"/artifact/text?path={artifact}")- response = connection.getresponse()-- assert response.status == 404- finally:- connection.close()- server.shutdown()- server.server_close()- thread.join(timeout=5)---def test_artifact_handler_rejects_paths_outside_allowed_roots(tmp_path) -> None:- allowed_root = tmp_path / "allowed"- outside_root = tmp_path / "outside"- allowed_root.mkdir()- outside_root.mkdir()- artifact = outside_root / "artifact.txt"- artifact.write_text("secret")- handler = ui_runtime._artifact_handler_class(- artifact_token="token",- artifact_roots=(allowed_root.resolve(),),- ui_port=8080,- )- server = ThreadingHTTPServer(("127.0.0.1", 0), handler)- thread = threading.Thread(target=server.serve_forever, daemon=True)- thread.start()-- try:- connection = HTTPConnection("127.0.0.1", server.server_port, timeout=5)- connection.request("GET", f"/token/artifact/text?path={artifact}")- response = connection.getresponse()-- assert response.status == 403- finally:- connection.close()- server.shutdown()- server.server_close()- thread.join(timeout=5)---def test_artifact_handler_rejects_traversal_that_starts_with_allowed_root(tmp_path) -> None:- allowed_root = tmp_path / "allowed"- outside_root = tmp_path / "outside"- allowed_root.mkdir()- outside_root.mkdir()- artifact = outside_root / "artifact.txt"- artifact.write_text("secret")- handler = ui_runtime._artifact_handler_class(- artifact_token="token",- artifact_roots=(allowed_root.resolve(),),- ui_port=8080,- )- server = ThreadingHTTPServer(("127.0.0.1", 0), handler)- thread = threading.Thread(target=server.serve_forever, daemon=True)- thread.start()-- try:- connection = HTTPConnection("127.0.0.1", server.server_port, timeout=5)- traversal_path = allowed_root / ".." / "outside" / "artifact.txt"- connection.request("GET", f"/token/artifact/text?path={traversal_path}")- response = connection.getresponse()-- assert response.status == 403- finally:- connection.close()- server.shutdown()- server.server_close()- thread.join(timeout=5)---def test_artifact_handler_rejects_file_url_paths_even_inside_allowed_roots(tmp_path) -> None:- artifact = tmp_path / "artifact.txt"- artifact.write_text("secret")- handler = ui_runtime._artifact_handler_class(- artifact_token="token",- artifact_roots=(tmp_path.resolve(),),- ui_port=8080,- )- server = ThreadingHTTPServer(("127.0.0.1", 0), handler)- thread = threading.Thread(target=server.serve_forever, daemon=True)- thread.start()-- try:- connection = HTTPConnection("127.0.0.1", server.server_port, timeout=5)- file_url = urllib.parse.quote(f"file://{artifact}", safe="")- connection.request("GET", f"/token/artifact/text?path={file_url}")- response = connection.getresponse()-- assert response.status == 400- assert response.getheader("Referrer-Policy") == "no-referrer"- finally:- connection.close()- server.shutdown()- server.server_close()- thread.join(timeout=5)---def test_artifact_handler_serves_paths_inside_allowed_roots(tmp_path) -> None:- artifact = tmp_path / "artifact.txt"- artifact.write_text("hello")- handler = ui_runtime._artifact_handler_class(- artifact_token="token",- artifact_roots=(tmp_path.resolve(),),- ui_port=8080,- )- server = ThreadingHTTPServer(("127.0.0.1", 0), handler)- thread = threading.Thread(target=server.serve_forever, daemon=True)- thread.start()-- try:- connection = HTTPConnection("127.0.0.1", server.server_port, timeout=5)- connection.request(- "GET",- f"/token/artifact/text?path={artifact}",- headers={"Origin": "http://localhost:8080"},- )- response = connection.getresponse()- body = response.read().decode()-- assert response.status == 200- assert response.getheader("Access-Control-Allow-Origin") == "http://localhost:8080"- assert response.getheader("Referrer-Policy") == "no-referrer"- assert body == "hello"- finally:- connection.close()- server.shutdown()- server.server_close()- thread.join(timeout=5)diff --git a/uv.lock b/uv.lockindex 46badcb9b..6b49d1321 100644--- a/uv.lock+++ b/uv.lock@@ -5730,77 +5730,6 @@ dependencies = [][package.optional-dependencies]-all = [- { name = "aioboto3" },- { name = "aiofiles" },- { name = "aiohttp" },- { name = "aioredlock" },- { name = "aiosqlite" },- { name = "alembic" },- { name = "anthropic" },- { name = "asyncache" },- { name = "asyncpg" },- { name = "authlib" },- { name = "azure-identity" },- { name = "azure-keyvault-secrets" },- { name = "azure-storage-blob" },- { name = "croniter" },- { name = "curlparser" },- { name = "email-validator" },- { name = "fastapi" },- { name = "fastmcp" },- { name = "filetype" },- { name = "fuzzysearch" },- { name = "google-auth" },- { name = "google-auth-oauthlib" },- { name = "google-cloud-aiplatform" },- { name = "greenlet", version = "3.0.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" },- { name = "greenlet", version = "3.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" },- { name = "jinja2" },- { name = "json-repair" },- { name = "json5" },- { name = "jsonschema" },- { name = "lark" },- { name = "libcst" },- { name = "litellm" },- { name = "onepassword-sdk" },- { name = "openai" },- { name = "openai-agents" },- { name = "opentelemetry-api" },- { name = "pandas" },- { name = "pdfplumber" },- { name = "pillow" },- { name = "playwright", version = "1.46.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" },- { name = "playwright", version = "1.58.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" },- { name = "posthog" },- { name = "psutil" },- { name = "psycopg", version = "3.1.18", source = { registry = "https://pypi.org/simple" }, extra = ["binary", "pool"], marker = "python_full_version < '3.13'" },- { name = "psycopg", version = "3.2.13", source = { registry = "https://pypi.org/simple" }, extra = ["binary", "pool"], marker = "python_full_version >= '3.13'" },- { name = "pyasn1" },- { name = "pyjwt", extra = ["crypto"] },- { name = "pyotp" },- { name = "pypdf" },- { name = "python-calamine" },- { name = "python-docx" },- { name = "python-dotenv" },- { name = "python-multipart" },- { name = "requests-toolbelt" },- { name = "skyvern-ui" },- { name = "sqlalchemy", extra = ["mypy"] },- { name = "sse-starlette" },- { name = "starlette-context" },- { name = "tiktoken" },- { name = "tldextract" },- { name = "toml" },- { name = "tornado" },- { name = "types-boto3", extra = ["full"] },- { name = "types-toml" },- { name = "urllib3" },- { name = "uvicorn", extra = ["standard"] },- { name = "websockets" },- { name = "yutori" },- { name = "zstandard" },-]local = [{ name = "aioboto3" },{ name = "aiofiles" },@@ -5930,9 +5859,6 @@ server = [{ name = "yutori" },{ name = "zstandard" },]-ui = [- { name = "skyvern-ui" },-][package.dev-dependencies]cloud = [@@ -5988,212 +5914,142 @@ dev = [[package.metadata]requires-dist = [- { name = "aioboto3", marker = "extra == 'all'", specifier = ">=14.3.0,<15" },{ name = "aioboto3", marker = "extra == 'local'", specifier = ">=14.3.0,<15" },{ name = "aioboto3", marker = "extra == 'server'", specifier = ">=14.3.0,<15" },- { name = "aiofiles", marker = "extra == 'all'", specifier = ">=24.1.0,<25" },{ name = "aiofiles", marker = "extra == 'local'", specifier = ">=24.1.0,<25" },{ name = "aiofiles", marker = "extra == 'server'", specifier = ">=24.1.0,<25" },- { name = "aiohttp", marker = "extra == 'all'", specifier = ">=3.13.4,<4" },{ name = "aiohttp", marker = "extra == 'local'", specifier = ">=3.13.4,<4" },{ name = "aiohttp", marker = "extra == 'server'", specifier = ">=3.13.4,<4" },- { name = "aioredlock", marker = "extra == 'all'", specifier = ">=0.7.3,<0.8" },{ name = "aioredlock", marker = "extra == 'server'", specifier = ">=0.7.3,<0.8" },- { name = "aiosqlite", marker = "extra == 'all'", specifier = ">=0.21.0,<0.23" },{ name = "aiosqlite", marker = "extra == 'local'", specifier = ">=0.21.0,<0.23" },{ name = "aiosqlite", marker = "extra == 'server'", specifier = ">=0.21.0,<0.23" },- { name = "alembic", marker = "extra == 'all'", specifier = ">=1.12.1,<2" },{ name = "alembic", marker = "extra == 'local'", specifier = ">=1.12.1,<2" },{ name = "alembic", marker = "extra == 'server'", specifier = ">=1.12.1,<2" },- { name = "anthropic", marker = "extra == 'all'", specifier = ">=0.97.0,<0.98" },{ name = "anthropic", marker = "extra == 'local'", specifier = ">=0.97.0,<0.98" },{ name = "anthropic", marker = "extra == 'server'", specifier = ">=0.97.0,<0.98" },- { name = "asyncache", marker = "extra == 'all'", specifier = ">=0.3.1,<0.4" },{ name = "asyncache", marker = "extra == 'local'", specifier = ">=0.3.1,<0.4" },{ name = "asyncache", marker = "extra == 'server'", specifier = ">=0.3.1,<0.4" },- { name = "asyncpg", marker = "extra == 'all'", specifier = ">=0.30.0,<0.32" },{ name = "asyncpg", marker = "extra == 'server'", specifier = ">=0.30.0,<0.32" },- { name = "authlib", marker = "extra == 'all'", specifier = ">=1.7.1" },{ name = "authlib", marker = "extra == 'local'", specifier = ">=1.7.1" },{ name = "authlib", marker = "extra == 'server'", specifier = ">=1.7.1" },- { name = "azure-identity", marker = "extra == 'all'", specifier = ">=1.24.0,<2" },{ name = "azure-identity", marker = "extra == 'local'", specifier = ">=1.24.0,<2" },{ name = "azure-identity", marker = "extra == 'server'", specifier = ">=1.24.0,<2" },- { name = "azure-keyvault-secrets", marker = "extra == 'all'", specifier = ">=4.2.0,<5" },{ name = "azure-keyvault-secrets", marker = "extra == 'local'", specifier = ">=4.2.0,<5" },{ name = "azure-keyvault-secrets", marker = "extra == 'server'", specifier = ">=4.2.0,<5" },- { name = "azure-storage-blob", marker = "extra == 'all'", specifier = ">=12.26.0" },{ name = "azure-storage-blob", marker = "extra == 'local'", specifier = ">=12.26.0" },{ name = "azure-storage-blob", marker = "extra == 'server'", specifier = ">=12.26.0" },{ name = "cachetools", specifier = ">=5.3.2,<6" },- { name = "croniter", marker = "extra == 'all'", specifier = ">=1.3.8,<4" },{ name = "croniter", marker = "extra == 'local'", specifier = ">=1.3.8,<4" },{ name = "croniter", marker = "extra == 'server'", specifier = ">=1.3.8,<4" },- { name = "curlparser", marker = "extra == 'all'", specifier = ">=0.1.0,<0.2" },{ name = "curlparser", marker = "extra == 'local'", specifier = ">=0.1.0,<0.2" },{ name = "curlparser", marker = "extra == 'server'", specifier = ">=0.1.0,<0.2" },- { name = "email-validator", marker = "extra == 'all'", specifier = ">=2.2.0,<3" },{ name = "email-validator", marker = "extra == 'local'", specifier = ">=2.2.0,<3" },{ name = "email-validator", marker = "extra == 'server'", specifier = ">=2.2.0,<3" },- { name = "fastapi", marker = "extra == 'all'", specifier = ">=0.136.1,<0.137" },{ name = "fastapi", marker = "extra == 'local'", specifier = ">=0.136.1,<0.137" },{ name = "fastapi", marker = "extra == 'server'", specifier = ">=0.136.1,<0.137" },- { name = "fastmcp", marker = "extra == 'all'", specifier = ">=3.2.0,<4" },{ name = "fastmcp", marker = "extra == 'server'", specifier = ">=3.2.0,<4" },- { name = "filetype", marker = "extra == 'all'", specifier = ">=1.2.0,<2" },{ name = "filetype", marker = "extra == 'local'", specifier = ">=1.2.0,<2" },{ name = "filetype", marker = "extra == 'server'", specifier = ">=1.2.0,<2" },- { name = "fuzzysearch", marker = "extra == 'all'", specifier = ">=0.8,<1" },{ name = "fuzzysearch", marker = "extra == 'local'", specifier = ">=0.8,<1" },{ name = "fuzzysearch", marker = "extra == 'server'", specifier = ">=0.8,<1" },- { name = "google-auth", marker = "extra == 'all'", specifier = ">=2.49.2,<3" },{ name = "google-auth", marker = "extra == 'local'", specifier = ">=2.49.2,<3" },{ name = "google-auth", marker = "extra == 'server'", specifier = ">=2.49.2,<3" },- { name = "google-auth-oauthlib", marker = "extra == 'all'", specifier = ">=1.3.1,<2" },{ name = "google-auth-oauthlib", marker = "extra == 'local'", specifier = ">=1.3.1,<2" },{ name = "google-auth-oauthlib", marker = "extra == 'server'", specifier = ">=1.3.1,<2" },- { name = "google-cloud-aiplatform", marker = "extra == 'all'", specifier = ">=1.149.0,<2" },{ name = "google-cloud-aiplatform", marker = "extra == 'local'", specifier = ">=1.149.0,<2" },{ name = "google-cloud-aiplatform", marker = "extra == 'server'", specifier = ">=1.149.0,<2" },- { name = "greenlet", marker = "python_full_version == '3.11.*' and extra == 'all'", specifier = "==3.0.3" },{ name = "greenlet", marker = "python_full_version == '3.11.*' and extra == 'local'", specifier = "==3.0.3" },{ name = "greenlet", marker = "python_full_version == '3.11.*' and extra == 'server'", specifier = "==3.0.3" },- { name = "greenlet", marker = "python_full_version >= '3.12' and python_full_version < '3.14' and extra == 'all'", specifier = ">3.0.3" },{ name = "greenlet", marker = "python_full_version >= '3.12' and python_full_version < '3.14' and extra == 'local'", specifier = ">3.0.3" },{ name = "greenlet", marker = "python_full_version >= '3.12' and python_full_version < '3.14' and extra == 'server'", specifier = ">3.0.3" },{ name = "httpx", extras = ["socks"], specifier = ">=0.27.0" },- { name = "jinja2", marker = "extra == 'all'", specifier = ">=3.1.2,<4" },{ name = "jinja2", marker = "extra == 'local'", specifier = ">=3.1.2,<4" },{ name = "jinja2", marker = "extra == 'server'", specifier = ">=3.1.2,<4" },- { name = "json-repair", marker = "extra == 'all'", specifier = ">=0.59.5,<0.60" },{ name = "json-repair", marker = "extra == 'local'", specifier = ">=0.59.5,<0.60" },{ name = "json-repair", marker = "extra == 'server'", specifier = ">=0.59.5,<0.60" },- { name = "json5", marker = "extra == 'all'", specifier = ">=0.13.0,<1" },{ name = "json5", marker = "extra == 'local'", specifier = ">=0.13.0,<1" },{ name = "json5", marker = "extra == 'server'", specifier = ">=0.13.0,<1" },- { name = "jsonschema", marker = "extra == 'all'", specifier = ">=4.23.0" },{ name = "jsonschema", marker = "extra == 'local'", specifier = ">=4.23.0" },{ name = "jsonschema", marker = "extra == 'server'", specifier = ">=4.23.0" },- { name = "lark", marker = "extra == 'all'", specifier = ">=1.2.2,<2" },{ name = "lark", marker = "extra == 'local'", specifier = ">=1.2.2,<2" },{ name = "lark", marker = "extra == 'server'", specifier = ">=1.2.2,<2" },- { name = "libcst", marker = "extra == 'all'", specifier = ">=1.8.2,<2" },{ name = "libcst", marker = "extra == 'local'", specifier = ">=1.8.2,<2" },{ name = "libcst", marker = "extra == 'server'", specifier = ">=1.8.2,<2" },- { name = "litellm", marker = "extra == 'all'", specifier = "==1.83.14" },{ name = "litellm", marker = "extra == 'local'", specifier = "==1.83.14" },{ name = "litellm", marker = "extra == 'server'", specifier = "==1.83.14" },- { name = "onepassword-sdk", marker = "extra == 'all'", specifier = "==0.4.0" },{ name = "onepassword-sdk", marker = "extra == 'local'", specifier = "==0.4.0" },{ name = "onepassword-sdk", marker = "extra == 'server'", specifier = "==0.4.0" },- { name = "openai", marker = "extra == 'all'", specifier = ">=1.68.2" },{ name = "openai", marker = "extra == 'local'", specifier = ">=1.68.2" },{ name = "openai", marker = "extra == 'server'", specifier = ">=1.68.2" },- { name = "openai-agents", marker = "extra == 'all'", specifier = ">=0.10.5,<0.15" },{ name = "openai-agents", marker = "extra == 'server'", specifier = ">=0.10.5,<0.15" },- { name = "opentelemetry-api", marker = "extra == 'all'", specifier = ">=1.41.1,<2" },{ name = "opentelemetry-api", marker = "extra == 'local'", specifier = ">=1.41.1,<2" },{ name = "opentelemetry-api", marker = "extra == 'server'", specifier = ">=1.41.1,<2" },{ name = "orjson", specifier = ">=3.9.10,<4" },- { name = "pandas", marker = "extra == 'all'", specifier = ">=2.3.1,<4" },{ name = "pandas", marker = "extra == 'local'", specifier = ">=2.3.1,<4" },{ name = "pandas", marker = "extra == 'server'", specifier = ">=2.3.1,<4" },- { name = "pdfplumber", marker = "extra == 'all'", specifier = ">=0.11.0,<0.12" },{ name = "pdfplumber", marker = "extra == 'local'", specifier = ">=0.11.0,<0.12" },{ name = "pdfplumber", marker = "extra == 'server'", specifier = ">=0.11.0,<0.12" },- { name = "pillow", marker = "extra == 'all'", specifier = ">=10.2.0" },{ name = "pillow", marker = "extra == 'local'", specifier = ">=10.2.0" },{ name = "pillow", marker = "extra == 'server'", specifier = ">=10.2.0" },- { name = "playwright", marker = "python_full_version == '3.11.*' and extra == 'all'", specifier = "==1.46.0" },{ name = "playwright", marker = "python_full_version == '3.11.*' and extra == 'local'", specifier = "==1.46.0" },{ name = "playwright", marker = "python_full_version == '3.11.*' and extra == 'server'", specifier = "==1.46.0" },- { name = "playwright", marker = "python_full_version >= '3.12' and python_full_version < '3.14' and extra == 'all'", specifier = ">1.46.0" },{ name = "playwright", marker = "python_full_version >= '3.12' and python_full_version < '3.14' and extra == 'local'", specifier = ">1.46.0" },{ name = "playwright", marker = "python_full_version >= '3.12' and python_full_version < '3.14' and extra == 'server'", specifier = ">1.46.0" },- { name = "posthog", marker = "extra == 'all'", specifier = ">=3.7.0,<4" },{ name = "posthog", marker = "extra == 'server'", specifier = ">=3.7.0,<4" },- { name = "psutil", marker = "extra == 'all'", specifier = ">=7.0.0" },{ name = "psutil", marker = "extra == 'local'", specifier = ">=7.0.0" },{ name = "psutil", marker = "extra == 'server'", specifier = ">=7.0.0" },- { name = "psycopg", extras = ["binary", "pool"], marker = "python_full_version >= '3.11' and python_full_version < '3.13' and extra == 'all'", specifier = "==3.1.18" },{ name = "psycopg", extras = ["binary", "pool"], marker = "python_full_version >= '3.11' and python_full_version < '3.13' and extra == 'server'", specifier = "==3.1.18" },- { name = "psycopg", extras = ["binary", "pool"], marker = "python_full_version == '3.13.*' and extra == 'all'", specifier = ">=3.2.2,<3.3.0" },{ name = "psycopg", extras = ["binary", "pool"], marker = "python_full_version == '3.13.*' and extra == 'server'", specifier = ">=3.2.2,<3.3.0" },- { name = "pyasn1", marker = "extra == 'all'", specifier = ">=0.6.3" },{ name = "pyasn1", marker = "extra == 'local'", specifier = ">=0.6.3" },{ name = "pyasn1", marker = "extra == 'server'", specifier = ">=0.6.3" },{ name = "pydantic", specifier = ">=2.5.2,<3" },{ name = "pydantic-settings", specifier = ">=2.1.0,<3" },- { name = "pyjwt", extras = ["crypto"], marker = "extra == 'all'", specifier = ">=2.12.0,<3" },{ name = "pyjwt", extras = ["crypto"], marker = "extra == 'local'", specifier = ">=2.12.0,<3" },{ name = "pyjwt", extras = ["crypto"], marker = "extra == 'server'", specifier = ">=2.12.0,<3" },- { name = "pyotp", marker = "extra == 'all'", specifier = ">=2.9.0,<3" },{ name = "pyotp", marker = "extra == 'local'", specifier = ">=2.9.0,<3" },{ name = "pyotp", marker = "extra == 'server'", specifier = ">=2.9.0,<3" },- { name = "pypdf", marker = "extra == 'all'", specifier = ">=6.7.5,<7" },{ name = "pypdf", marker = "extra == 'local'", specifier = ">=6.7.5,<7" },{ name = "pypdf", marker = "extra == 'server'", specifier = ">=6.7.5,<7" },- { name = "python-calamine", marker = "extra == 'all'", specifier = ">=0.6.1" },{ name = "python-calamine", marker = "extra == 'local'", specifier = ">=0.6.1" },{ name = "python-calamine", marker = "extra == 'server'", specifier = ">=0.6.1" },- { name = "python-docx", marker = "extra == 'all'", specifier = ">=1.1.0" },{ name = "python-docx", marker = "extra == 'local'", specifier = ">=1.1.0" },{ name = "python-docx", marker = "extra == 'server'", specifier = ">=1.1.0" },{ name = "python-dotenv", specifier = ">=1.0.0,<2" },- { name = "python-dotenv", marker = "extra == 'all'", specifier = "==1.2.2" },{ name = "python-dotenv", marker = "extra == 'server'", specifier = "==1.2.2" },- { name = "python-multipart", marker = "extra == 'all'", specifier = ">=0.0.27,<1" },{ name = "python-multipart", marker = "extra == 'local'", specifier = ">=0.0.27,<1" },{ name = "python-multipart", marker = "extra == 'server'", specifier = ">=0.0.27,<1" },- { name = "requests-toolbelt", marker = "extra == 'all'", specifier = ">=1.0.0,<2" },{ name = "requests-toolbelt", marker = "extra == 'local'", specifier = ">=1.0.0,<2" },{ name = "requests-toolbelt", marker = "extra == 'server'", specifier = ">=1.0.0,<2" },{ name = "rich", specifier = ">=13.7.0,<14" },- { name = "skyvern-ui", marker = "extra == 'all'", directory = "packages/skyvern-ui" },- { name = "skyvern-ui", marker = "extra == 'ui'", directory = "packages/skyvern-ui" },{ name = "sqlalchemy", marker = "extra == 'local'", specifier = ">=2.0.29,<3" },- { name = "sqlalchemy", extras = ["mypy"], marker = "extra == 'all'", specifier = ">=2.0.29,<3" },{ name = "sqlalchemy", extras = ["mypy"], marker = "extra == 'server'", specifier = ">=2.0.29,<3" },- { name = "sse-starlette", marker = "extra == 'all'", specifier = ">=3.4.1,<4" },{ name = "sse-starlette", marker = "extra == 'local'", specifier = ">=3.4.1,<4" },{ name = "sse-starlette", marker = "extra == 'server'", specifier = ">=3.4.1,<4" },- { name = "starlette-context", marker = "extra == 'all'", specifier = ">=0.3.6,<0.6" },{ name = "starlette-context", marker = "extra == 'local'", specifier = ">=0.3.6,<0.6" },{ name = "starlette-context", marker = "extra == 'server'", specifier = ">=0.3.6,<0.6" },{ name = "structlog", specifier = ">=23.2.0,<24" },- { name = "tiktoken", marker = "extra == 'all'", specifier = ">=0.9.0" },{ name = "tiktoken", marker = "extra == 'local'", specifier = ">=0.9.0" },{ name = "tiktoken", marker = "extra == 'server'", specifier = ">=0.9.0" },- { name = "tldextract", marker = "extra == 'all'", specifier = ">=5.1.2,<6" },{ name = "tldextract", marker = "extra == 'local'", specifier = ">=5.1.2,<6" },{ name = "tldextract", marker = "extra == 'server'", specifier = ">=5.1.2,<6" },- { name = "toml", marker = "extra == 'all'", specifier = ">=0.10.2,<0.11" },{ name = "toml", marker = "extra == 'local'", specifier = ">=0.10.2,<0.11" },{ name = "toml", marker = "extra == 'server'", specifier = ">=0.10.2,<0.11" },- { name = "tornado", marker = "extra == 'all'", specifier = ">=6.5.5" },{ name = "tornado", marker = "extra == 'local'", specifier = ">=6.5.5" },{ name = "tornado", marker = "extra == 'server'", specifier = ">=6.5.5" },{ name = "typer", specifier = ">=0.16.0" },- { name = "types-boto3", extras = ["full"], marker = "extra == 'all'", specifier = ">=1.38.31,<2" },{ name = "types-boto3", extras = ["full"], marker = "extra == 'server'", specifier = ">=1.38.31,<2" },- { name = "types-toml", marker = "extra == 'all'", specifier = ">=0.10.8.7,<0.11" },{ name = "types-toml", marker = "extra == 'server'", specifier = ">=0.10.8.7,<0.11" },- { name = "urllib3", marker = "extra == 'all'", specifier = ">=2.7.0" },{ name = "urllib3", marker = "extra == 'local'", specifier = ">=2.7.0" },{ name = "urllib3", marker = "extra == 'server'", specifier = ">=2.7.0" },- { name = "uvicorn", extras = ["standard"], marker = "extra == 'all'", specifier = ">=0.44.0" },{ name = "uvicorn", extras = ["standard"], marker = "extra == 'server'", specifier = ">=0.44.0" },- { name = "websockets", marker = "extra == 'all'", specifier = ">=12.0,<15.1" },{ name = "websockets", marker = "extra == 'local'", specifier = ">=12.0,<15.1" },{ name = "websockets", marker = "extra == 'server'", specifier = ">=12.0,<15.1" },- { name = "yutori", marker = "extra == 'all'", specifier = ">=0.5.0" },{ name = "yutori", marker = "extra == 'local'", specifier = ">=0.5.0" },{ name = "yutori", marker = "extra == 'server'", specifier = ">=0.5.0" },- { name = "zstandard", marker = "extra == 'all'", specifier = ">=0.25.0" },{ name = "zstandard", marker = "extra == 'local'", specifier = ">=0.25.0" },{ name = "zstandard", marker = "extra == 'server'", specifier = ">=0.25.0" },]-provides-extras = ["local", "server", "ui", "all"]+provides-extras = ["local", "server"][package.metadata.requires-dev]cloud = [@@ -6248,11 +6104,6 @@ dev = [{ name = "types-requests", specifier = ">=2.31.0.2,<3" },]-[[package]]-name = "skyvern-ui"-version = "1.0.36"-source = { directory = "packages/skyvern-ui" }-[[package]]name = "sniffio"version = "1.3.1"