-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔄 synced local 'skyvern/' with remote 'skyvern/'
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Adds `get_workflow_run_events` API endpoint and database index for `ObserverThoughtModel`, and refactors `parse_actions` function. > > - **API**: > - Adds `get_workflow_run_events` endpoint in `agent_protocol.py` to retrieve events for a workflow run, including tasks, actions, and observer thoughts. > - **Database**: > - Adds index `observer_cruise_index` to `ObserverThoughtModel` in `models.py` and corresponding Alembic migration. > - **Refactoring**: > - Moves `parse_actions` function to `parse_actions.py` from `actions.py`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for 29096b0ad914a522589edb557c6ce8f3b44bbb40. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
- Loading branch information
1 parent
985f8c9
commit d24d9ce
Showing
7 changed files
with
360 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from datetime import datetime | ||
from enum import StrEnum | ||
from typing import Any | ||
|
||
from pydantic import BaseModel | ||
|
||
from skyvern.forge.sdk.schemas.observers import ObserverThought | ||
from skyvern.forge.sdk.workflow.models.block import BlockType | ||
from skyvern.webeye.actions.actions import Action | ||
|
||
|
||
class WorkflowRunBlock(BaseModel): | ||
workflow_run_block_id: str = "placeholder" | ||
workflow_run_id: str | ||
parent_workflow_run_block_id: str | None = None | ||
block_type: BlockType | ||
label: str | None = None | ||
title: str | None = None | ||
status: str | None = None | ||
output: dict | list | str | None = None | ||
continue_on_failure: bool = False | ||
task_id: str | None = None | ||
url: str | None = None | ||
navigation_goal: str | None = None | ||
data_extraction_goal: str | None = None | ||
data_schema: dict[str, Any] | list | str | None = None | ||
terminate_criterion: str | None = None | ||
complete_criterion: str | None = None | ||
created_at: datetime | ||
modified_at: datetime | ||
|
||
|
||
class WorkflowRunEventType(StrEnum): | ||
action = "action" | ||
thought = "thought" | ||
block = "block" | ||
|
||
|
||
class WorkflowRunEvent(BaseModel): | ||
type: WorkflowRunEventType | ||
action: Action | None = None | ||
thought: ObserverThought | None = None | ||
block: WorkflowRunBlock | None = None | ||
created_at: datetime | ||
modified_at: datetime |
Oops, something went wrong.