PR #29
#29
by
dzakaathif
- opened
This view is limited to 50 files because it contains too many changes.
See the raw diff here.
- rewards/__init__.py +9 -1
- rewards/microsoft_teams.py +935 -0
- rewards/outlook.py +951 -0
- rewards/slack.py +938 -0
- rewards/taobao_mobile.py +408 -0
- tasks/linear/add-label-to-issue.json +1 -1
- tasks/linear/change-issue-priority.json +1 -1
- tasks/linear/change-issue-status.json +1 -1
- tasks/linear/complete-issue-workflow.json +1 -1
- tasks/linear/create-new-issue.json +1 -1
- tasks/linear/drag-and-reassign-issue.json +1 -1
- tasks/linear/drag-issue-different-column.json +1 -1
- tasks/linear/drag-two-issues-same-user.json +1 -1
- tasks/linear/multi-issue-reorganization.json +1 -1
- tasks/linear/reassign-issue.json +1 -1
- tasks/linear/update-issue-properties.json +1 -1
- tasks/linear/view-issue-details.json +1 -1
- tasks/microsoft-teams/birthday-for-george.json +15 -0
- tasks/microsoft-teams/create-a-chat-with-fred-weasely.json +15 -0
- tasks/microsoft-teams/filter-chats-for-harry.json +15 -0
- tasks/microsoft-teams/group-chat-and-hermione.json +15 -0
- tasks/microsoft-teams/harry-hagrid-harry-hagrid.json +15 -0
- tasks/microsoft-teams/large-group-chat.json +15 -0
- tasks/microsoft-teams/make-a-group-chat-with-hagrid-and-ron.json +15 -0
- tasks/microsoft-teams/message-and-search-for-2.json +15 -0
- tasks/microsoft-teams/message-hermione-and-search-for-it.json +15 -0
- tasks/microsoft-teams/message-hermione-and-then-tim.json +15 -0
- tasks/microsoft-teams/message-the-third-user-in-the-search.json +15 -0
- tasks/microsoft-teams/message-tim-and-alex-langford.json +15 -0
- tasks/microsoft-teams/message-tim-and-select-hermiones-photos.json +15 -0
- tasks/microsoft-teams/message-tim-white-twice.json +15 -0
- tasks/microsoft-teams/navigate-to-harrys-files-page.json +15 -0
- tasks/microsoft-teams/navigate-to-harrys-photos-page.json +15 -0
- tasks/microsoft-teams/open-search-page-for-hagrid.json +15 -0
- tasks/microsoft-teams/prepare-to-make-a-new-chat.json +15 -0
- tasks/microsoft-teams/respond-to-hermione.json +15 -0
- tasks/microsoft-teams/search-for-messages-containing-hey.json +15 -0
- tasks/microsoft-teams/the-a-team.json +15 -0
- tasks/outlook/apply-the-has-attachments-filter.json +15 -0
- tasks/outlook/apply-the-unread-search-filter.json +15 -0
- tasks/outlook/choose-sent-items-from-the-folder-selector.json +15 -0
- tasks/outlook/collapse-the-favorites-section.json +15 -0
- tasks/outlook/collapse-the-navigation-sidebar.json +15 -0
- tasks/outlook/compose-a-new-draft.json +15 -0
- tasks/outlook/delete-an-email-from-the-list.json +15 -0
- tasks/outlook/discard-a-draft.json +15 -0
- tasks/outlook/expand-the-navigation-sidebar.json +15 -0
- tasks/outlook/fill-draft-fields.json +15 -0
- tasks/outlook/flag-an-email.json +15 -0
- tasks/outlook/go-to-the-drafts-page.json +15 -0
rewards/__init__.py
CHANGED
|
@@ -11,9 +11,13 @@ from dojo_sdk_core.dojos.rewards.linear import REWARD_FUNCTIONS_LINEAR
|
|
| 11 |
from dojo_sdk_core.dojos.rewards.linkedin import REWARD_FUNCTIONS_LINKEDIN
|
| 12 |
from dojo_sdk_core.dojos.rewards.minesweeper import REWARD_FUNCTIONS_MINESWEEPER
|
| 13 |
from dojo_sdk_core.dojos.rewards.salesforce import REWARD_FUNCTIONS_SALESFORCE
|
|
|
|
| 14 |
from dojo_sdk_core.dojos.rewards.tic_tac_toe import REWARD_FUNCTIONS_TIC_TAC_TOE
|
| 15 |
from dojo_sdk_core.dojos.rewards.xiaohongshu import REWARD_FUNCTIONS_XIAOHONGSHU
|
| 16 |
from dojo_sdk_core.dojos.rewards.weibo import REWARD_FUNCTIONS_WEIBO
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# Unified registry of all reward functions
|
| 19 |
REWARD_FUNCTIONS = {
|
|
@@ -22,10 +26,14 @@ REWARD_FUNCTIONS = {
|
|
| 22 |
**REWARD_FUNCTIONS_LINEAR,
|
| 23 |
**REWARD_FUNCTIONS_LINKEDIN,
|
| 24 |
**REWARD_FUNCTIONS_SALESFORCE,
|
|
|
|
| 25 |
**REWARD_FUNCTIONS_TIC_TAC_TOE,
|
| 26 |
**REWARD_FUNCTIONS_MINESWEEPER,
|
| 27 |
**REWARD_FUNCTIONS_XIAOHONGSHU,
|
| 28 |
**REWARD_FUNCTIONS_WEIBO,
|
|
|
|
|
|
|
|
|
|
| 29 |
}
|
| 30 |
|
| 31 |
|
|
@@ -34,4 +42,4 @@ def get_reward_function(name: str):
|
|
| 34 |
return REWARD_FUNCTIONS.get(name)
|
| 35 |
|
| 36 |
|
| 37 |
-
__all__ = ["REWARD_FUNCTIONS", "get_reward_function"]
|
|
|
|
| 11 |
from dojo_sdk_core.dojos.rewards.linkedin import REWARD_FUNCTIONS_LINKEDIN
|
| 12 |
from dojo_sdk_core.dojos.rewards.minesweeper import REWARD_FUNCTIONS_MINESWEEPER
|
| 13 |
from dojo_sdk_core.dojos.rewards.salesforce import REWARD_FUNCTIONS_SALESFORCE
|
| 14 |
+
from dojo_sdk_core.dojos.rewards.slack import REWARD_FUNCTIONS_SLACK
|
| 15 |
from dojo_sdk_core.dojos.rewards.tic_tac_toe import REWARD_FUNCTIONS_TIC_TAC_TOE
|
| 16 |
from dojo_sdk_core.dojos.rewards.xiaohongshu import REWARD_FUNCTIONS_XIAOHONGSHU
|
| 17 |
from dojo_sdk_core.dojos.rewards.weibo import REWARD_FUNCTIONS_WEIBO
|
| 18 |
+
from dojo_sdk_core.dojos.rewards.jd import REWARD_FUNCTIONS_JD
|
| 19 |
+
from dojo_sdk_core.dojos.rewards.taobao_mobile import REWARD_FUNCTIONS_TAOBAO_MOBILE
|
| 20 |
+
from dojo_sdk_core.dojos.rewards.microsoft_teams import REWARD_FUNCTIONS_MICROSOFT_TEAMS
|
| 21 |
|
| 22 |
# Unified registry of all reward functions
|
| 23 |
REWARD_FUNCTIONS = {
|
|
|
|
| 26 |
**REWARD_FUNCTIONS_LINEAR,
|
| 27 |
**REWARD_FUNCTIONS_LINKEDIN,
|
| 28 |
**REWARD_FUNCTIONS_SALESFORCE,
|
| 29 |
+
**REWARD_FUNCTIONS_SLACK,
|
| 30 |
**REWARD_FUNCTIONS_TIC_TAC_TOE,
|
| 31 |
**REWARD_FUNCTIONS_MINESWEEPER,
|
| 32 |
**REWARD_FUNCTIONS_XIAOHONGSHU,
|
| 33 |
**REWARD_FUNCTIONS_WEIBO,
|
| 34 |
+
**REWARD_FUNCTIONS_JD,
|
| 35 |
+
**REWARD_FUNCTIONS_TAOBAO_MOBILE,
|
| 36 |
+
**REWARD_FUNCTIONS_MICROSOFT_TEAMS,
|
| 37 |
}
|
| 38 |
|
| 39 |
|
|
|
|
| 42 |
return REWARD_FUNCTIONS.get(name)
|
| 43 |
|
| 44 |
|
| 45 |
+
__all__ = ["REWARD_FUNCTIONS", "get_reward_function"]
|
rewards/microsoft_teams.py
ADDED
|
@@ -0,0 +1,935 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Reward function for Microsoft Teams SPA
|
| 3 |
+
"""
|
| 4 |
+
|
| 5 |
+
from typing import Any, Dict, List, Tuple
|
| 6 |
+
|
| 7 |
+
# === Easy ===
|
| 8 |
+
def _validate_respond_to_hermione(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 9 |
+
"""
|
| 10 |
+
Reward function that checks if the user has sent the message
|
| 11 |
+
"Sure thing - it looks good!" to Hermione.
|
| 12 |
+
|
| 13 |
+
Args:
|
| 14 |
+
state: The current SPA state as a dictionary
|
| 15 |
+
|
| 16 |
+
Returns:
|
| 17 |
+
Tuple of (reward, message)
|
| 18 |
+
reward = 1.0 if message sent, 0.0 otherwise
|
| 19 |
+
"""
|
| 20 |
+
user_id = "you"
|
| 21 |
+
target_conversation_id = "hermione-granger"
|
| 22 |
+
expected_content = "Sure thing - it looks good!"
|
| 23 |
+
|
| 24 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 25 |
+
|
| 26 |
+
# Find Hermione's conversation
|
| 27 |
+
hermione_convo = None
|
| 28 |
+
for convo in messages:
|
| 29 |
+
if convo.get("conversationId") == target_conversation_id:
|
| 30 |
+
hermione_convo = convo
|
| 31 |
+
break
|
| 32 |
+
|
| 33 |
+
if hermione_convo is None:
|
| 34 |
+
return 0.0, "Hermione's conversation not found."
|
| 35 |
+
|
| 36 |
+
# Check if the expected message exists in the conversation
|
| 37 |
+
for msg in hermione_convo.get("messages", []):
|
| 38 |
+
if msg.get("senderId") == user_id and msg.get("content") == expected_content:
|
| 39 |
+
return 1.0, "Success! The expected message was sent to Hermione."
|
| 40 |
+
|
| 41 |
+
return 0.0, f"Message not sent. Expected: '{expected_content}'"
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
def _validate_message_tim_white_twice(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 45 |
+
"""
|
| 46 |
+
Reward function that checks if the user has sent two specific messages
|
| 47 |
+
to Tim White.
|
| 48 |
+
|
| 49 |
+
Args:
|
| 50 |
+
initial_state: The initial SPA state as a dictionary
|
| 51 |
+
final_state: The final SPA state as a dictionary
|
| 52 |
+
|
| 53 |
+
Returns:
|
| 54 |
+
Tuple of (reward, message)
|
| 55 |
+
reward = 1.0 if both messages sent, 0.0 otherwise
|
| 56 |
+
"""
|
| 57 |
+
user_id = "you"
|
| 58 |
+
target_conversation_id = "tim-white"
|
| 59 |
+
expected_messages = [
|
| 60 |
+
"Hey Tim, smoke test completed.",
|
| 61 |
+
"Let me know if you need a hand with anything."
|
| 62 |
+
]
|
| 63 |
+
|
| 64 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 65 |
+
|
| 66 |
+
# Find Tim White's conversation
|
| 67 |
+
tim_convo = None
|
| 68 |
+
for convo in messages:
|
| 69 |
+
if convo.get("conversationId") == target_conversation_id:
|
| 70 |
+
tim_convo = convo
|
| 71 |
+
break
|
| 72 |
+
|
| 73 |
+
if tim_convo is None:
|
| 74 |
+
return 0.0, "Tim White's conversation not found."
|
| 75 |
+
|
| 76 |
+
# Check if both expected messages exist in the conversation
|
| 77 |
+
sent_messages = [msg.get("content") for msg in tim_convo.get("messages", []) if msg.get("senderId") == user_id]
|
| 78 |
+
missing = [msg for msg in expected_messages if msg not in sent_messages]
|
| 79 |
+
|
| 80 |
+
if not missing:
|
| 81 |
+
return 1.0, "Success! Both messages were sent to Tim White."
|
| 82 |
+
else:
|
| 83 |
+
return 0.0, f"Message(s) not sent: {missing}"
|
| 84 |
+
|
| 85 |
+
def _validate_harry_hagrid_harry_hagrid(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 86 |
+
"""
|
| 87 |
+
Reward function that checks if the user completed the sequence:
|
| 88 |
+
1. Messaged Harry: "Hey Harry, can we reschedule to 2? I have a meeting with Hagrid."
|
| 89 |
+
2. Messaged Hagrid: "Hey Hagrid, should be all good - I'll let you know asap."
|
| 90 |
+
3. Messaged Harry: "Good to hear - see you at 2!"
|
| 91 |
+
4. Messaged Hagrid: "Harry said yes, I'll see you at 12 then!"
|
| 92 |
+
|
| 93 |
+
Args:
|
| 94 |
+
initial_state: The starting SPA state
|
| 95 |
+
final_state: The final SPA state after user actions
|
| 96 |
+
|
| 97 |
+
Returns:
|
| 98 |
+
Tuple of (reward, message)
|
| 99 |
+
reward = 1.0 if all messages are correctly sent, 0.0 otherwise
|
| 100 |
+
"""
|
| 101 |
+
user_id = "you"
|
| 102 |
+
harry_convo_id = "harry-potter"
|
| 103 |
+
hagrid_convo_id = "hagrid-cao"
|
| 104 |
+
|
| 105 |
+
expected_messages = {
|
| 106 |
+
harry_convo_id: [
|
| 107 |
+
"Hey Harry, can we reschedule to 2? I have a meeting with Hagrid.",
|
| 108 |
+
"Good to hear - see you at 2!"
|
| 109 |
+
],
|
| 110 |
+
hagrid_convo_id: [
|
| 111 |
+
"Hey Hagrid, should be all good - I'll let you know asap.",
|
| 112 |
+
"Harry said yes, I'll see you at 12 then!"
|
| 113 |
+
]
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 117 |
+
found: dict[str, list[str]] = {harry_convo_id: [], hagrid_convo_id: []}
|
| 118 |
+
|
| 119 |
+
for convo in messages:
|
| 120 |
+
convo_id = convo.get("conversationId")
|
| 121 |
+
if convo_id in expected_messages:
|
| 122 |
+
for msg in convo.get("messages", []):
|
| 123 |
+
if msg.get("senderId") == user_id:
|
| 124 |
+
content = msg.get("content", "")
|
| 125 |
+
if content in expected_messages[convo_id]:
|
| 126 |
+
found[convo_id].append(content)
|
| 127 |
+
|
| 128 |
+
harry_msgs = set(found[harry_convo_id])
|
| 129 |
+
hagrid_msgs = set(found[hagrid_convo_id])
|
| 130 |
+
|
| 131 |
+
harry_ok = harry_msgs == set(expected_messages[harry_convo_id])
|
| 132 |
+
hagrid_ok = hagrid_msgs == set(expected_messages[hagrid_convo_id])
|
| 133 |
+
|
| 134 |
+
if harry_ok and hagrid_ok:
|
| 135 |
+
return 1.0, "Success! All messages were correctly sent to Harry and Hagrid in both chats."
|
| 136 |
+
|
| 137 |
+
missing: list[str] = []
|
| 138 |
+
for convo_id, expected in expected_messages.items():
|
| 139 |
+
convo_name = "Harry" if convo_id == harry_convo_id else "Hagrid"
|
| 140 |
+
missing_msgs = [m for m in expected if m not in found[convo_id]]
|
| 141 |
+
if missing_msgs:
|
| 142 |
+
missing.append(f"{convo_name}: {missing_msgs}")
|
| 143 |
+
|
| 144 |
+
return 0.0, f"Some messages are missing or incorrect: {', '.join(missing)}"
|
| 145 |
+
|
| 146 |
+
def _validate_open_search_page_for_hagrid(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 147 |
+
"""
|
| 148 |
+
Reward function that checks if the user opened the search page for Hagrid.
|
| 149 |
+
|
| 150 |
+
Args:
|
| 151 |
+
initial_state: The SPA state before user action
|
| 152 |
+
final_state: The SPA state after user action
|
| 153 |
+
|
| 154 |
+
Returns:
|
| 155 |
+
Tuple of (reward, message)
|
| 156 |
+
reward = 1.0 if the search page shows results for Hagrid, 0.0 otherwise
|
| 157 |
+
"""
|
| 158 |
+
expected_search_term = "hagrid"
|
| 159 |
+
expected_page = "SEARCH"
|
| 160 |
+
expected_search_page_type = "PEOPLE"
|
| 161 |
+
|
| 162 |
+
# Check if the search page is open
|
| 163 |
+
page = final_state.get("page")
|
| 164 |
+
search_page = final_state.get("searchPage")
|
| 165 |
+
search_term = final_state.get("searchTerm", "").lower()
|
| 166 |
+
|
| 167 |
+
if page != expected_page:
|
| 168 |
+
return 0.0, f"Wrong page open: {page}. Expected HOME → SEARCH."
|
| 169 |
+
|
| 170 |
+
if search_page != expected_search_page_type:
|
| 171 |
+
return 0.0, f"Search page type is '{search_page}', expected '{expected_search_page_type}'."
|
| 172 |
+
|
| 173 |
+
if search_term != expected_search_term:
|
| 174 |
+
return 0.0, f"Search term is '{search_term}', expected '{expected_search_term}'."
|
| 175 |
+
|
| 176 |
+
return 1.0, "Success! Hagrid's search page is open and ready."
|
| 177 |
+
|
| 178 |
+
def _validate_prepare_to_make_a_new_chat(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 179 |
+
"""
|
| 180 |
+
Reward function that checks if the user has selected the new chat icon
|
| 181 |
+
and entered the new chat screen.
|
| 182 |
+
|
| 183 |
+
Args:
|
| 184 |
+
initial_state: The SPA state before the action
|
| 185 |
+
final_state: The SPA state after the action
|
| 186 |
+
|
| 187 |
+
Returns:
|
| 188 |
+
Tuple of (reward, message)
|
| 189 |
+
reward = 1.0 if the new chat screen is shown, 0.0 otherwise
|
| 190 |
+
"""
|
| 191 |
+
# Check if the SPA has transitioned to creating a new chat
|
| 192 |
+
creating_chat = final_state.get("creatingChat", False)
|
| 193 |
+
|
| 194 |
+
if creating_chat:
|
| 195 |
+
return 1.0, "Success! The new chat screen is now shown."
|
| 196 |
+
|
| 197 |
+
return 0.0, "New chat screen not shown. Make sure the new chat icon was clicked."
|
| 198 |
+
|
| 199 |
+
def _validate_filter_chats_for_harry(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 200 |
+
"""
|
| 201 |
+
Reward function that checks if the sidebar chats are filtered
|
| 202 |
+
for the name 'harry', meaning only Harry Potter's chat is shown.
|
| 203 |
+
|
| 204 |
+
Args:
|
| 205 |
+
state: The current SPA state as a dictionary.
|
| 206 |
+
|
| 207 |
+
Returns:
|
| 208 |
+
Tuple of (reward, message)
|
| 209 |
+
reward = 1.0 if only Harry Potter's chat is displayed after filtering,
|
| 210 |
+
0.0 otherwise.
|
| 211 |
+
"""
|
| 212 |
+
target_filter = "harry"
|
| 213 |
+
|
| 214 |
+
# Extract filtering info
|
| 215 |
+
filter_string: str = final_state.get("filterString", "")
|
| 216 |
+
filtering: bool = final_state.get("filtering", False)
|
| 217 |
+
# messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 218 |
+
|
| 219 |
+
# If filtering not active or filter string is wrong
|
| 220 |
+
if (not filtering):
|
| 221 |
+
return 0.0, "Filtering is not active."
|
| 222 |
+
if (filter_string.lower() != target_filter):
|
| 223 |
+
return 0.0, f"Expected filter string '{target_filter}', got '{filter_string}'."
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
return 1.0, "Success! Filters for Harry potter's chat."
|
| 227 |
+
|
| 228 |
+
def _validate_navigate_to_harrys_files_page(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 229 |
+
"""
|
| 230 |
+
Reward function that checks if the user has navigated to Harry's files page.
|
| 231 |
+
|
| 232 |
+
Args:
|
| 233 |
+
initial_state: The initial SPA state as a dictionary
|
| 234 |
+
final_state: The final SPA state as a dictionary
|
| 235 |
+
|
| 236 |
+
Returns:
|
| 237 |
+
Tuple of (reward, message)
|
| 238 |
+
reward = 1.0 if files page is open, 0.0 otherwise
|
| 239 |
+
"""
|
| 240 |
+
expected_page = "FILES"
|
| 241 |
+
current_page = final_state.get("mainChatPage", "")
|
| 242 |
+
|
| 243 |
+
if current_page == expected_page:
|
| 244 |
+
return 1.0, "Success! The files page is open."
|
| 245 |
+
|
| 246 |
+
return 0.0, f"Files page not open. Current page: '{current_page}'"
|
| 247 |
+
|
| 248 |
+
def _validate_navigate_to_harrys_photos_page(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 249 |
+
"""
|
| 250 |
+
Reward function that checks if the user has navigated to Harry's photos page.
|
| 251 |
+
|
| 252 |
+
Args:
|
| 253 |
+
initial_state: The initial SPA state as a dictionary
|
| 254 |
+
final_state: The final SPA state as a dictionary
|
| 255 |
+
|
| 256 |
+
Returns:
|
| 257 |
+
Tuple of (reward, message)
|
| 258 |
+
reward = 1.0 if files page is open, 0.0 otherwise
|
| 259 |
+
"""
|
| 260 |
+
expected_page = "PHOTOS"
|
| 261 |
+
current_page = final_state.get("mainChatPage", "")
|
| 262 |
+
|
| 263 |
+
if current_page == expected_page:
|
| 264 |
+
return 1.0, "Success! The photos page is open."
|
| 265 |
+
|
| 266 |
+
return 0.0, f"Photos page not open. Current page: '{current_page}'"
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
# === Medium ===
|
| 274 |
+
def _validate_message_hermione_and_then_tim(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 275 |
+
"""
|
| 276 |
+
Reward function that checks if the user has:
|
| 277 |
+
1. Sent Hermione the message "All done. Let me know if you get it!"
|
| 278 |
+
2. Sent Tim the message "Smoke tested! Should be with you shortly."
|
| 279 |
+
|
| 280 |
+
Args:
|
| 281 |
+
initial_state: The initial SPA state
|
| 282 |
+
final_state: The final SPA state after user interaction
|
| 283 |
+
|
| 284 |
+
Returns:
|
| 285 |
+
Tuple of (reward, message)
|
| 286 |
+
reward = 1.0 if both messages were sent correctly, 0.5 if only one was sent, 0.0 otherwise
|
| 287 |
+
"""
|
| 288 |
+
user_id = "you"
|
| 289 |
+
|
| 290 |
+
# Define targets
|
| 291 |
+
hermione_conversation_id = "hermione-granger"
|
| 292 |
+
tim_conversation_id = "tim-white"
|
| 293 |
+
|
| 294 |
+
expected_hermione_msg = "All done. Let me know if you get it!"
|
| 295 |
+
expected_tim_msg = "Smoke tested! Should be with you shortly."
|
| 296 |
+
|
| 297 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 298 |
+
|
| 299 |
+
# Helper to find a conversation by ID
|
| 300 |
+
def find_convo(convo_id: str) -> Dict[str, Any]:
|
| 301 |
+
for convo in messages:
|
| 302 |
+
if convo.get("conversationId") == convo_id:
|
| 303 |
+
return convo
|
| 304 |
+
return {}
|
| 305 |
+
|
| 306 |
+
# Check Hermione convo
|
| 307 |
+
hermione_convo = find_convo(hermione_conversation_id)
|
| 308 |
+
hermione_msg_sent = any(
|
| 309 |
+
msg.get("senderId") == user_id and msg.get("content") == expected_hermione_msg
|
| 310 |
+
for msg in hermione_convo.get("messages", [])
|
| 311 |
+
) if hermione_convo else False
|
| 312 |
+
|
| 313 |
+
# Check Tim convo
|
| 314 |
+
tim_convo = find_convo(tim_conversation_id)
|
| 315 |
+
tim_msg_sent = any(
|
| 316 |
+
msg.get("senderId") == user_id and msg.get("content") == expected_tim_msg
|
| 317 |
+
for msg in tim_convo.get("messages", [])
|
| 318 |
+
) if tim_convo else False
|
| 319 |
+
|
| 320 |
+
# Reward logic
|
| 321 |
+
if hermione_msg_sent and tim_msg_sent:
|
| 322 |
+
return 1.0, "Success! Messages sent to both Hermione and Tim."
|
| 323 |
+
elif hermione_msg_sent or tim_msg_sent:
|
| 324 |
+
missing = "Tim" if hermione_msg_sent else "Hermione"
|
| 325 |
+
return 0.5, f"Partially complete. Missing message to {missing}."
|
| 326 |
+
else:
|
| 327 |
+
return 0.0, "Messages not sent to either Hermione or Tim."
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
def _validate_make_a_group_chat_with_hagrid_and_ron(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 331 |
+
"""
|
| 332 |
+
Reward function that checks if the user has created a group chat
|
| 333 |
+
including Hagrid and Ron, and sent the message "Hey guys!".
|
| 334 |
+
|
| 335 |
+
Args:
|
| 336 |
+
initial_state: The initial SPA state as a dictionary
|
| 337 |
+
final_state: The final SPA state as a dictionary
|
| 338 |
+
|
| 339 |
+
Returns:
|
| 340 |
+
Tuple of (reward, message)
|
| 341 |
+
reward = 1.0 if the correct group chat was created and message sent, 0.0 otherwise
|
| 342 |
+
"""
|
| 343 |
+
user_id = "you"
|
| 344 |
+
expected_participants = {"hagrid-cao", "ron-weasley"}
|
| 345 |
+
expected_message = "Hey guys!"
|
| 346 |
+
|
| 347 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 348 |
+
if not messages:
|
| 349 |
+
return 0.0, "No messages found in final state."
|
| 350 |
+
|
| 351 |
+
# Look for a new conversation containing both Hagrid and Ron
|
| 352 |
+
for convo in messages:
|
| 353 |
+
user_ids = set(convo.get("userIds", []))
|
| 354 |
+
if expected_participants.issubset(user_ids):
|
| 355 |
+
# Check that the user sent "Hey guys!" in this conversation
|
| 356 |
+
for msg in convo.get("messages", []):
|
| 357 |
+
if msg.get("senderId") == user_id and msg.get("content") == expected_message:
|
| 358 |
+
return 1.0, "Success! Created group chat with Hagrid and Ron and sent 'Hey guys!'."
|
| 359 |
+
return 0.0, "Group chat found, but expected message not sent."
|
| 360 |
+
|
| 361 |
+
return 0.0, "No group chat found with both Hagrid and Ron."
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
def _validate_create_a_chat_with_fred_weasely(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 365 |
+
"""
|
| 366 |
+
Reward function that checks if a new chat was created with Fred Weasley
|
| 367 |
+
and the message "Hey Fred, how are you!" was sent.
|
| 368 |
+
|
| 369 |
+
Args:
|
| 370 |
+
state: The current SPA state as a dictionary.
|
| 371 |
+
|
| 372 |
+
Returns:
|
| 373 |
+
Tuple of (reward, message)
|
| 374 |
+
reward = 1.0 if chat created and message sent, 0.0 otherwise.
|
| 375 |
+
"""
|
| 376 |
+
user_id = "you"
|
| 377 |
+
target_conversation_id = "fred-weasley"
|
| 378 |
+
expected_content = "Hey Fred, how are you!"
|
| 379 |
+
|
| 380 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 381 |
+
|
| 382 |
+
# Find Fred's conversation
|
| 383 |
+
fred_convo = None
|
| 384 |
+
for convo in messages:
|
| 385 |
+
if convo.get("conversationId") == target_conversation_id:
|
| 386 |
+
fred_convo = convo
|
| 387 |
+
break
|
| 388 |
+
|
| 389 |
+
if fred_convo is None:
|
| 390 |
+
return 0.0, "Conversation with Fred Weasley not found. Make sure you started a new chat."
|
| 391 |
+
|
| 392 |
+
# Check if the expected message exists in the conversation
|
| 393 |
+
for msg in fred_convo.get("messages", []):
|
| 394 |
+
if msg.get("senderId") == user_id and msg.get("content") == expected_content:
|
| 395 |
+
return 1.0, "Success! Chat with Fred Weasley created and message sent."
|
| 396 |
+
|
| 397 |
+
return 0.0, f"Message not found in Fred's chat. Expected: '{expected_content}'"
|
| 398 |
+
|
| 399 |
+
def _validate_message_tim_and_select_hermiones_photos(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 400 |
+
"""
|
| 401 |
+
Reward function that validates whether:
|
| 402 |
+
1. The user sent "Hey Tim, it's me" to Tim White.
|
| 403 |
+
2. The user navigated to Hermione's chat and selected the Photos tab.
|
| 404 |
+
|
| 405 |
+
Args:
|
| 406 |
+
initial_state: The SPA's starting state as a dictionary.
|
| 407 |
+
final_state: The SPA's ending state as a dictionary.
|
| 408 |
+
|
| 409 |
+
Returns:
|
| 410 |
+
Tuple of (reward, message)
|
| 411 |
+
reward = 1.0 if both actions are complete, 0.5 if only message is sent,
|
| 412 |
+
0.0 otherwise.
|
| 413 |
+
"""
|
| 414 |
+
|
| 415 |
+
user_id = "you"
|
| 416 |
+
tim_conversation_id = "tim-white"
|
| 417 |
+
hermione_conversation_id = "hermione-granger"
|
| 418 |
+
expected_message = "Hey Tim, it's me"
|
| 419 |
+
|
| 420 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 421 |
+
|
| 422 |
+
# --- Step 1: Check message to Tim ---
|
| 423 |
+
tim_convo = None
|
| 424 |
+
for convo in messages:
|
| 425 |
+
if convo.get("conversationId") == tim_conversation_id:
|
| 426 |
+
tim_convo = convo
|
| 427 |
+
break
|
| 428 |
+
|
| 429 |
+
message_sent = False
|
| 430 |
+
if tim_convo:
|
| 431 |
+
for msg in tim_convo.get("messages", []):
|
| 432 |
+
if msg.get("senderId") == user_id and msg.get("content") == expected_message:
|
| 433 |
+
message_sent = True
|
| 434 |
+
break
|
| 435 |
+
|
| 436 |
+
# --- Step 2: Check Hermione's chat and Photos tab ---
|
| 437 |
+
active_convo = final_state.get("msgId")
|
| 438 |
+
active_tab = final_state.get("mainChatPage")
|
| 439 |
+
|
| 440 |
+
on_hermione_photos = (
|
| 441 |
+
active_convo == hermione_conversation_id
|
| 442 |
+
and active_tab == "PHOTOS"
|
| 443 |
+
)
|
| 444 |
+
|
| 445 |
+
# --- Combine results ---
|
| 446 |
+
if message_sent and on_hermione_photos:
|
| 447 |
+
return 1.0, "Success! Message sent to Tim and Hermione's Photos tab is open."
|
| 448 |
+
elif message_sent:
|
| 449 |
+
return 0.5, "Partial success. Message sent to Tim, but not on Hermione's Photos tab."
|
| 450 |
+
else:
|
| 451 |
+
return 0.0, "Message to Tim not sent yet, and Hermione's Photos tab not open."
|
| 452 |
+
|
| 453 |
+
def _validate_search_for_messages_containing_hey(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 454 |
+
"""
|
| 455 |
+
Reward function that checks if a search for 'hey' was performed and
|
| 456 |
+
if the result containing "Hey Hugo — are we still on for Friday at 12pm?" is shown.
|
| 457 |
+
|
| 458 |
+
Args:
|
| 459 |
+
initial_state: The initial SPA state as a dictionary
|
| 460 |
+
final_state: The final SPA state as a dictionary
|
| 461 |
+
|
| 462 |
+
Returns:
|
| 463 |
+
Tuple of (reward, message)
|
| 464 |
+
reward = 1.0 if search result is present, 0.0 otherwise
|
| 465 |
+
"""
|
| 466 |
+
expected_message_content = "Hey Hugo — are we still on for Friday at 12pm?"
|
| 467 |
+
|
| 468 |
+
# Check if the user navigated to the MESSAGES tab in the search page
|
| 469 |
+
if final_state.get("page") != "SEARCH" or final_state.get("searchPage") != "MESSAGES":
|
| 470 |
+
return 0.0, "User did not navigate to the messages tab after searching."
|
| 471 |
+
|
| 472 |
+
# Look through all messages in the final state
|
| 473 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 474 |
+
for convo in messages:
|
| 475 |
+
for msg in convo.get("messages", []):
|
| 476 |
+
if expected_message_content in msg.get("content", ""):
|
| 477 |
+
return 1.0, f"Success! Found expected message: '{expected_message_content}'"
|
| 478 |
+
|
| 479 |
+
return 0.0, f"Message not found. Expected: '{expected_message_content}'"
|
| 480 |
+
|
| 481 |
+
|
| 482 |
+
def _validate_message_tim_and_alex_langford(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 483 |
+
"""
|
| 484 |
+
Reward function that checks if the user sent the message
|
| 485 |
+
"Smoke test finished, looks good!" to Tim and also started a
|
| 486 |
+
new conversation with Alex Langford, sending "Good to see you Alex!".
|
| 487 |
+
|
| 488 |
+
Args:
|
| 489 |
+
initial_state: The initial SPA state as a dictionary
|
| 490 |
+
final_state: The final SPA state as a dictionary
|
| 491 |
+
|
| 492 |
+
Returns:
|
| 493 |
+
Tuple[float, str]:
|
| 494 |
+
reward = 1.0 if both conditions met,
|
| 495 |
+
0.5 if only one of them is met,
|
| 496 |
+
0.0 otherwise.
|
| 497 |
+
message = explanation of result.
|
| 498 |
+
"""
|
| 499 |
+
user_id = "you"
|
| 500 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 501 |
+
|
| 502 |
+
# --- Targets ---
|
| 503 |
+
tim_convo_id = "tim-white"
|
| 504 |
+
tim_expected_content = "Smoke test finished, looks good!"
|
| 505 |
+
|
| 506 |
+
alex_convo_id = "alex-langford"
|
| 507 |
+
alex_expected_content = "Good to see you Alex!"
|
| 508 |
+
|
| 509 |
+
tim_message_sent = False
|
| 510 |
+
alex_message_sent = False
|
| 511 |
+
|
| 512 |
+
# Check Tim’s conversation
|
| 513 |
+
for convo in messages:
|
| 514 |
+
if convo.get("conversationId") == tim_convo_id:
|
| 515 |
+
for msg in convo.get("messages", []):
|
| 516 |
+
if msg.get("senderId") == user_id and msg.get("content") == tim_expected_content:
|
| 517 |
+
tim_message_sent = True
|
| 518 |
+
break
|
| 519 |
+
|
| 520 |
+
# Check Alex’s conversation (it must exist and have the message)
|
| 521 |
+
for convo in messages:
|
| 522 |
+
if convo.get("conversationId") == alex_convo_id:
|
| 523 |
+
for msg in convo.get("messages", []):
|
| 524 |
+
if msg.get("senderId") == user_id and msg.get("content") == alex_expected_content:
|
| 525 |
+
alex_message_sent = True
|
| 526 |
+
break
|
| 527 |
+
|
| 528 |
+
# --- Scoring logic ---
|
| 529 |
+
if tim_message_sent and alex_message_sent:
|
| 530 |
+
return 1.0, "Success! Messages sent to both Tim and Alex."
|
| 531 |
+
elif tim_message_sent:
|
| 532 |
+
return 0.5, "Partial success: message sent to Tim, but not to Alex."
|
| 533 |
+
elif alex_message_sent:
|
| 534 |
+
return 0.5, "Partial success: message sent to Alex, but not to Tim."
|
| 535 |
+
else:
|
| 536 |
+
return 0.0, "No valid messages sent to Tim or Alex."
|
| 537 |
+
|
| 538 |
+
|
| 539 |
+
|
| 540 |
+
|
| 541 |
+
|
| 542 |
+
|
| 543 |
+
# === Hard ===
|
| 544 |
+
def _validate_large_group_chat(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 545 |
+
"""
|
| 546 |
+
Reward function that checks if the user has created a group chat with
|
| 547 |
+
Harry Potter, Hermione Granger, Tim White, and Tim White 2,
|
| 548 |
+
and sent the message 'What a group chat!'.
|
| 549 |
+
|
| 550 |
+
Args:
|
| 551 |
+
initial_state: The initial SPA state as a dictionary
|
| 552 |
+
final_state: The final SPA state as a dictionary
|
| 553 |
+
|
| 554 |
+
Returns:
|
| 555 |
+
Tuple of (reward, message)
|
| 556 |
+
reward = 1.0 if the group chat and message exist, 0.0 otherwise
|
| 557 |
+
"""
|
| 558 |
+
user_id = "you"
|
| 559 |
+
expected_users = {"harry-potter", "hermione-granger", "tim-white", "tim-white-2"}
|
| 560 |
+
expected_message = "What a group chat!"
|
| 561 |
+
|
| 562 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 563 |
+
|
| 564 |
+
# Find a conversation that has exactly the expected users
|
| 565 |
+
group_convo = None
|
| 566 |
+
for convo in messages:
|
| 567 |
+
convo_users = set(convo.get("userIds", []))
|
| 568 |
+
if convo_users == expected_users:
|
| 569 |
+
group_convo = convo
|
| 570 |
+
break
|
| 571 |
+
|
| 572 |
+
if group_convo is None:
|
| 573 |
+
return 0.0, "Group chat with the required users not found."
|
| 574 |
+
|
| 575 |
+
# Check if the expected message was sent by the user in that chat
|
| 576 |
+
for msg in group_convo.get("messages", []):
|
| 577 |
+
if msg.get("senderId") == user_id and msg.get("content") == expected_message:
|
| 578 |
+
return 1.0, "Success! Group chat created and message sent."
|
| 579 |
+
|
| 580 |
+
return 0.0, f"Message not found in the group chat. Expected: '{expected_message}'"
|
| 581 |
+
|
| 582 |
+
def _validate_message_hermione_and_search_for_it(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 583 |
+
"""
|
| 584 |
+
Reward function that verifies:
|
| 585 |
+
1. The user sent the message "All good Hermione, it's finished." to Hermione.
|
| 586 |
+
2. The user performed a search for 'Hermi' and opened the 'messages' tab.
|
| 587 |
+
|
| 588 |
+
Args:
|
| 589 |
+
initial_state: The initial SPA state as a dictionary.
|
| 590 |
+
final_state: The final SPA state as a dictionary.
|
| 591 |
+
|
| 592 |
+
Returns:
|
| 593 |
+
Tuple of (reward, message)
|
| 594 |
+
reward = 1.0 if both conditions are met, partial reward if only one is met.
|
| 595 |
+
"""
|
| 596 |
+
user_id = "you"
|
| 597 |
+
target_conversation_id = "hermione-granger"
|
| 598 |
+
expected_content = "All good Hermione, it's finished."
|
| 599 |
+
expected_search_term = "Hermi"
|
| 600 |
+
expected_search_page = "MESSAGES"
|
| 601 |
+
|
| 602 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 603 |
+
|
| 604 |
+
# Step 1: Verify Hermione's conversation and message
|
| 605 |
+
hermione_convo = None
|
| 606 |
+
for convo in messages:
|
| 607 |
+
if convo.get("conversationId") == target_conversation_id:
|
| 608 |
+
hermione_convo = convo
|
| 609 |
+
break
|
| 610 |
+
|
| 611 |
+
if hermione_convo is None:
|
| 612 |
+
return 0.0, "Hermione's conversation not found."
|
| 613 |
+
|
| 614 |
+
sent_message = any(
|
| 615 |
+
msg.get("senderId") == user_id and msg.get("content") == expected_content
|
| 616 |
+
for msg in hermione_convo.get("messages", [])
|
| 617 |
+
)
|
| 618 |
+
|
| 619 |
+
# Step 2: Verify search term and tab
|
| 620 |
+
search_term = final_state.get("searchTerm", "")
|
| 621 |
+
search_page = final_state.get("searchPage", "")
|
| 622 |
+
on_search_page = final_state.get("page") == "SEARCH"
|
| 623 |
+
|
| 624 |
+
correct_search = (
|
| 625 |
+
on_search_page and
|
| 626 |
+
search_term == expected_search_term and
|
| 627 |
+
search_page == expected_search_page
|
| 628 |
+
)
|
| 629 |
+
|
| 630 |
+
# Evaluate total reward
|
| 631 |
+
if sent_message and correct_search:
|
| 632 |
+
return 1.0, "Success! You messaged Hermione and searched for it correctly."
|
| 633 |
+
elif sent_message:
|
| 634 |
+
return 0.5, "Message sent, but search not completed correctly."
|
| 635 |
+
elif correct_search:
|
| 636 |
+
return 0.5, "Search was correct, but Hermione’s message wasn’t sent."
|
| 637 |
+
else:
|
| 638 |
+
return 0.0, "Neither the message nor the search action were completed correctly."
|
| 639 |
+
|
| 640 |
+
|
| 641 |
+
def _validate_message_the_third_user_in_the_search(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 642 |
+
"""
|
| 643 |
+
Reward function that checks if the user has messaged the third user in the
|
| 644 |
+
search list ("Anne Peters") with the message "Hi Anne, it's me."
|
| 645 |
+
|
| 646 |
+
Args:
|
| 647 |
+
initial_state: The starting SPA state as a dictionary
|
| 648 |
+
final_state: The resulting SPA state as a dictionary
|
| 649 |
+
|
| 650 |
+
Returns:
|
| 651 |
+
Tuple of (reward, message)
|
| 652 |
+
reward = 1.0 if message sent correctly, 0.0 otherwise
|
| 653 |
+
"""
|
| 654 |
+
user_id = "you"
|
| 655 |
+
target_conversation_id = "anne-peters"
|
| 656 |
+
expected_content = "Hi Anne, it's me."
|
| 657 |
+
|
| 658 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 659 |
+
|
| 660 |
+
# Locate Anne's conversation
|
| 661 |
+
anne_convo = None
|
| 662 |
+
for convo in messages:
|
| 663 |
+
if convo.get("conversationId") == target_conversation_id:
|
| 664 |
+
anne_convo = convo
|
| 665 |
+
break
|
| 666 |
+
|
| 667 |
+
if anne_convo is None:
|
| 668 |
+
return 0.0, "Anne's conversation not found — looks like you didn't message her."
|
| 669 |
+
|
| 670 |
+
# Check if the expected message exists
|
| 671 |
+
for msg in anne_convo.get("messages", []):
|
| 672 |
+
if msg.get("senderId") == user_id and msg.get("content") == expected_content:
|
| 673 |
+
return 1.0, "Nice! You successfully messaged Anne Peters with the correct text."
|
| 674 |
+
|
| 675 |
+
return 0.0, f"Message not sent or incorrect. Expected: '{expected_content}'"
|
| 676 |
+
|
| 677 |
+
# _validate_harry_hagrid_harry_hagrid
|
| 678 |
+
def _validate_message_and_search_for_2(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 679 |
+
"""
|
| 680 |
+
Reward function for verifying that:
|
| 681 |
+
1. The user sent two specific messages to Harry Potter.
|
| 682 |
+
2. The user searched for the number '2' in messages.
|
| 683 |
+
3. The search results display five messages (four from user, one from Harry).
|
| 684 |
+
|
| 685 |
+
Args:
|
| 686 |
+
initial_state: The starting state of the SPA
|
| 687 |
+
final_state: The ending state after the user's actions
|
| 688 |
+
|
| 689 |
+
Returns:
|
| 690 |
+
Tuple of (reward, message)
|
| 691 |
+
reward = 1.0 if all criteria are met, 0.0 otherwise
|
| 692 |
+
"""
|
| 693 |
+
user_id = "you"
|
| 694 |
+
target_conversation_id = "harry-potter"
|
| 695 |
+
|
| 696 |
+
required_messages = [
|
| 697 |
+
"What do you mean you said we'd meet at two?!",
|
| 698 |
+
"Wait let me check my message history"
|
| 699 |
+
]
|
| 700 |
+
|
| 701 |
+
# 1. Check messages to Harry
|
| 702 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 703 |
+
harry_convo = next(
|
| 704 |
+
(convo for convo in messages if convo.get("conversationId") == target_conversation_id),
|
| 705 |
+
None
|
| 706 |
+
)
|
| 707 |
+
|
| 708 |
+
if harry_convo is None:
|
| 709 |
+
return 0.0, "Harry's conversation not found."
|
| 710 |
+
|
| 711 |
+
convo_messages = harry_convo.get("messages", [])
|
| 712 |
+
sent_texts = [m.get("content") for m in convo_messages if m.get("senderId") == user_id]
|
| 713 |
+
|
| 714 |
+
if not all(req in sent_texts for req in required_messages):
|
| 715 |
+
return 0.0, "Missing one or more required messages to Harry."
|
| 716 |
+
|
| 717 |
+
# 2. Check search parameters
|
| 718 |
+
search_term = final_state.get("searchTerm", "")
|
| 719 |
+
search_page = final_state.get("searchPage", "")
|
| 720 |
+
|
| 721 |
+
if search_term != "2" or search_page != "MESSAGES":
|
| 722 |
+
return 0.0, f"Search not completed correctly. Expected term='2' and page='MESSAGES', got term='{search_term}', page='{search_page}'."
|
| 723 |
+
|
| 724 |
+
# 3. Check number of messages in search results (five total, four from user, one from Harry)
|
| 725 |
+
harry_msgs = [
|
| 726 |
+
msg for convo in messages
|
| 727 |
+
if convo.get("conversationId") == target_conversation_id
|
| 728 |
+
for msg in convo.get("messages", [])
|
| 729 |
+
]
|
| 730 |
+
|
| 731 |
+
num_from_user = sum(1 for m in harry_msgs if m.get("senderId") == user_id)
|
| 732 |
+
num_from_harry = sum(1 for m in harry_msgs if m.get("senderId") == "harry-potter")
|
| 733 |
+
|
| 734 |
+
if num_from_user == 5 and num_from_harry == 1: # three to harry, one to hermione and tim.
|
| 735 |
+
return 1.0, "Success! Messages sent, search performed, and correct results displayed."
|
| 736 |
+
else:
|
| 737 |
+
return 0.0, f"Incorrect number of messages displayed. Found {num_from_user} from you and {num_from_harry} from Harry."
|
| 738 |
+
|
| 739 |
+
|
| 740 |
+
def _validate_the_a_team(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 741 |
+
"""
|
| 742 |
+
Reward function for the "The A team" task in Microsoft Teams.
|
| 743 |
+
Checks if a group chat with Alex Langford, Alex Langford II, and Anne Peters
|
| 744 |
+
exists and contains the message "The A team" sent by the user.
|
| 745 |
+
|
| 746 |
+
Args:
|
| 747 |
+
initial_state: The initial SPA state (not used here)
|
| 748 |
+
final_state: The final SPA state
|
| 749 |
+
|
| 750 |
+
Returns:
|
| 751 |
+
Tuple of (reward, message)
|
| 752 |
+
reward = 1.0 if group chat exists and message sent, 0.0 otherwise
|
| 753 |
+
"""
|
| 754 |
+
user_id = "you"
|
| 755 |
+
target_users = {"alex-langford", "alex-langford-2", "anne-peters"}
|
| 756 |
+
expected_message = "The A team"
|
| 757 |
+
|
| 758 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 759 |
+
|
| 760 |
+
# Find the group chat containing all three target users
|
| 761 |
+
target_chat = None
|
| 762 |
+
for convo in messages:
|
| 763 |
+
convo_users = set(["alex-langford", "alex-langford-2", "anne-peters"])
|
| 764 |
+
if target_users.issubset(convo_users):
|
| 765 |
+
target_chat = convo
|
| 766 |
+
break
|
| 767 |
+
|
| 768 |
+
if target_chat is None:
|
| 769 |
+
return 0.0, "Group chat with Alex Langford, Alex Langford II, and Anne Peters not found."
|
| 770 |
+
|
| 771 |
+
# Check if the expected message was sent by the user
|
| 772 |
+
for msg in target_chat.get("messages", []):
|
| 773 |
+
if msg.get("senderId") == user_id and msg.get("content") == expected_message:
|
| 774 |
+
return 1.0, "Success! The group chat was created and message sent."
|
| 775 |
+
|
| 776 |
+
return 0.0, f"Group chat exists but message '{expected_message}' was not sent."
|
| 777 |
+
|
| 778 |
+
|
| 779 |
+
def _validate_birthday_for_george(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 780 |
+
"""
|
| 781 |
+
Reward function that checks if the user has:
|
| 782 |
+
1. Created a group chat with Fred Weasley, Hermione Granger, and Harry Potter
|
| 783 |
+
2. Sent the correct message in that group chat
|
| 784 |
+
3. Sent a follow-up message to George Weasley
|
| 785 |
+
4. Typed "Ron Weasley" into the search bar (without pressing enter)
|
| 786 |
+
5. Stayed on the HOME page
|
| 787 |
+
|
| 788 |
+
Args:
|
| 789 |
+
state: The current SPA state as a dictionary
|
| 790 |
+
|
| 791 |
+
Returns:
|
| 792 |
+
Tuple of (reward, message)
|
| 793 |
+
reward = 1.0 if all criteria are met, 0.0 otherwise
|
| 794 |
+
"""
|
| 795 |
+
|
| 796 |
+
user_id = "you"
|
| 797 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 798 |
+
page: str = final_state.get("page", "")
|
| 799 |
+
search_term: str = final_state.get("searchTerm", "").strip().lower()
|
| 800 |
+
|
| 801 |
+
# --- 1. Check for group chat ---
|
| 802 |
+
expected_group_users = {"fred-weasley", "harry-potter", "hermione-granger"}
|
| 803 |
+
group_message_text = "Hey guys, just confirming we're throwing a surprise party for George tomorrow at 3. See you then!"
|
| 804 |
+
|
| 805 |
+
group_chat_found = False
|
| 806 |
+
group_message_ok = False
|
| 807 |
+
george_message_ok = False
|
| 808 |
+
|
| 809 |
+
for convo in messages:
|
| 810 |
+
user_ids = set(convo.get("userIds", []))
|
| 811 |
+
convo_messages = convo.get("messages", [])
|
| 812 |
+
|
| 813 |
+
# Check group chat
|
| 814 |
+
if user_ids == expected_group_users:
|
| 815 |
+
group_chat_found = True
|
| 816 |
+
for msg in convo_messages:
|
| 817 |
+
if msg.get("senderId") == user_id and msg.get("content") == group_message_text:
|
| 818 |
+
group_message_ok = True
|
| 819 |
+
break
|
| 820 |
+
|
| 821 |
+
# Check message to George
|
| 822 |
+
if user_ids == {"george-weasley"}:
|
| 823 |
+
for msg in convo_messages:
|
| 824 |
+
if (
|
| 825 |
+
msg.get("senderId") == user_id
|
| 826 |
+
and msg.get("content")
|
| 827 |
+
== "Hey George, is it your day off tomorrow? I can't remember if you're out."
|
| 828 |
+
):
|
| 829 |
+
george_message_ok = True
|
| 830 |
+
break
|
| 831 |
+
|
| 832 |
+
# --- 2. Check all criteria ---
|
| 833 |
+
if not group_chat_found:
|
| 834 |
+
return 0.0, "Group chat with Fred, Harry, and Hermione not found."
|
| 835 |
+
|
| 836 |
+
if not group_message_ok:
|
| 837 |
+
return 0.0, "Expected message to the group chat not found."
|
| 838 |
+
|
| 839 |
+
if not george_message_ok:
|
| 840 |
+
return 0.0, "Expected message to George Weasley not found."
|
| 841 |
+
|
| 842 |
+
if search_term != "ron weasley":
|
| 843 |
+
return 0.0, f"Search term incorrect. Expected 'Ron Weasley', found '{final_state.get('searchTerm', '')}'."
|
| 844 |
+
|
| 845 |
+
if page != "HOME":
|
| 846 |
+
return 0.0, f"User is not on HOME page (found '{page}')."
|
| 847 |
+
|
| 848 |
+
return 1.0, "Success! All expected actions were completed correctly."
|
| 849 |
+
|
| 850 |
+
def _validate_group_chat_and_hermione(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 851 |
+
"""
|
| 852 |
+
Reward function for validating that:
|
| 853 |
+
1. The user created a group chat with Harry and Hagrid and sent the message:
|
| 854 |
+
"I'll see you both at 2. Looking forward to it!"
|
| 855 |
+
2. Then messaged Hermione saying:
|
| 856 |
+
"Hey Hermione, me, Harry and Hagrid are meeting up if you want to join us!"
|
| 857 |
+
|
| 858 |
+
Args:
|
| 859 |
+
state: The current SPA state as a dictionary
|
| 860 |
+
|
| 861 |
+
Returns:
|
| 862 |
+
Tuple of (reward, message)
|
| 863 |
+
reward = 1.0 if both conditions met, 0.5 if only group chat message sent,
|
| 864 |
+
0.0 otherwise
|
| 865 |
+
"""
|
| 866 |
+
user_id = "you"
|
| 867 |
+
messages: List[Dict[str, Any]] = final_state.get("messages", [])
|
| 868 |
+
|
| 869 |
+
# --- Condition 1: Group chat with Harry and Hagrid ---
|
| 870 |
+
expected_group_users = {"hagrid-cao", "harry-potter"}
|
| 871 |
+
expected_group_message = "I'll see you both at 2. Looking forward to it!"
|
| 872 |
+
group_chat_found = False
|
| 873 |
+
group_message_sent = False
|
| 874 |
+
|
| 875 |
+
for convo in messages:
|
| 876 |
+
convo_users = set(convo.get("userIds", []))
|
| 877 |
+
if convo_users == expected_group_users:
|
| 878 |
+
group_chat_found = True
|
| 879 |
+
for msg in convo.get("messages", []):
|
| 880 |
+
if msg.get("senderId") == user_id and msg.get("content") == expected_group_message:
|
| 881 |
+
group_message_sent = True
|
| 882 |
+
break
|
| 883 |
+
break
|
| 884 |
+
|
| 885 |
+
if not group_chat_found:
|
| 886 |
+
return 0.0, "Group chat with Harry and Hagrid not found."
|
| 887 |
+
|
| 888 |
+
if not group_message_sent:
|
| 889 |
+
return 0.0, f"Group chat found, but expected message '{expected_group_message}' not sent."
|
| 890 |
+
|
| 891 |
+
# --- Condition 2: Message Hermione ---
|
| 892 |
+
hermione_convo = next((c for c in messages if c.get("conversationId") == "hermione-granger"), None)
|
| 893 |
+
expected_hermione_message = "Hey Hermione, me, Harry and Hagrid are meeting up if you want to join us!"
|
| 894 |
+
hermione_message_sent = False
|
| 895 |
+
|
| 896 |
+
if hermione_convo is not None:
|
| 897 |
+
for msg in hermione_convo.get("messages", []):
|
| 898 |
+
if msg.get("senderId") == user_id and msg.get("content") == expected_hermione_message:
|
| 899 |
+
hermione_message_sent = True
|
| 900 |
+
break
|
| 901 |
+
else:
|
| 902 |
+
return 0.5, "Hermione's conversation not found, but group chat message was sent."
|
| 903 |
+
|
| 904 |
+
if group_message_sent and hermione_message_sent:
|
| 905 |
+
return 1.0, "Success! Both group chat message and Hermione message were sent."
|
| 906 |
+
elif group_message_sent:
|
| 907 |
+
return 0.5, "Partial success — group chat message sent, but Hermione message missing."
|
| 908 |
+
else:
|
| 909 |
+
return 0.0, "Messages missing or incorrect."
|
| 910 |
+
|
| 911 |
+
|
| 912 |
+
# Registry of all microsoft teams reward functions
|
| 913 |
+
REWARD_FUNCTIONS_MICROSOFT_TEAMS = {
|
| 914 |
+
"_validate_respond_to_hermione": _validate_respond_to_hermione,
|
| 915 |
+
"_validate_message_tim_white_twice": _validate_message_tim_white_twice,
|
| 916 |
+
"_validate_prepare_to_make_a_new_chat": _validate_prepare_to_make_a_new_chat,
|
| 917 |
+
"_validate_open_search_page_for_hagrid": _validate_open_search_page_for_hagrid,
|
| 918 |
+
"_validate_filter_chats_for_harry": _validate_filter_chats_for_harry,
|
| 919 |
+
"_validate_navigate_to_harrys_files_page": _validate_navigate_to_harrys_files_page,
|
| 920 |
+
"_validate_navigate_to_harrys_photos_page": _validate_navigate_to_harrys_photos_page,
|
| 921 |
+
"_validate_message_hermione_and_then_tim": _validate_message_hermione_and_then_tim,
|
| 922 |
+
"_validate_make_a_group_chat_with_hagrid_and_ron": _validate_make_a_group_chat_with_hagrid_and_ron,
|
| 923 |
+
"_validate_create_a_chat_with_fred_weasely": _validate_create_a_chat_with_fred_weasely,
|
| 924 |
+
"_validate_message_tim_and_select_hermiones_photos": _validate_message_tim_and_select_hermiones_photos,
|
| 925 |
+
"_validate_search_for_messages_containing_hey": _validate_search_for_messages_containing_hey,
|
| 926 |
+
"_validate_message_tim_and_alex_langford": _validate_message_tim_and_alex_langford,
|
| 927 |
+
"_validate_large_group_chat": _validate_large_group_chat,
|
| 928 |
+
"_validate_message_hermione_and_search_for_it": _validate_message_hermione_and_search_for_it,
|
| 929 |
+
"_validate_message_the_third_user_in_the_search": _validate_message_the_third_user_in_the_search,
|
| 930 |
+
"_validate_harry_hagrid_harry_hagrid": _validate_harry_hagrid_harry_hagrid,
|
| 931 |
+
"_validate_message_and_search_for_2": _validate_message_and_search_for_2,
|
| 932 |
+
"_validate_the_a_team": _validate_the_a_team,
|
| 933 |
+
"_validate_birthday_for_george": _validate_birthday_for_george,
|
| 934 |
+
"_validate_group_chat_and_hermione": _validate_group_chat_and_hermione,
|
| 935 |
+
}
|
rewards/outlook.py
ADDED
|
@@ -0,0 +1,951 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Reward functions for Outlook app tasks.
|
| 3 |
+
"""
|
| 4 |
+
|
| 5 |
+
import logging
|
| 6 |
+
from typing import Any, Dict, Tuple
|
| 7 |
+
|
| 8 |
+
logger = logging.getLogger(__name__)
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def _validate_go_to_the_drafts_page(
|
| 12 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 13 |
+
) -> Tuple[float, str]:
|
| 14 |
+
"""
|
| 15 |
+
Validate that the user successfully navigated to the Drafts page.
|
| 16 |
+
|
| 17 |
+
This function checks:
|
| 18 |
+
1. The currentPage is "drafts"
|
| 19 |
+
|
| 20 |
+
Args:
|
| 21 |
+
initial_state: The initial state before navigation
|
| 22 |
+
final_state: The final state after navigation
|
| 23 |
+
|
| 24 |
+
Returns:
|
| 25 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 26 |
+
"""
|
| 27 |
+
try:
|
| 28 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 29 |
+
|
| 30 |
+
# Check: currentPage should be "drafts"
|
| 31 |
+
current_page = final_state.get("currentPage")
|
| 32 |
+
if current_page != "drafts":
|
| 33 |
+
return (
|
| 34 |
+
0.0,
|
| 35 |
+
f"Expected currentPage to be 'drafts', got '{current_page}'",
|
| 36 |
+
)
|
| 37 |
+
|
| 38 |
+
return 1.0, "Successfully navigated to Drafts page"
|
| 39 |
+
|
| 40 |
+
except Exception as e:
|
| 41 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
def _validate_go_to_the_sent_items_page(
|
| 45 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 46 |
+
) -> Tuple[float, str]:
|
| 47 |
+
"""
|
| 48 |
+
Validate that the user successfully navigated to the Sent Items page.
|
| 49 |
+
|
| 50 |
+
This function checks:
|
| 51 |
+
1. The currentPage is "sent"
|
| 52 |
+
|
| 53 |
+
Args:
|
| 54 |
+
initial_state: The initial state before navigation
|
| 55 |
+
final_state: The final state after navigation
|
| 56 |
+
|
| 57 |
+
Returns:
|
| 58 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 59 |
+
"""
|
| 60 |
+
try:
|
| 61 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 62 |
+
|
| 63 |
+
# Check: currentPage should be "sent"
|
| 64 |
+
current_page = final_state.get("currentPage")
|
| 65 |
+
if current_page != "sent":
|
| 66 |
+
return (
|
| 67 |
+
0.0,
|
| 68 |
+
f"Expected currentPage to be 'sent', got '{current_page}'",
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
+
return 1.0, "Successfully navigated to Sent Items page"
|
| 72 |
+
|
| 73 |
+
except Exception as e:
|
| 74 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def _validate_open_an_email_from_the_list(
|
| 78 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 79 |
+
) -> Tuple[float, str]:
|
| 80 |
+
"""
|
| 81 |
+
Validate that the user successfully opened an email from the list.
|
| 82 |
+
|
| 83 |
+
This function checks:
|
| 84 |
+
1. The selectedEmailId is "3" (LinkedIn email)
|
| 85 |
+
2. Email with id "3" has read status set to true
|
| 86 |
+
|
| 87 |
+
Args:
|
| 88 |
+
initial_state: The initial state before opening
|
| 89 |
+
final_state: The final state after opening
|
| 90 |
+
|
| 91 |
+
Returns:
|
| 92 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 93 |
+
"""
|
| 94 |
+
try:
|
| 95 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 96 |
+
|
| 97 |
+
# Check 1: selectedEmailId should be "3"
|
| 98 |
+
selected_email_id = final_state.get("selectedEmailId")
|
| 99 |
+
if selected_email_id != "3":
|
| 100 |
+
return (
|
| 101 |
+
0.0,
|
| 102 |
+
f"Expected selectedEmailId to be '3', got '{selected_email_id}'",
|
| 103 |
+
)
|
| 104 |
+
|
| 105 |
+
# Check 2: Email with id "3" should have read = true
|
| 106 |
+
emails = final_state.get("emails", [])
|
| 107 |
+
email_3 = next((e for e in emails if e.get("id") == "3"), None)
|
| 108 |
+
|
| 109 |
+
if email_3 is None:
|
| 110 |
+
return 0.0, "Email with id '3' not found in emails array"
|
| 111 |
+
|
| 112 |
+
if not email_3.get("read"):
|
| 113 |
+
return (
|
| 114 |
+
0.0,
|
| 115 |
+
f"Expected email '3' to have read=true, got read={email_3.get('read')}",
|
| 116 |
+
)
|
| 117 |
+
|
| 118 |
+
return 1.0, "Successfully opened email from the list"
|
| 119 |
+
|
| 120 |
+
except Exception as e:
|
| 121 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
def _validate_delete_an_email_from_the_list(
|
| 125 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 126 |
+
) -> Tuple[float, str]:
|
| 127 |
+
"""
|
| 128 |
+
Validate that the user successfully deleted an email from the list.
|
| 129 |
+
|
| 130 |
+
This function checks:
|
| 131 |
+
1. Email with id "3" (LinkedIn) is removed from the emails array
|
| 132 |
+
|
| 133 |
+
Args:
|
| 134 |
+
initial_state: The initial state before deletion
|
| 135 |
+
final_state: The final state after deletion
|
| 136 |
+
|
| 137 |
+
Returns:
|
| 138 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 139 |
+
"""
|
| 140 |
+
try:
|
| 141 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 142 |
+
|
| 143 |
+
# Check: Email with id "3" should not exist in emails array
|
| 144 |
+
emails = final_state.get("emails", [])
|
| 145 |
+
email_3 = next((e for e in emails if e.get("id") == "3"), None)
|
| 146 |
+
|
| 147 |
+
if email_3 is not None:
|
| 148 |
+
return 0.0, "Email with id '3' (LinkedIn) still exists, should be deleted"
|
| 149 |
+
|
| 150 |
+
return 1.0, "Successfully deleted email from the list"
|
| 151 |
+
|
| 152 |
+
except Exception as e:
|
| 153 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
def _validate_flag_an_email(
|
| 157 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 158 |
+
) -> Tuple[float, str]:
|
| 159 |
+
"""
|
| 160 |
+
Validate that the user successfully flagged an email.
|
| 161 |
+
|
| 162 |
+
This function checks:
|
| 163 |
+
1. Email with id "3" (LinkedIn) has flagged status set to true
|
| 164 |
+
|
| 165 |
+
Args:
|
| 166 |
+
initial_state: The initial state before flagging
|
| 167 |
+
final_state: The final state after flagging
|
| 168 |
+
|
| 169 |
+
Returns:
|
| 170 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 171 |
+
"""
|
| 172 |
+
try:
|
| 173 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 174 |
+
|
| 175 |
+
# Check: Email with id "3" should have flagged = true
|
| 176 |
+
emails = final_state.get("emails", [])
|
| 177 |
+
email_3 = next((e for e in emails if e.get("id") == "3"), None)
|
| 178 |
+
|
| 179 |
+
if email_3 is None:
|
| 180 |
+
return 0.0, "Email with id '3' not found in emails array"
|
| 181 |
+
|
| 182 |
+
if not email_3.get("flagged"):
|
| 183 |
+
return (
|
| 184 |
+
0.0,
|
| 185 |
+
f"Expected email '3' to have flagged=true, got flagged={email_3.get('flagged')}",
|
| 186 |
+
)
|
| 187 |
+
|
| 188 |
+
return 1.0, "Successfully flagged the email"
|
| 189 |
+
|
| 190 |
+
except Exception as e:
|
| 191 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 192 |
+
|
| 193 |
+
|
| 194 |
+
def _validate_pin_an_email(
|
| 195 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 196 |
+
) -> Tuple[float, str]:
|
| 197 |
+
"""
|
| 198 |
+
Validate that the user successfully pinned an email.
|
| 199 |
+
|
| 200 |
+
This function checks:
|
| 201 |
+
1. Email with id "6" (Google Calendar) has pinned status set to true
|
| 202 |
+
|
| 203 |
+
Args:
|
| 204 |
+
initial_state: The initial state before pinning
|
| 205 |
+
final_state: The final state after pinning
|
| 206 |
+
|
| 207 |
+
Returns:
|
| 208 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 209 |
+
"""
|
| 210 |
+
try:
|
| 211 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 212 |
+
|
| 213 |
+
# Check: Email with id "6" should have pinned = true
|
| 214 |
+
emails = final_state.get("emails", [])
|
| 215 |
+
email_6 = next((e for e in emails if e.get("id") == "6"), None)
|
| 216 |
+
|
| 217 |
+
if email_6 is None:
|
| 218 |
+
return 0.0, "Email with id '6' not found in emails array"
|
| 219 |
+
|
| 220 |
+
if not email_6.get("pinned"):
|
| 221 |
+
return (
|
| 222 |
+
0.0,
|
| 223 |
+
f"Expected email '6' to have pinned=true, got pinned={email_6.get('pinned')}",
|
| 224 |
+
)
|
| 225 |
+
|
| 226 |
+
return 1.0, "Successfully pinned the email"
|
| 227 |
+
|
| 228 |
+
except Exception as e:
|
| 229 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 230 |
+
|
| 231 |
+
|
| 232 |
+
def _validate_toggle_read_on_an_email(
|
| 233 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 234 |
+
) -> Tuple[float, str]:
|
| 235 |
+
"""
|
| 236 |
+
Validate that the user successfully toggled read status on an email.
|
| 237 |
+
|
| 238 |
+
This function checks:
|
| 239 |
+
1. Email with id "3" (LinkedIn) has read status set to true
|
| 240 |
+
|
| 241 |
+
Args:
|
| 242 |
+
initial_state: The initial state before toggling
|
| 243 |
+
final_state: The final state after toggling
|
| 244 |
+
|
| 245 |
+
Returns:
|
| 246 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 247 |
+
"""
|
| 248 |
+
try:
|
| 249 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 250 |
+
|
| 251 |
+
# Check: Email with id "3" should have read = true
|
| 252 |
+
emails = final_state.get("emails", [])
|
| 253 |
+
email_3 = next((e for e in emails if e.get("id") == "3"), None)
|
| 254 |
+
|
| 255 |
+
if email_3 is None:
|
| 256 |
+
return 0.0, "Email with id '3' not found in emails array"
|
| 257 |
+
|
| 258 |
+
if not email_3.get("read"):
|
| 259 |
+
return (
|
| 260 |
+
0.0,
|
| 261 |
+
f"Expected email '3' to have read=true, got read={email_3.get('read')}",
|
| 262 |
+
)
|
| 263 |
+
|
| 264 |
+
return 1.0, "Successfully toggled read status on the email"
|
| 265 |
+
|
| 266 |
+
except Exception as e:
|
| 267 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 268 |
+
|
| 269 |
+
|
| 270 |
+
def _validate_toggle_unread_on_an_email(
|
| 271 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 272 |
+
) -> Tuple[float, str]:
|
| 273 |
+
"""
|
| 274 |
+
Validate that the user successfully toggled unread status on an email.
|
| 275 |
+
|
| 276 |
+
This function checks:
|
| 277 |
+
1. Email with id "2" (Netflix) has read status set to false
|
| 278 |
+
|
| 279 |
+
Args:
|
| 280 |
+
initial_state: The initial state before toggling
|
| 281 |
+
final_state: The final state after toggling
|
| 282 |
+
|
| 283 |
+
Returns:
|
| 284 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 285 |
+
"""
|
| 286 |
+
try:
|
| 287 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 288 |
+
|
| 289 |
+
# Check: Email with id "2" should have read = false
|
| 290 |
+
emails = final_state.get("emails", [])
|
| 291 |
+
email_2 = next((e for e in emails if e.get("id") == "2"), None)
|
| 292 |
+
|
| 293 |
+
if email_2 is None:
|
| 294 |
+
return 0.0, "Email with id '2' not found in emails array"
|
| 295 |
+
|
| 296 |
+
if email_2.get("read"):
|
| 297 |
+
return (
|
| 298 |
+
0.0,
|
| 299 |
+
f"Expected email '2' to have read=false, got read={email_2.get('read')}",
|
| 300 |
+
)
|
| 301 |
+
|
| 302 |
+
return 1.0, "Successfully toggled unread status on the email"
|
| 303 |
+
|
| 304 |
+
except Exception as e:
|
| 305 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 306 |
+
|
| 307 |
+
|
| 308 |
+
def _validate_compose_a_new_draft(
|
| 309 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 310 |
+
) -> Tuple[float, str]:
|
| 311 |
+
"""
|
| 312 |
+
Validate that the user successfully composed a new draft.
|
| 313 |
+
|
| 314 |
+
This function checks:
|
| 315 |
+
1. A new draft email exists (id starts with "draft-")
|
| 316 |
+
2. The currentPage is "drafts"
|
| 317 |
+
3. The selectedEmailId is set to the new draft
|
| 318 |
+
|
| 319 |
+
Args:
|
| 320 |
+
initial_state: The initial state before composing
|
| 321 |
+
final_state: The final state after composing
|
| 322 |
+
|
| 323 |
+
Returns:
|
| 324 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 325 |
+
"""
|
| 326 |
+
try:
|
| 327 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 328 |
+
|
| 329 |
+
# Check 1: currentPage should be "drafts"
|
| 330 |
+
current_page = final_state.get("currentPage")
|
| 331 |
+
if current_page != "drafts":
|
| 332 |
+
return (
|
| 333 |
+
0.0,
|
| 334 |
+
f"Expected currentPage to be 'drafts', got '{current_page}'",
|
| 335 |
+
)
|
| 336 |
+
|
| 337 |
+
# Check 2: Find a new draft email
|
| 338 |
+
emails = final_state.get("emails", [])
|
| 339 |
+
new_draft = next(
|
| 340 |
+
(e for e in emails if e.get("id", "").startswith("draft-") and e.get("folder") == "drafts"),
|
| 341 |
+
None
|
| 342 |
+
)
|
| 343 |
+
|
| 344 |
+
if new_draft is None:
|
| 345 |
+
return 0.0, "No new draft email found with id starting with 'draft-'"
|
| 346 |
+
|
| 347 |
+
# Check 3: selectedEmailId should be set to the new draft
|
| 348 |
+
selected_email_id = final_state.get("selectedEmailId")
|
| 349 |
+
if selected_email_id != new_draft.get("id"):
|
| 350 |
+
return (
|
| 351 |
+
0.0,
|
| 352 |
+
f"Expected selectedEmailId to be '{new_draft.get('id')}', got '{selected_email_id}'",
|
| 353 |
+
)
|
| 354 |
+
|
| 355 |
+
return 1.0, "Successfully composed a new draft"
|
| 356 |
+
|
| 357 |
+
except Exception as e:
|
| 358 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 359 |
+
|
| 360 |
+
|
| 361 |
+
def _validate_fill_draft_fields(
|
| 362 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 363 |
+
) -> Tuple[float, str]:
|
| 364 |
+
"""
|
| 365 |
+
Validate that the user successfully filled draft fields.
|
| 366 |
+
|
| 367 |
+
This function checks:
|
| 368 |
+
1. The draft email has to="teammate@example.com"
|
| 369 |
+
2. The draft email has subject="Weekly update"
|
| 370 |
+
3. The draft email has body containing "This is an update from me!"
|
| 371 |
+
|
| 372 |
+
Args:
|
| 373 |
+
initial_state: The initial state before filling
|
| 374 |
+
final_state: The final state after filling
|
| 375 |
+
|
| 376 |
+
Returns:
|
| 377 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 378 |
+
"""
|
| 379 |
+
try:
|
| 380 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 381 |
+
|
| 382 |
+
# Find the draft email
|
| 383 |
+
emails = final_state.get("emails", [])
|
| 384 |
+
draft_email = next(
|
| 385 |
+
(e for e in emails if e.get("id", "").startswith("draft-") and e.get("folder") == "drafts"),
|
| 386 |
+
None
|
| 387 |
+
)
|
| 388 |
+
|
| 389 |
+
if draft_email is None:
|
| 390 |
+
return 0.0, "No draft email found"
|
| 391 |
+
|
| 392 |
+
# Check 1: to field should be "teammate@example.com"
|
| 393 |
+
to_field = draft_email.get("to", "")
|
| 394 |
+
if to_field != "teammate@example.com":
|
| 395 |
+
return (
|
| 396 |
+
0.0,
|
| 397 |
+
f"Expected 'to' field to be 'teammate@example.com', got '{to_field}'",
|
| 398 |
+
)
|
| 399 |
+
|
| 400 |
+
# Check 2: subject should be "Weekly update"
|
| 401 |
+
subject = draft_email.get("subject", "")
|
| 402 |
+
if subject != "Weekly update":
|
| 403 |
+
return (
|
| 404 |
+
0.0,
|
| 405 |
+
f"Expected subject to be 'Weekly update', got '{subject}'",
|
| 406 |
+
)
|
| 407 |
+
|
| 408 |
+
# Check 3: body should contain "This is an update from me!"
|
| 409 |
+
body = draft_email.get("body", "")
|
| 410 |
+
if "This is an update from me!" not in body:
|
| 411 |
+
return (
|
| 412 |
+
0.0,
|
| 413 |
+
f"Expected body to contain 'This is an update from me!', got '{body}'",
|
| 414 |
+
)
|
| 415 |
+
|
| 416 |
+
return 1.0, "Successfully filled draft fields"
|
| 417 |
+
|
| 418 |
+
except Exception as e:
|
| 419 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
def _validate_send_the_draft(
|
| 423 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 424 |
+
) -> Tuple[float, str]:
|
| 425 |
+
"""
|
| 426 |
+
Validate that the user successfully sent the draft.
|
| 427 |
+
|
| 428 |
+
This function checks:
|
| 429 |
+
1. The currentPage is "sent"
|
| 430 |
+
2. A new sent email exists with id starting with "sent-"
|
| 431 |
+
3. The sent email has to="teammate@example.com"
|
| 432 |
+
4. The sent email has subject="Weekly update"
|
| 433 |
+
5. The sent email has body="This is an update from me!"
|
| 434 |
+
6. The sent email has folder="sent"
|
| 435 |
+
|
| 436 |
+
Args:
|
| 437 |
+
initial_state: The initial state before sending
|
| 438 |
+
final_state: The final state after sending
|
| 439 |
+
|
| 440 |
+
Returns:
|
| 441 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 442 |
+
"""
|
| 443 |
+
try:
|
| 444 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 445 |
+
|
| 446 |
+
# Check 1: currentPage should be "sent"
|
| 447 |
+
current_page = final_state.get("currentPage")
|
| 448 |
+
if current_page != "sent":
|
| 449 |
+
return (
|
| 450 |
+
0.0,
|
| 451 |
+
f"Expected currentPage to be 'sent', got '{current_page}'",
|
| 452 |
+
)
|
| 453 |
+
|
| 454 |
+
# Check 2: Find a new sent email
|
| 455 |
+
emails = final_state.get("emails", [])
|
| 456 |
+
sent_email = next(
|
| 457 |
+
(e for e in emails if e.get("id", "").startswith("sent-") and e.get("folder") == "sent"),
|
| 458 |
+
None
|
| 459 |
+
)
|
| 460 |
+
|
| 461 |
+
if sent_email is None:
|
| 462 |
+
return 0.0, "No new sent email found with id starting with 'sent-'"
|
| 463 |
+
|
| 464 |
+
# Check 3: to field should be "teammate@example.com"
|
| 465 |
+
to_field = sent_email.get("to", "")
|
| 466 |
+
if to_field != "teammate@example.com":
|
| 467 |
+
return (
|
| 468 |
+
0.0,
|
| 469 |
+
f"Expected 'to' field to be 'teammate@example.com', got '{to_field}'",
|
| 470 |
+
)
|
| 471 |
+
|
| 472 |
+
# Check 4: subject should be "Weekly update"
|
| 473 |
+
subject = sent_email.get("subject", "")
|
| 474 |
+
if subject != "Weekly update":
|
| 475 |
+
return (
|
| 476 |
+
0.0,
|
| 477 |
+
f"Expected subject to be 'Weekly update', got '{subject}'",
|
| 478 |
+
)
|
| 479 |
+
|
| 480 |
+
# Check 5: body should be "This is an update from me!"
|
| 481 |
+
body = sent_email.get("body", "")
|
| 482 |
+
if body.strip() != "This is an update from me!":
|
| 483 |
+
return (
|
| 484 |
+
0.0,
|
| 485 |
+
f"Expected body to be 'This is an update from me!', got '{body}'",
|
| 486 |
+
)
|
| 487 |
+
|
| 488 |
+
return 1.0, "Successfully sent the draft"
|
| 489 |
+
|
| 490 |
+
except Exception as e:
|
| 491 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 492 |
+
|
| 493 |
+
|
| 494 |
+
def _validate_discard_a_draft(
|
| 495 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 496 |
+
) -> Tuple[float, str]:
|
| 497 |
+
"""
|
| 498 |
+
Validate that the user successfully discarded a draft.
|
| 499 |
+
|
| 500 |
+
This function checks:
|
| 501 |
+
1. Email with id "13" (Weekend plans draft) is removed from emails array
|
| 502 |
+
2. The currentPage is "drafts"
|
| 503 |
+
3. The selectedEmailId is null
|
| 504 |
+
|
| 505 |
+
Args:
|
| 506 |
+
initial_state: The initial state before discarding
|
| 507 |
+
final_state: The final state after discarding
|
| 508 |
+
|
| 509 |
+
Returns:
|
| 510 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 511 |
+
"""
|
| 512 |
+
try:
|
| 513 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 514 |
+
|
| 515 |
+
# Check 1: Email with id "13" should not exist
|
| 516 |
+
emails = final_state.get("emails", [])
|
| 517 |
+
email_13 = next((e for e in emails if e.get("id") == "13"), None)
|
| 518 |
+
|
| 519 |
+
if email_13 is not None:
|
| 520 |
+
return 0.0, "Email with id '13' still exists, should be discarded"
|
| 521 |
+
|
| 522 |
+
# Check 2: currentPage should be "drafts"
|
| 523 |
+
current_page = final_state.get("currentPage")
|
| 524 |
+
if current_page != "drafts":
|
| 525 |
+
return (
|
| 526 |
+
0.0,
|
| 527 |
+
f"Expected currentPage to be 'drafts', got '{current_page}'",
|
| 528 |
+
)
|
| 529 |
+
|
| 530 |
+
# Check 3: selectedEmailId should be null
|
| 531 |
+
selected_email_id = final_state.get("selectedEmailId")
|
| 532 |
+
if selected_email_id is not None:
|
| 533 |
+
return (
|
| 534 |
+
0.0,
|
| 535 |
+
f"Expected selectedEmailId to be null, got '{selected_email_id}'",
|
| 536 |
+
)
|
| 537 |
+
|
| 538 |
+
return 1.0, "Successfully discarded the draft"
|
| 539 |
+
|
| 540 |
+
except Exception as e:
|
| 541 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 542 |
+
|
| 543 |
+
|
| 544 |
+
def _validate_type_to_show_search_suggestions(
|
| 545 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 546 |
+
) -> Tuple[float, str]:
|
| 547 |
+
"""
|
| 548 |
+
Validate that the user successfully typed to show search suggestions.
|
| 549 |
+
|
| 550 |
+
This function checks:
|
| 551 |
+
1. The searchQuery is "GitHub"
|
| 552 |
+
2. The searchInputValue is "GitHub"
|
| 553 |
+
3. The isSearchExpanded is true
|
| 554 |
+
|
| 555 |
+
Args:
|
| 556 |
+
initial_state: The initial state before typing
|
| 557 |
+
final_state: The final state after typing
|
| 558 |
+
|
| 559 |
+
Returns:
|
| 560 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 561 |
+
"""
|
| 562 |
+
try:
|
| 563 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 564 |
+
|
| 565 |
+
# Check 1: searchQuery should be "GitHub"
|
| 566 |
+
search_query = final_state.get("searchQuery", "")
|
| 567 |
+
if search_query != "GitHub":
|
| 568 |
+
return (
|
| 569 |
+
0.0,
|
| 570 |
+
f"Expected searchQuery to be 'GitHub', got '{search_query}'",
|
| 571 |
+
)
|
| 572 |
+
|
| 573 |
+
# Check 2: searchInputValue should be "GitHub"
|
| 574 |
+
search_input_value = final_state.get("searchInputValue", "")
|
| 575 |
+
if search_input_value != "GitHub":
|
| 576 |
+
return (
|
| 577 |
+
0.0,
|
| 578 |
+
f"Expected searchInputValue to be 'GitHub', got '{search_input_value}'",
|
| 579 |
+
)
|
| 580 |
+
|
| 581 |
+
# Check 3: isSearchExpanded should be true
|
| 582 |
+
is_search_expanded = final_state.get("isSearchExpanded")
|
| 583 |
+
if not is_search_expanded:
|
| 584 |
+
return (
|
| 585 |
+
0.0,
|
| 586 |
+
f"Expected isSearchExpanded to be true, got '{is_search_expanded}'",
|
| 587 |
+
)
|
| 588 |
+
|
| 589 |
+
return 1.0, "Successfully typed to show search suggestions"
|
| 590 |
+
|
| 591 |
+
except Exception as e:
|
| 592 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 593 |
+
|
| 594 |
+
|
| 595 |
+
def _validate_submit_a_search_with_enter(
|
| 596 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 597 |
+
) -> Tuple[float, str]:
|
| 598 |
+
"""
|
| 599 |
+
Validate that the user successfully submitted a search with enter.
|
| 600 |
+
|
| 601 |
+
This function checks:
|
| 602 |
+
1. The currentPage is "search"
|
| 603 |
+
2. The searchQuery is "user"
|
| 604 |
+
3. The searchInputValue is "user"
|
| 605 |
+
|
| 606 |
+
Args:
|
| 607 |
+
initial_state: The initial state before submitting
|
| 608 |
+
final_state: The final state after submitting
|
| 609 |
+
|
| 610 |
+
Returns:
|
| 611 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 612 |
+
"""
|
| 613 |
+
try:
|
| 614 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 615 |
+
|
| 616 |
+
# Check 1: currentPage should be "search"
|
| 617 |
+
current_page = final_state.get("currentPage")
|
| 618 |
+
if current_page != "search":
|
| 619 |
+
return (
|
| 620 |
+
0.0,
|
| 621 |
+
f"Expected currentPage to be 'search', got '{current_page}'",
|
| 622 |
+
)
|
| 623 |
+
|
| 624 |
+
# Check 2: searchQuery should be "user"
|
| 625 |
+
search_query = final_state.get("searchQuery", "")
|
| 626 |
+
if search_query != "user":
|
| 627 |
+
return (
|
| 628 |
+
0.0,
|
| 629 |
+
f"Expected searchQuery to be 'user', got '{search_query}'",
|
| 630 |
+
)
|
| 631 |
+
|
| 632 |
+
# Check 3: searchInputValue should be "user"
|
| 633 |
+
search_input_value = final_state.get("searchInputValue", "")
|
| 634 |
+
if search_input_value != "user":
|
| 635 |
+
return (
|
| 636 |
+
0.0,
|
| 637 |
+
f"Expected searchInputValue to be 'user', got '{search_input_value}'",
|
| 638 |
+
)
|
| 639 |
+
|
| 640 |
+
return 1.0, "Successfully submitted search with enter"
|
| 641 |
+
|
| 642 |
+
except Exception as e:
|
| 643 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 644 |
+
|
| 645 |
+
|
| 646 |
+
def _validate_open_an_email_from_the_search_dropdown(
|
| 647 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 648 |
+
) -> Tuple[float, str]:
|
| 649 |
+
"""
|
| 650 |
+
Validate that the user successfully opened an email from the search dropdown.
|
| 651 |
+
|
| 652 |
+
This function checks:
|
| 653 |
+
1. The currentPage is "search"
|
| 654 |
+
2. The selectedEmailId is "1"
|
| 655 |
+
3. Email with id "1" has read status set to true
|
| 656 |
+
|
| 657 |
+
Args:
|
| 658 |
+
initial_state: The initial state before opening
|
| 659 |
+
final_state: The final state after opening
|
| 660 |
+
|
| 661 |
+
Returns:
|
| 662 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 663 |
+
"""
|
| 664 |
+
try:
|
| 665 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 666 |
+
|
| 667 |
+
# Check 1: currentPage should be "search"
|
| 668 |
+
current_page = final_state.get("currentPage")
|
| 669 |
+
if current_page != "search":
|
| 670 |
+
return (
|
| 671 |
+
0.0,
|
| 672 |
+
f"Expected currentPage to be 'search', got '{current_page}'",
|
| 673 |
+
)
|
| 674 |
+
|
| 675 |
+
# Check 2: selectedEmailId should be "1"
|
| 676 |
+
selected_email_id = final_state.get("selectedEmailId")
|
| 677 |
+
if selected_email_id != "1":
|
| 678 |
+
return (
|
| 679 |
+
0.0,
|
| 680 |
+
f"Expected selectedEmailId to be '1', got '{selected_email_id}'",
|
| 681 |
+
)
|
| 682 |
+
|
| 683 |
+
# Check 3: Email with id "1" should have read = true
|
| 684 |
+
emails = final_state.get("emails", [])
|
| 685 |
+
email_1 = next((e for e in emails if e.get("id") == "1"), None)
|
| 686 |
+
|
| 687 |
+
if email_1 is None:
|
| 688 |
+
return 0.0, "Email with id '1' not found in emails array"
|
| 689 |
+
|
| 690 |
+
if not email_1.get("read"):
|
| 691 |
+
return (
|
| 692 |
+
0.0,
|
| 693 |
+
f"Expected email '1' to have read=true, got read={email_1.get('read')}",
|
| 694 |
+
)
|
| 695 |
+
|
| 696 |
+
return 1.0, "Successfully opened email from search dropdown"
|
| 697 |
+
|
| 698 |
+
except Exception as e:
|
| 699 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 700 |
+
|
| 701 |
+
|
| 702 |
+
def _validate_apply_the_has_attachments_filter(
|
| 703 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 704 |
+
) -> Tuple[float, str]:
|
| 705 |
+
"""
|
| 706 |
+
Validate that the user successfully applied the has attachments filter.
|
| 707 |
+
|
| 708 |
+
This function checks:
|
| 709 |
+
1. The currentPage is "search"
|
| 710 |
+
2. The searchFilters includes "hasAttachments"
|
| 711 |
+
|
| 712 |
+
Args:
|
| 713 |
+
initial_state: The initial state before applying filter
|
| 714 |
+
final_state: The final state after applying filter
|
| 715 |
+
|
| 716 |
+
Returns:
|
| 717 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 718 |
+
"""
|
| 719 |
+
try:
|
| 720 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 721 |
+
|
| 722 |
+
# Check 1: currentPage should be "search"
|
| 723 |
+
current_page = final_state.get("currentPage")
|
| 724 |
+
if current_page != "search":
|
| 725 |
+
return (
|
| 726 |
+
0.0,
|
| 727 |
+
f"Expected currentPage to be 'search', got '{current_page}'",
|
| 728 |
+
)
|
| 729 |
+
|
| 730 |
+
# Check 2: searchFilters should include "hasAttachments"
|
| 731 |
+
search_filters = final_state.get("searchFilters", [])
|
| 732 |
+
if "hasAttachments" not in search_filters:
|
| 733 |
+
return (
|
| 734 |
+
0.0,
|
| 735 |
+
f"Expected searchFilters to include 'hasAttachments', got {search_filters}",
|
| 736 |
+
)
|
| 737 |
+
|
| 738 |
+
return 1.0, "Successfully applied has attachments filter"
|
| 739 |
+
|
| 740 |
+
except Exception as e:
|
| 741 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 742 |
+
|
| 743 |
+
|
| 744 |
+
def _validate_apply_the_unread_search_filter(
|
| 745 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 746 |
+
) -> Tuple[float, str]:
|
| 747 |
+
"""
|
| 748 |
+
Validate that the user successfully applied the unread search filter.
|
| 749 |
+
|
| 750 |
+
This function checks:
|
| 751 |
+
1. The currentPage is "search"
|
| 752 |
+
2. The searchFilters includes "unreads"
|
| 753 |
+
|
| 754 |
+
Args:
|
| 755 |
+
initial_state: The initial state before applying filter
|
| 756 |
+
final_state: The final state after applying filter
|
| 757 |
+
|
| 758 |
+
Returns:
|
| 759 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 760 |
+
"""
|
| 761 |
+
try:
|
| 762 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 763 |
+
|
| 764 |
+
# Check 1: currentPage should be "search"
|
| 765 |
+
current_page = final_state.get("currentPage")
|
| 766 |
+
if current_page != "search":
|
| 767 |
+
return (
|
| 768 |
+
0.0,
|
| 769 |
+
f"Expected currentPage to be 'search', got '{current_page}'",
|
| 770 |
+
)
|
| 771 |
+
|
| 772 |
+
# Check 2: searchFilters should include "unreads"
|
| 773 |
+
search_filters = final_state.get("searchFilters", [])
|
| 774 |
+
if "unreads" not in search_filters:
|
| 775 |
+
return (
|
| 776 |
+
0.0,
|
| 777 |
+
f"Expected searchFilters to include 'unreads', got {search_filters}",
|
| 778 |
+
)
|
| 779 |
+
|
| 780 |
+
return 1.0, "Successfully applied unread search filter"
|
| 781 |
+
|
| 782 |
+
except Exception as e:
|
| 783 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 784 |
+
|
| 785 |
+
|
| 786 |
+
def _validate_choose_sent_items_from_the_folder_selector(
|
| 787 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 788 |
+
) -> Tuple[float, str]:
|
| 789 |
+
"""
|
| 790 |
+
Validate that the user successfully chose sent items from the folder selector.
|
| 791 |
+
|
| 792 |
+
This function checks:
|
| 793 |
+
1. The isSearchExpanded is true
|
| 794 |
+
2. The selectedFolder is "sent"
|
| 795 |
+
|
| 796 |
+
Args:
|
| 797 |
+
initial_state: The initial state before selecting
|
| 798 |
+
final_state: The final state after selecting
|
| 799 |
+
|
| 800 |
+
Returns:
|
| 801 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 802 |
+
"""
|
| 803 |
+
try:
|
| 804 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 805 |
+
|
| 806 |
+
# Check 1: isSearchExpanded should be true
|
| 807 |
+
is_search_expanded = final_state.get("isSearchExpanded")
|
| 808 |
+
if not is_search_expanded:
|
| 809 |
+
return (
|
| 810 |
+
0.0,
|
| 811 |
+
f"Expected isSearchExpanded to be true, got '{is_search_expanded}'",
|
| 812 |
+
)
|
| 813 |
+
|
| 814 |
+
# Check 2: selectedFolder should be "sent"
|
| 815 |
+
selected_folder = final_state.get("selectedFolder")
|
| 816 |
+
if selected_folder != "sent":
|
| 817 |
+
return (
|
| 818 |
+
0.0,
|
| 819 |
+
f"Expected selectedFolder to be 'sent', got '{selected_folder}'",
|
| 820 |
+
)
|
| 821 |
+
|
| 822 |
+
return 1.0, "Successfully chose sent items from folder selector"
|
| 823 |
+
|
| 824 |
+
except Exception as e:
|
| 825 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 826 |
+
|
| 827 |
+
|
| 828 |
+
def _validate_collapse_the_favorites_section(
|
| 829 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 830 |
+
) -> Tuple[float, str]:
|
| 831 |
+
"""
|
| 832 |
+
Validate that the user successfully collapsed the favorites section.
|
| 833 |
+
|
| 834 |
+
This function checks:
|
| 835 |
+
1. The isFavoritesOpen is false
|
| 836 |
+
|
| 837 |
+
Args:
|
| 838 |
+
initial_state: The initial state before collapsing
|
| 839 |
+
final_state: The final state after collapsing
|
| 840 |
+
|
| 841 |
+
Returns:
|
| 842 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 843 |
+
"""
|
| 844 |
+
try:
|
| 845 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 846 |
+
|
| 847 |
+
# Check: isFavoritesOpen should be false
|
| 848 |
+
is_favorites_open = final_state.get("isFavoritesOpen")
|
| 849 |
+
if is_favorites_open:
|
| 850 |
+
return (
|
| 851 |
+
0.0,
|
| 852 |
+
f"Expected isFavoritesOpen to be false, got '{is_favorites_open}'",
|
| 853 |
+
)
|
| 854 |
+
|
| 855 |
+
return 1.0, "Successfully collapsed the favorites section"
|
| 856 |
+
|
| 857 |
+
except Exception as e:
|
| 858 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 859 |
+
|
| 860 |
+
|
| 861 |
+
def _validate_expand_the_navigation_sidebar(
|
| 862 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 863 |
+
) -> Tuple[float, str]:
|
| 864 |
+
"""
|
| 865 |
+
Validate that the user successfully expanded the navigation sidebar.
|
| 866 |
+
|
| 867 |
+
This function checks:
|
| 868 |
+
1. The sidebarCollapsed is false
|
| 869 |
+
|
| 870 |
+
Args:
|
| 871 |
+
initial_state: The initial state before expanding
|
| 872 |
+
final_state: The final state after expanding
|
| 873 |
+
|
| 874 |
+
Returns:
|
| 875 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 876 |
+
"""
|
| 877 |
+
try:
|
| 878 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 879 |
+
|
| 880 |
+
# Check: sidebarCollapsed should be false
|
| 881 |
+
sidebar_collapsed = final_state.get("sidebarCollapsed")
|
| 882 |
+
if sidebar_collapsed:
|
| 883 |
+
return (
|
| 884 |
+
0.0,
|
| 885 |
+
f"Expected sidebarCollapsed to be false, got '{sidebar_collapsed}'",
|
| 886 |
+
)
|
| 887 |
+
|
| 888 |
+
return 1.0, "Successfully expanded the navigation sidebar"
|
| 889 |
+
|
| 890 |
+
except Exception as e:
|
| 891 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 892 |
+
|
| 893 |
+
|
| 894 |
+
def _validate_collapse_the_navigation_sidebar(
|
| 895 |
+
initial_state: Dict[str, Any], final_state: Dict[str, Any]
|
| 896 |
+
) -> Tuple[float, str]:
|
| 897 |
+
"""
|
| 898 |
+
Validate that the user successfully collapsed the navigation sidebar.
|
| 899 |
+
|
| 900 |
+
This function checks:
|
| 901 |
+
1. The sidebarCollapsed is true
|
| 902 |
+
|
| 903 |
+
Args:
|
| 904 |
+
initial_state: The initial state before collapsing
|
| 905 |
+
final_state: The final state after collapsing
|
| 906 |
+
|
| 907 |
+
Returns:
|
| 908 |
+
Tuple of (score, reason) where score is 1.0 for success, 0.0 for failure
|
| 909 |
+
"""
|
| 910 |
+
try:
|
| 911 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 912 |
+
|
| 913 |
+
# Check: sidebarCollapsed should be true
|
| 914 |
+
sidebar_collapsed = final_state.get("sidebarCollapsed")
|
| 915 |
+
if not sidebar_collapsed:
|
| 916 |
+
return (
|
| 917 |
+
0.0,
|
| 918 |
+
f"Expected sidebarCollapsed to be true, got '{sidebar_collapsed}'",
|
| 919 |
+
)
|
| 920 |
+
|
| 921 |
+
return 1.0, "Successfully collapsed the navigation sidebar"
|
| 922 |
+
|
| 923 |
+
except Exception as e:
|
| 924 |
+
return 0.0, f"Error during validation: {str(e)}"
|
| 925 |
+
|
| 926 |
+
|
| 927 |
+
# Registry of all Outlook reward functions
|
| 928 |
+
REWARD_FUNCTIONS_OUTLOOK = {
|
| 929 |
+
"_validate_go_to_the_drafts_page": _validate_go_to_the_drafts_page,
|
| 930 |
+
"_validate_go_to_the_sent_items_page": _validate_go_to_the_sent_items_page,
|
| 931 |
+
"_validate_open_an_email_from_the_list": _validate_open_an_email_from_the_list,
|
| 932 |
+
"_validate_delete_an_email_from_the_list": _validate_delete_an_email_from_the_list,
|
| 933 |
+
"_validate_flag_an_email": _validate_flag_an_email,
|
| 934 |
+
"_validate_pin_an_email": _validate_pin_an_email,
|
| 935 |
+
"_validate_toggle_read_on_an_email": _validate_toggle_read_on_an_email,
|
| 936 |
+
"_validate_toggle_unread_on_an_email": _validate_toggle_unread_on_an_email,
|
| 937 |
+
"_validate_compose_a_new_draft": _validate_compose_a_new_draft,
|
| 938 |
+
"_validate_fill_draft_fields": _validate_fill_draft_fields,
|
| 939 |
+
"_validate_send_the_draft": _validate_send_the_draft,
|
| 940 |
+
"_validate_discard_a_draft": _validate_discard_a_draft,
|
| 941 |
+
"_validate_type_to_show_search_suggestions": _validate_type_to_show_search_suggestions,
|
| 942 |
+
"_validate_submit_a_search_with_enter": _validate_submit_a_search_with_enter,
|
| 943 |
+
"_validate_open_an_email_from_the_search_dropdown": _validate_open_an_email_from_the_search_dropdown,
|
| 944 |
+
"_validate_apply_the_has_attachments_filter": _validate_apply_the_has_attachments_filter,
|
| 945 |
+
"_validate_apply_the_unread_search_filter": _validate_apply_the_unread_search_filter,
|
| 946 |
+
"_validate_choose_sent_items_from_the_folder_selector": _validate_choose_sent_items_from_the_folder_selector,
|
| 947 |
+
"_validate_collapse_the_favorites_section": _validate_collapse_the_favorites_section,
|
| 948 |
+
"_validate_expand_the_navigation_sidebar": _validate_expand_the_navigation_sidebar,
|
| 949 |
+
"_validate_collapse_the_navigation_sidebar": _validate_collapse_the_navigation_sidebar,
|
| 950 |
+
}
|
| 951 |
+
|
rewards/slack.py
ADDED
|
@@ -0,0 +1,938 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Reward functions for Slack app tasks.
|
| 3 |
+
"""
|
| 4 |
+
|
| 5 |
+
import logging
|
| 6 |
+
from typing import Any, Dict, Tuple
|
| 7 |
+
|
| 8 |
+
logger = logging.getLogger(__name__)
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def _validate_navigate_to_search_page(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 12 |
+
"""
|
| 13 |
+
Validate that the user successfully navigated to the search page with query 'coffee'.
|
| 14 |
+
|
| 15 |
+
This function checks:
|
| 16 |
+
1. The page is "SEARCH"
|
| 17 |
+
2. The params.query is "coffee"
|
| 18 |
+
3. The searchQuery is "coffee"
|
| 19 |
+
"""
|
| 20 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 21 |
+
|
| 22 |
+
# Check 1: page should be "SEARCH"
|
| 23 |
+
page = final_state.get("page")
|
| 24 |
+
if page != "SEARCH":
|
| 25 |
+
return 0.0, f"Expected page to be 'SEARCH', got '{page}'"
|
| 26 |
+
|
| 27 |
+
# Check 2: params.query should be "coffee"
|
| 28 |
+
params = final_state.get("params", {})
|
| 29 |
+
query_param = params.get("query")
|
| 30 |
+
if query_param != "coffee":
|
| 31 |
+
return 0.0, f"Expected params.query to be 'coffee', got '{query_param}'"
|
| 32 |
+
|
| 33 |
+
# Check 3: searchQuery should be "coffee"
|
| 34 |
+
search_query = final_state.get("searchQuery")
|
| 35 |
+
if search_query != "coffee":
|
| 36 |
+
return 0.0, f"Expected searchQuery to be 'coffee', got '{search_query}'"
|
| 37 |
+
|
| 38 |
+
return 1.0, "Successfully navigated to search page with query 'coffee'"
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def _validate_switch_to_different_channel(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 42 |
+
"""
|
| 43 |
+
Validate that the user successfully switched from #social channel to #all-slack channel.
|
| 44 |
+
|
| 45 |
+
This function checks:
|
| 46 |
+
1. The page is "CHANNEL"
|
| 47 |
+
2. The currentChannel is "channel-1" (all-slack)
|
| 48 |
+
3. The currentDM is null (not viewing a DM)
|
| 49 |
+
"""
|
| 50 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 51 |
+
|
| 52 |
+
# Check 1: page should be "CHANNEL"
|
| 53 |
+
page = final_state.get("page")
|
| 54 |
+
if page != "CHANNEL":
|
| 55 |
+
return 0.0, f"Expected page to be 'CHANNEL', got '{page}'"
|
| 56 |
+
|
| 57 |
+
# Check 2: currentChannel should be "channel-1" (all-slack)
|
| 58 |
+
current_channel = final_state.get("currentChannel")
|
| 59 |
+
if current_channel != "channel-1":
|
| 60 |
+
return 0.0, f"Expected currentChannel to be 'channel-1', got '{current_channel}'"
|
| 61 |
+
|
| 62 |
+
# Check 3: currentDM should be null (not viewing a DM)
|
| 63 |
+
current_dm = final_state.get("currentDM")
|
| 64 |
+
if current_dm is not None:
|
| 65 |
+
return 0.0, f"Expected currentDM to be null, got '{current_dm}'"
|
| 66 |
+
|
| 67 |
+
return 1.0, "Successfully switched to #all-slack channel"
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
def _validate_view_user_profile_from_message(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 71 |
+
"""
|
| 72 |
+
Validate that the user successfully opened Dzaka's user profile sidebar from a message.
|
| 73 |
+
|
| 74 |
+
This function checks:
|
| 75 |
+
1. The page is "CHANNEL"
|
| 76 |
+
2. The currentChannel is "channel-3" (social channel)
|
| 77 |
+
3. The showUserProfile is true
|
| 78 |
+
4. The selectedUserId is "user-1" (Dzaka's user ID)
|
| 79 |
+
"""
|
| 80 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 81 |
+
|
| 82 |
+
# Check 1: page should be "CHANNEL"
|
| 83 |
+
page = final_state.get("page")
|
| 84 |
+
if page != "CHANNEL":
|
| 85 |
+
return 0.0, f"Expected page to be 'CHANNEL', got '{page}'"
|
| 86 |
+
|
| 87 |
+
# Check 2: currentChannel should be "channel-3" (social channel)
|
| 88 |
+
current_channel = final_state.get("currentChannel")
|
| 89 |
+
if current_channel != "channel-3":
|
| 90 |
+
return 0.0, f"Expected currentChannel to be 'channel-3', got '{current_channel}'"
|
| 91 |
+
|
| 92 |
+
# Check 3: showUserProfile should be true
|
| 93 |
+
show_user_profile = final_state.get("showUserProfile")
|
| 94 |
+
if show_user_profile is not True:
|
| 95 |
+
return 0.0, f"Expected showUserProfile to be true, got '{show_user_profile}'"
|
| 96 |
+
|
| 97 |
+
# Check 4: selectedUserId should be "user-1" (Dzaka's user ID)
|
| 98 |
+
selected_user_id = final_state.get("selectedUserId")
|
| 99 |
+
if selected_user_id != "user-1":
|
| 100 |
+
return 0.0, f"Expected selectedUserId to be 'user-1', got '{selected_user_id}'"
|
| 101 |
+
|
| 102 |
+
return 1.0, "Successfully opened Dzaka's user profile sidebar from message"
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def _validate_open_thread_panel_from_message(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 106 |
+
"""
|
| 107 |
+
Validate that the user successfully opened the thread panel from a message.
|
| 108 |
+
|
| 109 |
+
This function checks:
|
| 110 |
+
1. The page is "CHANNEL"
|
| 111 |
+
2. The currentChannel is "channel-3" (social channel)
|
| 112 |
+
3. The threadPanel.isOpen is true
|
| 113 |
+
4. The threadPanel.parentMessageId is "msg-01" (the "Morning crew! Coffee walk at 10?" message)
|
| 114 |
+
"""
|
| 115 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 116 |
+
|
| 117 |
+
# Check 1: page should be "CHANNEL"
|
| 118 |
+
page = final_state.get("page")
|
| 119 |
+
if page != "CHANNEL":
|
| 120 |
+
return 0.0, f"Expected page to be 'CHANNEL', got '{page}'"
|
| 121 |
+
|
| 122 |
+
# Check 2: currentChannel should be "channel-3" (social channel)
|
| 123 |
+
current_channel = final_state.get("currentChannel")
|
| 124 |
+
if current_channel != "channel-3":
|
| 125 |
+
return 0.0, f"Expected currentChannel to be 'channel-3', got '{current_channel}'"
|
| 126 |
+
|
| 127 |
+
# Check 3: threadPanel should exist
|
| 128 |
+
thread_panel = final_state.get("threadPanel")
|
| 129 |
+
if thread_panel is None:
|
| 130 |
+
return 0.0, "Expected threadPanel to exist in final state"
|
| 131 |
+
|
| 132 |
+
# Check 4: threadPanel.isOpen should be true
|
| 133 |
+
is_open = thread_panel.get("isOpen")
|
| 134 |
+
if is_open is not True:
|
| 135 |
+
return 0.0, f"Expected threadPanel.isOpen to be true, got '{is_open}'"
|
| 136 |
+
|
| 137 |
+
# Check 5: threadPanel.parentMessageId should be "msg-01"
|
| 138 |
+
parent_message_id = thread_panel.get("parentMessageId")
|
| 139 |
+
if parent_message_id != "msg-01":
|
| 140 |
+
return 0.0, f"Expected threadPanel.parentMessageId to be 'msg-01', got '{parent_message_id}'"
|
| 141 |
+
|
| 142 |
+
return 1.0, "Successfully opened thread panel for message 'Morning crew! Coffee walk at 10?'"
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
def _validate_navigate_from_direct_message_to_channel(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 146 |
+
"""
|
| 147 |
+
Validate that the user successfully navigated from a direct message to a channel.
|
| 148 |
+
|
| 149 |
+
This function checks:
|
| 150 |
+
1. The page is "CHANNEL"
|
| 151 |
+
2. The currentChannel is "channel-3" (social channel)
|
| 152 |
+
3. The currentDM is null (not viewing a DM)
|
| 153 |
+
"""
|
| 154 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 155 |
+
|
| 156 |
+
# Check 1: page should be "CHANNEL"
|
| 157 |
+
page = final_state.get("page")
|
| 158 |
+
if page != "CHANNEL":
|
| 159 |
+
return 0.0, f"Expected page to be 'CHANNEL', got '{page}'"
|
| 160 |
+
|
| 161 |
+
# Check 2: currentChannel should be "channel-3" (social channel)
|
| 162 |
+
current_channel = final_state.get("currentChannel")
|
| 163 |
+
if current_channel != "channel-3":
|
| 164 |
+
return 0.0, f"Expected currentChannel to be 'channel-3', got '{current_channel}'"
|
| 165 |
+
|
| 166 |
+
# Check 3: currentDM should be null (not viewing a DM)
|
| 167 |
+
current_dm = final_state.get("currentDM")
|
| 168 |
+
if current_dm is not None:
|
| 169 |
+
return 0.0, f"Expected currentDM to be null, got '{current_dm}'"
|
| 170 |
+
|
| 171 |
+
return 1.0, "Successfully navigated from direct message to #social channel"
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
def _validate_switch_search_filter_to_people(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 175 |
+
"""
|
| 176 |
+
Validate that the user successfully switched the search mode from "Messages" to "People".
|
| 177 |
+
|
| 178 |
+
This function checks:
|
| 179 |
+
1. The page is "SEARCH"
|
| 180 |
+
2. The searchFilters.mode is "people"
|
| 181 |
+
"""
|
| 182 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 183 |
+
|
| 184 |
+
# Check 1: page should be "SEARCH"
|
| 185 |
+
page = final_state.get("page")
|
| 186 |
+
if page != "SEARCH":
|
| 187 |
+
return 0.0, f"Expected page to be 'SEARCH', got '{page}'"
|
| 188 |
+
|
| 189 |
+
# Check 2: searchFilters should exist
|
| 190 |
+
search_filters = final_state.get("searchFilters")
|
| 191 |
+
if search_filters is None:
|
| 192 |
+
return 0.0, "Expected searchFilters to exist in final state"
|
| 193 |
+
|
| 194 |
+
# Check 3: searchFilters.mode should be "people"
|
| 195 |
+
search_mode = search_filters.get("mode")
|
| 196 |
+
if search_mode != "people":
|
| 197 |
+
return 0.0, f"Expected searchFilters.mode to be 'people', got '{search_mode}'"
|
| 198 |
+
|
| 199 |
+
return 1.0, "Successfully switched search mode to 'People'"
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
def _validate_search_and_open_message_result(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 203 |
+
"""
|
| 204 |
+
Validate that the user successfully searched for a message and clicked on a search result.
|
| 205 |
+
|
| 206 |
+
This function checks:
|
| 207 |
+
1. The page is "SEARCH"
|
| 208 |
+
2. The searchQuery is "vanta"
|
| 209 |
+
3. The params.query is "vanta"
|
| 210 |
+
4. The searchSelection is set to a message (type: "message", messageId: "msg-05")
|
| 211 |
+
"""
|
| 212 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 213 |
+
|
| 214 |
+
# Check 1: page should be "SEARCH"
|
| 215 |
+
page = final_state.get("page")
|
| 216 |
+
if page != "SEARCH":
|
| 217 |
+
return 0.0, f"Expected page to be 'SEARCH', got '{page}'"
|
| 218 |
+
|
| 219 |
+
# Check 2: searchQuery should be "vanta"
|
| 220 |
+
search_query = final_state.get("searchQuery")
|
| 221 |
+
if search_query != "vanta":
|
| 222 |
+
return 0.0, f"Expected searchQuery to be 'vanta', got '{search_query}'"
|
| 223 |
+
|
| 224 |
+
# Check 3: params.query should be "vanta"
|
| 225 |
+
params = final_state.get("params", {})
|
| 226 |
+
query_param = params.get("query")
|
| 227 |
+
if query_param != "vanta":
|
| 228 |
+
return 0.0, f"Expected params.query to be 'vanta', got '{query_param}'"
|
| 229 |
+
|
| 230 |
+
# Check 4: searchSelection should exist and be a message selection
|
| 231 |
+
search_selection = final_state.get("searchSelection")
|
| 232 |
+
if search_selection is None:
|
| 233 |
+
return 0.0, "Expected searchSelection to be set, got null"
|
| 234 |
+
|
| 235 |
+
# Check 5: searchSelection.type should be "message"
|
| 236 |
+
selection_type = search_selection.get("type")
|
| 237 |
+
if selection_type != "message":
|
| 238 |
+
return 0.0, f"Expected searchSelection.type to be 'message', got '{selection_type}'"
|
| 239 |
+
|
| 240 |
+
# Check 6: searchSelection.messageId should be "msg-05" (the message from Alistair containing "vanta")
|
| 241 |
+
message_id = search_selection.get("messageId")
|
| 242 |
+
if message_id != "msg-05":
|
| 243 |
+
return 0.0, f"Expected searchSelection.messageId to be 'msg-05', got '{message_id}'"
|
| 244 |
+
|
| 245 |
+
return 1.0, "Successfully searched for 'vanta' and opened message result in thread panel"
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
def _validate_send_message_in_channel(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 249 |
+
"""
|
| 250 |
+
Validate that the user successfully sent a message in the channel.
|
| 251 |
+
|
| 252 |
+
This function checks:
|
| 253 |
+
1. The page is "CHANNEL"
|
| 254 |
+
2. The currentChannel is "channel-3" (social channel)
|
| 255 |
+
3. A new message exists in the messages array with:
|
| 256 |
+
- channelId: "channel-3"
|
| 257 |
+
- userId: "user-1" (the current user Dzaka)
|
| 258 |
+
- content: "Thanks for sharing the recipe!"
|
| 259 |
+
4. The messageInputValue is empty (message was sent)
|
| 260 |
+
"""
|
| 261 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 262 |
+
|
| 263 |
+
# Check 1: page should be "CHANNEL"
|
| 264 |
+
page = final_state.get("page")
|
| 265 |
+
if page != "CHANNEL":
|
| 266 |
+
return 0.0, f"Expected page to be 'CHANNEL', got '{page}'"
|
| 267 |
+
|
| 268 |
+
# Check 2: currentChannel should be "channel-3" (social channel)
|
| 269 |
+
current_channel = final_state.get("currentChannel")
|
| 270 |
+
if current_channel != "channel-3":
|
| 271 |
+
return 0.0, f"Expected currentChannel to be 'channel-3', got '{current_channel}'"
|
| 272 |
+
|
| 273 |
+
# Check 3: messages array should exist
|
| 274 |
+
messages = final_state.get("messages", [])
|
| 275 |
+
if not isinstance(messages, list):
|
| 276 |
+
return 0.0, "Expected messages to be an array"
|
| 277 |
+
|
| 278 |
+
# Check 4: Find a message in channel-3 from user-1 with the expected content
|
| 279 |
+
target_message = None
|
| 280 |
+
for message in messages:
|
| 281 |
+
if (message.get("channelId") == "channel-3" and
|
| 282 |
+
message.get("userId") == "user-1" and
|
| 283 |
+
message.get("content") == "Thanks for sharing the recipe!"):
|
| 284 |
+
target_message = message
|
| 285 |
+
break
|
| 286 |
+
|
| 287 |
+
if target_message is None:
|
| 288 |
+
return 0.0, "Expected to find a new message with content 'Thanks for sharing the recipe!' from user-1 in channel-3"
|
| 289 |
+
|
| 290 |
+
# Check 5: The message should have a valid id and timestamp
|
| 291 |
+
message_id = target_message.get("id")
|
| 292 |
+
if not message_id:
|
| 293 |
+
return 0.0, "Expected the new message to have an id"
|
| 294 |
+
|
| 295 |
+
message_timestamp = target_message.get("timestamp")
|
| 296 |
+
if not message_timestamp:
|
| 297 |
+
return 0.0, "Expected the new message to have a timestamp"
|
| 298 |
+
|
| 299 |
+
# Check 6: messageInputValue should be empty (message was sent)
|
| 300 |
+
message_input_value = final_state.get("messageInputValue", "")
|
| 301 |
+
if message_input_value != "":
|
| 302 |
+
return 0.0, f"Expected messageInputValue to be empty after sending, got '{message_input_value}'"
|
| 303 |
+
|
| 304 |
+
return 1.0, "Successfully sent message 'Thanks for sharing the recipe!' in #social channel"
|
| 305 |
+
|
| 306 |
+
def _validate_search_with_from_filter(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 307 |
+
"""
|
| 308 |
+
Validate that the user successfully applied a "from" filter to search results.
|
| 309 |
+
|
| 310 |
+
This function checks:
|
| 311 |
+
1. The page is "SEARCH"
|
| 312 |
+
2. The searchQuery is "a"
|
| 313 |
+
3. The params.query is "a"
|
| 314 |
+
4. The searchFilters.fromUserId is "user-2" (Alistair)
|
| 315 |
+
5. The searchFilters.mode is "messages"
|
| 316 |
+
"""
|
| 317 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 318 |
+
|
| 319 |
+
# Check 1: page should be "SEARCH"
|
| 320 |
+
page = final_state.get("page")
|
| 321 |
+
if page != "SEARCH":
|
| 322 |
+
return 0.0, f"Expected page to be 'SEARCH', got '{page}'"
|
| 323 |
+
|
| 324 |
+
# Check 2: searchQuery should be "a"
|
| 325 |
+
search_query = final_state.get("searchQuery")
|
| 326 |
+
if search_query != "a":
|
| 327 |
+
return 0.0, f"Expected searchQuery to be 'a', got '{search_query}'"
|
| 328 |
+
|
| 329 |
+
# Check 3: params.query should be "a"
|
| 330 |
+
params = final_state.get("params", {})
|
| 331 |
+
query_param = params.get("query")
|
| 332 |
+
if query_param != "a":
|
| 333 |
+
return 0.0, f"Expected params.query to be 'a', got '{query_param}'"
|
| 334 |
+
|
| 335 |
+
# Check 4: searchFilters should exist
|
| 336 |
+
search_filters = final_state.get("searchFilters")
|
| 337 |
+
if search_filters is None:
|
| 338 |
+
return 0.0, "Expected searchFilters to exist in final state"
|
| 339 |
+
|
| 340 |
+
# Check 5: searchFilters.mode should be "messages"
|
| 341 |
+
search_mode = search_filters.get("mode")
|
| 342 |
+
if search_mode != "messages":
|
| 343 |
+
return 0.0, f"Expected searchFilters.mode to be 'messages', got '{search_mode}'"
|
| 344 |
+
|
| 345 |
+
# Check 6: searchFilters.fromUserId should be "user-2" (Alistair)
|
| 346 |
+
from_user_id = search_filters.get("fromUserId")
|
| 347 |
+
if from_user_id != "user-2":
|
| 348 |
+
return 0.0, f"Expected searchFilters.fromUserId to be 'user-2' (Alistair), got '{from_user_id}'"
|
| 349 |
+
|
| 350 |
+
return 1.0, "Successfully applied 'from' filter to search results showing only messages from Alistair"
|
| 351 |
+
|
| 352 |
+
|
| 353 |
+
def _validate_search_with_in_filter(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 354 |
+
"""
|
| 355 |
+
Validate that the user successfully applied an "in" filter to search results.
|
| 356 |
+
|
| 357 |
+
This function checks:
|
| 358 |
+
1. The page is "SEARCH"
|
| 359 |
+
2. The searchQuery is "a"
|
| 360 |
+
3. The params.query is "a"
|
| 361 |
+
4. The searchFilters.inId is "channel-1" (#all-slack channel)
|
| 362 |
+
5. The searchFilters.mode is "messages"
|
| 363 |
+
"""
|
| 364 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 365 |
+
|
| 366 |
+
# Check 1: page should be "SEARCH"
|
| 367 |
+
page = final_state.get("page")
|
| 368 |
+
if page != "SEARCH":
|
| 369 |
+
return 0.0, f"Expected page to be 'SEARCH', got '{page}'"
|
| 370 |
+
|
| 371 |
+
# Check 2: searchQuery should be "a"
|
| 372 |
+
search_query = final_state.get("searchQuery")
|
| 373 |
+
if search_query != "a":
|
| 374 |
+
return 0.0, f"Expected searchQuery to be 'a', got '{search_query}'"
|
| 375 |
+
|
| 376 |
+
# Check 3: params.query should be "a"
|
| 377 |
+
params = final_state.get("params", {})
|
| 378 |
+
query_param = params.get("query")
|
| 379 |
+
if query_param != "a":
|
| 380 |
+
return 0.0, f"Expected params.query to be 'a', got '{query_param}'"
|
| 381 |
+
|
| 382 |
+
# Check 4: searchFilters should exist
|
| 383 |
+
search_filters = final_state.get("searchFilters")
|
| 384 |
+
if search_filters is None:
|
| 385 |
+
return 0.0, "Expected searchFilters to exist in final state"
|
| 386 |
+
|
| 387 |
+
# Check 5: searchFilters.mode should be "messages"
|
| 388 |
+
search_mode = search_filters.get("mode")
|
| 389 |
+
if search_mode != "messages":
|
| 390 |
+
return 0.0, f"Expected searchFilters.mode to be 'messages', got '{search_mode}'"
|
| 391 |
+
|
| 392 |
+
# Check 6: searchFilters.inId should be "channel-1" (#all-slack channel)
|
| 393 |
+
in_id = search_filters.get("inId")
|
| 394 |
+
if in_id != "channel-1":
|
| 395 |
+
return 0.0, f"Expected searchFilters.inId to be 'channel-1' (#all-slack), got '{in_id}'"
|
| 396 |
+
|
| 397 |
+
return 1.0, "Successfully applied 'in' filter to search results showing only messages from #all-slack channel"
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
def _validate_create_new_public_channel(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 401 |
+
"""
|
| 402 |
+
Validate that the user successfully created a new public channel named "engineering".
|
| 403 |
+
|
| 404 |
+
This function checks:
|
| 405 |
+
1. The page is "CHANNEL"
|
| 406 |
+
2. A new channel exists in the channels array with name "engineering"
|
| 407 |
+
3. The currentChannel is set to the new channel's ID
|
| 408 |
+
4. The new channel ID is in joinedChannelIds
|
| 409 |
+
5. The currentDM is null (not viewing a DM)
|
| 410 |
+
6. The isCreateChannelOpen is false (modal is closed)
|
| 411 |
+
"""
|
| 412 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 413 |
+
|
| 414 |
+
# Check 1: page should be "CHANNEL"
|
| 415 |
+
page = final_state.get("page")
|
| 416 |
+
if page != "CHANNEL":
|
| 417 |
+
return 0.0, f"Expected page to be 'CHANNEL', got '{page}'"
|
| 418 |
+
|
| 419 |
+
# Check 2: currentDM should be null (not viewing a DM)
|
| 420 |
+
current_dm = final_state.get("currentDM")
|
| 421 |
+
if current_dm is not None:
|
| 422 |
+
return 0.0, f"Expected currentDM to be null, got '{current_dm}'"
|
| 423 |
+
|
| 424 |
+
# Check 3: channels array should exist
|
| 425 |
+
channels = final_state.get("channels", [])
|
| 426 |
+
if not isinstance(channels, list):
|
| 427 |
+
return 0.0, "Expected channels to be an array"
|
| 428 |
+
|
| 429 |
+
# Check 4: Find the new channel with name "engineering"
|
| 430 |
+
engineering_channel = None
|
| 431 |
+
for channel in channels:
|
| 432 |
+
if channel.get("name") == "engineering":
|
| 433 |
+
engineering_channel = channel
|
| 434 |
+
break
|
| 435 |
+
|
| 436 |
+
if engineering_channel is None:
|
| 437 |
+
return 0.0, "Expected to find a new channel with name 'engineering' in the channels array"
|
| 438 |
+
|
| 439 |
+
# Check 5: The engineering channel should have an id
|
| 440 |
+
engineering_channel_id = engineering_channel.get("id")
|
| 441 |
+
if not engineering_channel_id:
|
| 442 |
+
return 0.0, "Expected the engineering channel to have an id"
|
| 443 |
+
|
| 444 |
+
# Check 6: currentChannel should be set to the new engineering channel's ID
|
| 445 |
+
current_channel = final_state.get("currentChannel")
|
| 446 |
+
if current_channel != engineering_channel_id:
|
| 447 |
+
return 0.0, f"Expected currentChannel to be '{engineering_channel_id}' (the new engineering channel), got '{current_channel}'"
|
| 448 |
+
|
| 449 |
+
# Check 7: The new channel ID should be in joinedChannelIds
|
| 450 |
+
joined_channel_ids = final_state.get("joinedChannelIds", [])
|
| 451 |
+
if not isinstance(joined_channel_ids, list):
|
| 452 |
+
return 0.0, "Expected joinedChannelIds to be an array"
|
| 453 |
+
|
| 454 |
+
if engineering_channel_id not in joined_channel_ids:
|
| 455 |
+
return 0.0, f"Expected joinedChannelIds to include the new engineering channel ID '{engineering_channel_id}'"
|
| 456 |
+
|
| 457 |
+
# Check 8: isCreateChannelOpen should be false (modal is closed)
|
| 458 |
+
is_create_channel_open = final_state.get("isCreateChannelOpen")
|
| 459 |
+
if is_create_channel_open is not False:
|
| 460 |
+
return 0.0, f"Expected isCreateChannelOpen to be false (modal closed), got '{is_create_channel_open}'"
|
| 461 |
+
|
| 462 |
+
return 1.0, f"Successfully created new public channel 'engineering' and navigated to it"
|
| 463 |
+
|
| 464 |
+
|
| 465 |
+
def _validate_navigate_to_direct_message_page_from_search_and_send_a_message(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 466 |
+
"""
|
| 467 |
+
Validate that the user successfully searched for a person, navigated to their DM page, and sent a message.
|
| 468 |
+
|
| 469 |
+
This function checks:
|
| 470 |
+
1. The page is "USER_DM"
|
| 471 |
+
2. The params.userId is "user-2" (Alistair)
|
| 472 |
+
3. The currentDM is "dm-1" (the DM with Alistair)
|
| 473 |
+
4. The searchQuery is "Alistair"
|
| 474 |
+
5. A new message exists in the messages array with:
|
| 475 |
+
- userId: "user-1" (the current user Dzaka)
|
| 476 |
+
- dmId: "dm-1"
|
| 477 |
+
- content: "testing"
|
| 478 |
+
6. The messageInputValue is empty (message was sent)
|
| 479 |
+
"""
|
| 480 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 481 |
+
|
| 482 |
+
# Check 1: page should be "USER_DM"
|
| 483 |
+
page = final_state.get("page")
|
| 484 |
+
if page != "USER_DM":
|
| 485 |
+
return 0.0, f"Expected page to be 'USER_DM', got '{page}'"
|
| 486 |
+
|
| 487 |
+
# Check 2: params.userId should be "user-2" (Alistair)
|
| 488 |
+
params = final_state.get("params", {})
|
| 489 |
+
user_id_param = params.get("userId")
|
| 490 |
+
if user_id_param != "user-2":
|
| 491 |
+
return 0.0, f"Expected params.userId to be 'user-2' (Alistair), got '{user_id_param}'"
|
| 492 |
+
|
| 493 |
+
# Check 3: currentDM should be "dm-1" (the DM with Alistair)
|
| 494 |
+
current_dm = final_state.get("currentDM")
|
| 495 |
+
if current_dm != "dm-1":
|
| 496 |
+
return 0.0, f"Expected currentDM to be 'dm-1' (the DM with Alistair), got '{current_dm}'"
|
| 497 |
+
|
| 498 |
+
# Check 4: searchQuery should be "Alistair"
|
| 499 |
+
search_query = final_state.get("searchQuery")
|
| 500 |
+
if search_query != "Alistair":
|
| 501 |
+
return 0.0, f"Expected searchQuery to be 'Alistair', got '{search_query}'"
|
| 502 |
+
|
| 503 |
+
# Check 5: messages array should exist
|
| 504 |
+
messages = final_state.get("messages", [])
|
| 505 |
+
if not isinstance(messages, list):
|
| 506 |
+
return 0.0, "Expected messages to be an array"
|
| 507 |
+
|
| 508 |
+
# Check 6: Find a message in dm-1 from user-1 with the expected content
|
| 509 |
+
target_message = None
|
| 510 |
+
for message in messages:
|
| 511 |
+
if (message.get("dmId") == "dm-1" and
|
| 512 |
+
message.get("userId") == "user-1" and
|
| 513 |
+
message.get("content") == "testing"):
|
| 514 |
+
target_message = message
|
| 515 |
+
break
|
| 516 |
+
|
| 517 |
+
if target_message is None:
|
| 518 |
+
return 0.0, "Expected to find a new message with content 'testing' from user-1 in dm-1"
|
| 519 |
+
|
| 520 |
+
# Check 7: The message should have a valid id and timestamp
|
| 521 |
+
message_id = target_message.get("id")
|
| 522 |
+
if not message_id:
|
| 523 |
+
return 0.0, "Expected the new message to have an id"
|
| 524 |
+
|
| 525 |
+
message_timestamp = target_message.get("timestamp")
|
| 526 |
+
if not message_timestamp:
|
| 527 |
+
return 0.0, "Expected the new message to have a timestamp"
|
| 528 |
+
|
| 529 |
+
# Check 8: messageInputValue should be empty (message was sent)
|
| 530 |
+
message_input_value = final_state.get("messageInputValue", "")
|
| 531 |
+
if message_input_value != "":
|
| 532 |
+
return 0.0, f"Expected messageInputValue to be empty after sending, got '{message_input_value}'"
|
| 533 |
+
|
| 534 |
+
return 1.0, "Successfully searched for 'Alistair', navigated to DM page, and sent message 'testing'"
|
| 535 |
+
|
| 536 |
+
|
| 537 |
+
def _validate_using_exclude_automations_filter_on_search_results(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 538 |
+
"""
|
| 539 |
+
Validate that the user successfully applied the "Exclude automations" filter to search results.
|
| 540 |
+
|
| 541 |
+
This function checks:
|
| 542 |
+
1. The page is "SEARCH"
|
| 543 |
+
2. The searchQuery is "a"
|
| 544 |
+
3. The params.query is "a"
|
| 545 |
+
4. The searchFilters.mode is "messages"
|
| 546 |
+
5. The searchFilters.excludeAutomations is true
|
| 547 |
+
"""
|
| 548 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 549 |
+
|
| 550 |
+
# Check 1: page should be "SEARCH"
|
| 551 |
+
page = final_state.get("page")
|
| 552 |
+
if page != "SEARCH":
|
| 553 |
+
return 0.0, f"Expected page to be 'SEARCH', got '{page}'"
|
| 554 |
+
|
| 555 |
+
# Check 2: searchQuery should be "a"
|
| 556 |
+
search_query = final_state.get("searchQuery")
|
| 557 |
+
if search_query != "a":
|
| 558 |
+
return 0.0, f"Expected searchQuery to be 'a', got '{search_query}'"
|
| 559 |
+
|
| 560 |
+
# Check 3: params.query should be "a"
|
| 561 |
+
params = final_state.get("params", {})
|
| 562 |
+
query_param = params.get("query")
|
| 563 |
+
if query_param != "a":
|
| 564 |
+
return 0.0, f"Expected params.query to be 'a', got '{query_param}'"
|
| 565 |
+
|
| 566 |
+
# Check 4: searchFilters should exist
|
| 567 |
+
search_filters = final_state.get("searchFilters")
|
| 568 |
+
if search_filters is None:
|
| 569 |
+
return 0.0, "Expected searchFilters to exist in final state"
|
| 570 |
+
|
| 571 |
+
# Check 5: searchFilters.mode should be "messages"
|
| 572 |
+
search_mode = search_filters.get("mode")
|
| 573 |
+
if search_mode != "messages":
|
| 574 |
+
return 0.0, f"Expected searchFilters.mode to be 'messages', got '{search_mode}'"
|
| 575 |
+
|
| 576 |
+
# Check 6: searchFilters.excludeAutomations should be true
|
| 577 |
+
exclude_automations = search_filters.get("excludeAutomations")
|
| 578 |
+
if exclude_automations is not True:
|
| 579 |
+
return 0.0, f"Expected searchFilters.excludeAutomations to be true, got '{exclude_automations}'"
|
| 580 |
+
|
| 581 |
+
return 1.0, "Successfully applied 'Exclude automations' filter to search results"
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
def _validate_open_direct_message_from_sidebar(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 585 |
+
"""
|
| 586 |
+
Validate that the user successfully opened a direct message from the sidebar.
|
| 587 |
+
|
| 588 |
+
This function checks:
|
| 589 |
+
1. The page is "CHANNEL"
|
| 590 |
+
2. The currentChannel is "" (empty string when viewing a DM)
|
| 591 |
+
3. The currentDM is "dm-1" (the DM with Alistair)
|
| 592 |
+
"""
|
| 593 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 594 |
+
|
| 595 |
+
# Check 1: page should be "CHANNEL"
|
| 596 |
+
page = final_state.get("page")
|
| 597 |
+
if page != "CHANNEL":
|
| 598 |
+
return 0.0, f"Expected page to be 'CHANNEL', got '{page}'"
|
| 599 |
+
|
| 600 |
+
# Check 2: currentChannel should be "" (empty string when viewing a DM)
|
| 601 |
+
current_channel = final_state.get("currentChannel")
|
| 602 |
+
if current_channel != "":
|
| 603 |
+
return 0.0, f"Expected currentChannel to be empty string when viewing DM, got '{current_channel}'"
|
| 604 |
+
|
| 605 |
+
# Check 3: currentDM should be "dm-1" (the DM with Alistair)
|
| 606 |
+
current_dm = final_state.get("currentDM")
|
| 607 |
+
if current_dm != "dm-1":
|
| 608 |
+
return 0.0, f"Expected currentDM to be 'dm-1' (the DM with Alistair), got '{current_dm}'"
|
| 609 |
+
|
| 610 |
+
return 1.0, "Successfully opened direct message with Alistair from sidebar"
|
| 611 |
+
|
| 612 |
+
|
| 613 |
+
def _validate_search_and_filter_by_people(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 614 |
+
"""
|
| 615 |
+
Validate that the user successfully searched for people and opened a user profile.
|
| 616 |
+
|
| 617 |
+
This function checks:
|
| 618 |
+
1. The page is "SEARCH"
|
| 619 |
+
2. The searchQuery is "Mara"
|
| 620 |
+
3. The params.query is "Mara"
|
| 621 |
+
4. The searchFilters.mode is "people"
|
| 622 |
+
5. The searchSelection is set to a user (type: "user", userId: "user-4")
|
| 623 |
+
6. The showUserProfile is true
|
| 624 |
+
7. The selectedUserId is "user-4" (Mara Okafor)
|
| 625 |
+
"""
|
| 626 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 627 |
+
|
| 628 |
+
# Check 1: page should be "SEARCH"
|
| 629 |
+
page = final_state.get("page")
|
| 630 |
+
if page != "SEARCH":
|
| 631 |
+
return 0.0, f"Expected page to be 'SEARCH', got '{page}'"
|
| 632 |
+
|
| 633 |
+
# Check 2: searchQuery should be "Mara"
|
| 634 |
+
search_query = final_state.get("searchQuery")
|
| 635 |
+
if search_query != "Mara":
|
| 636 |
+
return 0.0, f"Expected searchQuery to be 'Mara', got '{search_query}'"
|
| 637 |
+
|
| 638 |
+
# Check 3: params.query should be "Mara"
|
| 639 |
+
params = final_state.get("params", {})
|
| 640 |
+
query_param = params.get("query")
|
| 641 |
+
if query_param != "Mara":
|
| 642 |
+
return 0.0, f"Expected params.query to be 'Mara', got '{query_param}'"
|
| 643 |
+
|
| 644 |
+
# Check 4: searchFilters should exist
|
| 645 |
+
search_filters = final_state.get("searchFilters")
|
| 646 |
+
if search_filters is None:
|
| 647 |
+
return 0.0, "Expected searchFilters to exist in final state"
|
| 648 |
+
|
| 649 |
+
# Check 5: searchFilters.mode should be "people"
|
| 650 |
+
search_mode = search_filters.get("mode")
|
| 651 |
+
if search_mode != "people":
|
| 652 |
+
return 0.0, f"Expected searchFilters.mode to be 'people', got '{search_mode}'"
|
| 653 |
+
|
| 654 |
+
# Check 6: searchSelection should exist and be a user selection
|
| 655 |
+
search_selection = final_state.get("searchSelection")
|
| 656 |
+
if search_selection is None:
|
| 657 |
+
return 0.0, "Expected searchSelection to be set, got null"
|
| 658 |
+
|
| 659 |
+
# Check 7: searchSelection.type should be "user"
|
| 660 |
+
selection_type = search_selection.get("type")
|
| 661 |
+
if selection_type != "user":
|
| 662 |
+
return 0.0, f"Expected searchSelection.type to be 'user', got '{selection_type}'"
|
| 663 |
+
|
| 664 |
+
# Check 8: searchSelection.userId should be "user-4" (Mara Okafor)
|
| 665 |
+
user_id = search_selection.get("userId")
|
| 666 |
+
if user_id != "user-4":
|
| 667 |
+
return 0.0, f"Expected searchSelection.userId to be 'user-4' (Mara Okafor), got '{user_id}'"
|
| 668 |
+
|
| 669 |
+
# Check 9: showUserProfile should be true
|
| 670 |
+
show_user_profile = final_state.get("showUserProfile")
|
| 671 |
+
if show_user_profile is not True:
|
| 672 |
+
return 0.0, f"Expected showUserProfile to be true, got '{show_user_profile}'"
|
| 673 |
+
|
| 674 |
+
# Check 10: selectedUserId should be "user-4" (Mara Okafor)
|
| 675 |
+
selected_user_id = final_state.get("selectedUserId")
|
| 676 |
+
if selected_user_id != "user-4":
|
| 677 |
+
return 0.0, f"Expected selectedUserId to be 'user-4' (Mara Okafor), got '{selected_user_id}'"
|
| 678 |
+
|
| 679 |
+
return 1.0, "Successfully searched for 'Mara', switched to people mode, and opened Mara Okafor's user profile"
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
def _validate_navigate_from_search_to_channel(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 683 |
+
"""
|
| 684 |
+
Validate that the user successfully navigated from the search page to the channel view.
|
| 685 |
+
|
| 686 |
+
This function checks:
|
| 687 |
+
1. The page is "CHANNEL"
|
| 688 |
+
2. The currentChannel is "channel-3" (social channel)
|
| 689 |
+
3. The currentDM is null (not viewing a DM)
|
| 690 |
+
4. The searchQuery is "" (empty, no longer on search page)
|
| 691 |
+
"""
|
| 692 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 693 |
+
|
| 694 |
+
# Check 1: page should be "CHANNEL"
|
| 695 |
+
page = final_state.get("page")
|
| 696 |
+
if page != "CHANNEL":
|
| 697 |
+
return 0.0, f"Expected page to be 'CHANNEL', got '{page}'"
|
| 698 |
+
|
| 699 |
+
# Check 2: currentChannel should be "channel-3" (social channel)
|
| 700 |
+
current_channel = final_state.get("currentChannel")
|
| 701 |
+
if current_channel != "channel-3":
|
| 702 |
+
return 0.0, f"Expected currentChannel to be 'channel-3' (#social), got '{current_channel}'"
|
| 703 |
+
|
| 704 |
+
# Check 3: currentDM should be null (not viewing a DM)
|
| 705 |
+
current_dm = final_state.get("currentDM")
|
| 706 |
+
if current_dm is not None:
|
| 707 |
+
return 0.0, f"Expected currentDM to be null, got '{current_dm}'"
|
| 708 |
+
|
| 709 |
+
# Check 4: searchQuery should be "" (empty, no longer on search page)
|
| 710 |
+
search_query = final_state.get("searchQuery")
|
| 711 |
+
if search_query != "":
|
| 712 |
+
return 0.0, f"Expected searchQuery to be empty string after navigating from search, got '{search_query}'"
|
| 713 |
+
|
| 714 |
+
return 1.0, "Successfully navigated from search page to #social channel"
|
| 715 |
+
|
| 716 |
+
|
| 717 |
+
def _validate_closing_a_user_dm(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 718 |
+
"""
|
| 719 |
+
Validate that the user successfully closed a user DM on the User DM page.
|
| 720 |
+
|
| 721 |
+
This function checks:
|
| 722 |
+
1. The page is "USER_DM"
|
| 723 |
+
2. The params.userId is "user-1"
|
| 724 |
+
3. The currentDM is null (DM is closed)
|
| 725 |
+
4. The selectedDMUserId is null (no DM selected)
|
| 726 |
+
5. The showBlankState is true (blank page shown in DM area)
|
| 727 |
+
"""
|
| 728 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 729 |
+
|
| 730 |
+
# Check 1: page should be "USER_DM"
|
| 731 |
+
page = final_state.get("page")
|
| 732 |
+
if page != "USER_DM":
|
| 733 |
+
return 0.0, f"Expected page to be 'USER_DM', got '{page}'"
|
| 734 |
+
|
| 735 |
+
# Check 2: params.userId should be "user-1"
|
| 736 |
+
params = final_state.get("params", {})
|
| 737 |
+
user_id_param = params.get("userId")
|
| 738 |
+
if user_id_param != "user-1":
|
| 739 |
+
return 0.0, f"Expected params.userId to be 'user-1', got '{user_id_param}'"
|
| 740 |
+
|
| 741 |
+
# Check 3: currentDM should be null (DM is closed)
|
| 742 |
+
current_dm = final_state.get("currentDM")
|
| 743 |
+
if current_dm is not None:
|
| 744 |
+
return 0.0, f"Expected currentDM to be null after closing DM, got '{current_dm}'"
|
| 745 |
+
|
| 746 |
+
# Check 4: selectedDMUserId should be null (no DM selected)
|
| 747 |
+
selected_dm_user_id = final_state.get("selectedDMUserId")
|
| 748 |
+
if selected_dm_user_id is not None:
|
| 749 |
+
return 0.0, f"Expected selectedDMUserId to be null after closing DM, got '{selected_dm_user_id}'"
|
| 750 |
+
|
| 751 |
+
# Check 5: showBlankState should be true (blank page shown in DM area)
|
| 752 |
+
show_blank_state = final_state.get("showBlankState")
|
| 753 |
+
if show_blank_state is not True:
|
| 754 |
+
return 0.0, f"Expected showBlankState to be true after closing DM, got '{show_blank_state}'"
|
| 755 |
+
|
| 756 |
+
return 1.0, "Successfully closed user DM, showing blank state on User DM page"
|
| 757 |
+
|
| 758 |
+
|
| 759 |
+
def _validate_filter_names_in_dm_view(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 760 |
+
"""
|
| 761 |
+
Validate that the user successfully filtered names in the DM view and opened a DM.
|
| 762 |
+
|
| 763 |
+
This function checks:
|
| 764 |
+
1. The page is "USER_DM"
|
| 765 |
+
2. The params.userId is "user-1"
|
| 766 |
+
3. The currentDM is "dm-3" (the DM with Mara)
|
| 767 |
+
4. The userListSearchTerm is "Mara" (the filter term used)
|
| 768 |
+
5. The selectedDMUserId is "user-4" (Mara Okafor)
|
| 769 |
+
"""
|
| 770 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 771 |
+
|
| 772 |
+
# Check 1: page should be "USER_DM"
|
| 773 |
+
page = final_state.get("page")
|
| 774 |
+
if page != "USER_DM":
|
| 775 |
+
return 0.0, f"Expected page to be 'USER_DM', got '{page}'"
|
| 776 |
+
|
| 777 |
+
# Check 2: params.userId should be "user-1"
|
| 778 |
+
params = final_state.get("params", {})
|
| 779 |
+
user_id_param = params.get("userId")
|
| 780 |
+
if user_id_param != "user-1":
|
| 781 |
+
return 0.0, f"Expected params.userId to be 'user-1', got '{user_id_param}'"
|
| 782 |
+
|
| 783 |
+
# Check 3: currentDM should be "dm-3" (the DM with Mara)
|
| 784 |
+
current_dm = final_state.get("currentDM")
|
| 785 |
+
if current_dm != "dm-3":
|
| 786 |
+
return 0.0, f"Expected currentDM to be 'dm-3' (the DM with Mara), got '{current_dm}'"
|
| 787 |
+
|
| 788 |
+
# Check 4: userListSearchTerm should be "Mara" (the filter term used)
|
| 789 |
+
user_list_search_term = final_state.get("userListSearchTerm")
|
| 790 |
+
if user_list_search_term != "Mara":
|
| 791 |
+
return 0.0, f"Expected userListSearchTerm to be 'Mara', got '{user_list_search_term}'"
|
| 792 |
+
|
| 793 |
+
# Check 5: selectedDMUserId should be "user-4" (Mara Okafor)
|
| 794 |
+
selected_dm_user_id = final_state.get("selectedDMUserId")
|
| 795 |
+
if selected_dm_user_id != "user-4":
|
| 796 |
+
return 0.0, f"Expected selectedDMUserId to be 'user-4' (Mara Okafor), got '{selected_dm_user_id}'"
|
| 797 |
+
|
| 798 |
+
return 1.0, "Successfully filtered names in DM view with 'Mara' and opened DM with Mara Okafor"
|
| 799 |
+
|
| 800 |
+
|
| 801 |
+
def _validate_dm_view_to_search_view(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 802 |
+
"""
|
| 803 |
+
Validate that the user successfully navigated from the DM view to the search view.
|
| 804 |
+
|
| 805 |
+
This function checks:
|
| 806 |
+
1. The page is "SEARCH"
|
| 807 |
+
2. The params.query is "Alistair"
|
| 808 |
+
3. The searchQuery is "Alistair"
|
| 809 |
+
4. The currentDM is null (not viewing a DM anymore)
|
| 810 |
+
"""
|
| 811 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 812 |
+
|
| 813 |
+
# Check 1: page should be "SEARCH"
|
| 814 |
+
page = final_state.get("page")
|
| 815 |
+
if page != "SEARCH":
|
| 816 |
+
return 0.0, f"Expected page to be 'SEARCH', got '{page}'"
|
| 817 |
+
|
| 818 |
+
# Check 2: params.query should be "Alistair"
|
| 819 |
+
params = final_state.get("params", {})
|
| 820 |
+
query_param = params.get("query")
|
| 821 |
+
if query_param != "Alistair":
|
| 822 |
+
return 0.0, f"Expected params.query to be 'Alistair', got '{query_param}'"
|
| 823 |
+
|
| 824 |
+
# Check 3: searchQuery should be "Alistair"
|
| 825 |
+
search_query = final_state.get("searchQuery")
|
| 826 |
+
if search_query != "Alistair":
|
| 827 |
+
return 0.0, f"Expected searchQuery to be 'Alistair', got '{search_query}'"
|
| 828 |
+
|
| 829 |
+
# Check 4: currentDM should be null (not viewing a DM anymore)
|
| 830 |
+
current_dm = final_state.get("currentDM")
|
| 831 |
+
if current_dm is not None:
|
| 832 |
+
return 0.0, f"Expected currentDM to be null after navigating to search view, got '{current_dm}'"
|
| 833 |
+
|
| 834 |
+
return 1.0, "Successfully navigated from DM view to search view with 'Alistair' query"
|
| 835 |
+
|
| 836 |
+
|
| 837 |
+
def _validate_reply_to_message_in_thread(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 838 |
+
"""
|
| 839 |
+
Validate that the user successfully replied to a message in a thread.
|
| 840 |
+
|
| 841 |
+
This function checks:
|
| 842 |
+
1. The page is "CHANNEL"
|
| 843 |
+
2. The currentChannel is "channel-3" (social channel)
|
| 844 |
+
3. The threadPanel.isOpen is true
|
| 845 |
+
4. The threadPanel.parentMessageId is "msg-01"
|
| 846 |
+
5. A new message exists in the messages array with:
|
| 847 |
+
- userId: "user-1" (the current user Dzaka)
|
| 848 |
+
- channelId: "channel-3"
|
| 849 |
+
- content: "Count me in!"
|
| 850 |
+
- threadParentId: "msg-01"
|
| 851 |
+
6. The messageInputValue is empty (message was sent)
|
| 852 |
+
"""
|
| 853 |
+
logger.debug(f"Running reward function on state: {final_state}")
|
| 854 |
+
|
| 855 |
+
# Check 1: page should be "CHANNEL"
|
| 856 |
+
page = final_state.get("page")
|
| 857 |
+
if page != "CHANNEL":
|
| 858 |
+
return 0.0, f"Expected page to be 'CHANNEL', got '{page}'"
|
| 859 |
+
|
| 860 |
+
# Check 2: currentChannel should be "channel-3" (social channel)
|
| 861 |
+
current_channel = final_state.get("currentChannel")
|
| 862 |
+
if current_channel != "channel-3":
|
| 863 |
+
return 0.0, f"Expected currentChannel to be 'channel-3', got '{current_channel}'"
|
| 864 |
+
|
| 865 |
+
# Check 3: threadPanel should exist
|
| 866 |
+
thread_panel = final_state.get("threadPanel")
|
| 867 |
+
if thread_panel is None:
|
| 868 |
+
return 0.0, "Expected threadPanel to exist in final state"
|
| 869 |
+
|
| 870 |
+
# Check 4: threadPanel.isOpen should be true
|
| 871 |
+
thread_panel_is_open = thread_panel.get("isOpen")
|
| 872 |
+
if thread_panel_is_open is not True:
|
| 873 |
+
return 0.0, f"Expected threadPanel.isOpen to be true, got '{thread_panel_is_open}'"
|
| 874 |
+
|
| 875 |
+
# Check 5: threadPanel.parentMessageId should be "msg-01"
|
| 876 |
+
parent_message_id = thread_panel.get("parentMessageId")
|
| 877 |
+
if parent_message_id != "msg-01":
|
| 878 |
+
return 0.0, f"Expected threadPanel.parentMessageId to be 'msg-01', got '{parent_message_id}'"
|
| 879 |
+
|
| 880 |
+
# Check 6: messages array should exist
|
| 881 |
+
messages = final_state.get("messages", [])
|
| 882 |
+
if not isinstance(messages, list):
|
| 883 |
+
return 0.0, "Expected messages to be an array"
|
| 884 |
+
|
| 885 |
+
# Check 7: Find a message in channel-3 from user-1 with the expected content and threadParentId
|
| 886 |
+
target_message = None
|
| 887 |
+
for message in messages:
|
| 888 |
+
if (message.get("channelId") == "channel-3" and
|
| 889 |
+
message.get("userId") == "user-1" and
|
| 890 |
+
message.get("content") == "Count me in!" and
|
| 891 |
+
message.get("threadParentId") == "msg-01"):
|
| 892 |
+
target_message = message
|
| 893 |
+
break
|
| 894 |
+
|
| 895 |
+
if target_message is None:
|
| 896 |
+
return 0.0, "Expected to find a new reply message with content 'Count me in!' from user-1 in channel-3 with threadParentId 'msg-01'"
|
| 897 |
+
|
| 898 |
+
# Check 8: The message should have a valid id and timestamp
|
| 899 |
+
message_id = target_message.get("id")
|
| 900 |
+
if not message_id:
|
| 901 |
+
return 0.0, "Expected the new reply message to have an id"
|
| 902 |
+
|
| 903 |
+
message_timestamp = target_message.get("timestamp")
|
| 904 |
+
if not message_timestamp:
|
| 905 |
+
return 0.0, "Expected the new reply message to have a timestamp"
|
| 906 |
+
|
| 907 |
+
# Check 9: messageInputValue should be empty (message was sent)
|
| 908 |
+
message_input_value = final_state.get("messageInputValue", "")
|
| 909 |
+
if message_input_value != "":
|
| 910 |
+
return 0.0, f"Expected messageInputValue to be empty after sending, got '{message_input_value}'"
|
| 911 |
+
|
| 912 |
+
return 1.0, "Successfully replied to message 'Morning crew! Coffee walk at 10?' in thread with 'Count me in!'"
|
| 913 |
+
|
| 914 |
+
|
| 915 |
+
# Registry of all Slack reward functions
|
| 916 |
+
REWARD_FUNCTIONS_SLACK = {
|
| 917 |
+
"_validate_navigate_to_search_page": _validate_navigate_to_search_page,
|
| 918 |
+
"_validate_switch_to_different_channel": _validate_switch_to_different_channel,
|
| 919 |
+
"_validate_view_user_profile_from_message": _validate_view_user_profile_from_message,
|
| 920 |
+
"_validate_open_thread_panel_from_message": _validate_open_thread_panel_from_message,
|
| 921 |
+
"_validate_navigate_from_direct_message_to_channel": _validate_navigate_from_direct_message_to_channel,
|
| 922 |
+
"_validate_switch_search_filter_to_people": _validate_switch_search_filter_to_people,
|
| 923 |
+
"_validate_search_and_open_message_result": _validate_search_and_open_message_result,
|
| 924 |
+
"_validate_send_message_in_channel": _validate_send_message_in_channel,
|
| 925 |
+
"_validate_reply_to_message_in_thread": _validate_reply_to_message_in_thread,
|
| 926 |
+
"_validate_search_with_from_filter": _validate_search_with_from_filter,
|
| 927 |
+
"_validate_search_with_in_filter": _validate_search_with_in_filter,
|
| 928 |
+
"_validate_create_new_public_channel": _validate_create_new_public_channel,
|
| 929 |
+
"_validate_navigate_to_direct_message_page_from_search_and_send_a_message": _validate_navigate_to_direct_message_page_from_search_and_send_a_message,
|
| 930 |
+
"_validate_using_exclude_automations_filter_on_search_results": _validate_using_exclude_automations_filter_on_search_results,
|
| 931 |
+
"_validate_open_direct_message_from_sidebar": _validate_open_direct_message_from_sidebar,
|
| 932 |
+
"_validate_search_and_filter_by_people": _validate_search_and_filter_by_people,
|
| 933 |
+
"_validate_navigate_from_search_to_channel": _validate_navigate_from_search_to_channel,
|
| 934 |
+
"_validate_closing_a_user_dm": _validate_closing_a_user_dm,
|
| 935 |
+
"_validate_filter_names_in_dm_view": _validate_filter_names_in_dm_view,
|
| 936 |
+
"_validate_dm_view_to_search_view": _validate_dm_view_to_search_view,
|
| 937 |
+
}
|
| 938 |
+
|
rewards/taobao_mobile.py
ADDED
|
@@ -0,0 +1,408 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Reward functions for Taobao app tasks.
|
| 3 |
+
"""
|
| 4 |
+
|
| 5 |
+
import logging
|
| 6 |
+
from typing import Any, Dict, Tuple
|
| 7 |
+
|
| 8 |
+
logger = logging.getLogger(__name__)
|
| 9 |
+
|
| 10 |
+
# Easy Tasks
|
| 11 |
+
|
| 12 |
+
def _validate_navigatetosearch(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 13 |
+
"""Validate that user navigated to search page."""
|
| 14 |
+
|
| 15 |
+
# Check if we're on search page
|
| 16 |
+
if final_state.get("page") != "search":
|
| 17 |
+
return 0.0, f"Not on search page, current page: {final_state.get('page')}"
|
| 18 |
+
|
| 19 |
+
# Search query should be empty (just navigated, not searched yet)
|
| 20 |
+
if final_state.get("searchQuery") != "":
|
| 21 |
+
return 0.0, f"Search query should be empty, got: {final_state.get('searchQuery')}"
|
| 22 |
+
|
| 23 |
+
return 1.0, "Successfully navigated to search page"
|
| 24 |
+
|
| 25 |
+
def _validate_viewproductfromhome(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 26 |
+
"""Validate that user viewed product from homepage."""
|
| 27 |
+
|
| 28 |
+
# Check if we're on preview page
|
| 29 |
+
if final_state.get("page") != "preview":
|
| 30 |
+
return 0.0, f"Not on preview page, current page: {final_state.get('page')}"
|
| 31 |
+
|
| 32 |
+
# Check if a product is selected
|
| 33 |
+
if not final_state.get("selectedProductId"):
|
| 34 |
+
return 0.0, "No product selected"
|
| 35 |
+
|
| 36 |
+
# Should have a valid product ID (numeric string)
|
| 37 |
+
product_id = final_state.get("selectedProductId")
|
| 38 |
+
if not product_id or not product_id.isdigit():
|
| 39 |
+
return 0.0, f"Invalid product ID: {product_id}"
|
| 40 |
+
|
| 41 |
+
return 1.0, f"Successfully viewing product {product_id} on preview page"
|
| 42 |
+
|
| 43 |
+
def _validate_viewshoppingcart(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 44 |
+
"""Validate that user navigated to cart page."""
|
| 45 |
+
|
| 46 |
+
# Check if we're on cart page
|
| 47 |
+
if final_state.get("page") != "cart":
|
| 48 |
+
return 0.0, f"Not on cart page, current page: {final_state.get('page')}"
|
| 49 |
+
|
| 50 |
+
# Cart should exist and have items (since prompt says "you have items")
|
| 51 |
+
cart = final_state.get("cart", [])
|
| 52 |
+
if len(cart) == 0:
|
| 53 |
+
return 0.0, "Cart should contain items but is empty"
|
| 54 |
+
|
| 55 |
+
return 1.0, "Successfully navigated to cart page with items"
|
| 56 |
+
|
| 57 |
+
def _validate_navigateviarelatedproducts(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 58 |
+
"""Validate that user navigated via related products."""
|
| 59 |
+
|
| 60 |
+
# Check we're on product detail page
|
| 61 |
+
if final_state.get("page") != "product":
|
| 62 |
+
return 0.0, f"Should be on product detail page, got: {final_state.get('page')}"
|
| 63 |
+
|
| 64 |
+
# Check correct product is selected (instant noodles - ID 3)
|
| 65 |
+
if final_state.get("selectedProductId") != "3":
|
| 66 |
+
return 0.0, f"Should be viewing instant noodles (product 3), got: {final_state.get('selectedProductId')}"
|
| 67 |
+
|
| 68 |
+
return 1.0, "Successfully navigated to instant noodles via related products"
|
| 69 |
+
|
| 70 |
+
def _validate_browserelatedfromcart(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 71 |
+
"""Validate browsing related products from cart page."""
|
| 72 |
+
|
| 73 |
+
# Check we're on product page
|
| 74 |
+
if final_state.get("page") != "product":
|
| 75 |
+
return 0.0, f"Should be on preview page, got: {final_state.get('page')}"
|
| 76 |
+
|
| 77 |
+
# Check a product is selected (any product from related)
|
| 78 |
+
if not final_state.get("selectedProductId"):
|
| 79 |
+
return 0.0, "No product selected from related products"
|
| 80 |
+
|
| 81 |
+
# Should have a valid product ID
|
| 82 |
+
product_id = final_state.get("selectedProductId")
|
| 83 |
+
if not product_id or not product_id.isdigit():
|
| 84 |
+
return 0.0, f"Invalid product ID selected: {product_id}"
|
| 85 |
+
|
| 86 |
+
return 1.0, f"Successfully browsed to product {product_id} from cart related products"
|
| 87 |
+
|
| 88 |
+
def _validate_quickproductcomparison(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 89 |
+
"""Validate quick product comparison using related products."""
|
| 90 |
+
|
| 91 |
+
# Check we're on preview page for product 3
|
| 92 |
+
if final_state.get("page") != "product":
|
| 93 |
+
return 0.0, f"Should be on product page, got: {final_state.get('page')}"
|
| 94 |
+
|
| 95 |
+
if final_state.get("selectedProductId") != "2":
|
| 96 |
+
return 0.0, f"Should be viewing Jeep shirt (product 2), got: {final_state.get('selectedProductId')}"
|
| 97 |
+
|
| 98 |
+
return 1.0, "Successfully compared multiple products using related products"
|
| 99 |
+
|
| 100 |
+
def _validate_returntosearchfromproduct(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 101 |
+
"""Validate returning to search from product detail."""
|
| 102 |
+
|
| 103 |
+
# Check we're on search page
|
| 104 |
+
if final_state.get("page") != "search":
|
| 105 |
+
return 0.0, f"Should be on search page, got: {final_state.get('page')}"
|
| 106 |
+
|
| 107 |
+
# Search query should be preserved (not empty)
|
| 108 |
+
search_query = final_state.get("searchQuery", "")
|
| 109 |
+
if not search_query:
|
| 110 |
+
return 0.0, "Search query should be preserved but is empty"
|
| 111 |
+
|
| 112 |
+
return 1.0, f"Successfully returned to search with query: {search_query}"
|
| 113 |
+
|
| 114 |
+
def _validate_searchproduct(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 115 |
+
"""Validate that user searched for sauce products."""
|
| 116 |
+
|
| 117 |
+
# Check we're on search page
|
| 118 |
+
if final_state.get("page") != "search":
|
| 119 |
+
return 0.0, f"Should be on search page, got: {final_state.get('page')}"
|
| 120 |
+
|
| 121 |
+
# Check search query is "sauce"
|
| 122 |
+
search_query = final_state.get("searchQuery", "").lower()
|
| 123 |
+
if "sauce" not in search_query:
|
| 124 |
+
return 0.0, f"Search query should contain 'sauce', got: {final_state.get('searchQuery')}"
|
| 125 |
+
|
| 126 |
+
return 1.0, "Successfully searched for sauce products"
|
| 127 |
+
|
| 128 |
+
# Medium Tasks
|
| 129 |
+
|
| 130 |
+
def _validate_searchfindiphone(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 131 |
+
"""Validate that user searched for iPhone and found specific product."""
|
| 132 |
+
|
| 133 |
+
# Check if we're on product page
|
| 134 |
+
if final_state.get("page") != "product":
|
| 135 |
+
return 0.0, f"Not on product page, current page: {final_state.get('page')}"
|
| 136 |
+
|
| 137 |
+
# Check if correct product is selected
|
| 138 |
+
if final_state.get("selectedProductId") != "1":
|
| 139 |
+
return 0.0, f"Wrong product selected. Expected: 1, Got: {final_state.get('selectedProductId')}"
|
| 140 |
+
|
| 141 |
+
# Check if search was performed with correct query
|
| 142 |
+
search_query = final_state.get("searchQuery", "").lower()
|
| 143 |
+
if "iphone" not in search_query:
|
| 144 |
+
return 0.0, f"Search query doesn't contain 'iPhone': {final_state.get('searchQuery')}"
|
| 145 |
+
|
| 146 |
+
return 1.0, "Successfully searched for iPhone and selected product 1"
|
| 147 |
+
|
| 148 |
+
def _validate_buynowfromdetails(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 149 |
+
"""Validate that product was added to cart from detail page."""
|
| 150 |
+
|
| 151 |
+
# Check cart contains items
|
| 152 |
+
cart = final_state.get("cart", [])
|
| 153 |
+
if len(cart) == 0:
|
| 154 |
+
return 0.0, "Cart is empty"
|
| 155 |
+
|
| 156 |
+
# Find product with ID "2" in cart
|
| 157 |
+
target_product = None
|
| 158 |
+
for item in cart:
|
| 159 |
+
if item.get("productId") == "2":
|
| 160 |
+
target_product = item
|
| 161 |
+
break
|
| 162 |
+
|
| 163 |
+
if not target_product:
|
| 164 |
+
return 0.0, f"Product 2 not found in cart. Cart contents: {cart}"
|
| 165 |
+
|
| 166 |
+
# Check quantity is 1
|
| 167 |
+
if target_product.get("qty", 0) != 1:
|
| 168 |
+
return 0.0, f"Product 2 quantity should be 1, got: {target_product.get('qty')}"
|
| 169 |
+
|
| 170 |
+
return 1.0, "Successfully added product 2 to cart with quantity 1"
|
| 171 |
+
|
| 172 |
+
def _validate_modifycartquantities(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 173 |
+
"""Validate that user modified cart quantities correctly."""
|
| 174 |
+
|
| 175 |
+
# Check we're on cart page
|
| 176 |
+
if final_state.get("page") != "cart":
|
| 177 |
+
return 0.0, f"Should be on cart page, got: {final_state.get('page')}"
|
| 178 |
+
|
| 179 |
+
cart = final_state.get("cart", [])
|
| 180 |
+
|
| 181 |
+
product_3 = next((item for item in cart if item.get("productId") == "3"), None)
|
| 182 |
+
product_7 = next((item for item in cart if item.get("productId") == "7"), None)
|
| 183 |
+
|
| 184 |
+
if not product_3:
|
| 185 |
+
return 0.0, "Instant noodles (product 3) not found in cart"
|
| 186 |
+
if not product_7:
|
| 187 |
+
return 0.0, "Laundry detergent (product 7) not found in cart"
|
| 188 |
+
|
| 189 |
+
# Check updated quantities
|
| 190 |
+
if product_3.get("qty", 0) != 3:
|
| 191 |
+
return 0.0, f"Product 3 quantity should be 3, got: {product_3.get('qty')}"
|
| 192 |
+
if product_7.get("qty", 0) != 1:
|
| 193 |
+
return 0.0, f"Product 7 quantity should be 1, got: {product_7.get('qty')}"
|
| 194 |
+
|
| 195 |
+
return 1.0, "Successfully modified cart quantities"
|
| 196 |
+
|
| 197 |
+
def _validate_useaddtocartpopup(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 198 |
+
"""Validate that user used add to cart popup successfully."""
|
| 199 |
+
|
| 200 |
+
# Check add to cart popup is closed
|
| 201 |
+
if final_state.get("isAddToCartPopupOpen", False):
|
| 202 |
+
return 0.0, "Add to cart popup should be closed but is still open"
|
| 203 |
+
|
| 204 |
+
# Check cart contains product 2 with quantity 2
|
| 205 |
+
cart = final_state.get("cart", [])
|
| 206 |
+
product_2 = next((item for item in cart if item.get("productId") == "2"), None)
|
| 207 |
+
|
| 208 |
+
if not product_2:
|
| 209 |
+
return 0.0, "JEEP shirt (product 2) not found in cart"
|
| 210 |
+
|
| 211 |
+
if product_2.get("qty", 0) != 2:
|
| 212 |
+
return 0.0, f"Product 2 quantity should be 2, got: {product_2.get('qty')}"
|
| 213 |
+
|
| 214 |
+
return 1.0, "Successfully used add to cart popup to add 2 quantities"
|
| 215 |
+
|
| 216 |
+
def _validate_relatedproductchain(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 217 |
+
"""Validate navigation through related product chain."""
|
| 218 |
+
|
| 219 |
+
# Check we're on product detail page for sauce
|
| 220 |
+
if final_state.get("page") != "product":
|
| 221 |
+
return 0.0, f"Should be on product detail page, got: {final_state.get('page')}"
|
| 222 |
+
|
| 223 |
+
if final_state.get("selectedProductId") != "5":
|
| 224 |
+
return 0.0, f"Should be viewing sauce (product 5), got: {final_state.get('selectedProductId')}"
|
| 225 |
+
|
| 226 |
+
return 1.0, "Successfully navigated through related product chain to sauce details"
|
| 227 |
+
|
| 228 |
+
def _validate_addrelatedtocart(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 229 |
+
"""Validate adding related product to cart."""
|
| 230 |
+
|
| 231 |
+
# Check cart contains product 4 with quantity 2
|
| 232 |
+
cart = final_state.get("cart", [])
|
| 233 |
+
product_4 = next((item for item in cart if item.get("productId") == "4"), None)
|
| 234 |
+
|
| 235 |
+
if not product_4:
|
| 236 |
+
return 0.0, "Cooking pan (product 4) not found in cart"
|
| 237 |
+
|
| 238 |
+
if product_4.get("qty", 0) != 2:
|
| 239 |
+
return 0.0, f"Product 4 quantity should be 2, got: {product_4.get('qty')}"
|
| 240 |
+
|
| 241 |
+
# Add to cart popup should be closed
|
| 242 |
+
if final_state.get("isAddToCartPopupOpen", False):
|
| 243 |
+
return 0.0, "Add to cart popup should be closed"
|
| 244 |
+
|
| 245 |
+
return 1.0, "Successfully added related product to cart with correct quantity"
|
| 246 |
+
|
| 247 |
+
# Hard Tasks
|
| 248 |
+
|
| 249 |
+
def _validate_complexsearchaddmultiple(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 250 |
+
"""Validate complex search and multiple product actions."""
|
| 251 |
+
|
| 252 |
+
# Check 1: Currently viewing product 4
|
| 253 |
+
if final_state.get("page") != "product":
|
| 254 |
+
return 0.0, f"Should be on product page, got: {final_state.get('page')}"
|
| 255 |
+
|
| 256 |
+
if final_state.get("selectedProductId") != "4":
|
| 257 |
+
return 0.0, f"Should be viewing product 4, got: {final_state.get('selectedProductId')}"
|
| 258 |
+
|
| 259 |
+
# Check 2: Search query is "no"
|
| 260 |
+
search_query = final_state.get("searchQuery", "").lower()
|
| 261 |
+
if "no" not in search_query:
|
| 262 |
+
return 0.0, f"Search query should contain 'no', got: {final_state.get('searchQuery')}"
|
| 263 |
+
|
| 264 |
+
# Check 3: Product 3 is in cart
|
| 265 |
+
cart = final_state.get("cart", [])
|
| 266 |
+
product_3_in_cart = any(item.get("productId") == "3" for item in cart)
|
| 267 |
+
|
| 268 |
+
if not product_3_in_cart:
|
| 269 |
+
return 0.0, f"Product 3 not found in cart. Cart contents: {cart}"
|
| 270 |
+
|
| 271 |
+
return 1.0, "Successfully completed complex search and multiple product actions"
|
| 272 |
+
|
| 273 |
+
def _validate_multiproductcartmanagement(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 274 |
+
"""Validate complex multi-product cart management."""
|
| 275 |
+
|
| 276 |
+
# Check 1: Currently on cart page
|
| 277 |
+
if final_state.get("page") != "cart":
|
| 278 |
+
return 0.0, f"Should be on cart page, got: {final_state.get('page')}"
|
| 279 |
+
|
| 280 |
+
# Check 2: Cart contains both products with correct quantities
|
| 281 |
+
cart = final_state.get("cart", [])
|
| 282 |
+
|
| 283 |
+
product_7 = next((item for item in cart if item.get("productId") == "7"), None)
|
| 284 |
+
product_3 = next((item for item in cart if item.get("productId") == "3"), None)
|
| 285 |
+
|
| 286 |
+
if not product_7:
|
| 287 |
+
return 0.0, "活力28洗衣液 (product 7) not found in cart"
|
| 288 |
+
if not product_3:
|
| 289 |
+
return 0.0, "华丰方便面 (product 3) not found in cart"
|
| 290 |
+
|
| 291 |
+
# Check quantities
|
| 292 |
+
if product_7.get("qty", 0) != 2:
|
| 293 |
+
return 0.0, f"Product 7 quantity should be 2, got: {product_7.get('qty')}"
|
| 294 |
+
if product_3.get("qty", 0) != 1:
|
| 295 |
+
return 0.0, f"Product 3 quantity should be 1, got: {product_3.get('qty')}"
|
| 296 |
+
|
| 297 |
+
return 1.0, "Successfully managed multiple products in cart with correct quantities"
|
| 298 |
+
|
| 299 |
+
def _validate_completeshoppingworkflow(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 300 |
+
"""Validate complete shopping workflow with cart modification."""
|
| 301 |
+
|
| 302 |
+
# Check 1: Currently on cart page
|
| 303 |
+
if final_state.get("page") != "cart":
|
| 304 |
+
return 0.0, f"Should be on cart page, got: {final_state.get('page')}"
|
| 305 |
+
|
| 306 |
+
# Check 2: Cart contains only product 6 (massage chair)
|
| 307 |
+
cart = final_state.get("cart", [])
|
| 308 |
+
|
| 309 |
+
product_6 = next((item for item in cart if item.get("productId") == "6"), None)
|
| 310 |
+
product_4 = next((item for item in cart if item.get("productId") == "4"), None)
|
| 311 |
+
|
| 312 |
+
# Product 6 should be in cart with quantity 1
|
| 313 |
+
if not product_6:
|
| 314 |
+
return 0.0, "奥克斯按摩椅 (product 6) not found in cart"
|
| 315 |
+
if product_6.get("qty", 0) != 1:
|
| 316 |
+
return 0.0, f"Product 6 quantity should be 1, got: {product_6.get('qty')}"
|
| 317 |
+
|
| 318 |
+
# Product 4 should NOT be in cart (was removed)
|
| 319 |
+
if product_4:
|
| 320 |
+
return 0.0, "爱仕达炒锅 (product 4) should be removed from cart but is still present"
|
| 321 |
+
|
| 322 |
+
# Should have exactly 1 item in cart
|
| 323 |
+
if len(cart) != 1:
|
| 324 |
+
return 0.0, f"Cart should have exactly 1 item, got: {len(cart)} items"
|
| 325 |
+
|
| 326 |
+
return 1.0, "Successfully completed shopping workflow with correct cart contents"
|
| 327 |
+
|
| 328 |
+
def _validate_completeproductdiscovery(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 329 |
+
"""Validate complete product discovery flow."""
|
| 330 |
+
|
| 331 |
+
# Check we're on cart page
|
| 332 |
+
if final_state.get("page") != "cart":
|
| 333 |
+
return 0.0, f"Should be on cart page, got: {final_state.get('page')}"
|
| 334 |
+
|
| 335 |
+
cart = final_state.get("cart", [])
|
| 336 |
+
|
| 337 |
+
product_5 = next((item for item in cart if item.get("productId") == "5"), None)
|
| 338 |
+
product_7 = next((item for item in cart if item.get("productId") == "7"), None)
|
| 339 |
+
|
| 340 |
+
if not product_5:
|
| 341 |
+
return 0.0, "Sauce (product 5) not found in cart"
|
| 342 |
+
if not product_7:
|
| 343 |
+
return 0.0, "Laundry detergent (product 7) not found in cart"
|
| 344 |
+
|
| 345 |
+
# Check quantities
|
| 346 |
+
if product_5.get("qty", 0) != 2:
|
| 347 |
+
return 0.0, f"Product 5 quantity should be 2, got: {product_5.get('qty')}"
|
| 348 |
+
if product_7.get("qty", 0) != 1:
|
| 349 |
+
return 0.0, f"Product 7 quantity should be 1, got: {product_7.get('qty')}"
|
| 350 |
+
|
| 351 |
+
# Should have exactly 2 items in cart
|
| 352 |
+
if len(cart) != 2:
|
| 353 |
+
return 0.0, f"Cart should have exactly 2 items, got: {len(cart)} items"
|
| 354 |
+
|
| 355 |
+
return 1.0, "Successfully completed product discovery flow"
|
| 356 |
+
|
| 357 |
+
def _validate_relatedproductsshoppingspree(initial_state: Dict[str, Any], final_state: Dict[str, Any]) -> Tuple[float, str]:
|
| 358 |
+
"""Validate complete shopping spree using related products."""
|
| 359 |
+
|
| 360 |
+
# Check we're on cart page
|
| 361 |
+
if final_state.get("page") != "cart":
|
| 362 |
+
return 0.0, f"Should be on cart page, got: {final_state.get('page')}"
|
| 363 |
+
|
| 364 |
+
cart = final_state.get("cart", [])
|
| 365 |
+
|
| 366 |
+
# Check all products with correct quantities
|
| 367 |
+
products_expected = {
|
| 368 |
+
"4": 1, # cooking pan
|
| 369 |
+
"5": 2, # sauce
|
| 370 |
+
"3": 3, # noodles
|
| 371 |
+
"2": 1 # detergent
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
for product_id, expected_qty in products_expected.items():
|
| 375 |
+
product = next((item for item in cart if item.get("productId") == product_id), None)
|
| 376 |
+
if not product:
|
| 377 |
+
return 0.0, f"Product {product_id} not found in cart"
|
| 378 |
+
if product.get("qty", 0) != expected_qty:
|
| 379 |
+
return 0.0, f"Product {product_id} quantity should be {expected_qty}, got: {product.get('qty')}"
|
| 380 |
+
|
| 381 |
+
# Should have exactly 4 items in cart
|
| 382 |
+
if len(cart) != 4:
|
| 383 |
+
return 0.0, f"Cart should have exactly 4 items, got: {len(cart)} items"
|
| 384 |
+
|
| 385 |
+
return 1.0, "Successfully completed related products shopping spree with all items"
|
| 386 |
+
|
| 387 |
+
# Registry
|
| 388 |
+
REWARD_FUNCTIONS_TAOBAO_MOBILE = {
|
| 389 |
+
"_validate_navigatetosearch": _validate_navigatetosearch,
|
| 390 |
+
"_validate_viewproductfromhome": _validate_viewproductfromhome,
|
| 391 |
+
"_validate_viewshoppingcart": _validate_viewshoppingcart,
|
| 392 |
+
"_validate_navigateviarelatedproducts": _validate_navigateviarelatedproducts,
|
| 393 |
+
"_validate_browserelatedfromcart": _validate_browserelatedfromcart,
|
| 394 |
+
"_validate_quickproductcomparison": _validate_quickproductcomparison,
|
| 395 |
+
"_validate_returntosearchfromproduct": _validate_returntosearchfromproduct,
|
| 396 |
+
"_validate_searchproduct": _validate_searchproduct,
|
| 397 |
+
"_validate_searchfindiphone": _validate_searchfindiphone,
|
| 398 |
+
"_validate_buynowfromdetails": _validate_buynowfromdetails,
|
| 399 |
+
"_validate_modifycartquantities": _validate_modifycartquantities,
|
| 400 |
+
"_validate_useaddtocartpopup": _validate_useaddtocartpopup,
|
| 401 |
+
"_validate_relatedproductchain": _validate_relatedproductchain,
|
| 402 |
+
"_validate_addrelatedtocart": _validate_addrelatedtocart,
|
| 403 |
+
"_validate_complexsearchaddmultiple": _validate_complexsearchaddmultiple,
|
| 404 |
+
"_validate_multiproductcartmanagement": _validate_multiproductcartmanagement,
|
| 405 |
+
"_validate_completeshoppingworkflow": _validate_completeshoppingworkflow,
|
| 406 |
+
"_validate_completeproductdiscovery": _validate_completeproductdiscovery,
|
| 407 |
+
"_validate_relatedproductsshoppingspree": _validate_relatedproductsshoppingspree,
|
| 408 |
+
}
|
tasks/linear/add-label-to-issue.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Add the Bug label to issue VSS-104",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [{\"id\": \"4\", \"identifier\": \"VSS-104\", \"title\": \"Build 3D station rotation visualizer component\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Add the Bug label to issue VSS-104 by following these steps: 1) Click on issue VSS-104 on the kanban board to open it. 2) Find the Labels section in the right sidebar of the issue details page. 3) Click the 'Add label' button to open the labels dropdown. 4) Click on the 'Bug' label in the dropdown to add it to the issue.\", \"success_criteria\": \"Issue VSS-104 must have the Bug label (id='label1') in its labels array.\"}",
|
| 10 |
"reward_function": "",
|
| 11 |
"valid_target_states": "[{\"issues\": [{\"id\": \"4\", \"identifier\": \"VSS-104\", \"title\": \"Build 3D station rotation visualizer component\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}], \"projectId\": \"proj1\", \"priority\": \"none\"}]}]",
|
|
|
|
| 5 |
"description": "Add the Bug label to issue VSS-104",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [{\"id\": \"4\", \"identifier\": \"VSS-104\", \"title\": \"Build 3D station rotation visualizer component\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Add the Bug label to issue VSS-104 by following these steps: 1) Click on issue VSS-104 on the kanban board to open it. 2) Find the Labels section in the right sidebar of the issue details page. 3) Click the 'Add label' button to open the labels dropdown. 4) Click on the 'Bug' label in the dropdown to add it to the issue.\", \"success_criteria\": \"Issue VSS-104 must have the Bug label (id='label1') in its labels array.\"}",
|
| 10 |
"reward_function": "",
|
| 11 |
"valid_target_states": "[{\"issues\": [{\"id\": \"4\", \"identifier\": \"VSS-104\", \"title\": \"Build 3D station rotation visualizer component\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}], \"projectId\": \"proj1\", \"priority\": \"none\"}]}]",
|
tasks/linear/change-issue-priority.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Change the priority of issue VSS-101 from none to high",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [{\"id\": \"1\", \"identifier\": \"VSS-101\", \"title\": \"Design oxygen level monitoring dashboard\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Change the priority of issue VSS-101 by following these steps: 1) Click on issue VSS-101 on the kanban board to open it. 2) Locate the Priority section in the right sidebar. 3) Click on the priority dropdown (currently showing 'Set priority'). 4) Select 'High' from the dropdown menu.\", \"success_criteria\": \"Issue VSS-101 must have priority set to 'high'.\"}",
|
| 10 |
"reward_function": "",
|
| 11 |
"valid_target_states": "[{\"issues\": [{\"id\": \"1\", \"identifier\": \"VSS-101\", \"title\": \"Design oxygen level monitoring dashboard\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"high\"}]}]",
|
|
|
|
| 5 |
"description": "Change the priority of issue VSS-101 from none to high",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [{\"id\": \"1\", \"identifier\": \"VSS-101\", \"title\": \"Design oxygen level monitoring dashboard\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Change the priority of issue VSS-101 by following these steps: 1) Click on issue VSS-101 on the kanban board to open it. 2) Locate the Priority section in the right sidebar. 3) Click on the priority dropdown (currently showing 'Set priority'). 4) Select 'High' from the dropdown menu.\", \"success_criteria\": \"Issue VSS-101 must have priority set to 'high'.\"}",
|
| 10 |
"reward_function": "",
|
| 11 |
"valid_target_states": "[{\"issues\": [{\"id\": \"1\", \"identifier\": \"VSS-101\", \"title\": \"Design oxygen level monitoring dashboard\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"high\"}]}]",
|
tasks/linear/change-issue-status.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Change the status of issue VSS-102 from queued to in_progress",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [{\"id\": \"2\", \"identifier\": \"VSS-102\", \"title\": \"Add solar panel efficiency widget to control panel\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Change the status of issue VSS-102 by following these steps: 1) Click on issue VSS-102 on the kanban board to open it. 2) Locate the Status section in the right sidebar. 3) Click on the status dropdown (currently showing 'Queued'). 4) Select 'In Progress' from the dropdown menu.\", \"success_criteria\": \"Issue VSS-102 must have status set to 'in_progress'.\"}",
|
| 10 |
"reward_function": "",
|
| 11 |
"valid_target_states": "[{\"issues\": [{\"id\": \"2\", \"identifier\": \"VSS-102\", \"title\": \"Add solar panel efficiency widget to control panel\", \"status\": \"in_progress\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}]}]",
|
|
|
|
| 5 |
"description": "Change the status of issue VSS-102 from queued to in_progress",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [{\"id\": \"2\", \"identifier\": \"VSS-102\", \"title\": \"Add solar panel efficiency widget to control panel\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Change the status of issue VSS-102 by following these steps: 1) Click on issue VSS-102 on the kanban board to open it. 2) Locate the Status section in the right sidebar. 3) Click on the status dropdown (currently showing 'Queued'). 4) Select 'In Progress' from the dropdown menu.\", \"success_criteria\": \"Issue VSS-102 must have status set to 'in_progress'.\"}",
|
| 10 |
"reward_function": "",
|
| 11 |
"valid_target_states": "[{\"issues\": [{\"id\": \"2\", \"identifier\": \"VSS-102\", \"title\": \"Add solar panel efficiency widget to control panel\", \"status\": \"in_progress\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}]}]",
|
tasks/linear/complete-issue-workflow.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Complete an end-to-end workflow: create issue, set priority, assign, add label, move to in_progress, and add comment",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Complete an end-to-end workflow by following these detailed steps: 1) Click the 'Create issue' button (edit/pencil icon) in the top right of the left sidebar to open the new issue modal. 2) Click in the title field and type 'Fix critical database connection bug'. 3) Click in the description field (below title) and type a description. 4) In the bottom section of the modal, locate the Priority dropdown and click it, then select 'High'. 5) Locate the Assignee dropdown and click it, then select 'Chen'. 6) Locate the Labels section and click the 'Add label' button, then select 'Bug'. 7) Locate the Status dropdown (current showing 'Queued') and click it, then select 'In Progress'. 8) Click the 'Create' button at the bottom of the modal to create the issue. 9) Find the newly created issue in the Chen's row of the In Progress column. 10) Click the newly created issue on the kanban board to open it. 11) Scroll to the comments section at the bottom of the issue details page. 12) Click in the comment text field and type 'Starting investigation'. 13) Click the submit button (arrow icon) to post the comment.\", \"success_criteria\": \"A new issue must exist with title 'Fix critical database connection bug', priority='high', assigneeId='2', status='in_progress', Bug label in labels array, and at least one comment containing 'Starting investigation'.\"}",
|
| 10 |
"reward_function": "_validate_complete_issue_workflow",
|
| 11 |
"valid_target_states": "",
|
|
|
|
| 5 |
"description": "Complete an end-to-end workflow: create issue, set priority, assign, add label, move to in_progress, and add comment",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Complete an end-to-end workflow by following these detailed steps: 1) Click the 'Create issue' button (edit/pencil icon) in the top right of the left sidebar to open the new issue modal. 2) Click in the title field and type 'Fix critical database connection bug'. 3) Click in the description field (below title) and type a description. 4) In the bottom section of the modal, locate the Priority dropdown and click it, then select 'High'. 5) Locate the Assignee dropdown and click it, then select 'Chen'. 6) Locate the Labels section and click the 'Add label' button, then select 'Bug'. 7) Locate the Status dropdown (current showing 'Queued') and click it, then select 'In Progress'. 8) Click the 'Create' button at the bottom of the modal to create the issue. 9) Find the newly created issue in the Chen's row of the In Progress column. 10) Click the newly created issue on the kanban board to open it. 11) Scroll to the comments section at the bottom of the issue details page. 12) Click in the comment text field and type 'Starting investigation'. 13) Click the submit button (arrow icon) to post the comment.\", \"success_criteria\": \"A new issue must exist with title 'Fix critical database connection bug', priority='high', assigneeId='2', status='in_progress', Bug label in labels array, and at least one comment containing 'Starting investigation'.\"}",
|
| 10 |
"reward_function": "_validate_complete_issue_workflow",
|
| 11 |
"valid_target_states": "",
|
tasks/linear/create-new-issue.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Create a new issue with title, description, assignee, and priority",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Create a new issue by following these steps: 1) Click the 'Create issue' button (edit/pencil icon) in the top right of the left sidebar to open the new issue modal. 2) Click in the title field and type 'Implement user authentication system'. 3) Click in the description field (below the title field) and type 'Add JWT-based authentication'. 4) In the bottom section of the modal, locate the Assignee dropdown and click it, then select 'Chen' from the dropdown. 5) Locate the Priority dropdown and click it, then select 'High' from the dropdown. 6) Click the 'Create' button at the bottom of the modal to create the issue.\", \"success_criteria\": \"A new issue must be created with the title 'Implement user authentication system', description containing 'JWT-based authentication', assigned to Chen (assigneeId='2'), and priority set to 'high'.\"}",
|
| 10 |
"reward_function": "_validate_create_new_issue",
|
| 11 |
"valid_target_states": "",
|
|
|
|
| 5 |
"description": "Create a new issue with title, description, assignee, and priority",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Create a new issue by following these steps: 1) Click the 'Create issue' button (edit/pencil icon) in the top right of the left sidebar to open the new issue modal. 2) Click in the title field and type 'Implement user authentication system'. 3) Click in the description field (below the title field) and type 'Add JWT-based authentication'. 4) In the bottom section of the modal, locate the Assignee dropdown and click it, then select 'Chen' from the dropdown. 5) Locate the Priority dropdown and click it, then select 'High' from the dropdown. 6) Click the 'Create' button at the bottom of the modal to create the issue.\", \"success_criteria\": \"A new issue must be created with the title 'Implement user authentication system', description containing 'JWT-based authentication', assigned to Chen (assigneeId='2'), and priority set to 'high'.\"}",
|
| 10 |
"reward_function": "_validate_create_new_issue",
|
| 11 |
"valid_target_states": "",
|
tasks/linear/drag-and-reassign-issue.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Drag issue VSS-106 from Riley's Queued to Chen's In Progress",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [{\"id\": \"6\", \"identifier\": \"VSS-106\", \"title\": \"Build real-time life support system monitoring API\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"medium\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Drag issue VSS-106 to change both its status and assignee by following these steps: 1) Locate issue VSS-106 in Riley's row in the Queued column on the kanban board. 2) Click and hold on the issue card. 3) Drag the issue to Chen's row in the In Progress column. 4) Release to drop the issue (this will change both the status to 'In Progress' and the assignee to 'Chen').\", \"success_criteria\": \"Issue VSS-106 must have status='in_progress' and assigneeId='2' (Chen).\"}",
|
| 10 |
"reward_function": "_validate_drag_and_reassign_issue",
|
| 11 |
"valid_target_states": "",
|
|
|
|
| 5 |
"description": "Drag issue VSS-106 from Riley's Queued to Chen's In Progress",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [{\"id\": \"6\", \"identifier\": \"VSS-106\", \"title\": \"Build real-time life support system monitoring API\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"medium\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Drag issue VSS-106 to change both its status and assignee by following these steps: 1) Locate issue VSS-106 in Riley's row in the Queued column on the kanban board. 2) Click and hold on the issue card. 3) Drag the issue to Chen's row in the In Progress column. 4) Release to drop the issue (this will change both the status to 'In Progress' and the assignee to 'Chen').\", \"success_criteria\": \"Issue VSS-106 must have status='in_progress' and assigneeId='2' (Chen).\"}",
|
| 10 |
"reward_function": "_validate_drag_and_reassign_issue",
|
| 11 |
"valid_target_states": "",
|
tasks/linear/drag-issue-different-column.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Drag issue VSS-101 from Queued to In Progress column for user Riley",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [{\"id\": \"1\", \"identifier\": \"VSS-101\", \"title\": \"Design oxygen level monitoring dashboard\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}, {\"id\": \"2\", \"identifier\": \"VSS-102\", \"title\": \"Add solar panel efficiency widget to control panel\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}, {\"id\": \"6\", \"identifier\": \"VSS-106\", \"title\": \"Build real-time life support system monitoring API\", \"status\": \"in_progress\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"medium\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Drag issue VSS-101 to a different column by following these steps: 1) Locate issue VSS-101 in Riley's row in the Queued column on the kanban board. 2) Click and hold on the issue card. 3) Drag the issue to the In Progress column in Riley's row. 4) Release to drop the issue in its new location.\", \"success_criteria\": \"Issue VSS-101 must be in the In Progress column and still assigned to user Riley (assigneeId=1).\"}",
|
| 10 |
"reward_function": "_validate_drag_to_different_column",
|
| 11 |
"valid_target_states": "",
|
|
|
|
| 5 |
"description": "Drag issue VSS-101 from Queued to In Progress column for user Riley",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [{\"id\": \"1\", \"identifier\": \"VSS-101\", \"title\": \"Design oxygen level monitoring dashboard\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}, {\"id\": \"2\", \"identifier\": \"VSS-102\", \"title\": \"Add solar panel efficiency widget to control panel\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}, {\"id\": \"6\", \"identifier\": \"VSS-106\", \"title\": \"Build real-time life support system monitoring API\", \"status\": \"in_progress\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"medium\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Drag issue VSS-101 to a different column by following these steps: 1) Locate issue VSS-101 in Riley's row in the Queued column on the kanban board. 2) Click and hold on the issue card. 3) Drag the issue to the In Progress column in Riley's row. 4) Release to drop the issue in its new location.\", \"success_criteria\": \"Issue VSS-101 must be in the In Progress column and still assigned to user Riley (assigneeId=1).\"}",
|
| 10 |
"reward_function": "_validate_drag_to_different_column",
|
| 11 |
"valid_target_states": "",
|
tasks/linear/drag-two-issues-same-user.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Drag VSS-101 to In Progress and VSS-106 to Queued, both for user Riley",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [{\"id\": \"1\", \"identifier\": \"VSS-101\", \"title\": \"Design oxygen level monitoring dashboard\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}, {\"id\": \"6\", \"identifier\": \"VSS-106\", \"title\": \"Build real-time life support system monitoring API\", \"status\": \"in_progress\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"medium\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Perform two drag operations in Riley's board row by following these detailed steps: 1) First drag: Locate issue VSS-101 in Riley's row in the Queued column, click and hold on the issue card, drag it to the In Progress column in Riley's row, and release to drop. 2) Second drag: Locate issue VSS-106 in Riley's row in the In Progress column, click and hold on the issue card, drag it to the Queued column in Riley's row, and release to drop. Both issues should remain assigned to Riley.\", \"success_criteria\": \"Issue VSS-101 must be in In Progress column and issue VSS-106 must be in Queued column, both assigned to user Riley (assigneeId=1).\"}",
|
| 10 |
"reward_function": "_validate_drag_two_issues_same_user",
|
| 11 |
"valid_target_states": "",
|
|
|
|
| 5 |
"description": "Drag VSS-101 to In Progress and VSS-106 to Queued, both for user Riley",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [{\"id\": \"1\", \"identifier\": \"VSS-101\", \"title\": \"Design oxygen level monitoring dashboard\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}, {\"id\": \"6\", \"identifier\": \"VSS-106\", \"title\": \"Build real-time life support system monitoring API\", \"status\": \"in_progress\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"medium\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Perform two drag operations in Riley's board row by following these detailed steps: 1) First drag: Locate issue VSS-101 in Riley's row in the Queued column, click and hold on the issue card, drag it to the In Progress column in Riley's row, and release to drop. 2) Second drag: Locate issue VSS-106 in Riley's row in the In Progress column, click and hold on the issue card, drag it to the Queued column in Riley's row, and release to drop. Both issues should remain assigned to Riley.\", \"success_criteria\": \"Issue VSS-101 must be in In Progress column and issue VSS-106 must be in Queued column, both assigned to user Riley (assigneeId=1).\"}",
|
| 10 |
"reward_function": "_validate_drag_two_issues_same_user",
|
| 11 |
"valid_target_states": "",
|
tasks/linear/multi-issue-reorganization.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Reorganize three issues by dragging them to different columns and assignees",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [{\"id\": \"1\", \"identifier\": \"VSS-101\", \"title\": \"Design oxygen level monitoring dashboard\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}, {\"id\": \"2\", \"identifier\": \"VSS-102\", \"title\": \"Add solar panel efficiency widget to control panel\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}, {\"id\": \"3\", \"identifier\": \"VSS-103\", \"title\": \"Create crew member profile cards with avatar animations\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}, {\"id\": \"3\", \"name\": \"Kowalski\", \"avatar\": \"K\", \"email\": \"kowalski@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Reorganize the board by performing three drag operations with detailed steps: 1) First drag: Locate issue VSS-101 in Riley's row in the Queued column, click and hold on the issue card, drag it to Chen's row in the In Progress column, and release to drop. 2) Second drag: Locate issue VSS-102 in Riley's row in the Queued column, click and hold on the issue card, drag it to Kowalski's row in the Blocked column, and release to drop. 3) Third drag: Locate issue VSS-103 in Riley's row in the Queued column, click and hold on the issue card, drag it to Riley's row in the In Review column, and release to drop.\", \"success_criteria\": \"VSS-101 must have status='in_progress' and assigneeId='2', VSS-102 must have status='blocked' and assigneeId='3', VSS-103 must have status='in_review' and assigneeId='1'.\"}",
|
| 10 |
"reward_function": "_validate_multi_issue_reorganization",
|
| 11 |
"valid_target_states": "",
|
|
|
|
| 5 |
"description": "Reorganize three issues by dragging them to different columns and assignees",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [{\"id\": \"1\", \"identifier\": \"VSS-101\", \"title\": \"Design oxygen level monitoring dashboard\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}, {\"id\": \"2\", \"identifier\": \"VSS-102\", \"title\": \"Add solar panel efficiency widget to control panel\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}, {\"id\": \"3\", \"identifier\": \"VSS-103\", \"title\": \"Create crew member profile cards with avatar animations\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}, {\"id\": \"3\", \"name\": \"Kowalski\", \"avatar\": \"K\", \"email\": \"kowalski@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Reorganize the board by performing three drag operations with detailed steps: 1) First drag: Locate issue VSS-101 in Riley's row in the Queued column, click and hold on the issue card, drag it to Chen's row in the In Progress column, and release to drop. 2) Second drag: Locate issue VSS-102 in Riley's row in the Queued column, click and hold on the issue card, drag it to Kowalski's row in the Blocked column, and release to drop. 3) Third drag: Locate issue VSS-103 in Riley's row in the Queued column, click and hold on the issue card, drag it to Riley's row in the In Review column, and release to drop.\", \"success_criteria\": \"VSS-101 must have status='in_progress' and assigneeId='2', VSS-102 must have status='blocked' and assigneeId='3', VSS-103 must have status='in_review' and assigneeId='1'.\"}",
|
| 10 |
"reward_function": "_validate_multi_issue_reorganization",
|
| 11 |
"valid_target_states": "",
|
tasks/linear/reassign-issue.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Reassign issue VSS-103 from Riley to Chen",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [{\"id\": \"3\", \"identifier\": \"VSS-103\", \"title\": \"Create crew member profile cards with avatar animations\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Reassign issue VSS-103 from Riley to Chen by following these steps: 1) Click on issue VSS-103 on the kanban board to open it. 2) Locate the Assignee section in the right sidebar. 3) Click on the assignee dropdown (currently showing 'Riley'). 4) Select 'Chen' from the dropdown menu.\", \"success_criteria\": \"Issue VSS-103 must be assigned to Chen (assigneeId='2').\"}",
|
| 10 |
"reward_function": "",
|
| 11 |
"valid_target_states": "[{\"issues\": [{\"id\": \"3\", \"identifier\": \"VSS-103\", \"title\": \"Create crew member profile cards with avatar animations\", \"status\": \"queued\", \"assigneeId\": \"2\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}]}]",
|
|
|
|
| 5 |
"description": "Reassign issue VSS-103 from Riley to Chen",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [{\"id\": \"3\", \"identifier\": \"VSS-103\", \"title\": \"Create crew member profile cards with avatar animations\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Reassign issue VSS-103 from Riley to Chen by following these steps: 1) Click on issue VSS-103 on the kanban board to open it. 2) Locate the Assignee section in the right sidebar. 3) Click on the assignee dropdown (currently showing 'Riley'). 4) Select 'Chen' from the dropdown menu.\", \"success_criteria\": \"Issue VSS-103 must be assigned to Chen (assigneeId='2').\"}",
|
| 10 |
"reward_function": "",
|
| 11 |
"valid_target_states": "[{\"issues\": [{\"id\": \"3\", \"identifier\": \"VSS-103\", \"title\": \"Create crew member profile cards with avatar animations\", \"status\": \"queued\", \"assigneeId\": \"2\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}]}]",
|
tasks/linear/update-issue-properties.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Change both priority to urgent and add Operations label to VSS-105",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [{\"id\": \"5\", \"identifier\": \"VSS-105\", \"title\": \"Implement gravity simulator physics calculations\", \"status\": \"queued\", \"assigneeId\": \"2\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Update issue VSS-105 by following these steps: 1) Click on issue VSS-105 on the kanban board to open it. 2) First, locate the Priority section in the right sidebar and click the priority dropdown. 3) Select 'Urgent' from the dropdown menu. 4) Then, locate the Labels section in the right sidebar. 5) Click the 'Add label' button to open the labels dropdown. 6) Click on the 'Operations' label to add it to the issue.\", \"success_criteria\": \"Issue VSS-105 must have priority='urgent' and contain the Operations label (id='label2') in its labels array.\"}",
|
| 10 |
"reward_function": "_validate_update_issue_properties",
|
| 11 |
"valid_target_states": "",
|
|
|
|
| 5 |
"description": "Change both priority to urgent and add Operations label to VSS-105",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [{\"id\": \"5\", \"identifier\": \"VSS-105\", \"title\": \"Implement gravity simulator physics calculations\", \"status\": \"queued\", \"assigneeId\": \"2\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Update issue VSS-105 by following these steps: 1) Click on issue VSS-105 on the kanban board to open it. 2) First, locate the Priority section in the right sidebar and click the priority dropdown. 3) Select 'Urgent' from the dropdown menu. 4) Then, locate the Labels section in the right sidebar. 5) Click the 'Add label' button to open the labels dropdown. 6) Click on the 'Operations' label to add it to the issue.\", \"success_criteria\": \"Issue VSS-105 must have priority='urgent' and contain the Operations label (id='label2') in its labels array.\"}",
|
| 10 |
"reward_function": "_validate_update_issue_properties",
|
| 11 |
"valid_target_states": "",
|
tasks/linear/view-issue-details.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"description": "Click on issue VSS-104 to view its details",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
-
"initial_state": "{\"issues\": [{\"id\": \"4\", \"identifier\": \"VSS-104\", \"title\": \"Build 3D station rotation visualizer component\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\"}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Click on issue VSS-104 on the kanban board to open and view its details.\", \"success_criteria\": \"The taskId must be set to '4' to indicate issue VSS-104 is being viewed.\"}",
|
| 10 |
"reward_function": "",
|
| 11 |
"valid_target_states": "[{\"taskId\": \"4\"}]",
|
|
|
|
| 5 |
"description": "Click on issue VSS-104 to view its details",
|
| 6 |
"tier": "free",
|
| 7 |
"environment": "{\"type\": \"url\", \"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/linear/index.html\"}",
|
| 8 |
+
"initial_state": "{\"issues\": [{\"id\": \"4\", \"identifier\": \"VSS-104\", \"title\": \"Build 3D station rotation visualizer component\", \"status\": \"queued\", \"assigneeId\": \"1\", \"labels\": [], \"projectId\": \"proj1\", \"priority\": \"none\"}], \"users\": [{\"id\": \"1\", \"name\": \"Riley\", \"avatar\": \"R\", \"email\": \"riley@station.space\"}, {\"id\": \"2\", \"name\": \"Chen\", \"avatar\": \"C\", \"email\": \"chen@station.space\"}], \"labels\": [{\"id\": \"label1\", \"name\": \"Bug\", \"color\": \"#EF4444\"}, {\"id\": \"label2\", \"name\": \"Operations\", \"color\": \"#8B5CF6\"}, {\"id\": \"label3\", \"name\": \"Feature\", \"color\": \"#10B981\"}], \"cycles\": [{\"id\": \"cycle53\", \"name\": \"Cycle 53\", \"startDate\": \"Oct 20\", \"endDate\": \"Oct 26\", \"scope\": 114, \"started\": 32, \"completed\": 22, \"status\": \"current\"}, {\"id\": \"cycle54\", \"name\": \"Cycle 54\", \"startDate\": \"Oct 27\", \"endDate\": \"Nov 2\", \"scope\": 0, \"started\": 0, \"completed\": 0, \"status\": \"upcoming\"}], \"projects\": [{\"id\": \"proj1\", \"name\": \"Data Collector\", \"teamId\": \"team1\"}], \"milestones\": [{\"id\": \"milestone3\", \"name\": \"Data Pipeline v2 Release\", \"targetDate\": \"Nov 1\", \"color\": \"#10B981\", \"projectId\": \"proj1\"}], \"teamIdentifier\": \"VSS\", \"columns\": [{\"status\": \"queued\", \"title\": \"Queued\"}, {\"status\": \"in_progress\", \"title\": \"In Progress\"}, {\"status\": \"blocked\", \"title\": \"Blocked\"}, {\"status\": \"in_review\", \"title\": \"In Review\"}, {\"status\": \"staging\", \"title\": \"Staging\"}, {\"status\": \"done\", \"title\": \"Done\"}], \"taskId\": null, \"isNewIssueModalOpen\": false, \"hiddenUserIds\": [], \"hiddenColumnStatuses\": [], \"showRightSidebar\": true, \"autoHideRows\": false, \"autoHideColumns\": false, \"initialIssueValues\": null}",
|
| 9 |
"instructions": "{\"user_prompt\": \"Click on issue VSS-104 on the kanban board to open and view its details.\", \"success_criteria\": \"The taskId must be set to '4' to indicate issue VSS-104 is being viewed.\"}",
|
| 10 |
"reward_function": "",
|
| 11 |
"valid_target_states": "[{\"taskId\": \"4\"}]",
|
tasks/microsoft-teams/birthday-for-george.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "birthday-for-george",
|
| 4 |
+
"name": "Birthday for george",
|
| 5 |
+
"description": "Make a group chat with Fred Weasley, Hermione Granger and Harry Potter. Message \"Hey guys, just confirming we're throwing a surprise party for George tomorrow at 3. See you then!\". Then message George Weasley, \"Hey George, is it your day off tomorrow? I can't remember if you're out.\". Then navigate to the search bar and type in \"Ron Weasley\". Do not click enter.",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762753894139,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762753954139,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762667494139,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762838494139,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762839694139,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Make a group chat with Fred Weasley, Hermione Granger and Harry Potter. Message \\\"Hey guys, just confirming we're throwing a surprise party for George tomorrow at 3. See you then!\\\". Then message George Weasley, \\\"Hey George, is it your day off tomorrow? I can't remember if you're out.\\\". Then navigate to the search bar and type in \\\"Ron Weasley\\\". Do not click enter.\",\"success_criteria\": \"The user is still on the home page. A group chat is made with Fred, Harry and Hermione and a message is also sent to George. Ron Weasley appears in the search bar.\"}",
|
| 10 |
+
"reward_function": "_validate_birthday_for_george",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"hard\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/create-a-chat-with-fred-weasely.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "create-a-chat-with-fred-weasely",
|
| 4 |
+
"name": "Create a chat with Fred Weasely",
|
| 5 |
+
"description": "Select the new chat button, enter Fred, select Fred Weasley and send the message \"Hey Fred, how are you!\"",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762752229664,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762752289664,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762665829664,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762836829664,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762838029664,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Select the new chat button, enter Fred, select Fred Weasley and send the message \\\"Hey Fred, how are you!\\\"\",\"success_criteria\": \"A new chat is made with Fred Weasley and the message \\\"Hey Fred, how are you!\\\"\"}",
|
| 10 |
+
"reward_function": "_validate_create_a_chat_with_fred_weasely",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/filter-chats-for-harry.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "filter-chats-for-harry",
|
| 4 |
+
"name": "Filter chats for harry",
|
| 5 |
+
"description": "Filter chats in the sidebar for the name harry",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762751569967,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762751629967,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762665169967,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762836169967,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762837369967,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the home screen. Click on the filter icon to Filter chats in the sidebar for the name 'harry'.\",\"success_criteria\": \"Only one chat (harry potter) is displayed.\"}",
|
| 10 |
+
"reward_function": "_validate_filter_chats_for_harry",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/group-chat-and-hermione.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "group-chat-and-hermione",
|
| 4 |
+
"name": "Group chat and hermione",
|
| 5 |
+
"description": "Make a group chat with Harry and Hagrid. Message them \"I'll see you both at 2. Looking forward to it!\". Then message Hermione saying \"Hey Hermione, me, Harry and Hagrid are meeting up if you want to join us!\"",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"hagrid-cao\",\"userIds\": [\"hagrid-cao\"],\"messages\": [{\"senderId\": \"you\",\"timestamp\": 1762839797655,\"content\": \"Hey Hagrid, should be all good - I'll let you know asap.\"},{\"senderId\": \"you\",\"timestamp\": 1762839838087,\"content\": \"Harry said yes, I'll see you at 12 then!\"}]},{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762753300009,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762753360009,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"},{\"senderId\": \"you\",\"timestamp\": 1762839780451,\"content\": \"Hey Harry, can we reschedule to 2? I have a meeting with Hagrid.\"},{\"senderId\": \"you\",\"timestamp\": 1762839823558,\"content\": \"Good to hear - see you at 2!\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762666900009,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762837900009,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762839100009,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"hagrid-cao\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"FILES\",\"usersInChat\": [\"hagrid-cao\"],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Make a group chat with Harry and Hagrid. Message them \\\"I'll see you both at 2. Looking forward to it!\\\". Then message Hermione saying \\\"Hey Hermione, me, Harry and Hagrid are meeting up if you want to join us!\\\"\",\"success_criteria\": \"A message is sent to the group chat and then one to Hermione.\"}",
|
| 10 |
+
"reward_function": "_validate_group_chat_and_hermione",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"hard\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/harry-hagrid-harry-hagrid.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "harry-hagrid-harry-hagrid",
|
| 4 |
+
"name": "Harry hagrid harry hagrid",
|
| 5 |
+
"description": "Message Harry \"Hey Harry, can we reschedule to 2? I have a meeting with Hagrid.\". Then make a chat with Hagrid and message \"Hey Hagrid, should be all good - I'll let you know asap.\". Then message Harry saying \"Good to hear - see you at 2!\" then message Hagrid saying \"Harry said yes, I'll see you at 12 then!\"",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762753300009,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762753360009,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762666900009,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762837900009,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762839100009,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"FILES\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Message Harry \\\"Hey Harry, can we reschedule to 2? I have a meeting with Hagrid.\\\". Then make a chat with Hagrid and message \\\"Hey Hagrid, should be all good - I'll let you know asap.\\\". Then message Harry saying \\\"Good to hear - see you at 2!\\\" then message Hagrid saying \\\"Harry said yes, I'll see you at 12 then!\\\"\",\"success_criteria\": \"Four messages are sent, two to Harry and two to Hagrid.\"}",
|
| 10 |
+
"reward_function": "_validate_harry_hagrid_harry_hagrid",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"hard\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/large-group-chat.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "large-group-chat",
|
| 4 |
+
"name": "Large group chat",
|
| 5 |
+
"description": "Make a group chat with Harry Potter, Hermione Granger, Tim White and Tim White 2. Message 'What a group chat!'",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762752827385,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762752887385,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762666427385,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762837427385,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762838627385,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Make a group chat with Harry Potter, Hermione Granger, Tim White and Tim White 2 by selecting them in the search bar. Send the message 'What a group chat!'\",\"success_criteria\": \"A group chat with the four people is made.\"}",
|
| 10 |
+
"reward_function": "_validate_large_group_chat",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"hard\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/make-a-group-chat-with-hagrid-and-ron.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "make-a-group-chat-with-hagrid-and-ron",
|
| 4 |
+
"name": "Make a group chat with Hagrid and Ron",
|
| 5 |
+
"description": "Click the new chat button, type Hagrid and Ron in the new chat field, and select both of them. Send a message saying \"Hey guys!\"",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762752049479,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762752109479,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762665649479,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762836649479,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762837849479,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Click the new chat button, type Hagrid and Ron in the new chat field, and select both of them. Send a message saying \\\"Hey guys!\\\"\",\"success_criteria\": \"A new message is sent in a new group chat with Harry and Ron\"}",
|
| 10 |
+
"reward_function": "_validate_make_a_group_chat_with_hagrid_and_ron",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/message-and-search-for-2.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "message-and-search-for-2",
|
| 4 |
+
"name": "Message and search for 2",
|
| 5 |
+
"description": "Message Harry \"What do you mean you said we'd meet at two?!\". Then message Harry \"Wait let me check my message history\". Then type the number 2 into the search bar and hit enter. Then select messages.",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"hagrid-cao-harry-potter\",\"userIds\": [\"hagrid-cao\",\"harry-potter\"],\"messages\": [{\"senderId\": \"you\",\"timestamp\": 1762839959617,\"content\": \"I'll see you both at 2. Looking forward to it!\"}]},{\"conversationId\": \"hagrid-cao\",\"userIds\": [\"hagrid-cao\"],\"messages\": [{\"senderId\": \"you\",\"timestamp\": 1762839797655,\"content\": \"Hey Hagrid, should be all good - I'll let you know asap.\"},{\"senderId\": \"you\",\"timestamp\": 1762839838087,\"content\": \"Harry said yes, I'll see you at 12 then!\"}]},{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762753300009,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762753360009,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"},{\"senderId\": \"you\",\"timestamp\": 1762839780451,\"content\": \"Hey Harry, can we reschedule to 2? I have a meeting with Hagrid.\"},{\"senderId\": \"you\",\"timestamp\": 1762839823558,\"content\": \"Good to hear - see you at 2!\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762666900009,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"},{\"senderId\": \"you\",\"timestamp\": 1762839995270,\"content\": \"Hey Hermione, me, Harry and Hagrid are meeting up if you want to join us!\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762837900009,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762839100009,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"hermione-granger\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"FILES\",\"usersInChat\": [\"hagrid-cao\",\"harry-potter\"],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Message Harry \\\"What do you mean you said we'd meet at two?!\\\". Then message Harry \\\"Wait let me check my message history\\\". Then type the number 2 into the search bar and hit enter. Then select messages.\",\"success_criteria\": \"Five messages should be displayed, four from You and one from Harry.\"}",
|
| 10 |
+
"reward_function": "_validate_message_and_search_for_2",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"hard\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/message-hermione-and-search-for-it.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "message-hermione-and-search-for-it",
|
| 4 |
+
"name": "Message Hermione and search for it",
|
| 5 |
+
"description": "Message Hermione 'All good Hermione, it's finished.'. Head to the search bar, type 'Hermi' and hit enter to bring up search results. Click on the 'messages' tab.",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762752827385,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762752887385,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762666427385,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762837427385,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762838627385,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Message Hermione 'All good Hermione, it's finished.'. Head to the search bar, type 'Hermi' and hit enter to bring up search results. Click on the 'messages' tab.\",\"success_criteria\": \"A tab with the message from you is shown.\"}",
|
| 10 |
+
"reward_function": "_validate_message_hermione_and_search_for_it",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"hard\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/message-hermione-and-then-tim.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "message-hermione-and-then-tim",
|
| 4 |
+
"name": "Message Hermione and then Tim",
|
| 5 |
+
"description": "Message Hermione \"All done. Let me know if you get it!\" and then Tim \"Smoke tested! Should be with you shortly.\"",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762751902135,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762751962135,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762665502135,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762836502135,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762837702135,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are on the home page. First message Hermione \\\"All done. Let me know if you get it!\\\" and then message Tim \\\"Smoke tested! Should be with you shortly.\\\"\",\"success_criteria\": \"A message is sent to both Hermione and Tim\"}",
|
| 10 |
+
"reward_function": "_validate_message_hermione_and_then_tim",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/message-the-third-user-in-the-search.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "message-the-third-user-in-the-search",
|
| 4 |
+
"name": "Message the third user in the search",
|
| 5 |
+
"description": "Head to the search bar. Hit enter immediately to bring up the full list of users. Select the third user and message them 'Hi Anne, it's me.'",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762753116363,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762753176363,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762666716363,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762837716363,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762838916363,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Head to the search bar. Hit enter immediately to bring up the full list of users. Select the third user and message them 'Hi Anne, it's me.'\",\"success_criteria\": \"A new message to Anne Peters is sent saying 'Hi Anne, it's me.'\"}",
|
| 10 |
+
"reward_function": "_validate_message_the_third_user_in_the_search",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"hard\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/message-tim-and-alex-langford.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "message-tim-and-alex-langford",
|
| 4 |
+
"name": "Message Tim and Alex Langford",
|
| 5 |
+
"description": "Message Tim \"Smoke test finished, looks good!\" and then make a new chat with Alex Langford. Type \"Good to see you Alex!\"",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762752668419,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762752728419,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762666268419,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762837268419,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762838468419,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Message Tim \\\"Smoke test finished, looks good!\\\" and then make a new chat with Alex Langford. Type \\\"Good to see you Alex!\\\"\",\"success_criteria\": \"A new message is sent to Tim and Alex.\"}",
|
| 10 |
+
"reward_function": "_validate_message_tim_and_alex_langford",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/message-tim-and-select-hermiones-photos.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "message-tim-and-select-hermiones-photos",
|
| 4 |
+
"name": "Message tim and select hermione's photos",
|
| 5 |
+
"description": "Message Tim \"Hey Tim, it's me\" and then select the photos tab of Hermione's chat",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762752391131,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762752451131,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762665991131,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762836991131,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762838191131,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Message Tim \\\"Hey Tim, it's me\\\" and then navigate to the chat with Hermione and select the photos tab of Hermione's chat.\",\"success_criteria\": \"A message is sent to Tim and the photos page is displayed under Hermione's chat\"}",
|
| 10 |
+
"reward_function": "_validate_message_tim_and_select_hermiones_photos",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/message-tim-white-twice.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "message-tim-white-twice",
|
| 4 |
+
"name": "message tim white twice",
|
| 5 |
+
"description": "send two follow up messages to tim white",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762751175504,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762751235504,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762664775504,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762835775504,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762836975504,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"you are on the home page. Select tim white's chat and send two messages: \\\"Hey Tim, smoke test completed.\\\" and then \\\"Let me know if you need a hand with anything.\\\".\",\"success_criteria\": \"Two new messages with \\\"Hey Tim, smoke test completed.\\\" and then \\\"Let me know if you need a hand with anything.\\\" have been sent.\"}",
|
| 10 |
+
"reward_function": "_validate_message_tim_white_twice",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/navigate-to-harrys-files-page.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "navigate-to-harrys-files-page",
|
| 4 |
+
"name": "Navigate to harry's files page",
|
| 5 |
+
"description": "Navigate to harry's files page",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762751674612,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762751734612,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762665274612,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762836274612,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762837474612,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are on the home page. Select the files icon to open the files page.\",\"success_criteria\": \"The files page is open\"}",
|
| 10 |
+
"reward_function": "_validate_navigate_to_harrys_files_page",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/navigate-to-harrys-photos-page.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "navigate-to-harrys-photos-page",
|
| 4 |
+
"name": "Navigate to harry's photos page",
|
| 5 |
+
"description": "Navigate to harry's photos page",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762751736852,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762751796852,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762665336852,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762836336852,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762837536852,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are on the home page. Select the photos icon to navigate to the photos page.\",\"success_criteria\": \"You are on Harry's photos page. 'No photos shared in the chat' is displayed.\"}",
|
| 10 |
+
"reward_function": "_validate_navigate_to_harrys_photos_page",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/open-search-page-for-hagrid.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "open-search-page-for-hagrid",
|
| 4 |
+
"name": "Open search page for Hagrid",
|
| 5 |
+
"description": "Open the search page for Hagrid.",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762751481129,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762751541129,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762665081129,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762836081129,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762837281129,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are on the home page. Type Hagrid into the search bar and hit enter to open the search page.\",\"success_criteria\": \"The search page displays results for hagrid.\"}",
|
| 10 |
+
"reward_function": "_validate_open_search_page_for_hagrid",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/prepare-to-make-a-new-chat.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "prepare-to-make-a-new-chat",
|
| 4 |
+
"name": "prepare to make a new chat",
|
| 5 |
+
"description": "select the new chat icon in the users sidebar",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762751348166,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762751408166,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762664948166,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762835948166,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762837148166,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"you are on the home screen. select the new chat icon in the users sidebar to enter the new chat screen.\",\"success_criteria\": \"the new chat screen is shown.\"}",
|
| 10 |
+
"reward_function": "_validate_prepare_to_make_a_new_chat",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/respond-to-hermione.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "respond-to-hermione",
|
| 4 |
+
"name": "Respond to Hermione",
|
| 5 |
+
"description": "Respond to Hermione with \"Sure thing - it looks good!\"",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762750249402,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762750309402,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762663849402,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762834849402,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762836049402,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"tim-white\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are on the home page, select Hermione's chat and respond with \\\"Sure thing - it looks good!\\\", hitting enter to send.\",\"success_criteria\": \"A new message has been sent to Hermione.\"}",
|
| 10 |
+
"reward_function": "_validate_respond_to_hermione",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/search-for-messages-containing-hey.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "search-for-messages-containing-hey",
|
| 4 |
+
"name": "Search for messages containing 'hey'",
|
| 5 |
+
"description": "Type 'hey' in the search bar and then click enter. Then navigate to the messages tab to find the messages.",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762752546952,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762752606952,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762666146952,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762837146952,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762838346952,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Type 'hey' in the search bar and then click enter. Then navigate to the messages tab to find the messages.\",\"success_criteria\": \"A result: \\\"Hey Hugo \\u2014 are we still on for Friday at 12pm?\\\" is shown\"}",
|
| 10 |
+
"reward_function": "_validate_search_for_messages_containing_hey",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/microsoft-teams/the-a-team.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "microsoft-teams",
|
| 3 |
+
"id": "the-a-team",
|
| 4 |
+
"name": "The A team",
|
| 5 |
+
"description": "Select the search bar and hit enter to bring up the search tab. Take note of the first three people. Go back to the Chat by clicking the 'chat' icon on the left. Make a group chat with those three people and message 'The A team'.",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/microsoft-teams/index.html\"}",
|
| 8 |
+
"initial_state": "{\"users\": [{\"id\": \"you\",\"name\": \"You\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/you.jpg\",\"email\": \"you@you.com\"},{\"id\": \"alex-langford\",\"name\": \"Alex Langford\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/alex-langford.jpg\",\"email\": \"alex.langford@acme.com\"},{\"id\": \"alex-langford-2\",\"name\": \"Alex Langford II\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/alex-langford-2.jpg\",\"email\": \"alex2@langford.co.uk\"},{\"id\": \"anne-peters\",\"name\": \"Anne Peters\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/anne-peters.jpg\",\"email\": \"anne.peters@peters.dev\"},{\"id\": \"fred-weasley\",\"name\": \"Fred Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/fred-weasley.jpg\",\"email\": \"fred@weasley.org\"},{\"id\": \"frank-sinatra\",\"name\": \"Frank Junior\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/frank-sinatra.jpg\",\"email\": \"frank.jr@example.com\"},{\"id\": \"george-weasley\",\"name\": \"George Weasley\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/george-weasley.jpg\",\"email\": \"george@weasley.co\"},{\"id\": \"hagrid-cao\",\"name\": \"Hagrid Cao\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/hagrid-cao.jpg\",\"email\": \"hagrid.cao@outback.nz\"},{\"id\": \"harry-potter\",\"name\": \"Harry Potter\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/harry-potter.jpg\",\"email\": \"harry.potter@hogwarts.ac.uk\"},{\"id\": \"hermione-granger\",\"name\": \"Hermione Granger\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/hermione-granger.jpg\",\"email\": \"hermione.granger@ministry.gov\"},{\"id\": \"jonothan-tierce\",\"name\": \"Jonothan Tierce\",\"status\": \"BUSY\",\"avatar\": \"/assets/users/jonothan-tierce.jpg\",\"email\": \"jonothan.tierce@startup.io\"},{\"id\": \"kate-clarkson\",\"name\": \"Kate Clarkson\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/kate-clarkson.jpg\",\"email\": \"kate.clarkson@chakra.com\"},{\"id\": \"lisa-shane\",\"name\": \"Lisa Shane\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/lisa-shane.jpg\",\"email\": \"lisa.shane@gmail.com\"},{\"id\": \"ron-weasley\",\"name\": \"Ron Weasley\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/ron-weasley.jpg\",\"email\": \"ron.weasley@weasley.org\"},{\"id\": \"tim-white\",\"name\": \"Tim White\",\"status\": \"OFFLINE\",\"avatar\": \"/assets/users/tim-white.jpg\",\"email\": \"tim.white@company.com\"},{\"id\": \"tim-white-2\",\"name\": \"Tim White 2\",\"status\": \"ONLINE\",\"avatar\": \"/assets/users/tim-white-2.jpg\",\"email\": \"tim.white2@another.co\"}],\"page\": \"HOME\",\"messages\": [{\"conversationId\": \"harry-potter\",\"userIds\": [\"harry-potter\"],\"messages\": [{\"senderId\": \"harry-potter\",\"timestamp\": 1762753814700,\"content\": \"Hey Hugo \\u2014 are we still on for Friday at 12pm?\"},{\"senderId\": \"you\",\"timestamp\": 1762753874700,\"content\": \"Yep \\u2014 still good. I'll bring the agenda and the slides.\"}]},{\"conversationId\": \"hermione-granger\",\"userIds\": [\"hermione-granger\"],\"messages\": [{\"senderId\": \"hermione-granger\",\"timestamp\": 1762667414700,\"content\": \"Can you review my PR when you have a minute? It's small but has some edge cases.\"}]},{\"conversationId\": \"tim-white\",\"userIds\": [\"tim-white\"],\"messages\": [{\"senderId\": \"tim-white\",\"timestamp\": 1762838414700,\"content\": \"Just deployed the update \\u2014 everything looks green on staging.\"},{\"senderId\": \"you\",\"timestamp\": 1762839614700,\"content\": \"Awesome, thanks for the quick turnaround! I'll smoke test now.\"}]}],\"msgId\": \"harry-potter\",\"creatingChat\": false,\"searchTerm\": \"\",\"searchPage\": \"PEOPLE\",\"usersInChat\": [],\"createChatSearchTerm\": \"\",\"newMsg\": \"\",\"mainChatPage\": \"CHAT\",\"resultsOpen\": false,\"newMsgText\": \"\",\"filterString\": \"\",\"filtering\": false,\"sidebarResultsOpen\": false}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"Select the search bar and hit enter to bring up the search tab. Take note of the first three people. Go back to the Chat by clicking the 'chat' icon on the left. Make a group chat with those three people and message 'The A team'.\",\"success_criteria\": \"A group chat with Alex Langford, Alex Langford II and Anne Peters is made.\"}",
|
| 10 |
+
"reward_function": "_validate_the_a_team",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"hard\"}"
|
| 15 |
+
}
|
tasks/outlook/apply-the-has-attachments-filter.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "apply-the-has-attachments-filter",
|
| 4 |
+
"name": "Apply the Has attachments filter",
|
| 5 |
+
"description": "Filter search results to only emails with attachments",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T09:56:31.003Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T06:56:31.003Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T11:56:31.003Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T11:56:31.003Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T11:56:31.003Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T11:26:31.003Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T11:56:31.003Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T05:56:31.003Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T11:56:31.003Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T11:56:31.003Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T11:56:31.003Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T11:56:31.003Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T11:56:31.003Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, search for \\u201corder\\u201d, then click the \\u201cHas attachments\\u201d chip in the filters bar.\",\"success_criteria\": \"The chip highlights and only emails with attachments remain in the list.\"}",
|
| 10 |
+
"reward_function": "_validate_apply_the_has_attachments_filter",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/outlook/apply-the-unread-search-filter.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "apply-the-unread-search-filter",
|
| 4 |
+
"name": "Apply the Unread search filter",
|
| 5 |
+
"description": " Filter search results to only unread messages",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T09:55:16.719Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T06:55:16.719Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T11:55:16.719Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T11:55:16.719Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T11:55:16.719Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T11:25:16.719Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T11:55:16.719Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T05:55:16.719Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T11:55:16.719Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T11:55:16.719Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T11:55:16.719Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T11:55:16.719Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T11:55:16.719Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, search for \\u201cuser\\u201d, then click the \\u201cUnread\\u201d chip in the filters bar.\",\"success_criteria\": \"The \\u201cUnread\\u201d chip becomes highlighted and only unread emails are listed.\"}",
|
| 10 |
+
"reward_function": "_validate_apply_the_unread_search_filter",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/outlook/choose-sent-items-from-the-folder-selector.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "choose-sent-items-from-the-folder-selector",
|
| 4 |
+
"name": "Choose Sent Items from the folder selector",
|
| 5 |
+
"description": "Use the folder selector to change the search scope",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T09:54:10.419Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T06:54:10.419Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T11:54:10.419Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T11:54:10.419Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T11:54:10.419Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T11:24:10.419Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T11:54:10.419Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T05:54:10.419Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T11:54:10.419Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T11:54:10.419Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T11:54:10.419Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T11:54:10.419Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T11:54:10.419Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, expand the search bar and click the \\u201cAll folders\\u201d selector, then choose \\u201cSent Items\\u201d.\",\"success_criteria\": \"The selector shows \\u201cSent Items\\u201d as the chosen scope.\"}",
|
| 10 |
+
"reward_function": "_validate_choose_sent_items_from_the_folder_selector",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/outlook/collapse-the-favorites-section.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "collapse-the-favorites-section",
|
| 4 |
+
"name": "Collapse the Favorites section",
|
| 5 |
+
"description": "Hide favorites under the “Favorites” header",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T09:59:20.789Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T06:59:20.789Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T11:59:20.789Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T11:59:20.789Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T11:59:20.789Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T11:29:20.789Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T11:59:20.789Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T05:59:20.789Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T11:59:20.789Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T11:59:20.789Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T11:59:20.789Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T11:59:20.789Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T11:59:20.789Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, click the \\u201cFavorites\\u201d header in the left sidebar to collapse it.\",\"success_criteria\": \"The favorites list is hidden and the chevron points right.\"}",
|
| 10 |
+
"reward_function": "_validate_collapse_the_favorites_section",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/outlook/collapse-the-navigation-sidebar.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "collapse-the-navigation-sidebar",
|
| 4 |
+
"name": "Collapse the navigation sidebar",
|
| 5 |
+
"description": "Hide the folders/sections sidebar",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T09:57:46.779Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T06:57:46.779Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T11:57:46.779Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T11:57:46.779Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T11:57:46.779Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T11:27:46.779Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T11:57:46.779Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T05:57:46.779Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T11:57:46.779Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T11:57:46.779Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T11:57:46.779Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T11:57:46.779Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T11:57:46.779Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, click the hamburger icon in the top toolbar to collapse the left folder sidebar.\",\"success_criteria\": \"The left sidebar slides out of view and folder items are no longer visible.\"}",
|
| 10 |
+
"reward_function": "_validate_collapse_the_navigation_sidebar",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/outlook/compose-a-new-draft.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "compose-a-new-draft",
|
| 4 |
+
"name": "Compose a new draft",
|
| 5 |
+
"description": "Start a new email draft from the toolbar",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T10:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T07:40:10.529Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T12:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T12:40:10.529Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T12:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T12:10:10.529Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T12:40:10.529Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T06:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T12:40:10.529Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T12:40:10.529Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T12:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T12:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T12:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, click the \\u201cNew mail\\u201d button in the toolbar.\",\"success_criteria\": \"The draft editor appears in the reading pane and the current page switches to \\u201cDrafts\\u201d.\"}",
|
| 10 |
+
"reward_function": "_validate_compose_a_new_draft",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/outlook/delete-an-email-from-the-list.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "delete-an-email-from-the-list",
|
| 4 |
+
"name": "Delete an email from the list",
|
| 5 |
+
"description": "Remove a message using the trash icon",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T10:37:40.298Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T07:37:40.298Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T12:37:40.298Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T12:37:40.298Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T12:37:40.298Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T12:07:40.298Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T12:37:40.298Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T06:37:40.298Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T12:37:40.298Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T12:37:40.298Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T12:37:40.298Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T12:37:40.298Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T12:37:40.298Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, hover over the LinkedIn email item to reveal the trash icon button, click the the trash icon to delete it. \",\"success_criteria\": \"The LinkedIn email row disappears from the list.\"}",
|
| 10 |
+
"reward_function": "_validate_delete_an_email_from_the_list",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/outlook/discard-a-draft.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "discard-a-draft",
|
| 4 |
+
"name": "Discard a draft",
|
| 5 |
+
"description": "Open and delete a draft from the drafts",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T10:51:07.493Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T07:51:07.493Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T12:51:07.493Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T12:51:07.493Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T12:51:07.493Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T12:21:07.493Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T12:51:07.493Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T06:51:07.493Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T12:51:07.493Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T12:51:07.493Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T12:51:07.493Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T12:51:07.493Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T12:51:07.493Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, click the drafts button on the left sidebar to go to the drafts page, click the draft with the Subject Weekend plans, click the trash icon in the draft toolbar to discard it. \",\"success_criteria\": \"The draft with the Subject \\\"Weekend plans\\\" disappears from the list and the reading pane shows the empty state. \"}",
|
| 10 |
+
"reward_function": "_validate_discard_a_draft",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/outlook/expand-the-navigation-sidebar.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "expand-the-navigation-sidebar",
|
| 4 |
+
"name": "Expand the navigation sidebar",
|
| 5 |
+
"description": "Show the folders/sections sidebar",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T09:58:35.550Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T06:58:35.550Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T11:58:35.550Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T11:58:35.550Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T11:58:35.550Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T11:28:35.550Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T11:58:35.550Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T05:58:35.550Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T11:58:35.550Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T11:58:35.550Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T11:58:35.550Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T11:58:35.550Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T11:58:35.550Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": true,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, click the hamburger icon again to bring the left folder sidebar back.\",\"success_criteria\": \"The left sidebar reappears and folder items are visible.\"}",
|
| 10 |
+
"reward_function": "_validate_expand_the_navigation_sidebar",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|
tasks/outlook/fill-draft-fields.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "fill-draft-fields",
|
| 4 |
+
"name": "Fill draft fields",
|
| 5 |
+
"description": "Enter To, Subject, and Body in the draft",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"draft-1763383215522\",\"from\": \"user@outlook.com\",\"to\": \"\",\"subject\": \"\",\"body\": \"\",\"preview\": \"\",\"timestamp\": \"2025-11-17T12:40:15.522Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T10:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T07:40:10.529Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T12:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T12:40:10.529Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T12:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T12:10:10.529Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T12:40:10.529Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T06:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T12:40:10.529Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T12:40:10.529Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T12:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T12:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T12:40:10.529Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"drafts\",\"selectedEmailId\": \"draft-1763383215522\",\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app and currently in the draft mode, on the draft editor to the right pane, set \\\"To\\\" to \\u201cteammate@example.com\\u201d, \\\"Subject\\\" to \\\"Weekly update\\\", and enter \\\"This is an update from me!\\\" into the body. \",\"success_criteria\": \"The \\\"To\\\" shows \\u201cteammate@example.com\\u201d, \\\"Subject\\\" shows \\\"Weekly update\\u201d, and the body shows \\\"This is an update from me!\\\". And the draft\\u2019s preview snippet updates.\"}",
|
| 10 |
+
"reward_function": "_validate_fill_draft_fields",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/outlook/flag-an-email.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "flag-an-email",
|
| 4 |
+
"name": "Flag an email",
|
| 5 |
+
"description": "Mark a message with a flag",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T10:08:30.577Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T07:08:30.577Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T12:08:30.577Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T12:08:30.577Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T12:08:30.577Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T11:38:30.577Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T12:08:30.577Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T06:08:30.577Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T12:08:30.577Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T12:08:30.577Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T12:08:30.577Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T12:08:30.577Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T12:08:30.577Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, hover a list item with the title LinkediIn to reveal actions, and click the flag icon to flag it.\",\"success_criteria\": \"The flag icon of the LinkedIn item becomes filled and colored, indicating the email is flagged.\"}",
|
| 10 |
+
"reward_function": "_validate_flag_an_email",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"medium\"}"
|
| 15 |
+
}
|
tasks/outlook/go-to-the-drafts-page.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spa": "outlook",
|
| 3 |
+
"id": "go-to-the-drafts-page",
|
| 4 |
+
"name": "Go to the Drafts page",
|
| 5 |
+
"description": "Navigate to the drafts page using the sidebar",
|
| 6 |
+
"tier": "pro",
|
| 7 |
+
"environment": "{\"type\": \"url\",\"path\": \"https://dojo-spas-production.s3.us-east-1.amazonaws.com/outlook/index.html\"}",
|
| 8 |
+
"initial_state": "{\"emails\": [{\"id\": \"1\",\"from\": \"GitHub\",\"to\": \"user@outlook.com\",\"subject\": \"Your pull request has been merged\",\"hasAttachments\": true,\"preview\": \"Great news! Your contribution to the project has been accepted.\",\"body\": \"Hello,\\n\\nYour pull request #1234 \\\"Add new feature\\\" has been successfully merged into the main branch.\\n\\nThank you for your contribution!\\n\\nBest regards,\\nGitHub Team\",\"timestamp\": \"2025-11-17T10:00:19.304Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"2\",\"from\": \"Netflix\",\"to\": \"user@outlook.com\",\"subject\": \"New shows just for you\",\"preview\": \"Check out these recommendations based on your viewing history\",\"body\": \"Hi there,\\n\\nWe think you'll love these new additions to our catalog:\\n\\n- Show 1\\n- Show 2\\n- Show 3\\n\\nHappy watching!\\nThe Netflix Team\",\"timestamp\": \"2025-11-17T07:00:19.304Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"3\",\"from\": \"LinkedIn\",\"to\": \"user@outlook.com\",\"subject\": \"You have 5 new connection requests\",\"preview\": \"Expand your professional network\",\"body\": \"Hello,\\n\\nYou have 5 new connection requests waiting for your response.\\n\\nVisit LinkedIn to see who wants to connect with you.\\n\\nBest,\\nLinkedIn Team\",\"timestamp\": \"2025-11-16T12:00:19.304Z\",\"read\": false,\"flagged\": false,\"pinned\": true,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"4\",\"from\": \"Amazon\",\"to\": \"user@outlook.com\",\"subject\": \"Your order has been shipped\",\"hasAttachments\": true,\"preview\": \"Track your package delivery\",\"body\": \"Dear Customer,\\n\\nYour order #789-123456 has been shipped and is on its way.\\n\\nExpected delivery: Tomorrow\\nTracking number: 1Z999AA10123456784\\n\\nThank you for shopping with Amazon.\",\"timestamp\": \"2025-11-15T12:00:19.304Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"5\",\"from\": \"Spotify\",\"to\": \"user@outlook.com\",\"subject\": \"Your Weekly Discover playlist is ready\",\"preview\": \"50 new songs picked just for you\",\"body\": \"Hey music lover,\\n\\nYour personalized Discover Weekly playlist is ready with 50 fresh tracks we think you'll love.\\n\\nStart listening now!\\n\\nThe Spotify Team\",\"timestamp\": \"2025-11-14T12:00:19.304Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"6\",\"from\": \"Google Calendar\",\"to\": \"user@outlook.com\",\"subject\": \"Reminder: Team meeting in 30 minutes\",\"hasAttachments\": true,\"preview\": \"Don't forget your upcoming event\",\"body\": \"This is a reminder that you have a team meeting scheduled in 30 minutes.\\n\\nEvent: Team Standup\\nTime: 10:00 AM - 10:30 AM\\nLocation: Conference Room A\\n\\nJoin video call: [Link]\",\"timestamp\": \"2025-11-17T11:30:19.304Z\",\"read\": false,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"inbox\"},{\"id\": \"7\",\"from\": \"Medium\",\"to\": \"user@outlook.com\",\"subject\": \"Top stories for you this week\",\"preview\": \"Curated articles based on your interests\",\"body\": \"Hello,\\n\\nHere are the top stories we think you'll enjoy:\\n\\n1. \\\"The Future of AI\\\" by John Doe\\n2. \\\"Best Practices for React\\\" by Jane Smith\\n3. \\\"Understanding TypeScript\\\" by Bob Johnson\\n\\nHappy reading!\\nMedium Team\",\"timestamp\": \"2025-11-13T12:00:19.304Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"8\",\"from\": \"Slack\",\"to\": \"user@outlook.com\",\"subject\": \"You were mentioned in #general\",\"preview\": \"@user Check out this interesting article...\",\"body\": \"You were mentioned in #general by Sarah:\\n\\n\\\"@user Check out this interesting article about web performance optimization. Would love to hear your thoughts!\\\"\\n\\nReply in Slack\",\"timestamp\": \"2025-11-17T06:00:19.304Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"inbox\"},{\"id\": \"9\",\"from\": \"user@outlook.com\",\"to\": \"colleague@company.com\",\"subject\": \"Meeting notes from yesterday\",\"preview\": \"Here are the key points we discussed...\",\"body\": \"Hi,\\n\\nHere are the meeting notes from yesterday's discussion:\\n\\n1. Project timeline\\n2. Next steps\\n3. Action items\\n\\nLet me know if you have any questions.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-16T12:00:19.304Z\",\"read\": true,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"sent\"},{\"id\": \"10\",\"from\": \"user@outlook.com\",\"to\": \"team@company.com\",\"cc\": \"manager@company.com\",\"subject\": \"Weekly status update\",\"preview\": \"This week's progress and upcoming tasks...\",\"body\": \"Hello Team,\\n\\nHere's this week's status update:\\n\\nCompleted:\\n- Task 1\\n- Task 2\\n\\nIn Progress:\\n- Task 3\\n\\nUpcoming:\\n- Task 4\\n\\nThanks,\\nUser\",\"timestamp\": \"2025-11-14T12:00:19.304Z\",\"read\": true,\"flagged\": true,\"pinned\": false,\"importance\": \"high\",\"folder\": \"sent\"},{\"id\": \"11\",\"from\": \"user@outlook.com\",\"to\": \"client@example.com\",\"subject\": \"Proposal draft\",\"preview\": \"Working on the proposal, need to review...\",\"body\": \"Hi,\\n\\nI'm working on the proposal. Need to add more details about pricing and timeline.\\n\\nWill send the final version soon.\\n\\nBest,\\nUser\",\"timestamp\": \"2025-11-15T12:00:19.304Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"12\",\"from\": \"user@outlook.com\",\"to\": \"vendor@example.com\",\"subject\": \"Follow up on quote\",\"preview\": \"Need to follow up on the pricing quote...\",\"body\": \"Hello,\\n\\nI wanted to follow up on the quote you sent last week. Could you provide more details about...\",\"timestamp\": \"2025-11-12T12:00:19.304Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"normal\",\"folder\": \"drafts\"},{\"id\": \"13\",\"from\": \"user@outlook.com\",\"to\": \"friend@example.com\",\"subject\": \"Weekend plans\",\"preview\": \"Let's plan something fun for the weekend...\",\"body\": \"Hey,\\n\\nWhat are you up to this weekend? Want to grab lunch?\\n\\nLet me know!\\n\\nUser\",\"timestamp\": \"2025-11-16T12:00:19.304Z\",\"read\": false,\"flagged\": false,\"pinned\": false,\"importance\": \"low\",\"folder\": \"drafts\"}],\"currentPage\": \"inbox\",\"selectedEmailId\": null,\"searchQuery\": \"\",\"searchInputValue\": \"\",\"isSearchExpanded\": false,\"isSearchDropdownVisible\": false,\"searchFilters\": [],\"sidebarCollapsed\": false,\"currentPageNumber\": 1,\"bottomTabs\": [{\"id\": \"1\",\"label\": \"New: Try our model Comp...\"},{\"id\": \"2\",\"label\": \"Learn the Basics of Fe...\"}],\"isFavoritesOpen\": true,\"isAccountOpen\": true,\"selectedFolder\": \"all\",\"isFolderSelectorOpen\": false,\"activeSidebarGroup\": \"favorites\"}",
|
| 9 |
+
"instructions": "{\"user_prompt\": \"You are in the outlook mail app, click \\u201cDrafts\\u201d in the left sidebar.\",\"success_criteria\": \"\\u201cDrafts\\u201d is highlighted and only draft messages are listed.\"}",
|
| 10 |
+
"reward_function": "_validate_go_to_the_drafts_page",
|
| 11 |
+
"valid_target_states": "",
|
| 12 |
+
"max_steps": 20,
|
| 13 |
+
"timeout_seconds": 120,
|
| 14 |
+
"metadata": "{\"category\": \"productivity\",\"difficulty\": \"easy\"}"
|
| 15 |
+
}
|