asteroid-odyssey 1.3.6__py3-none-any.whl → 1.3.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. asteroid_odyssey/__init__.py +4 -2
  2. asteroid_odyssey/agents_v1_gen/__init__.py +0 -1
  3. asteroid_odyssey/agents_v1_gen/api/execution_api.py +26 -311
  4. asteroid_odyssey/agents_v1_gen/models/__init__.py +0 -1
  5. asteroid_odyssey/agents_v1_gen/models/agent_profile.py +4 -2
  6. asteroid_odyssey/agents_v1_gen/models/create_agent_profile_request.py +5 -3
  7. asteroid_odyssey/agents_v1_gen/models/proxy_type.py +1 -0
  8. asteroid_odyssey/agents_v1_gen/models/update_agent_profile_request.py +4 -2
  9. asteroid_odyssey/agents_v2_gen/__init__.py +53 -15
  10. asteroid_odyssey/agents_v2_gen/api/__init__.py +3 -1
  11. asteroid_odyssey/agents_v2_gen/api/agents_api.py +684 -0
  12. asteroid_odyssey/agents_v2_gen/api/{default_api.py → execution_api.py} +381 -479
  13. asteroid_odyssey/agents_v2_gen/api/files_api.py +895 -0
  14. asteroid_odyssey/agents_v2_gen/models/__init__.py +50 -14
  15. asteroid_odyssey/agents_v2_gen/models/agents_agent_execute_agent_request.py +103 -0
  16. asteroid_odyssey/{agents_v1_gen/models/upload_execution_files200_response.py → agents_v2_gen/models/agents_agent_execute_agent_response.py} +11 -13
  17. asteroid_odyssey/agents_v2_gen/models/agents_execution_action_name.py +93 -0
  18. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_completed_info.py +350 -0
  19. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_completed_payload.py +25 -3
  20. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_failed_payload.py +19 -3
  21. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_started_info.py +252 -0
  22. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_started_payload.py +23 -3
  23. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_file_added_payload.py +10 -1
  24. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_generic_payload.py +11 -2
  25. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_payload_union.py +132 -104
  26. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_playwright_script_generated_payload.py +114 -0
  27. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_terminal.py → agents_execution_activity_reasoning_payload.py} +9 -13
  28. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_status_changed_payload.py +11 -2
  29. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_step_completed_payload.py +11 -2
  30. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_step_started_payload.py +11 -2
  31. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_transitioned_node_payload.py +20 -4
  32. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_user_message_received_payload.py +11 -2
  33. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_action_started.py → agents_execution_activity_workflow_updated_payload.py} +17 -13
  34. asteroid_odyssey/agents_v2_gen/models/agents_execution_comment.py +100 -0
  35. asteroid_odyssey/agents_v2_gen/models/agents_execution_completed_payload.py +4 -11
  36. asteroid_odyssey/agents_v2_gen/models/agents_execution_element_file_upload_completed_details.py +96 -0
  37. asteroid_odyssey/agents_v2_gen/models/agents_execution_execution_result.py +103 -0
  38. asteroid_odyssey/agents_v2_gen/models/agents_execution_ext_api_call_completed_details.py +102 -0
  39. asteroid_odyssey/agents_v2_gen/models/agents_execution_ext_get_mail_completed_details.py +98 -0
  40. asteroid_odyssey/agents_v2_gen/models/agents_execution_failed_payload.py +8 -2
  41. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_file_added.py → agents_execution_file_list_completed_details.py} +13 -17
  42. asteroid_odyssey/agents_v2_gen/models/agents_execution_file_read_completed_details.py +100 -0
  43. asteroid_odyssey/agents_v2_gen/models/agents_execution_file_stage_completed_details.py +96 -0
  44. asteroid_odyssey/agents_v2_gen/models/agents_execution_human_label.py +96 -0
  45. asteroid_odyssey/agents_v2_gen/models/agents_execution_list_item.py +141 -0
  46. asteroid_odyssey/agents_v2_gen/models/agents_execution_llm_call_purpose.py +40 -0
  47. asteroid_odyssey/agents_v2_gen/models/agents_execution_llm_call_started_details.py +97 -0
  48. asteroid_odyssey/agents_v2_gen/models/agents_execution_nav_to_completed_details.py +96 -0
  49. asteroid_odyssey/agents_v2_gen/models/agents_execution_nav_to_started_details.py +96 -0
  50. asteroid_odyssey/agents_v2_gen/models/agents_execution_obs_snapshot_with_selectors_completed_details.py +98 -0
  51. asteroid_odyssey/agents_v2_gen/models/agents_execution_rules_details.py +87 -0
  52. asteroid_odyssey/agents_v2_gen/models/agents_execution_scratchpad_read_completed_details.py +98 -0
  53. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_generic.py → agents_execution_scratchpad_read_started_details.py} +20 -17
  54. asteroid_odyssey/agents_v2_gen/models/agents_execution_scratchpad_write_completed_details.py +104 -0
  55. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_step_started.py → agents_execution_scratchpad_write_started_details.py} +20 -17
  56. asteroid_odyssey/agents_v2_gen/models/agents_execution_script_hybrid_playwright_completed_details.py +102 -0
  57. asteroid_odyssey/agents_v2_gen/models/agents_execution_script_hybrid_playwright_started_details.py +96 -0
  58. asteroid_odyssey/agents_v2_gen/models/agents_execution_script_pad_run_function_completed_details.py +102 -0
  59. asteroid_odyssey/agents_v2_gen/models/agents_execution_script_playwright_completed_details.py +102 -0
  60. asteroid_odyssey/agents_v2_gen/models/agents_execution_script_playwright_started_details.py +96 -0
  61. asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_read_completed_details.py +96 -0
  62. asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_read_started_details.py +98 -0
  63. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_action_completed.py → agents_execution_scriptpad_run_function_started_details.py} +21 -18
  64. asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_search_replace_completed_details.py +106 -0
  65. asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_search_replace_started_details.py +100 -0
  66. asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_write_completed_details.py +102 -0
  67. asteroid_odyssey/agents_v2_gen/models/agents_execution_sort_field.py +37 -0
  68. asteroid_odyssey/agents_v2_gen/models/agents_execution_terminal_payload.py +11 -2
  69. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_action_failed.py → agents_execution_util_get_datetime_completed_details.py} +20 -19
  70. asteroid_odyssey/agents_v2_gen/models/agents_execution_util_get_datetime_started_details.py +96 -0
  71. asteroid_odyssey/agents_v2_gen/models/{agents_execution_graph_update.py → agents_execution_workflow_update.py} +11 -5
  72. asteroid_odyssey/agents_v2_gen/models/agents_files_temp_file.py +89 -0
  73. asteroid_odyssey/agents_v2_gen/models/{agents_execution_activity_graph_updated_payload.py → agents_files_temp_files_response.py} +14 -14
  74. asteroid_odyssey/agents_v2_gen/models/agents_graph_models_nodes_properties_playwright_script_llm_var.py +92 -0
  75. asteroid_odyssey/agents_v2_gen/models/agents_graph_models_nodes_properties_playwright_script_llm_var_type.py +38 -0
  76. asteroid_odyssey/agents_v2_gen/models/agents_graph_models_transitions_transition_type.py +38 -0
  77. asteroid_odyssey/agents_v2_gen/models/common_os_error.py +87 -0
  78. asteroid_odyssey/agents_v2_gen/models/executions_list200_response.py +101 -0
  79. asteroid_odyssey/client.py +204 -33
  80. {asteroid_odyssey-1.3.6.dist-info → asteroid_odyssey-1.3.8.dist-info}/METADATA +1 -1
  81. asteroid_odyssey-1.3.8.dist-info/RECORD +132 -0
  82. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_graph_updated.py +0 -100
  83. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_status_changed.py +0 -100
  84. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_completed.py +0 -100
  85. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_transitioned_node.py +0 -100
  86. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_user_message_received.py +0 -100
  87. asteroid_odyssey-1.3.6.dist-info/RECORD +0 -95
  88. {asteroid_odyssey-1.3.6.dist-info → asteroid_odyssey-1.3.8.dist-info}/WHEEL +0 -0
  89. {asteroid_odyssey-1.3.6.dist-info → asteroid_odyssey-1.3.8.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,98 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class AgentsExecutionExtGetMailCompletedDetails(BaseModel):
26
+ """
27
+ AgentsExecutionExtGetMailCompletedDetails
28
+ """ # noqa: E501
29
+ action_name: StrictStr = Field(alias="actionName")
30
+ email_count: StrictInt = Field(alias="emailCount")
31
+ emails: List[Any]
32
+ __properties: ClassVar[List[str]] = ["actionName", "emailCount", "emails"]
33
+
34
+ @field_validator('action_name')
35
+ def action_name_validate_enum(cls, value):
36
+ """Validates the enum"""
37
+ if value not in set(['ext_get_mail']):
38
+ raise ValueError("must be one of enum values ('ext_get_mail')")
39
+ return value
40
+
41
+ model_config = ConfigDict(
42
+ populate_by_name=True,
43
+ validate_assignment=True,
44
+ protected_namespaces=(),
45
+ )
46
+
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.model_dump(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
+ return json.dumps(self.to_dict())
56
+
57
+ @classmethod
58
+ def from_json(cls, json_str: str) -> Optional[Self]:
59
+ """Create an instance of AgentsExecutionExtGetMailCompletedDetails from a JSON string"""
60
+ return cls.from_dict(json.loads(json_str))
61
+
62
+ def to_dict(self) -> Dict[str, Any]:
63
+ """Return the dictionary representation of the model using alias.
64
+
65
+ This has the following differences from calling pydantic's
66
+ `self.model_dump(by_alias=True)`:
67
+
68
+ * `None` is only added to the output dict for nullable fields that
69
+ were set at model initialization. Other fields with value `None`
70
+ are ignored.
71
+ """
72
+ excluded_fields: Set[str] = set([
73
+ ])
74
+
75
+ _dict = self.model_dump(
76
+ by_alias=True,
77
+ exclude=excluded_fields,
78
+ exclude_none=True,
79
+ )
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of AgentsExecutionExtGetMailCompletedDetails from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "actionName": obj.get("actionName"),
93
+ "emailCount": obj.get("emailCount"),
94
+ "emails": obj.get("emails")
95
+ })
96
+ return _obj
97
+
98
+
@@ -18,7 +18,8 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictStr
21
- from typing import Any, ClassVar, Dict, List
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from asteroid_odyssey.agents_v2_gen.models.common_os_error import CommonOSError
22
23
  from typing import Optional, Set
23
24
  from typing_extensions import Self
24
25
 
@@ -26,8 +27,9 @@ class AgentsExecutionFailedPayload(BaseModel):
26
27
  """
27
28
  AgentsExecutionFailedPayload
28
29
  """ # noqa: E501
30
+ os_error: Optional[CommonOSError] = None
29
31
  reason: StrictStr
30
- __properties: ClassVar[List[str]] = ["reason"]
32
+ __properties: ClassVar[List[str]] = ["os_error", "reason"]
31
33
 
32
34
  model_config = ConfigDict(
33
35
  populate_by_name=True,
@@ -68,6 +70,9 @@ class AgentsExecutionFailedPayload(BaseModel):
68
70
  exclude=excluded_fields,
69
71
  exclude_none=True,
70
72
  )
73
+ # override the default output from pydantic by calling `to_dict()` of os_error
74
+ if self.os_error:
75
+ _dict['os_error'] = self.os_error.to_dict()
71
76
  return _dict
72
77
 
73
78
  @classmethod
@@ -80,6 +85,7 @@ class AgentsExecutionFailedPayload(BaseModel):
80
85
  return cls.model_validate(obj)
81
86
 
82
87
  _obj = cls.model_validate({
88
+ "os_error": CommonOSError.from_dict(obj["os_error"]) if obj.get("os_error") is not None else None,
83
89
  "reason": obj.get("reason")
84
90
  })
85
91
  return _obj
@@ -19,23 +19,22 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List
22
- from asteroid_odyssey.agents_v2_gen.models.agents_execution_activity_file_added_payload import AgentsExecutionActivityFileAddedPayload
23
22
  from typing import Optional, Set
24
23
  from typing_extensions import Self
25
24
 
26
- class ActivityPayloadUnionFileAdded(BaseModel):
25
+ class AgentsExecutionFileListCompletedDetails(BaseModel):
27
26
  """
28
- ActivityPayloadUnionFileAdded
27
+ AgentsExecutionFileListCompletedDetails
29
28
  """ # noqa: E501
30
- activity_type: StrictStr = Field(alias="activityType")
31
- data: AgentsExecutionActivityFileAddedPayload
32
- __properties: ClassVar[List[str]] = ["activityType", "data"]
29
+ action_name: StrictStr = Field(alias="actionName")
30
+ file_names: List[StrictStr] = Field(alias="fileNames")
31
+ __properties: ClassVar[List[str]] = ["actionName", "fileNames"]
33
32
 
34
- @field_validator('activity_type')
35
- def activity_type_validate_enum(cls, value):
33
+ @field_validator('action_name')
34
+ def action_name_validate_enum(cls, value):
36
35
  """Validates the enum"""
37
- if value not in set(['file_added']):
38
- raise ValueError("must be one of enum values ('file_added')")
36
+ if value not in set(['file_list']):
37
+ raise ValueError("must be one of enum values ('file_list')")
39
38
  return value
40
39
 
41
40
  model_config = ConfigDict(
@@ -56,7 +55,7 @@ class ActivityPayloadUnionFileAdded(BaseModel):
56
55
 
57
56
  @classmethod
58
57
  def from_json(cls, json_str: str) -> Optional[Self]:
59
- """Create an instance of ActivityPayloadUnionFileAdded from a JSON string"""
58
+ """Create an instance of AgentsExecutionFileListCompletedDetails from a JSON string"""
60
59
  return cls.from_dict(json.loads(json_str))
61
60
 
62
61
  def to_dict(self) -> Dict[str, Any]:
@@ -77,14 +76,11 @@ class ActivityPayloadUnionFileAdded(BaseModel):
77
76
  exclude=excluded_fields,
78
77
  exclude_none=True,
79
78
  )
80
- # override the default output from pydantic by calling `to_dict()` of data
81
- if self.data:
82
- _dict['data'] = self.data.to_dict()
83
79
  return _dict
84
80
 
85
81
  @classmethod
86
82
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
- """Create an instance of ActivityPayloadUnionFileAdded from a dict"""
83
+ """Create an instance of AgentsExecutionFileListCompletedDetails from a dict"""
88
84
  if obj is None:
89
85
  return None
90
86
 
@@ -92,8 +88,8 @@ class ActivityPayloadUnionFileAdded(BaseModel):
92
88
  return cls.model_validate(obj)
93
89
 
94
90
  _obj = cls.model_validate({
95
- "activityType": obj.get("activityType"),
96
- "data": AgentsExecutionActivityFileAddedPayload.from_dict(obj["data"]) if obj.get("data") is not None else None
91
+ "actionName": obj.get("actionName"),
92
+ "fileNames": obj.get("fileNames")
97
93
  })
98
94
  return _obj
99
95
 
@@ -0,0 +1,100 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class AgentsExecutionFileReadCompletedDetails(BaseModel):
26
+ """
27
+ AgentsExecutionFileReadCompletedDetails
28
+ """ # noqa: E501
29
+ action_name: StrictStr = Field(alias="actionName")
30
+ error_count: Optional[StrictInt] = Field(default=None, alias="errorCount")
31
+ file_names: List[StrictStr] = Field(alias="fileNames")
32
+ total_size_bytes: Optional[StrictInt] = Field(default=None, alias="totalSizeBytes")
33
+ __properties: ClassVar[List[str]] = ["actionName", "errorCount", "fileNames", "totalSizeBytes"]
34
+
35
+ @field_validator('action_name')
36
+ def action_name_validate_enum(cls, value):
37
+ """Validates the enum"""
38
+ if value not in set(['file_read']):
39
+ raise ValueError("must be one of enum values ('file_read')")
40
+ return value
41
+
42
+ model_config = ConfigDict(
43
+ populate_by_name=True,
44
+ validate_assignment=True,
45
+ protected_namespaces=(),
46
+ )
47
+
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.model_dump(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> Optional[Self]:
60
+ """Create an instance of AgentsExecutionFileReadCompletedDetails from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self) -> Dict[str, Any]:
64
+ """Return the dictionary representation of the model using alias.
65
+
66
+ This has the following differences from calling pydantic's
67
+ `self.model_dump(by_alias=True)`:
68
+
69
+ * `None` is only added to the output dict for nullable fields that
70
+ were set at model initialization. Other fields with value `None`
71
+ are ignored.
72
+ """
73
+ excluded_fields: Set[str] = set([
74
+ ])
75
+
76
+ _dict = self.model_dump(
77
+ by_alias=True,
78
+ exclude=excluded_fields,
79
+ exclude_none=True,
80
+ )
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of AgentsExecutionFileReadCompletedDetails from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "actionName": obj.get("actionName"),
94
+ "errorCount": obj.get("errorCount"),
95
+ "fileNames": obj.get("fileNames"),
96
+ "totalSizeBytes": obj.get("totalSizeBytes")
97
+ })
98
+ return _obj
99
+
100
+
@@ -0,0 +1,96 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class AgentsExecutionFileStageCompletedDetails(BaseModel):
26
+ """
27
+ AgentsExecutionFileStageCompletedDetails
28
+ """ # noqa: E501
29
+ action_name: StrictStr = Field(alias="actionName")
30
+ file_names: List[StrictStr] = Field(alias="fileNames")
31
+ __properties: ClassVar[List[str]] = ["actionName", "fileNames"]
32
+
33
+ @field_validator('action_name')
34
+ def action_name_validate_enum(cls, value):
35
+ """Validates the enum"""
36
+ if value not in set(['file_stage']):
37
+ raise ValueError("must be one of enum values ('file_stage')")
38
+ return value
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> Optional[Self]:
58
+ """Create an instance of AgentsExecutionFileStageCompletedDetails from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self) -> Dict[str, Any]:
62
+ """Return the dictionary representation of the model using alias.
63
+
64
+ This has the following differences from calling pydantic's
65
+ `self.model_dump(by_alias=True)`:
66
+
67
+ * `None` is only added to the output dict for nullable fields that
68
+ were set at model initialization. Other fields with value `None`
69
+ are ignored.
70
+ """
71
+ excluded_fields: Set[str] = set([
72
+ ])
73
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of AgentsExecutionFileStageCompletedDetails from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "actionName": obj.get("actionName"),
92
+ "fileNames": obj.get("fileNames")
93
+ })
94
+ return _obj
95
+
96
+
@@ -0,0 +1,96 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class AgentsExecutionHumanLabel(BaseModel):
27
+ """
28
+ Human-applied label for categorizing executions
29
+ """ # noqa: E501
30
+ color: StrictStr = Field(description="Hex color code for the label (e.g., #FF5733)")
31
+ created_at: datetime = Field(description="When the label was created", alias="createdAt")
32
+ id: StrictStr = Field(description="Unique identifier for the label")
33
+ name: StrictStr = Field(description="Display name of the label")
34
+ organization_id: StrictStr = Field(description="Organization this label belongs to", alias="organizationId")
35
+ __properties: ClassVar[List[str]] = ["color", "createdAt", "id", "name", "organizationId"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of AgentsExecutionHumanLabel from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of AgentsExecutionHumanLabel from a dict"""
81
+ if obj is None:
82
+ return None
83
+
84
+ if not isinstance(obj, dict):
85
+ return cls.model_validate(obj)
86
+
87
+ _obj = cls.model_validate({
88
+ "color": obj.get("color"),
89
+ "createdAt": obj.get("createdAt"),
90
+ "id": obj.get("id"),
91
+ "name": obj.get("name"),
92
+ "organizationId": obj.get("organizationId")
93
+ })
94
+ return _obj
95
+
96
+
@@ -0,0 +1,141 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
+ from asteroid_odyssey.agents_v2_gen.models.agents_execution_comment import AgentsExecutionComment
24
+ from asteroid_odyssey.agents_v2_gen.models.agents_execution_execution_result import AgentsExecutionExecutionResult
25
+ from asteroid_odyssey.agents_v2_gen.models.agents_execution_human_label import AgentsExecutionHumanLabel
26
+ from asteroid_odyssey.agents_v2_gen.models.agents_execution_status import AgentsExecutionStatus
27
+ from typing import Optional, Set
28
+ from typing_extensions import Self
29
+
30
+ class AgentsExecutionListItem(BaseModel):
31
+ """
32
+ Represents a single execution in a list view
33
+ """ # noqa: E501
34
+ agent_id: StrictStr = Field(description="The ID of the agent that was executed", alias="agentId")
35
+ agent_name: StrictStr = Field(description="The agent display name", alias="agentName")
36
+ agent_profile_name: Optional[StrictStr] = Field(default=None, description="The name of the agent profile used for this execution (if any)", alias="agentProfileName")
37
+ agent_version: StrictInt = Field(description="The version of the agent that was executed", alias="agentVersion")
38
+ agent_version_dirty: StrictBool = Field(description="Whether the agent version was modified from the original", alias="agentVersionDirty")
39
+ browser_recording_url: Optional[StrictStr] = Field(default=None, description="Browser recording URL (if a browser session was used)", alias="browserRecordingUrl")
40
+ comments: List[AgentsExecutionComment] = Field(description="Comments on this execution")
41
+ created_at: datetime = Field(description="When the execution was created", alias="createdAt")
42
+ duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Execution duration in seconds (only present for terminal executions)")
43
+ execution_result: Optional[AgentsExecutionExecutionResult] = Field(default=None, description="Execution result with outcome, reasoning, and result data", alias="executionResult")
44
+ human_labels: List[AgentsExecutionHumanLabel] = Field(description="Human-applied labels for this execution", alias="humanLabels")
45
+ id: StrictStr = Field(description="The unique identifier of the execution")
46
+ metadata: Optional[Dict[str, Any]] = Field(default=None, description="Optional metadata key-value pairs attached to this execution")
47
+ organization_id: StrictStr = Field(description="The organization this execution belongs to", alias="organizationId")
48
+ status: AgentsExecutionStatus = Field(description="The current status of the execution")
49
+ terminal_at: Optional[datetime] = Field(default=None, description="When the execution reached a terminal state (if applicable)", alias="terminalAt")
50
+ workflow_id: StrictStr = Field(description="The ID of the workflow that was executed", alias="workflowId")
51
+ __properties: ClassVar[List[str]] = ["agentId", "agentName", "agentProfileName", "agentVersion", "agentVersionDirty", "browserRecordingUrl", "comments", "createdAt", "duration", "executionResult", "humanLabels", "id", "metadata", "organizationId", "status", "terminalAt", "workflowId"]
52
+
53
+ model_config = ConfigDict(
54
+ populate_by_name=True,
55
+ validate_assignment=True,
56
+ protected_namespaces=(),
57
+ )
58
+
59
+
60
+ def to_str(self) -> str:
61
+ """Returns the string representation of the model using alias"""
62
+ return pprint.pformat(self.model_dump(by_alias=True))
63
+
64
+ def to_json(self) -> str:
65
+ """Returns the JSON representation of the model using alias"""
66
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
67
+ return json.dumps(self.to_dict())
68
+
69
+ @classmethod
70
+ def from_json(cls, json_str: str) -> Optional[Self]:
71
+ """Create an instance of AgentsExecutionListItem from a JSON string"""
72
+ return cls.from_dict(json.loads(json_str))
73
+
74
+ def to_dict(self) -> Dict[str, Any]:
75
+ """Return the dictionary representation of the model using alias.
76
+
77
+ This has the following differences from calling pydantic's
78
+ `self.model_dump(by_alias=True)`:
79
+
80
+ * `None` is only added to the output dict for nullable fields that
81
+ were set at model initialization. Other fields with value `None`
82
+ are ignored.
83
+ """
84
+ excluded_fields: Set[str] = set([
85
+ ])
86
+
87
+ _dict = self.model_dump(
88
+ by_alias=True,
89
+ exclude=excluded_fields,
90
+ exclude_none=True,
91
+ )
92
+ # override the default output from pydantic by calling `to_dict()` of each item in comments (list)
93
+ _items = []
94
+ if self.comments:
95
+ for _item_comments in self.comments:
96
+ if _item_comments:
97
+ _items.append(_item_comments.to_dict())
98
+ _dict['comments'] = _items
99
+ # override the default output from pydantic by calling `to_dict()` of execution_result
100
+ if self.execution_result:
101
+ _dict['executionResult'] = self.execution_result.to_dict()
102
+ # override the default output from pydantic by calling `to_dict()` of each item in human_labels (list)
103
+ _items = []
104
+ if self.human_labels:
105
+ for _item_human_labels in self.human_labels:
106
+ if _item_human_labels:
107
+ _items.append(_item_human_labels.to_dict())
108
+ _dict['humanLabels'] = _items
109
+ return _dict
110
+
111
+ @classmethod
112
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
113
+ """Create an instance of AgentsExecutionListItem from a dict"""
114
+ if obj is None:
115
+ return None
116
+
117
+ if not isinstance(obj, dict):
118
+ return cls.model_validate(obj)
119
+
120
+ _obj = cls.model_validate({
121
+ "agentId": obj.get("agentId"),
122
+ "agentName": obj.get("agentName"),
123
+ "agentProfileName": obj.get("agentProfileName"),
124
+ "agentVersion": obj.get("agentVersion"),
125
+ "agentVersionDirty": obj.get("agentVersionDirty"),
126
+ "browserRecordingUrl": obj.get("browserRecordingUrl"),
127
+ "comments": [AgentsExecutionComment.from_dict(_item) for _item in obj["comments"]] if obj.get("comments") is not None else None,
128
+ "createdAt": obj.get("createdAt"),
129
+ "duration": obj.get("duration"),
130
+ "executionResult": AgentsExecutionExecutionResult.from_dict(obj["executionResult"]) if obj.get("executionResult") is not None else None,
131
+ "humanLabels": [AgentsExecutionHumanLabel.from_dict(_item) for _item in obj["humanLabels"]] if obj.get("humanLabels") is not None else None,
132
+ "id": obj.get("id"),
133
+ "metadata": obj.get("metadata"),
134
+ "organizationId": obj.get("organizationId"),
135
+ "status": obj.get("status"),
136
+ "terminalAt": obj.get("terminalAt"),
137
+ "workflowId": obj.get("workflowId")
138
+ })
139
+ return _obj
140
+
141
+
@@ -0,0 +1,40 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class AgentsExecutionLLMCallPurpose(str, Enum):
22
+ """
23
+ AgentsExecutionLLMCallPurpose
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ IRIS_PICK_NEXT_ACTION = 'iris_pick_next_action'
30
+ TRANSITION_PICK_NEXT_NODE = 'transition_pick_next_node'
31
+ OUTPUT_POPULATE_RESULT = 'output_populate_result'
32
+ GENERATE_HYBRID_PLAYWRIGHT_CODE = 'generate_hybrid_playwright_code'
33
+ GENERATE_PLAYWRIGHT_VARIABLES = 'generate_playwright_variables'
34
+
35
+ @classmethod
36
+ def from_json(cls, json_str: str) -> Self:
37
+ """Create an instance of AgentsExecutionLLMCallPurpose from a JSON string"""
38
+ return cls(json.loads(json_str))
39
+
40
+