asteroid-odyssey 1.6.133__py3-none-any.whl → 1.6.135__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 +14 -0
- asteroid_odyssey/models/__init__.py +7 -0
- asteroid_odyssey/models/agents_execution_api_key_ref.py +89 -0
- asteroid_odyssey/models/agents_execution_api_trigger_context.py +106 -0
- asteroid_odyssey/models/agents_execution_list_item.py +8 -2
- asteroid_odyssey/models/agents_execution_schedule_ref.py +89 -0
- asteroid_odyssey/models/agents_execution_schedule_trigger_context.py +100 -0
- asteroid_odyssey/models/agents_execution_trigger_context.py +154 -0
- asteroid_odyssey/models/agents_execution_trigger_runner.py +91 -0
- asteroid_odyssey/models/agents_execution_ui_trigger_context.py +100 -0
- {asteroid_odyssey-1.6.133.dist-info → asteroid_odyssey-1.6.135.dist-info}/METADATA +1 -1
- {asteroid_odyssey-1.6.133.dist-info → asteroid_odyssey-1.6.135.dist-info}/RECORD +14 -7
- {asteroid_odyssey-1.6.133.dist-info → asteroid_odyssey-1.6.135.dist-info}/WHEEL +0 -0
- {asteroid_odyssey-1.6.133.dist-info → asteroid_odyssey-1.6.135.dist-info}/top_level.txt +0 -0
asteroid_odyssey/__init__.py
CHANGED
|
@@ -38,6 +38,8 @@ __all__ = [
|
|
|
38
38
|
"AgentsAgentExecuteAgentRequest",
|
|
39
39
|
"AgentsAgentExecuteAgentResponse",
|
|
40
40
|
"AgentsAgentSortField",
|
|
41
|
+
"AgentsExecutionAPIKeyRef",
|
|
42
|
+
"AgentsExecutionAPITriggerContext",
|
|
41
43
|
"AgentsExecutionActionName",
|
|
42
44
|
"AgentsExecutionActivity",
|
|
43
45
|
"AgentsExecutionActivityActionCompletedInfo",
|
|
@@ -83,6 +85,8 @@ __all__ = [
|
|
|
83
85
|
"AgentsExecutionObsSnapshotWithSelectorsCompletedDetails",
|
|
84
86
|
"AgentsExecutionPausedPayload",
|
|
85
87
|
"AgentsExecutionRulesDetails",
|
|
88
|
+
"AgentsExecutionScheduleRef",
|
|
89
|
+
"AgentsExecutionScheduleTriggerContext",
|
|
86
90
|
"AgentsExecutionScratchpadReadCompletedDetails",
|
|
87
91
|
"AgentsExecutionScratchpadReadStartedDetails",
|
|
88
92
|
"AgentsExecutionScratchpadWriteCompletedDetails",
|
|
@@ -104,6 +108,9 @@ __all__ = [
|
|
|
104
108
|
"AgentsExecutionStatus",
|
|
105
109
|
"AgentsExecutionTerminalPayload",
|
|
106
110
|
"AgentsExecutionTransitionDetails",
|
|
111
|
+
"AgentsExecutionTriggerContext",
|
|
112
|
+
"AgentsExecutionTriggerRunner",
|
|
113
|
+
"AgentsExecutionUITriggerContext",
|
|
107
114
|
"AgentsExecutionUpdateExecutionStatusRequest",
|
|
108
115
|
"AgentsExecutionUpdateType",
|
|
109
116
|
"AgentsExecutionUpdateableStatus",
|
|
@@ -168,6 +175,8 @@ from asteroid_odyssey.models.agents_agent_base import AgentsAgentBase as AgentsA
|
|
|
168
175
|
from asteroid_odyssey.models.agents_agent_execute_agent_request import AgentsAgentExecuteAgentRequest as AgentsAgentExecuteAgentRequest
|
|
169
176
|
from asteroid_odyssey.models.agents_agent_execute_agent_response import AgentsAgentExecuteAgentResponse as AgentsAgentExecuteAgentResponse
|
|
170
177
|
from asteroid_odyssey.models.agents_agent_sort_field import AgentsAgentSortField as AgentsAgentSortField
|
|
178
|
+
from asteroid_odyssey.models.agents_execution_api_key_ref import AgentsExecutionAPIKeyRef as AgentsExecutionAPIKeyRef
|
|
179
|
+
from asteroid_odyssey.models.agents_execution_api_trigger_context import AgentsExecutionAPITriggerContext as AgentsExecutionAPITriggerContext
|
|
171
180
|
from asteroid_odyssey.models.agents_execution_action_name import AgentsExecutionActionName as AgentsExecutionActionName
|
|
172
181
|
from asteroid_odyssey.models.agents_execution_activity import AgentsExecutionActivity as AgentsExecutionActivity
|
|
173
182
|
from asteroid_odyssey.models.agents_execution_activity_action_completed_info import AgentsExecutionActivityActionCompletedInfo as AgentsExecutionActivityActionCompletedInfo
|
|
@@ -213,6 +222,8 @@ from asteroid_odyssey.models.agents_execution_node_output_item import AgentsExec
|
|
|
213
222
|
from asteroid_odyssey.models.agents_execution_obs_snapshot_with_selectors_completed_details import AgentsExecutionObsSnapshotWithSelectorsCompletedDetails as AgentsExecutionObsSnapshotWithSelectorsCompletedDetails
|
|
214
223
|
from asteroid_odyssey.models.agents_execution_paused_payload import AgentsExecutionPausedPayload as AgentsExecutionPausedPayload
|
|
215
224
|
from asteroid_odyssey.models.agents_execution_rules_details import AgentsExecutionRulesDetails as AgentsExecutionRulesDetails
|
|
225
|
+
from asteroid_odyssey.models.agents_execution_schedule_ref import AgentsExecutionScheduleRef as AgentsExecutionScheduleRef
|
|
226
|
+
from asteroid_odyssey.models.agents_execution_schedule_trigger_context import AgentsExecutionScheduleTriggerContext as AgentsExecutionScheduleTriggerContext
|
|
216
227
|
from asteroid_odyssey.models.agents_execution_scratchpad_read_completed_details import AgentsExecutionScratchpadReadCompletedDetails as AgentsExecutionScratchpadReadCompletedDetails
|
|
217
228
|
from asteroid_odyssey.models.agents_execution_scratchpad_read_started_details import AgentsExecutionScratchpadReadStartedDetails as AgentsExecutionScratchpadReadStartedDetails
|
|
218
229
|
from asteroid_odyssey.models.agents_execution_scratchpad_write_completed_details import AgentsExecutionScratchpadWriteCompletedDetails as AgentsExecutionScratchpadWriteCompletedDetails
|
|
@@ -234,6 +245,9 @@ from asteroid_odyssey.models.agents_execution_sort_field import AgentsExecutionS
|
|
|
234
245
|
from asteroid_odyssey.models.agents_execution_status import AgentsExecutionStatus as AgentsExecutionStatus
|
|
235
246
|
from asteroid_odyssey.models.agents_execution_terminal_payload import AgentsExecutionTerminalPayload as AgentsExecutionTerminalPayload
|
|
236
247
|
from asteroid_odyssey.models.agents_execution_transition_details import AgentsExecutionTransitionDetails as AgentsExecutionTransitionDetails
|
|
248
|
+
from asteroid_odyssey.models.agents_execution_trigger_context import AgentsExecutionTriggerContext as AgentsExecutionTriggerContext
|
|
249
|
+
from asteroid_odyssey.models.agents_execution_trigger_runner import AgentsExecutionTriggerRunner as AgentsExecutionTriggerRunner
|
|
250
|
+
from asteroid_odyssey.models.agents_execution_ui_trigger_context import AgentsExecutionUITriggerContext as AgentsExecutionUITriggerContext
|
|
237
251
|
from asteroid_odyssey.models.agents_execution_update_execution_status_request import AgentsExecutionUpdateExecutionStatusRequest as AgentsExecutionUpdateExecutionStatusRequest
|
|
238
252
|
from asteroid_odyssey.models.agents_execution_update_type import AgentsExecutionUpdateType as AgentsExecutionUpdateType
|
|
239
253
|
from asteroid_odyssey.models.agents_execution_updateable_status import AgentsExecutionUpdateableStatus as AgentsExecutionUpdateableStatus
|
|
@@ -21,6 +21,8 @@ from asteroid_odyssey.models.agents_agent_base import AgentsAgentBase
|
|
|
21
21
|
from asteroid_odyssey.models.agents_agent_execute_agent_request import AgentsAgentExecuteAgentRequest
|
|
22
22
|
from asteroid_odyssey.models.agents_agent_execute_agent_response import AgentsAgentExecuteAgentResponse
|
|
23
23
|
from asteroid_odyssey.models.agents_agent_sort_field import AgentsAgentSortField
|
|
24
|
+
from asteroid_odyssey.models.agents_execution_api_key_ref import AgentsExecutionAPIKeyRef
|
|
25
|
+
from asteroid_odyssey.models.agents_execution_api_trigger_context import AgentsExecutionAPITriggerContext
|
|
24
26
|
from asteroid_odyssey.models.agents_execution_action_name import AgentsExecutionActionName
|
|
25
27
|
from asteroid_odyssey.models.agents_execution_activity import AgentsExecutionActivity
|
|
26
28
|
from asteroid_odyssey.models.agents_execution_activity_action_completed_info import AgentsExecutionActivityActionCompletedInfo
|
|
@@ -66,6 +68,8 @@ from asteroid_odyssey.models.agents_execution_node_output_item import AgentsExec
|
|
|
66
68
|
from asteroid_odyssey.models.agents_execution_obs_snapshot_with_selectors_completed_details import AgentsExecutionObsSnapshotWithSelectorsCompletedDetails
|
|
67
69
|
from asteroid_odyssey.models.agents_execution_paused_payload import AgentsExecutionPausedPayload
|
|
68
70
|
from asteroid_odyssey.models.agents_execution_rules_details import AgentsExecutionRulesDetails
|
|
71
|
+
from asteroid_odyssey.models.agents_execution_schedule_ref import AgentsExecutionScheduleRef
|
|
72
|
+
from asteroid_odyssey.models.agents_execution_schedule_trigger_context import AgentsExecutionScheduleTriggerContext
|
|
69
73
|
from asteroid_odyssey.models.agents_execution_scratchpad_read_completed_details import AgentsExecutionScratchpadReadCompletedDetails
|
|
70
74
|
from asteroid_odyssey.models.agents_execution_scratchpad_read_started_details import AgentsExecutionScratchpadReadStartedDetails
|
|
71
75
|
from asteroid_odyssey.models.agents_execution_scratchpad_write_completed_details import AgentsExecutionScratchpadWriteCompletedDetails
|
|
@@ -87,6 +91,9 @@ from asteroid_odyssey.models.agents_execution_sort_field import AgentsExecutionS
|
|
|
87
91
|
from asteroid_odyssey.models.agents_execution_status import AgentsExecutionStatus
|
|
88
92
|
from asteroid_odyssey.models.agents_execution_terminal_payload import AgentsExecutionTerminalPayload
|
|
89
93
|
from asteroid_odyssey.models.agents_execution_transition_details import AgentsExecutionTransitionDetails
|
|
94
|
+
from asteroid_odyssey.models.agents_execution_trigger_context import AgentsExecutionTriggerContext
|
|
95
|
+
from asteroid_odyssey.models.agents_execution_trigger_runner import AgentsExecutionTriggerRunner
|
|
96
|
+
from asteroid_odyssey.models.agents_execution_ui_trigger_context import AgentsExecutionUITriggerContext
|
|
90
97
|
from asteroid_odyssey.models.agents_execution_update_execution_status_request import AgentsExecutionUpdateExecutionStatusRequest
|
|
91
98
|
from asteroid_odyssey.models.agents_execution_update_type import AgentsExecutionUpdateType
|
|
92
99
|
from asteroid_odyssey.models.agents_execution_updateable_status import AgentsExecutionUpdateableStatus
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AgentsExecutionAPIKeyRef(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
API key reference used for authentication
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
id: StrictStr = Field(description="API key ID")
|
|
30
|
+
name: StrictStr = Field(description="API key name")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["id", "name"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of AgentsExecutionAPIKeyRef from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of AgentsExecutionAPIKeyRef from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"id": obj.get("id"),
|
|
85
|
+
"name": obj.get("name")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -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, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from asteroid_odyssey.models.agents_execution_api_key_ref import AgentsExecutionAPIKeyRef
|
|
23
|
+
from asteroid_odyssey.models.agents_execution_trigger_runner import AgentsExecutionTriggerRunner
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class AgentsExecutionAPITriggerContext(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
API-triggered execution context
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
source: StrictStr = Field(description="Trigger source discriminator")
|
|
32
|
+
runner: AgentsExecutionTriggerRunner = Field(description="Runner information")
|
|
33
|
+
api_key: Optional[AgentsExecutionAPIKeyRef] = Field(default=None, description="API key used for authentication (may be hidden for privacy when admin-triggered)", alias="apiKey")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["source", "runner", "apiKey"]
|
|
35
|
+
|
|
36
|
+
@field_validator('source')
|
|
37
|
+
def source_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value not in set(['api']):
|
|
40
|
+
raise ValueError("must be one of enum values ('api')")
|
|
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 AgentsExecutionAPITriggerContext 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
|
+
# override the default output from pydantic by calling `to_dict()` of runner
|
|
83
|
+
if self.runner:
|
|
84
|
+
_dict['runner'] = self.runner.to_dict()
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of api_key
|
|
86
|
+
if self.api_key:
|
|
87
|
+
_dict['apiKey'] = self.api_key.to_dict()
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of AgentsExecutionAPITriggerContext from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"source": obj.get("source"),
|
|
101
|
+
"runner": AgentsExecutionTriggerRunner.from_dict(obj["runner"]) if obj.get("runner") is not None else None,
|
|
102
|
+
"apiKey": AgentsExecutionAPIKeyRef.from_dict(obj["apiKey"]) if obj.get("apiKey") is not None else None
|
|
103
|
+
})
|
|
104
|
+
return _obj
|
|
105
|
+
|
|
106
|
+
|
|
@@ -24,6 +24,7 @@ from asteroid_odyssey.models.agents_execution_comment import AgentsExecutionComm
|
|
|
24
24
|
from asteroid_odyssey.models.agents_execution_execution_result import AgentsExecutionExecutionResult
|
|
25
25
|
from asteroid_odyssey.models.agents_execution_human_label import AgentsExecutionHumanLabel
|
|
26
26
|
from asteroid_odyssey.models.agents_execution_status import AgentsExecutionStatus
|
|
27
|
+
from asteroid_odyssey.models.agents_execution_trigger_context import AgentsExecutionTriggerContext
|
|
27
28
|
from typing import Optional, Set
|
|
28
29
|
from typing_extensions import Self
|
|
29
30
|
|
|
@@ -49,7 +50,8 @@ class AgentsExecutionListItem(BaseModel):
|
|
|
49
50
|
metadata: Optional[Dict[str, Any]] = Field(default=None, description="Optional metadata key-value pairs attached to this execution")
|
|
50
51
|
browser_recording_url: Optional[StrictStr] = Field(default=None, description="Browser recording URL (if a browser session was used and execution is terminal)", alias="browserRecordingUrl")
|
|
51
52
|
browser_live_view_url: Optional[StrictStr] = Field(default=None, description="Browser live view URL for debugging (if a browser session is active and execution is running)", alias="browserLiveViewUrl")
|
|
52
|
-
|
|
53
|
+
trigger_context: Optional[AgentsExecutionTriggerContext] = Field(default=None, description="Context about how and by whom this execution was triggered (discriminated by source)", alias="triggerContext")
|
|
54
|
+
__properties: ClassVar[List[str]] = ["id", "agentId", "workflowId", "status", "createdAt", "terminalAt", "organizationId", "agentName", "agentProfileName", "agentProfileId", "inputs", "executionResult", "duration", "humanLabels", "comments", "metadata", "browserRecordingUrl", "browserLiveViewUrl", "triggerContext"]
|
|
53
55
|
|
|
54
56
|
model_config = ConfigDict(
|
|
55
57
|
populate_by_name=True,
|
|
@@ -107,6 +109,9 @@ class AgentsExecutionListItem(BaseModel):
|
|
|
107
109
|
if _item_comments:
|
|
108
110
|
_items.append(_item_comments.to_dict())
|
|
109
111
|
_dict['comments'] = _items
|
|
112
|
+
# override the default output from pydantic by calling `to_dict()` of trigger_context
|
|
113
|
+
if self.trigger_context:
|
|
114
|
+
_dict['triggerContext'] = self.trigger_context.to_dict()
|
|
110
115
|
return _dict
|
|
111
116
|
|
|
112
117
|
@classmethod
|
|
@@ -136,7 +141,8 @@ class AgentsExecutionListItem(BaseModel):
|
|
|
136
141
|
"comments": [AgentsExecutionComment.from_dict(_item) for _item in obj["comments"]] if obj.get("comments") is not None else None,
|
|
137
142
|
"metadata": obj.get("metadata"),
|
|
138
143
|
"browserRecordingUrl": obj.get("browserRecordingUrl"),
|
|
139
|
-
"browserLiveViewUrl": obj.get("browserLiveViewUrl")
|
|
144
|
+
"browserLiveViewUrl": obj.get("browserLiveViewUrl"),
|
|
145
|
+
"triggerContext": AgentsExecutionTriggerContext.from_dict(obj["triggerContext"]) if obj.get("triggerContext") is not None else None
|
|
140
146
|
})
|
|
141
147
|
return _obj
|
|
142
148
|
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AgentsExecutionScheduleRef(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Schedule reference for schedule-triggered executions
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
id: StrictStr = Field(description="Schedule ID")
|
|
30
|
+
cron_expression: StrictStr = Field(description="Cron expression of the schedule", alias="cronExpression")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["id", "cronExpression"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of AgentsExecutionScheduleRef from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of AgentsExecutionScheduleRef from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"id": obj.get("id"),
|
|
85
|
+
"cronExpression": obj.get("cronExpression")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -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, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from asteroid_odyssey.models.agents_execution_schedule_ref import AgentsExecutionScheduleRef
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class AgentsExecutionScheduleTriggerContext(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Schedule-triggered execution context
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
source: StrictStr = Field(description="Trigger source discriminator")
|
|
31
|
+
schedule: AgentsExecutionScheduleRef = Field(description="Schedule that triggered the execution")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["source", "schedule"]
|
|
33
|
+
|
|
34
|
+
@field_validator('source')
|
|
35
|
+
def source_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in set(['schedule']):
|
|
38
|
+
raise ValueError("must be one of enum values ('schedule')")
|
|
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 AgentsExecutionScheduleTriggerContext 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
|
+
# override the default output from pydantic by calling `to_dict()` of schedule
|
|
81
|
+
if self.schedule:
|
|
82
|
+
_dict['schedule'] = self.schedule.to_dict()
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of AgentsExecutionScheduleTriggerContext 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
|
+
"source": obj.get("source"),
|
|
96
|
+
"schedule": AgentsExecutionScheduleRef.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -0,0 +1,154 @@
|
|
|
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
|
+
import pprint
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
|
+
from typing import Any, List, Optional
|
|
20
|
+
from asteroid_odyssey.models.agents_execution_api_trigger_context import AgentsExecutionAPITriggerContext
|
|
21
|
+
from asteroid_odyssey.models.agents_execution_schedule_trigger_context import AgentsExecutionScheduleTriggerContext
|
|
22
|
+
from asteroid_odyssey.models.agents_execution_ui_trigger_context import AgentsExecutionUITriggerContext
|
|
23
|
+
from pydantic import StrictStr, Field
|
|
24
|
+
from typing import Union, List, Set, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
26
|
+
|
|
27
|
+
AGENTSEXECUTIONTRIGGERCONTEXT_ONE_OF_SCHEMAS = ["AgentsExecutionAPITriggerContext", "AgentsExecutionScheduleTriggerContext", "AgentsExecutionUITriggerContext"]
|
|
28
|
+
|
|
29
|
+
class AgentsExecutionTriggerContext(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
Discriminated union of trigger contexts (discriminated by source)
|
|
32
|
+
"""
|
|
33
|
+
# data type: AgentsExecutionAPITriggerContext
|
|
34
|
+
oneof_schema_1_validator: Optional[AgentsExecutionAPITriggerContext] = None
|
|
35
|
+
# data type: AgentsExecutionUITriggerContext
|
|
36
|
+
oneof_schema_2_validator: Optional[AgentsExecutionUITriggerContext] = None
|
|
37
|
+
# data type: AgentsExecutionScheduleTriggerContext
|
|
38
|
+
oneof_schema_3_validator: Optional[AgentsExecutionScheduleTriggerContext] = None
|
|
39
|
+
actual_instance: Optional[Union[AgentsExecutionAPITriggerContext, AgentsExecutionScheduleTriggerContext, AgentsExecutionUITriggerContext]] = None
|
|
40
|
+
one_of_schemas: Set[str] = { "AgentsExecutionAPITriggerContext", "AgentsExecutionScheduleTriggerContext", "AgentsExecutionUITriggerContext" }
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
discriminator_value_class_map: Dict[str, str] = {
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
52
|
+
if args:
|
|
53
|
+
if len(args) > 1:
|
|
54
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
55
|
+
if kwargs:
|
|
56
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
57
|
+
super().__init__(actual_instance=args[0])
|
|
58
|
+
else:
|
|
59
|
+
super().__init__(**kwargs)
|
|
60
|
+
|
|
61
|
+
@field_validator('actual_instance')
|
|
62
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
63
|
+
instance = AgentsExecutionTriggerContext.model_construct()
|
|
64
|
+
error_messages = []
|
|
65
|
+
match = 0
|
|
66
|
+
# validate data type: AgentsExecutionAPITriggerContext
|
|
67
|
+
if not isinstance(v, AgentsExecutionAPITriggerContext):
|
|
68
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AgentsExecutionAPITriggerContext`")
|
|
69
|
+
else:
|
|
70
|
+
match += 1
|
|
71
|
+
# validate data type: AgentsExecutionUITriggerContext
|
|
72
|
+
if not isinstance(v, AgentsExecutionUITriggerContext):
|
|
73
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AgentsExecutionUITriggerContext`")
|
|
74
|
+
else:
|
|
75
|
+
match += 1
|
|
76
|
+
# validate data type: AgentsExecutionScheduleTriggerContext
|
|
77
|
+
if not isinstance(v, AgentsExecutionScheduleTriggerContext):
|
|
78
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AgentsExecutionScheduleTriggerContext`")
|
|
79
|
+
else:
|
|
80
|
+
match += 1
|
|
81
|
+
if match > 1:
|
|
82
|
+
# more than 1 match
|
|
83
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in AgentsExecutionTriggerContext with oneOf schemas: AgentsExecutionAPITriggerContext, AgentsExecutionScheduleTriggerContext, AgentsExecutionUITriggerContext. Details: " + ", ".join(error_messages))
|
|
84
|
+
elif match == 0:
|
|
85
|
+
# no match
|
|
86
|
+
raise ValueError("No match found when setting `actual_instance` in AgentsExecutionTriggerContext with oneOf schemas: AgentsExecutionAPITriggerContext, AgentsExecutionScheduleTriggerContext, AgentsExecutionUITriggerContext. Details: " + ", ".join(error_messages))
|
|
87
|
+
else:
|
|
88
|
+
return v
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
92
|
+
return cls.from_json(json.dumps(obj))
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_json(cls, json_str: str) -> Self:
|
|
96
|
+
"""Returns the object represented by the json string"""
|
|
97
|
+
instance = cls.model_construct()
|
|
98
|
+
error_messages = []
|
|
99
|
+
match = 0
|
|
100
|
+
|
|
101
|
+
# deserialize data into AgentsExecutionAPITriggerContext
|
|
102
|
+
try:
|
|
103
|
+
instance.actual_instance = AgentsExecutionAPITriggerContext.from_json(json_str)
|
|
104
|
+
match += 1
|
|
105
|
+
except (ValidationError, ValueError) as e:
|
|
106
|
+
error_messages.append(str(e))
|
|
107
|
+
# deserialize data into AgentsExecutionUITriggerContext
|
|
108
|
+
try:
|
|
109
|
+
instance.actual_instance = AgentsExecutionUITriggerContext.from_json(json_str)
|
|
110
|
+
match += 1
|
|
111
|
+
except (ValidationError, ValueError) as e:
|
|
112
|
+
error_messages.append(str(e))
|
|
113
|
+
# deserialize data into AgentsExecutionScheduleTriggerContext
|
|
114
|
+
try:
|
|
115
|
+
instance.actual_instance = AgentsExecutionScheduleTriggerContext.from_json(json_str)
|
|
116
|
+
match += 1
|
|
117
|
+
except (ValidationError, ValueError) as e:
|
|
118
|
+
error_messages.append(str(e))
|
|
119
|
+
|
|
120
|
+
if match > 1:
|
|
121
|
+
# more than 1 match
|
|
122
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into AgentsExecutionTriggerContext with oneOf schemas: AgentsExecutionAPITriggerContext, AgentsExecutionScheduleTriggerContext, AgentsExecutionUITriggerContext. Details: " + ", ".join(error_messages))
|
|
123
|
+
elif match == 0:
|
|
124
|
+
# no match
|
|
125
|
+
raise ValueError("No match found when deserializing the JSON string into AgentsExecutionTriggerContext with oneOf schemas: AgentsExecutionAPITriggerContext, AgentsExecutionScheduleTriggerContext, AgentsExecutionUITriggerContext. Details: " + ", ".join(error_messages))
|
|
126
|
+
else:
|
|
127
|
+
return instance
|
|
128
|
+
|
|
129
|
+
def to_json(self) -> str:
|
|
130
|
+
"""Returns the JSON representation of the actual instance"""
|
|
131
|
+
if self.actual_instance is None:
|
|
132
|
+
return "null"
|
|
133
|
+
|
|
134
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
135
|
+
return self.actual_instance.to_json()
|
|
136
|
+
else:
|
|
137
|
+
return json.dumps(self.actual_instance)
|
|
138
|
+
|
|
139
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], AgentsExecutionAPITriggerContext, AgentsExecutionScheduleTriggerContext, AgentsExecutionUITriggerContext]]:
|
|
140
|
+
"""Returns the dict representation of the actual instance"""
|
|
141
|
+
if self.actual_instance is None:
|
|
142
|
+
return None
|
|
143
|
+
|
|
144
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
145
|
+
return self.actual_instance.to_dict()
|
|
146
|
+
else:
|
|
147
|
+
# primitive type
|
|
148
|
+
return self.actual_instance
|
|
149
|
+
|
|
150
|
+
def to_str(self) -> str:
|
|
151
|
+
"""Returns the string representation of the actual instance"""
|
|
152
|
+
return pprint.pformat(self.model_dump())
|
|
153
|
+
|
|
154
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AgentsExecutionTriggerRunner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Runner information - who triggered the execution
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
user_id: StrictStr = Field(description="User ID of the runner", alias="userId")
|
|
30
|
+
email: StrictStr = Field(description="Email of the runner")
|
|
31
|
+
is_admin: Optional[StrictBool] = Field(default=None, description="Whether the user is an admin (may be hidden for privacy)", alias="isAdmin")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["userId", "email", "isAdmin"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of AgentsExecutionTriggerRunner from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of AgentsExecutionTriggerRunner from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"userId": obj.get("userId"),
|
|
86
|
+
"email": obj.get("email"),
|
|
87
|
+
"isAdmin": obj.get("isAdmin")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -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, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from asteroid_odyssey.models.agents_execution_trigger_runner import AgentsExecutionTriggerRunner
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class AgentsExecutionUITriggerContext(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
UI-triggered execution context
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
source: StrictStr = Field(description="Trigger source discriminator")
|
|
31
|
+
runner: AgentsExecutionTriggerRunner = Field(description="Runner information")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["source", "runner"]
|
|
33
|
+
|
|
34
|
+
@field_validator('source')
|
|
35
|
+
def source_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in set(['ui']):
|
|
38
|
+
raise ValueError("must be one of enum values ('ui')")
|
|
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 AgentsExecutionUITriggerContext 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
|
+
# override the default output from pydantic by calling `to_dict()` of runner
|
|
81
|
+
if self.runner:
|
|
82
|
+
_dict['runner'] = self.runner.to_dict()
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of AgentsExecutionUITriggerContext 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
|
+
"source": obj.get("source"),
|
|
96
|
+
"runner": AgentsExecutionTriggerRunner.from_dict(obj["runner"]) if obj.get("runner") is not None else None
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
asteroid_odyssey/__init__.py,sha256=
|
|
1
|
+
asteroid_odyssey/__init__.py,sha256=9hlm_kCbCsdGRk5JMO4dCGCLvuOLAELhWSKIjj8Gaw0,24108
|
|
2
2
|
asteroid_odyssey/api_client.py,sha256=vk7bgx6L2b1SvKdTD9RRCY2d1rRvHaI6QoQy0KiFZ8A,27723
|
|
3
3
|
asteroid_odyssey/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
4
|
asteroid_odyssey/configuration.py,sha256=ICQFu0VrF-OoEScevweF58q4R7IMpP_-r9x60nuyba4,18903
|
|
@@ -10,7 +10,7 @@ asteroid_odyssey/api/agent_profiles_api.py,sha256=EzvS-86oCwa_9xF5XBAy5Z0VaUvJmz
|
|
|
10
10
|
asteroid_odyssey/api/agents_api.py,sha256=EWiMV7wcVBMdas96xbWBNw2mqIs3b04G6S1URXW12-4,26482
|
|
11
11
|
asteroid_odyssey/api/execution_api.py,sha256=vqo84-Aw5BvJ0ZTDfc21SPdpeuSYRWzzBIgPj1u4-as,77059
|
|
12
12
|
asteroid_odyssey/api/files_api.py,sha256=3eelhlLfOhN53THJ90LfdLo3kdCnnw5Qml83dtWqPC4,35447
|
|
13
|
-
asteroid_odyssey/models/__init__.py,sha256=
|
|
13
|
+
asteroid_odyssey/models/__init__.py,sha256=YcsjFjl5eWw3uP-8aRK2_-qHd4IZUgHVuVgRgbW52_Q,13349
|
|
14
14
|
asteroid_odyssey/models/agent_list200_response.py,sha256=fZNz18hRSrvKPHPAe16A5p1K1RopKj0Unn6Npglhu7w,3235
|
|
15
15
|
asteroid_odyssey/models/agent_profile_clear_browser_cache200_response.py,sha256=R7svpgREt63we4utbMFsBPxw2-oycWLwi5xfINc6wL4,2591
|
|
16
16
|
asteroid_odyssey/models/agent_profiles_list200_response.py,sha256=OHvPOC6Kzo0jLWgkbx8TnkRs9w4VlAMsghH6gpyitdc,3308
|
|
@@ -39,6 +39,8 @@ asteroid_odyssey/models/agents_execution_activity_user_message_received_payload.
|
|
|
39
39
|
asteroid_odyssey/models/agents_execution_activity_workflow_updated_payload.py,sha256=YGLzyKgsXROjAQxzZqNI-8968px0HizQaFno9WqbLW0,3715
|
|
40
40
|
asteroid_odyssey/models/agents_execution_agent_query_context_completed_details.py,sha256=uCXll7oeFrhXI336OSNxbi0sgdL82lbJQlDP4q3Ew60,3105
|
|
41
41
|
asteroid_odyssey/models/agents_execution_agent_query_context_started_details.py,sha256=WoqM20eJeRGKoT9HLtmMbMLCyUNpr0zmLmbQxxjJD1U,3024
|
|
42
|
+
asteroid_odyssey/models/agents_execution_api_key_ref.py,sha256=PYpq_sHmgdXMX7sk7_fLu1kYLPAHChWy4OjajZyilT0,2666
|
|
43
|
+
asteroid_odyssey/models/agents_execution_api_trigger_context.py,sha256=okfyVCNkXWbvSGtwaw38DfvyEUGhyTs5BoiOQ2i5U-M,3906
|
|
42
44
|
asteroid_odyssey/models/agents_execution_awaiting_confirmation_payload.py,sha256=ebQJgeBSCQpLM_Z601NFSg8xQF9b5MsvGVY59dgCWW4,2595
|
|
43
45
|
asteroid_odyssey/models/agents_execution_cancel_reason.py,sha256=oOJGrFL0N4BYFQLcT8WfBCbhk2ccyly733vqwEd-Ewc,843
|
|
44
46
|
asteroid_odyssey/models/agents_execution_cancelled_payload.py,sha256=jzzKXmiYDGh15AdDzcJU0-d9APwq9ZmJdDxggXPavjE,2653
|
|
@@ -53,7 +55,7 @@ asteroid_odyssey/models/agents_execution_file_list_completed_details.py,sha256=7
|
|
|
53
55
|
asteroid_odyssey/models/agents_execution_file_read_completed_details.py,sha256=0tB0oJeKm3BSZqW54oDxGGHQFT0_R10W9G7bKrOJXeU,3352
|
|
54
56
|
asteroid_odyssey/models/agents_execution_file_stage_completed_details.py,sha256=aowoJrFg-jwZQ3ImE1WRdMR-8gS2qo4bxrBavbQSCbk,3032
|
|
55
57
|
asteroid_odyssey/models/agents_execution_human_label.py,sha256=ewRTI0UsUuzPts1xk80aD7H4sGeH7J7qi49mLvLQJqA,3218
|
|
56
|
-
asteroid_odyssey/models/agents_execution_list_item.py,sha256=
|
|
58
|
+
asteroid_odyssey/models/agents_execution_list_item.py,sha256=tlJ8dW30hkG5CKiVD9RAORvBxVzG7cAUX2wj8ucDdn0,8322
|
|
57
59
|
asteroid_odyssey/models/agents_execution_llm_call_purpose.py,sha256=ZyMEExVLDmrRDU25GWEePHAnDhKFEgJmUaU4h7ij2lU,1065
|
|
58
60
|
asteroid_odyssey/models/agents_execution_llm_call_started_details.py,sha256=90w2yZ2DP7jKndVr0qNx2uFaJfRJTaXWDn1J08UwsN4,3090
|
|
59
61
|
asteroid_odyssey/models/agents_execution_nav_to_completed_details.py,sha256=x3FB2vujx1Kedlplfe6jaZ6KhchFuX0KCliZbGgUDzE,3036
|
|
@@ -63,6 +65,8 @@ asteroid_odyssey/models/agents_execution_node_output_item.py,sha256=Nh7JEaS8eGTn
|
|
|
63
65
|
asteroid_odyssey/models/agents_execution_obs_snapshot_with_selectors_completed_details.py,sha256=7IvwnF8lJz49WwoOIdClHRk5UWLTWNeO-D6YS0NAErE,3137
|
|
64
66
|
asteroid_odyssey/models/agents_execution_paused_payload.py,sha256=slW-OsLyXs3JyDE9Zx8YGIU2y0msgoKCbHDG8IkYG8k,2539
|
|
65
67
|
asteroid_odyssey/models/agents_execution_rules_details.py,sha256=6QJ_XkLzSlgxxJqEjnM2jKzgbMkskHqdNSWG4ri_eNk,2531
|
|
68
|
+
asteroid_odyssey/models/agents_execution_schedule_ref.py,sha256=-5fGk_Jvbn3J4yeyqIJNJcNQfyryH1NuhR4CHaQ2k6s,2768
|
|
69
|
+
asteroid_odyssey/models/agents_execution_schedule_trigger_context.py,sha256=-gRX3o19y_XP2wowNWMQvV6JWtI5RMIIJAk5iUjyo7M,3393
|
|
66
70
|
asteroid_odyssey/models/agents_execution_scratchpad_read_completed_details.py,sha256=O-uAgkiTNSMMO6mXOREsdigyXaYDMdm0X6OAr0LuqaM,3232
|
|
67
71
|
asteroid_odyssey/models/agents_execution_scratchpad_read_started_details.py,sha256=LHzefgHTPiQGvo97t5fz4e8EM6P7ZpdSllFe4kzB82g,3261
|
|
68
72
|
asteroid_odyssey/models/agents_execution_scratchpad_write_completed_details.py,sha256=mTNt46NsD8MJVHx3FoqrAuZ5BaWZ8iuBUZpzZypsoe0,3633
|
|
@@ -84,6 +88,9 @@ asteroid_odyssey/models/agents_execution_sort_field.py,sha256=KVc_CoONxPHD8MQ2x9
|
|
|
84
88
|
asteroid_odyssey/models/agents_execution_status.py,sha256=xGM7e94JQGqf9tA4nl0hpmJWFLTIyLhPDLR-bnx_QuY,977
|
|
85
89
|
asteroid_odyssey/models/agents_execution_terminal_payload.py,sha256=AkN6f_0fkSKasKlssTzKIFu6RDPm4n8gzmggy6ulZtw,3351
|
|
86
90
|
asteroid_odyssey/models/agents_execution_transition_details.py,sha256=v9DuY5uODsDIO49hxUcn8gfUv7fED7G6Nz2Qf95iT2o,2755
|
|
91
|
+
asteroid_odyssey/models/agents_execution_trigger_context.py,sha256=EHCZ6OaHgwVF5VY2hLferXfdXJK2HcFMOfGn8HmJibQ,7297
|
|
92
|
+
asteroid_odyssey/models/agents_execution_trigger_runner.py,sha256=_LtFSvq3iF8nhWZX_hZ5TerGb9YALvWoskjRRuKkIYE,2962
|
|
93
|
+
asteroid_odyssey/models/agents_execution_ui_trigger_context.py,sha256=PmC5dn_IY4KJ26nfcti1OpeTf0_lwFoKiiaX2R65oyQ,3328
|
|
87
94
|
asteroid_odyssey/models/agents_execution_update_execution_status_request.py,sha256=M6Op-oX10ryXyvyZfQkm93Z8ZutndKc44lKIF1rDKzk,2783
|
|
88
95
|
asteroid_odyssey/models/agents_execution_update_type.py,sha256=2oVD53MapRhp93RB9fBDltn9ZWlR0rNApk-dLR5P-Rg,803
|
|
89
96
|
asteroid_odyssey/models/agents_execution_updateable_status.py,sha256=N_SxbG1lCbZLcU064jDyROGgHpzzQwcOXwCuEB4fC_o,861
|
|
@@ -121,7 +128,7 @@ asteroid_odyssey/models/common_sort_direction.py,sha256=UBW99PM3QRGRRE7dB5OSBhmh
|
|
|
121
128
|
asteroid_odyssey/models/common_unauthorized_error_body.py,sha256=Ng62vZVuPWEkTvdnYimbItSKhUGT9G52ZOapMQ2O7Xg,2897
|
|
122
129
|
asteroid_odyssey/models/executions_list200_response.py,sha256=hbMbbsh7F8Cjl3S2hhRkcH4cvHCL24TVz8fwhGE9LfI,3288
|
|
123
130
|
asteroid_odyssey/models/version.py,sha256=Vjiri_a5CcDJ1lSziRqif5HuFpaxneVDLIB1r8SFIkE,707
|
|
124
|
-
asteroid_odyssey-1.6.
|
|
125
|
-
asteroid_odyssey-1.6.
|
|
126
|
-
asteroid_odyssey-1.6.
|
|
127
|
-
asteroid_odyssey-1.6.
|
|
131
|
+
asteroid_odyssey-1.6.135.dist-info/METADATA,sha256=vwBV8nVVHB5f2hcuzrjmylQnLqtP5h1EnrOqDNpbkUU,1891
|
|
132
|
+
asteroid_odyssey-1.6.135.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
133
|
+
asteroid_odyssey-1.6.135.dist-info/top_level.txt,sha256=h4T6NKscnThJ4Nhzors2NKlJeZzepnM7XvDgsnfi5HA,17
|
|
134
|
+
asteroid_odyssey-1.6.135.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|