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.
- asteroid_odyssey/__init__.py +4 -2
- asteroid_odyssey/agents_v1_gen/__init__.py +0 -1
- asteroid_odyssey/agents_v1_gen/api/execution_api.py +26 -311
- asteroid_odyssey/agents_v1_gen/models/__init__.py +0 -1
- asteroid_odyssey/agents_v1_gen/models/agent_profile.py +4 -2
- asteroid_odyssey/agents_v1_gen/models/create_agent_profile_request.py +5 -3
- asteroid_odyssey/agents_v1_gen/models/proxy_type.py +1 -0
- asteroid_odyssey/agents_v1_gen/models/update_agent_profile_request.py +4 -2
- asteroid_odyssey/agents_v2_gen/__init__.py +53 -15
- asteroid_odyssey/agents_v2_gen/api/__init__.py +3 -1
- asteroid_odyssey/agents_v2_gen/api/agents_api.py +684 -0
- asteroid_odyssey/agents_v2_gen/api/{default_api.py → execution_api.py} +381 -479
- asteroid_odyssey/agents_v2_gen/api/files_api.py +895 -0
- asteroid_odyssey/agents_v2_gen/models/__init__.py +50 -14
- asteroid_odyssey/agents_v2_gen/models/agents_agent_execute_agent_request.py +103 -0
- asteroid_odyssey/{agents_v1_gen/models/upload_execution_files200_response.py → agents_v2_gen/models/agents_agent_execute_agent_response.py} +11 -13
- asteroid_odyssey/agents_v2_gen/models/agents_execution_action_name.py +93 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_completed_info.py +350 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_completed_payload.py +25 -3
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_failed_payload.py +19 -3
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_started_info.py +252 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_started_payload.py +23 -3
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_file_added_payload.py +10 -1
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_generic_payload.py +11 -2
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_payload_union.py +132 -104
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_playwright_script_generated_payload.py +114 -0
- asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_terminal.py → agents_execution_activity_reasoning_payload.py} +9 -13
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_status_changed_payload.py +11 -2
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_step_completed_payload.py +11 -2
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_step_started_payload.py +11 -2
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_transitioned_node_payload.py +20 -4
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_user_message_received_payload.py +11 -2
- asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_action_started.py → agents_execution_activity_workflow_updated_payload.py} +17 -13
- asteroid_odyssey/agents_v2_gen/models/agents_execution_comment.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_completed_payload.py +4 -11
- asteroid_odyssey/agents_v2_gen/models/agents_execution_element_file_upload_completed_details.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_execution_result.py +103 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_ext_api_call_completed_details.py +102 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_ext_get_mail_completed_details.py +98 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_failed_payload.py +8 -2
- asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_file_added.py → agents_execution_file_list_completed_details.py} +13 -17
- asteroid_odyssey/agents_v2_gen/models/agents_execution_file_read_completed_details.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_file_stage_completed_details.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_human_label.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_list_item.py +141 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_llm_call_purpose.py +40 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_llm_call_started_details.py +97 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_nav_to_completed_details.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_nav_to_started_details.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_obs_snapshot_with_selectors_completed_details.py +98 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_rules_details.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_scratchpad_read_completed_details.py +98 -0
- asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_generic.py → agents_execution_scratchpad_read_started_details.py} +20 -17
- asteroid_odyssey/agents_v2_gen/models/agents_execution_scratchpad_write_completed_details.py +104 -0
- asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_step_started.py → agents_execution_scratchpad_write_started_details.py} +20 -17
- asteroid_odyssey/agents_v2_gen/models/agents_execution_script_hybrid_playwright_completed_details.py +102 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_script_hybrid_playwright_started_details.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_script_pad_run_function_completed_details.py +102 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_script_playwright_completed_details.py +102 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_script_playwright_started_details.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_read_completed_details.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_read_started_details.py +98 -0
- asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_action_completed.py → agents_execution_scriptpad_run_function_started_details.py} +21 -18
- asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_search_replace_completed_details.py +106 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_search_replace_started_details.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_write_completed_details.py +102 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_sort_field.py +37 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_terminal_payload.py +11 -2
- asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_action_failed.py → agents_execution_util_get_datetime_completed_details.py} +20 -19
- asteroid_odyssey/agents_v2_gen/models/agents_execution_util_get_datetime_started_details.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/{agents_execution_graph_update.py → agents_execution_workflow_update.py} +11 -5
- asteroid_odyssey/agents_v2_gen/models/agents_files_temp_file.py +89 -0
- asteroid_odyssey/agents_v2_gen/models/{agents_execution_activity_graph_updated_payload.py → agents_files_temp_files_response.py} +14 -14
- asteroid_odyssey/agents_v2_gen/models/agents_graph_models_nodes_properties_playwright_script_llm_var.py +92 -0
- asteroid_odyssey/agents_v2_gen/models/agents_graph_models_nodes_properties_playwright_script_llm_var_type.py +38 -0
- asteroid_odyssey/agents_v2_gen/models/agents_graph_models_transitions_transition_type.py +38 -0
- asteroid_odyssey/agents_v2_gen/models/common_os_error.py +87 -0
- asteroid_odyssey/agents_v2_gen/models/executions_list200_response.py +101 -0
- asteroid_odyssey/client.py +204 -33
- {asteroid_odyssey-1.3.6.dist-info → asteroid_odyssey-1.3.8.dist-info}/METADATA +1 -1
- asteroid_odyssey-1.3.8.dist-info/RECORD +132 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_graph_updated.py +0 -100
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_status_changed.py +0 -100
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_completed.py +0 -100
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_transitioned_node.py +0 -100
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_user_message_received.py +0 -100
- asteroid_odyssey-1.3.6.dist-info/RECORD +0 -95
- {asteroid_odyssey-1.3.6.dist-info → asteroid_odyssey-1.3.8.dist-info}/WHEEL +0 -0
- {asteroid_odyssey-1.3.6.dist-info → asteroid_odyssey-1.3.8.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
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, StrictBool, 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 AgentsExecutionScratchpadWriteCompletedDetails(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AgentsExecutionScratchpadWriteCompletedDetails
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
+
content: Optional[StrictStr] = None
|
|
31
|
+
content_truncated: Optional[StrictBool] = Field(default=None, alias="contentTruncated")
|
|
32
|
+
lines_changed: StrictInt = Field(alias="linesChanged")
|
|
33
|
+
patches_applied: StrictInt = Field(alias="patchesApplied")
|
|
34
|
+
total_lines: StrictInt = Field(alias="totalLines")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["actionName", "content", "contentTruncated", "linesChanged", "patchesApplied", "totalLines"]
|
|
36
|
+
|
|
37
|
+
@field_validator('action_name')
|
|
38
|
+
def action_name_validate_enum(cls, value):
|
|
39
|
+
"""Validates the enum"""
|
|
40
|
+
if value not in set(['scratchpad_write']):
|
|
41
|
+
raise ValueError("must be one of enum values ('scratchpad_write')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
+
"""Create an instance of AgentsExecutionScratchpadWriteCompletedDetails from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
"""
|
|
75
|
+
excluded_fields: Set[str] = set([
|
|
76
|
+
])
|
|
77
|
+
|
|
78
|
+
_dict = self.model_dump(
|
|
79
|
+
by_alias=True,
|
|
80
|
+
exclude=excluded_fields,
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of AgentsExecutionScratchpadWriteCompletedDetails from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"actionName": obj.get("actionName"),
|
|
96
|
+
"content": obj.get("content"),
|
|
97
|
+
"contentTruncated": obj.get("contentTruncated"),
|
|
98
|
+
"linesChanged": obj.get("linesChanged"),
|
|
99
|
+
"patchesApplied": obj.get("patchesApplied"),
|
|
100
|
+
"totalLines": obj.get("totalLines")
|
|
101
|
+
})
|
|
102
|
+
return _obj
|
|
103
|
+
|
|
104
|
+
|
|
@@ -19,23 +19,29 @@ 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_step_started_payload import AgentsExecutionActivityStepStartedPayload
|
|
23
22
|
from typing import Optional, Set
|
|
24
23
|
from typing_extensions import Self
|
|
25
24
|
|
|
26
|
-
class
|
|
25
|
+
class AgentsExecutionScratchpadWriteStartedDetails(BaseModel):
|
|
27
26
|
"""
|
|
28
|
-
|
|
27
|
+
AgentsExecutionScratchpadWriteStartedDetails
|
|
29
28
|
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
__properties: ClassVar[List[str]] = ["
|
|
29
|
+
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
+
operation: StrictStr
|
|
31
|
+
__properties: ClassVar[List[str]] = ["actionName", "operation"]
|
|
33
32
|
|
|
34
|
-
@field_validator('
|
|
35
|
-
def
|
|
33
|
+
@field_validator('action_name')
|
|
34
|
+
def action_name_validate_enum(cls, value):
|
|
36
35
|
"""Validates the enum"""
|
|
37
|
-
if value not in set(['
|
|
38
|
-
raise ValueError("must be one of enum values ('
|
|
36
|
+
if value not in set(['scratchpad_write']):
|
|
37
|
+
raise ValueError("must be one of enum values ('scratchpad_write')")
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
@field_validator('operation')
|
|
41
|
+
def operation_validate_enum(cls, value):
|
|
42
|
+
"""Validates the enum"""
|
|
43
|
+
if value not in set(['write']):
|
|
44
|
+
raise ValueError("must be one of enum values ('write')")
|
|
39
45
|
return value
|
|
40
46
|
|
|
41
47
|
model_config = ConfigDict(
|
|
@@ -56,7 +62,7 @@ class ActivityPayloadUnionStepStarted(BaseModel):
|
|
|
56
62
|
|
|
57
63
|
@classmethod
|
|
58
64
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
-
"""Create an instance of
|
|
65
|
+
"""Create an instance of AgentsExecutionScratchpadWriteStartedDetails from a JSON string"""
|
|
60
66
|
return cls.from_dict(json.loads(json_str))
|
|
61
67
|
|
|
62
68
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -77,14 +83,11 @@ class ActivityPayloadUnionStepStarted(BaseModel):
|
|
|
77
83
|
exclude=excluded_fields,
|
|
78
84
|
exclude_none=True,
|
|
79
85
|
)
|
|
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
86
|
return _dict
|
|
84
87
|
|
|
85
88
|
@classmethod
|
|
86
89
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
-
"""Create an instance of
|
|
90
|
+
"""Create an instance of AgentsExecutionScratchpadWriteStartedDetails from a dict"""
|
|
88
91
|
if obj is None:
|
|
89
92
|
return None
|
|
90
93
|
|
|
@@ -92,8 +95,8 @@ class ActivityPayloadUnionStepStarted(BaseModel):
|
|
|
92
95
|
return cls.model_validate(obj)
|
|
93
96
|
|
|
94
97
|
_obj = cls.model_validate({
|
|
95
|
-
"
|
|
96
|
-
"
|
|
98
|
+
"actionName": obj.get("actionName"),
|
|
99
|
+
"operation": obj.get("operation")
|
|
97
100
|
})
|
|
98
101
|
return _obj
|
|
99
102
|
|
asteroid_odyssey/agents_v2_gen/models/agents_execution_script_hybrid_playwright_completed_details.py
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
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, StrictBool, 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 AgentsExecutionScriptHybridPlaywrightCompletedDetails(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AgentsExecutionScriptHybridPlaywrightCompletedDetails
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
+
console_logs: List[StrictStr] = Field(alias="consoleLogs")
|
|
31
|
+
failed_line: Optional[StrictInt] = Field(default=None, alias="failedLine")
|
|
32
|
+
result: StrictStr
|
|
33
|
+
success: StrictBool
|
|
34
|
+
__properties: ClassVar[List[str]] = ["actionName", "consoleLogs", "failedLine", "result", "success"]
|
|
35
|
+
|
|
36
|
+
@field_validator('action_name')
|
|
37
|
+
def action_name_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value not in set(['script_hybrid_playwright']):
|
|
40
|
+
raise ValueError("must be one of enum values ('script_hybrid_playwright')")
|
|
41
|
+
return value
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
validate_assignment=True,
|
|
46
|
+
protected_namespaces=(),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
+
"""Create an instance of AgentsExecutionScriptHybridPlaywrightCompletedDetails from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
"""
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of AgentsExecutionScriptHybridPlaywrightCompletedDetails from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"actionName": obj.get("actionName"),
|
|
95
|
+
"consoleLogs": obj.get("consoleLogs"),
|
|
96
|
+
"failedLine": obj.get("failedLine"),
|
|
97
|
+
"result": obj.get("result"),
|
|
98
|
+
"success": obj.get("success")
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
asteroid_odyssey/agents_v2_gen/models/agents_execution_script_hybrid_playwright_started_details.py
ADDED
|
@@ -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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AgentsExecutionScriptHybridPlaywrightStartedDetails(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AgentsExecutionScriptHybridPlaywrightStartedDetails
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
+
llm_vars: Optional[List[StrictStr]] = Field(default=None, alias="llmVars")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["actionName", "llmVars"]
|
|
32
|
+
|
|
33
|
+
@field_validator('action_name')
|
|
34
|
+
def action_name_validate_enum(cls, value):
|
|
35
|
+
"""Validates the enum"""
|
|
36
|
+
if value not in set(['script_hybrid_playwright']):
|
|
37
|
+
raise ValueError("must be one of enum values ('script_hybrid_playwright')")
|
|
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 AgentsExecutionScriptHybridPlaywrightStartedDetails 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 AgentsExecutionScriptHybridPlaywrightStartedDetails 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
|
+
"llmVars": obj.get("llmVars")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
asteroid_odyssey/agents_v2_gen/models/agents_execution_script_pad_run_function_completed_details.py
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
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, StrictBool, 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 AgentsExecutionScriptPadRunFunctionCompletedDetails(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AgentsExecutionScriptPadRunFunctionCompletedDetails
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
+
console_logs: List[StrictStr] = Field(alias="consoleLogs")
|
|
31
|
+
failed_line: Optional[StrictInt] = Field(default=None, alias="failedLine")
|
|
32
|
+
result: StrictStr
|
|
33
|
+
success: StrictBool
|
|
34
|
+
__properties: ClassVar[List[str]] = ["actionName", "consoleLogs", "failedLine", "result", "success"]
|
|
35
|
+
|
|
36
|
+
@field_validator('action_name')
|
|
37
|
+
def action_name_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value not in set(['scriptpad_run_function']):
|
|
40
|
+
raise ValueError("must be one of enum values ('scriptpad_run_function')")
|
|
41
|
+
return value
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
validate_assignment=True,
|
|
46
|
+
protected_namespaces=(),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
+
"""Create an instance of AgentsExecutionScriptPadRunFunctionCompletedDetails from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
"""
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of AgentsExecutionScriptPadRunFunctionCompletedDetails from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"actionName": obj.get("actionName"),
|
|
95
|
+
"consoleLogs": obj.get("consoleLogs"),
|
|
96
|
+
"failedLine": obj.get("failedLine"),
|
|
97
|
+
"result": obj.get("result"),
|
|
98
|
+
"success": obj.get("success")
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
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, StrictBool, 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 AgentsExecutionScriptPlaywrightCompletedDetails(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AgentsExecutionScriptPlaywrightCompletedDetails
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
+
console_logs: List[StrictStr] = Field(alias="consoleLogs")
|
|
31
|
+
failed_line: Optional[StrictInt] = Field(default=None, alias="failedLine")
|
|
32
|
+
result: StrictStr
|
|
33
|
+
success: StrictBool
|
|
34
|
+
__properties: ClassVar[List[str]] = ["actionName", "consoleLogs", "failedLine", "result", "success"]
|
|
35
|
+
|
|
36
|
+
@field_validator('action_name')
|
|
37
|
+
def action_name_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value not in set(['script_playwright']):
|
|
40
|
+
raise ValueError("must be one of enum values ('script_playwright')")
|
|
41
|
+
return value
|
|
42
|
+
|
|
43
|
+
model_config = ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
validate_assignment=True,
|
|
46
|
+
protected_namespaces=(),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def to_str(self) -> str:
|
|
51
|
+
"""Returns the string representation of the model using alias"""
|
|
52
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
+
|
|
54
|
+
def to_json(self) -> str:
|
|
55
|
+
"""Returns the JSON representation of the model using alias"""
|
|
56
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
+
return json.dumps(self.to_dict())
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
+
"""Create an instance of AgentsExecutionScriptPlaywrightCompletedDetails from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
+
"""Return the dictionary representation of the model using alias.
|
|
66
|
+
|
|
67
|
+
This has the following differences from calling pydantic's
|
|
68
|
+
`self.model_dump(by_alias=True)`:
|
|
69
|
+
|
|
70
|
+
* `None` is only added to the output dict for nullable fields that
|
|
71
|
+
were set at model initialization. Other fields with value `None`
|
|
72
|
+
are ignored.
|
|
73
|
+
"""
|
|
74
|
+
excluded_fields: Set[str] = set([
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of AgentsExecutionScriptPlaywrightCompletedDetails from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"actionName": obj.get("actionName"),
|
|
95
|
+
"consoleLogs": obj.get("consoleLogs"),
|
|
96
|
+
"failedLine": obj.get("failedLine"),
|
|
97
|
+
"result": obj.get("result"),
|
|
98
|
+
"success": obj.get("success")
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
|
@@ -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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AgentsExecutionScriptPlaywrightStartedDetails(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AgentsExecutionScriptPlaywrightStartedDetails
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
action_name: StrictStr = Field(alias="actionName")
|
|
30
|
+
llm_vars: Optional[List[StrictStr]] = Field(default=None, alias="llmVars")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["actionName", "llmVars"]
|
|
32
|
+
|
|
33
|
+
@field_validator('action_name')
|
|
34
|
+
def action_name_validate_enum(cls, value):
|
|
35
|
+
"""Validates the enum"""
|
|
36
|
+
if value not in set(['script_playwright']):
|
|
37
|
+
raise ValueError("must be one of enum values ('script_playwright')")
|
|
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 AgentsExecutionScriptPlaywrightStartedDetails 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 AgentsExecutionScriptPlaywrightStartedDetails 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
|
+
"llmVars": obj.get("llmVars")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|