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,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 AgentsExecutionScriptpadReadCompletedDetails(BaseModel):
26
+ """
27
+ AgentsExecutionScriptpadReadCompletedDetails
28
+ """ # noqa: E501
29
+ action_name: StrictStr = Field(alias="actionName")
30
+ content: StrictStr
31
+ __properties: ClassVar[List[str]] = ["actionName", "content"]
32
+
33
+ @field_validator('action_name')
34
+ def action_name_validate_enum(cls, value):
35
+ """Validates the enum"""
36
+ if value not in set(['scriptpad_read']):
37
+ raise ValueError("must be one of enum values ('scriptpad_read')")
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 AgentsExecutionScriptpadReadCompletedDetails 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 AgentsExecutionScriptpadReadCompletedDetails 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
+ "content": obj.get("content")
93
+ })
94
+ return _obj
95
+
96
+
@@ -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 AgentsExecutionScriptpadReadStartedDetails(BaseModel):
26
+ """
27
+ AgentsExecutionScriptpadReadStartedDetails
28
+ """ # noqa: E501
29
+ action_name: StrictStr = Field(alias="actionName")
30
+ limit: StrictInt
31
+ offset: StrictInt
32
+ __properties: ClassVar[List[str]] = ["actionName", "limit", "offset"]
33
+
34
+ @field_validator('action_name')
35
+ def action_name_validate_enum(cls, value):
36
+ """Validates the enum"""
37
+ if value not in set(['scriptpad_read']):
38
+ raise ValueError("must be one of enum values ('scriptpad_read')")
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 AgentsExecutionScriptpadReadStartedDetails 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 AgentsExecutionScriptpadReadStartedDetails 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
+ "limit": obj.get("limit"),
94
+ "offset": obj.get("offset")
95
+ })
96
+ return _obj
97
+
98
+
@@ -18,24 +18,24 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
- from typing import Any, ClassVar, Dict, List
22
- from asteroid_odyssey.agents_v2_gen.models.agents_execution_activity_action_completed_payload import AgentsExecutionActivityActionCompletedPayload
21
+ from typing import Any, ClassVar, Dict, List, Optional
23
22
  from typing import Optional, Set
24
23
  from typing_extensions import Self
25
24
 
26
- class ActivityPayloadUnionActionCompleted(BaseModel):
25
+ class AgentsExecutionScriptpadRunFunctionStartedDetails(BaseModel):
27
26
  """
28
- ActivityPayloadUnionActionCompleted
27
+ AgentsExecutionScriptpadRunFunctionStartedDetails
29
28
  """ # noqa: E501
30
- activity_type: StrictStr = Field(alias="activityType")
31
- data: AgentsExecutionActivityActionCompletedPayload
32
- __properties: ClassVar[List[str]] = ["activityType", "data"]
29
+ action_name: StrictStr = Field(alias="actionName")
30
+ arguments: Optional[Any]
31
+ function_name: StrictStr = Field(alias="functionName")
32
+ __properties: ClassVar[List[str]] = ["actionName", "arguments", "functionName"]
33
33
 
34
- @field_validator('activity_type')
35
- def activity_type_validate_enum(cls, value):
34
+ @field_validator('action_name')
35
+ def action_name_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in set(['action_completed']):
38
- raise ValueError("must be one of enum values ('action_completed')")
37
+ if value not in set(['scriptpad_run_function']):
38
+ raise ValueError("must be one of enum values ('scriptpad_run_function')")
39
39
  return value
40
40
 
41
41
  model_config = ConfigDict(
@@ -56,7 +56,7 @@ class ActivityPayloadUnionActionCompleted(BaseModel):
56
56
 
57
57
  @classmethod
58
58
  def from_json(cls, json_str: str) -> Optional[Self]:
59
- """Create an instance of ActivityPayloadUnionActionCompleted from a JSON string"""
59
+ """Create an instance of AgentsExecutionScriptpadRunFunctionStartedDetails from a JSON string"""
60
60
  return cls.from_dict(json.loads(json_str))
61
61
 
62
62
  def to_dict(self) -> Dict[str, Any]:
@@ -77,14 +77,16 @@ class ActivityPayloadUnionActionCompleted(BaseModel):
77
77
  exclude=excluded_fields,
78
78
  exclude_none=True,
79
79
  )
80
- # override the default output from pydantic by calling `to_dict()` of data
81
- if self.data:
82
- _dict['data'] = self.data.to_dict()
80
+ # set to None if arguments (nullable) is None
81
+ # and model_fields_set contains the field
82
+ if self.arguments is None and "arguments" in self.model_fields_set:
83
+ _dict['arguments'] = None
84
+
83
85
  return _dict
84
86
 
85
87
  @classmethod
86
88
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
- """Create an instance of ActivityPayloadUnionActionCompleted from a dict"""
89
+ """Create an instance of AgentsExecutionScriptpadRunFunctionStartedDetails from a dict"""
88
90
  if obj is None:
89
91
  return None
90
92
 
@@ -92,8 +94,9 @@ class ActivityPayloadUnionActionCompleted(BaseModel):
92
94
  return cls.model_validate(obj)
93
95
 
94
96
  _obj = cls.model_validate({
95
- "activityType": obj.get("activityType"),
96
- "data": AgentsExecutionActivityActionCompletedPayload.from_dict(obj["data"]) if obj.get("data") is not None else None
97
+ "actionName": obj.get("actionName"),
98
+ "arguments": obj.get("arguments"),
99
+ "functionName": obj.get("functionName")
97
100
  })
98
101
  return _obj
99
102
 
@@ -0,0 +1,106 @@
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 AgentsExecutionScriptpadSearchReplaceCompletedDetails(BaseModel):
26
+ """
27
+ AgentsExecutionScriptpadSearchReplaceCompletedDetails
28
+ """ # noqa: E501
29
+ action_name: StrictStr = Field(alias="actionName")
30
+ lines_replaced: StrictInt = Field(alias="linesReplaced")
31
+ lines_replaced_with: StrictInt = Field(alias="linesReplacedWith")
32
+ new_scriptpad: Optional[StrictStr] = Field(default=None, alias="newScriptpad")
33
+ new_total_lines: StrictInt = Field(alias="newTotalLines")
34
+ old_scriptpad: Optional[StrictStr] = Field(default=None, alias="oldScriptpad")
35
+ old_total_lines: StrictInt = Field(alias="oldTotalLines")
36
+ __properties: ClassVar[List[str]] = ["actionName", "linesReplaced", "linesReplacedWith", "newScriptpad", "newTotalLines", "oldScriptpad", "oldTotalLines"]
37
+
38
+ @field_validator('action_name')
39
+ def action_name_validate_enum(cls, value):
40
+ """Validates the enum"""
41
+ if value not in set(['scriptpad_search_replace']):
42
+ raise ValueError("must be one of enum values ('scriptpad_search_replace')")
43
+ return value
44
+
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
50
+
51
+
52
+ def to_str(self) -> str:
53
+ """Returns the string representation of the model using alias"""
54
+ return pprint.pformat(self.model_dump(by_alias=True))
55
+
56
+ def to_json(self) -> str:
57
+ """Returns the JSON representation of the model using alias"""
58
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
+ return json.dumps(self.to_dict())
60
+
61
+ @classmethod
62
+ def from_json(cls, json_str: str) -> Optional[Self]:
63
+ """Create an instance of AgentsExecutionScriptpadSearchReplaceCompletedDetails from a JSON string"""
64
+ return cls.from_dict(json.loads(json_str))
65
+
66
+ def to_dict(self) -> Dict[str, Any]:
67
+ """Return the dictionary representation of the model using alias.
68
+
69
+ This has the following differences from calling pydantic's
70
+ `self.model_dump(by_alias=True)`:
71
+
72
+ * `None` is only added to the output dict for nullable fields that
73
+ were set at model initialization. Other fields with value `None`
74
+ are ignored.
75
+ """
76
+ excluded_fields: Set[str] = set([
77
+ ])
78
+
79
+ _dict = self.model_dump(
80
+ by_alias=True,
81
+ exclude=excluded_fields,
82
+ exclude_none=True,
83
+ )
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of AgentsExecutionScriptpadSearchReplaceCompletedDetails from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate({
96
+ "actionName": obj.get("actionName"),
97
+ "linesReplaced": obj.get("linesReplaced"),
98
+ "linesReplacedWith": obj.get("linesReplacedWith"),
99
+ "newScriptpad": obj.get("newScriptpad"),
100
+ "newTotalLines": obj.get("newTotalLines"),
101
+ "oldScriptpad": obj.get("oldScriptpad"),
102
+ "oldTotalLines": obj.get("oldTotalLines")
103
+ })
104
+ return _obj
105
+
106
+
@@ -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, StrictBool, 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 AgentsExecutionScriptpadSearchReplaceStartedDetails(BaseModel):
26
+ """
27
+ AgentsExecutionScriptpadSearchReplaceStartedDetails
28
+ """ # noqa: E501
29
+ action_name: StrictStr = Field(alias="actionName")
30
+ replace: StrictStr
31
+ replace_all: StrictBool = Field(alias="replaceAll")
32
+ search: StrictStr
33
+ __properties: ClassVar[List[str]] = ["actionName", "replace", "replaceAll", "search"]
34
+
35
+ @field_validator('action_name')
36
+ def action_name_validate_enum(cls, value):
37
+ """Validates the enum"""
38
+ if value not in set(['scriptpad_search_replace']):
39
+ raise ValueError("must be one of enum values ('scriptpad_search_replace')")
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 AgentsExecutionScriptpadSearchReplaceStartedDetails 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 AgentsExecutionScriptpadSearchReplaceStartedDetails 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
+ "replace": obj.get("replace"),
95
+ "replaceAll": obj.get("replaceAll"),
96
+ "search": obj.get("search")
97
+ })
98
+ return _obj
99
+
100
+
@@ -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, 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 AgentsExecutionScriptpadWriteCompletedDetails(BaseModel):
26
+ """
27
+ AgentsExecutionScriptpadWriteCompletedDetails
28
+ """ # noqa: E501
29
+ action_name: StrictStr = Field(alias="actionName")
30
+ lines_changed: StrictInt = Field(alias="linesChanged")
31
+ patches_applied: StrictInt = Field(alias="patchesApplied")
32
+ scriptpad: Optional[StrictStr] = None
33
+ total_lines: StrictInt = Field(alias="totalLines")
34
+ __properties: ClassVar[List[str]] = ["actionName", "linesChanged", "patchesApplied", "scriptpad", "totalLines"]
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_write']):
40
+ raise ValueError("must be one of enum values ('scriptpad_write')")
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 AgentsExecutionScriptpadWriteCompletedDetails 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 AgentsExecutionScriptpadWriteCompletedDetails 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
+ "linesChanged": obj.get("linesChanged"),
96
+ "patchesApplied": obj.get("patchesApplied"),
97
+ "scriptpad": obj.get("scriptpad"),
98
+ "totalLines": obj.get("totalLines")
99
+ })
100
+ return _obj
101
+
102
+
@@ -0,0 +1,37 @@
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 AgentsExecutionSortField(str, Enum):
22
+ """
23
+ Fields that can be used for sorting executions
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ CREATED_AT = 'created_at'
30
+ STATUS = 'status'
31
+
32
+ @classmethod
33
+ def from_json(cls, json_str: str) -> Self:
34
+ """Create an instance of AgentsExecutionSortField from a JSON string"""
35
+ return cls(json.loads(json_str))
36
+
37
+
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
@@ -26,9 +26,17 @@ class AgentsExecutionTerminalPayload(BaseModel):
26
26
  """
27
27
  AgentsExecutionTerminalPayload
28
28
  """ # noqa: E501
29
+ activity_type: StrictStr = Field(alias="activityType")
29
30
  message: Optional[StrictStr] = None
30
31
  reason: StrictStr
31
- __properties: ClassVar[List[str]] = ["message", "reason"]
32
+ __properties: ClassVar[List[str]] = ["activityType", "message", "reason"]
33
+
34
+ @field_validator('activity_type')
35
+ def activity_type_validate_enum(cls, value):
36
+ """Validates the enum"""
37
+ if value not in set(['terminal']):
38
+ raise ValueError("must be one of enum values ('terminal')")
39
+ return value
32
40
 
33
41
  @field_validator('reason')
34
42
  def reason_validate_enum(cls, value):
@@ -88,6 +96,7 @@ class AgentsExecutionTerminalPayload(BaseModel):
88
96
  return cls.model_validate(obj)
89
97
 
90
98
  _obj = cls.model_validate({
99
+ "activityType": obj.get("activityType"),
91
100
  "message": obj.get("message"),
92
101
  "reason": obj.get("reason")
93
102
  })