Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix(mcp): classify login/run_task timeout as TIMEOUT, surface non-empty messages (#5953)
Aaron Perez30faa934f7fe
diff --git a/skyvern-frontend/src/routes/history/RunHistory.tsx b/skyvern-frontend/src/routes/history/RunHistory.tsxindex 59e1adf51..367aa3a48 100644--- a/skyvern-frontend/src/routes/history/RunHistory.tsx+++ b/skyvern-frontend/src/routes/history/RunHistory.tsx@@ -16,12 +16,10 @@ import {Status,TaskRunListItem,TaskRunType,- TriggerType,WorkflowRunStatusApiResponse,} from "@/api/types";import { StatusBadge } from "@/components/StatusBadge";import { StatusFilterDropdown } from "@/components/StatusFilterDropdown";-import { TriggerTypeBadge } from "@/components/TriggerTypeBadge";import {Pagination,PaginationContent,@@ -71,17 +69,6 @@ function isKnownStatus(value: string): value is Status {return statusValues.has(value);}-// Scheduled workflow runs carry a deterministic `wr_sched_<hash>` id prefix.-function inferTriggerType(run: TaskRunListItem): TriggerType | null {- if (- run.task_run_type === TaskRunType.WorkflowRun &&- run.run_id.startsWith("wr_sched_")- ) {- return TriggerType.Scheduled;- }- return null;-}-function getRunNavigationPath(run: TaskRunListItem): string {switch (run.task_run_type) {case TaskRunType.WorkflowRun:@@ -208,12 +195,10 @@ function RunHistory() {const isWorkflowRun = run.task_run_type === TaskRunType.WorkflowRun;const isExpanded = isWorkflowRun && expandedRows.has(run.run_id);const navPath = getRunNavigationPath(run);- const triggerType = inferTriggerType(run);const titleContent =- triggerType || run.script_run || run.workflow_deleted ? (+ run.script_run || run.workflow_deleted ? (<div className="flex items-center gap-2">- {triggerType && <TriggerTypeBadge triggerType={triggerType} />}{run.script_run && (<Tip content="Ran with code"><LightningBoltIcon className="text-[gold]" />diff --git a/skyvern/forge/sdk/db/models.py b/skyvern/forge/sdk/db/models.pyindex d6fc532f5..ba3302c3e 100644--- a/skyvern/forge/sdk/db/models.py+++ b/skyvern/forge/sdk/db/models.py@@ -1033,7 +1033,7 @@ class TaskRunModel(Base):"organization_id",desc("created_at"),postgresql_using="btree",- postgresql_where=text("parent_workflow_run_id IS NULL AND debug_session_id IS NULL"),+ postgresql_where=text("parent_workflow_run_id IS NULL AND debug_session_id IS NULL AND status IS NOT NULL"),),Index("ix_task_runs_org_status_created",diff --git a/skyvern/forge/sdk/routes/streaming/channels/execution.py b/skyvern/forge/sdk/routes/streaming/channels/execution.pyindex 21879cafd..0c75e5805 100644--- a/skyvern/forge/sdk/routes/streaming/channels/execution.py+++ b/skyvern/forge/sdk/routes/streaming/channels/execution.py@@ -220,7 +220,7 @@ class ExecutionChannel(CdpChannel):candidate = url.strip()if not candidate:raise ValueError("URL must not be empty")- if candidate.startswith("//"):+ if candidate.startswith("/"):raise ValueError("URL must include an explicit http(s) scheme or host")parsed = urlparse(candidate)@@ -228,7 +228,7 @@ class ExecutionChannel(CdpChannel):return candidateif parsed.scheme:raise ValueError(f"refusing to navigate to non-http(s) scheme: {parsed.scheme}")- # Bare host or path -- prepend https://.+ # Bare host -- prepend https://.return f"https://{candidate}"@staticmethoddiff --git a/tests/unit/forge/sdk/routes/streaming/test_message_reify.py b/tests/unit/forge/sdk/routes/streaming/test_message_reify.pyindex 885c6bfe8..13d9499ed 100644--- a/tests/unit/forge/sdk/routes/streaming/test_message_reify.py+++ b/tests/unit/forge/sdk/routes/streaming/test_message_reify.py@@ -133,6 +133,11 @@ class TestExecutionChannelHelpers:with pytest.raises(ValueError, match="explicit http\\(s\\) scheme or host"):ExecutionChannel._normalize_url("//evil.com")+ @pytest.mark.parametrize("url", ["/foo", "/foo/bar", "/"])+ def test_normalize_url_rejects_path_only_input(self, url: str) -> None:+ with pytest.raises(ValueError, match="explicit http\\(s\\) scheme or host"):+ ExecutionChannel._normalize_url(url)+def test_origin_of_extracts_origin(self) -> None:assert ExecutionChannel._origin_of("https://example.com/foo/bar?q=1") == "https://example.com"