Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix: remove default login complete_criterion from script path (#5650)
Shuchang Zheng1092818d9e2c
diff --git a/skyvern/services/script_service.py b/skyvern/services/script_service.pyindex c21b9b262..18fe2883a 100644--- a/skyvern/services/script_service.py+++ b/skyvern/services/script_service.py@@ -20,7 +20,6 @@ from jinja2.sandbox import SandboxedEnvironmentfrom skyvern.config import settingsfrom skyvern.constants import (BROWSER_DOWNLOADING_SUFFIX,- DEFAULT_LOGIN_COMPLETE_CRITERION,GET_DOWNLOADED_FILES_TIMEOUT,SAVE_DOWNLOADED_FILES_TIMEOUT,)@@ -481,17 +480,12 @@ async def _create_workflow_block_run_and_task(# Include script parameters as navigation_payload so handlers# (e.g. file upload) can find URLs like resume_link in the payload.nav_payload = context.script_run_parameters or None- # Apply default complete_criterion for login blocks so cached scripts- # get the same rigorous LLM verification as the agent path (SKY-8540).- # Without this, the LLM only sees a generic navigation_goal and can- # falsely mark login as complete when credentials were never entered.- task_complete_criterion = DEFAULT_LOGIN_COMPLETE_CRITERION if block_type == BlockType.LOGIN else Nonetask = await app.DATABASE.tasks.create_task(# fix HACK: changed the type of url to str | None to support None url. url is not used in the script right now.url=url or "",title=f"Script {block_type.value} task",navigation_goal=prompt,- complete_criterion=task_complete_criterion,+ complete_criterion=None,data_extraction_goal=prompt if block_type == BlockType.EXTRACTION else None,extracted_information_schema=schema,navigation_payload=nav_payload,