project run (#3097)

This commit is contained in:
Shuchang Zheng
2025-08-04 00:33:34 -07:00
committed by GitHub
parent d01e4a0cfe
commit fe3d5cec10
7 changed files with 212 additions and 13 deletions

View File

@@ -15,6 +15,7 @@ from skyvern.forge.sdk.db.models import (
OrganizationAuthTokenModel,
OrganizationModel,
OutputParameterModel,
ProjectFileModel,
ProjectModel,
StepModel,
TaskModel,
@@ -47,7 +48,7 @@ from skyvern.forge.sdk.workflow.models.workflow import (
WorkflowRunStatus,
WorkflowStatus,
)
from skyvern.schemas.projects import Project
from skyvern.schemas.projects import Project, ProjectFile
from skyvern.schemas.runs import ProxyLocation
from skyvern.webeye.actions.actions import (
Action,
@@ -507,6 +508,25 @@ def convert_to_project(project_model: ProjectModel) -> Project:
)
def convert_to_project_file(project_file_model: ProjectFileModel) -> ProjectFile:
return ProjectFile(
file_id=project_file_model.file_id,
project_revision_id=project_file_model.project_revision_id,
project_id=project_file_model.project_id,
organization_id=project_file_model.organization_id,
file_path=project_file_model.file_path,
file_name=project_file_model.file_name,
file_type=project_file_model.file_type,
content_hash=project_file_model.content_hash,
file_size=project_file_model.file_size,
mime_type=project_file_model.mime_type,
encoding=project_file_model.encoding,
artifact_id=project_file_model.artifact_id,
created_at=project_file_model.created_at,
modified_at=project_file_model.modified_at,
)
def hydrate_action(action_model: ActionModel) -> Action:
"""
Convert ActionModel to the appropriate Action type based on action_type.