Create or reuse a browser session and verify local browser streaming.
(
base_url: str = typer.Option(
"http://localhost:8000",
"--base-url",
help="Skyvern API server root or v1 URL.",
),
api_key: str | None = typer.Option(None, "--api-key", help="Skyvern API key. Defaults to SKYVERN_API_KEY."),
browser_session_id: str | None = typer.Option(
None,
"--browser-session-id",
help="Existing browser session to test. If omitted, doctor creates and closes one.",
),
timeout_seconds: int = typer.Option(45, "--timeout", min=5, max=180, help="Seconds to wait for stream readiness."),
json_output: bool = typer.Option(False, "--json", help="Output machine-readable JSON."),
)
| 1828 | |
| 1829 | @doctor_app.command("streaming") |
| 1830 | def streaming( |
| 1831 | base_url: str = typer.Option( |
| 1832 | "http://localhost:8000", |
| 1833 | "--base-url", |
| 1834 | help="Skyvern API server root or v1 URL.", |
| 1835 | ), |
| 1836 | api_key: str | None = typer.Option(None, "--api-key", help="Skyvern API key. Defaults to SKYVERN_API_KEY."), |
| 1837 | browser_session_id: str | None = typer.Option( |
| 1838 | None, |
| 1839 | "--browser-session-id", |
| 1840 | help="Existing browser session to test. If omitted, doctor creates and closes one.", |
| 1841 | ), |
| 1842 | timeout_seconds: int = typer.Option(45, "--timeout", min=5, max=180, help="Seconds to wait for stream readiness."), |
| 1843 | json_output: bool = typer.Option(False, "--json", help="Output machine-readable JSON."), |
| 1844 | ) -> None: |
| 1845 | """Create or reuse a browser session and verify local browser streaming.""" |
| 1846 | result = _streaming_smoke_test( |
| 1847 | base_url=base_url, |
| 1848 | api_key=api_key, |
| 1849 | browser_session_id=browser_session_id, |
| 1850 | timeout_seconds=timeout_seconds, |
| 1851 | ) |
| 1852 | |
| 1853 | if json_output: |
| 1854 | console.print(json.dumps(result.__dict__)) |
| 1855 | else: |
| 1856 | table = Table(show_header=True, header_style="bold", title="Skyvern Streaming Doctor") |
| 1857 | table.add_column("Check", style="bold") |
| 1858 | table.add_column("Status") |
| 1859 | table.add_column("Details") |
| 1860 | table.add_column("Fix") |
| 1861 | table.add_row(result.name, _STATUS_STYLE.get(result.status, result.status), result.detail, result.hint) |
| 1862 | console.print(table) |
| 1863 | |
| 1864 | if result.status == "error": |
| 1865 | raise typer.Exit(code=1) |
| 1866 | |
| 1867 | |
| 1868 | @doctor_app.callback(invoke_without_command=True) |
nothing calls this directly
no test coverage detected