Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Thread workflow_permanent_id into browser creation chain and PostHog flag properties (#4957)
LawyZheng7e20db308505
diff --git a/skyvern/forge/sdk/workflow/models/block.py b/skyvern/forge/sdk/workflow/models/block.pyindex 28e30772d..326a16e3a 100644--- a/skyvern/forge/sdk/workflow/models/block.py+++ b/skyvern/forge/sdk/workflow/models/block.py@@ -288,6 +288,7 @@ class Block(BaseModel, abc.ABC):url=None,proxy_location=workflow_run.proxy_location,workflow_run_id=workflow_run_id,+ workflow_permanent_id=workflow_run.workflow_permanent_id,organization_id=workflow_run.organization_id,extra_http_headers=workflow_run.extra_http_headers,browser_address=workflow_run.browser_address,diff --git a/skyvern/webeye/browser_state.py b/skyvern/webeye/browser_state.pyindex fd0c8f847..68aeb4923 100644--- a/skyvern/webeye/browser_state.py+++ b/skyvern/webeye/browser_state.py@@ -24,6 +24,7 @@ class BrowserState(Protocol):proxy_location: ProxyLocationInput = None,task_id: str | None = None,workflow_run_id: str | None = None,+ workflow_permanent_id: str | None = None,script_id: str | None = None,organization_id: str | None = None,extra_http_headers: dict[str, str] | None = None,@@ -45,6 +46,7 @@ class BrowserState(Protocol):proxy_location: ProxyLocationInput = None,task_id: str | None = None,workflow_run_id: str | None = None,+ workflow_permanent_id: str | None = None,script_id: str | None = None,organization_id: str | None = None,extra_http_headers: dict[str, str] | None = None,diff --git a/skyvern/webeye/real_browser_manager.py b/skyvern/webeye/real_browser_manager.pyindex c3009ac7c..3ba5ddc02 100644--- a/skyvern/webeye/real_browser_manager.py+++ b/skyvern/webeye/real_browser_manager.py@@ -29,6 +29,7 @@ class RealBrowserManager(BrowserManager):url: str | None = None,task_id: str | None = None,workflow_run_id: str | None = None,+ workflow_permanent_id: str | None = None,script_id: str | None = None,organization_id: str | None = None,extra_http_headers: dict[str, str] | None = None,@@ -46,6 +47,7 @@ class RealBrowserManager(BrowserManager):url=url,task_id=task_id,workflow_run_id=workflow_run_id,+ workflow_permanent_id=workflow_permanent_id,script_id=script_id,organization_id=organization_id,extra_http_headers=extra_http_headers,@@ -114,6 +116,7 @@ class RealBrowserManager(BrowserManager):proxy_location=task.proxy_location,url=task.url,task_id=task.task_id,+ workflow_permanent_id=task.workflow_permanent_id,organization_id=task.organization_id,extra_http_headers=task.extra_http_headers,browser_address=task.browser_address,@@ -135,6 +138,7 @@ class RealBrowserManager(BrowserManager):url=task.url,proxy_location=task.proxy_location,task_id=task.task_id,+ workflow_permanent_id=task.workflow_permanent_id,organization_id=task.organization_id,extra_http_headers=task.extra_http_headers,browser_address=task.browser_address,@@ -207,6 +211,7 @@ class RealBrowserManager(BrowserManager):proxy_location=workflow_run.proxy_location,url=url,workflow_run_id=workflow_run.workflow_run_id,+ workflow_permanent_id=workflow_run.workflow_permanent_id,organization_id=workflow_run.organization_id,extra_http_headers=workflow_run.extra_http_headers,browser_address=workflow_run.browser_address,@@ -233,6 +238,7 @@ class RealBrowserManager(BrowserManager):url=url,proxy_location=workflow_run.proxy_location,workflow_run_id=workflow_run.workflow_run_id,+ workflow_permanent_id=workflow_run.workflow_permanent_id,organization_id=workflow_run.organization_id,extra_http_headers=workflow_run.extra_http_headers,browser_address=workflow_run.browser_address,diff --git a/skyvern/webeye/real_browser_state.py b/skyvern/webeye/real_browser_state.pyindex 27f8ec755..cb9ffde71 100644--- a/skyvern/webeye/real_browser_state.py+++ b/skyvern/webeye/real_browser_state.py@@ -71,6 +71,7 @@ class RealBrowserState(BrowserState):proxy_location: ProxyLocationInput = None,task_id: str | None = None,workflow_run_id: str | None = None,+ workflow_permanent_id: str | None = None,script_id: str | None = None,organization_id: str | None = None,extra_http_headers: dict[str, str] | None = None,@@ -89,6 +90,7 @@ class RealBrowserState(BrowserState):proxy_location=proxy_location,task_id=task_id,workflow_run_id=workflow_run_id,+ workflow_permanent_id=workflow_permanent_id,script_id=script_id,organization_id=organization_id,extra_http_headers=extra_http_headers,@@ -278,6 +280,7 @@ class RealBrowserState(BrowserState):proxy_location: ProxyLocationInput = None,task_id: str | None = None,workflow_run_id: str | None = None,+ workflow_permanent_id: str | None = None,script_id: str | None = None,organization_id: str | None = None,extra_http_headers: dict[str, str] | None = None,@@ -294,6 +297,7 @@ class RealBrowserState(BrowserState):proxy_location=proxy_location,task_id=task_id,workflow_run_id=workflow_run_id,+ workflow_permanent_id=workflow_permanent_id,script_id=script_id,organization_id=organization_id,extra_http_headers=extra_http_headers,@@ -312,6 +316,7 @@ class RealBrowserState(BrowserState):proxy_location=proxy_location,task_id=task_id,workflow_run_id=workflow_run_id,+ workflow_permanent_id=workflow_permanent_id,script_id=script_id,organization_id=organization_id,extra_http_headers=extra_http_headers,@@ -329,6 +334,7 @@ class RealBrowserState(BrowserState):proxy_location=proxy_location,task_id=task_id,workflow_run_id=workflow_run_id,+ workflow_permanent_id=workflow_permanent_id,script_id=script_id,organization_id=organization_id,extra_http_headers=extra_http_headers,