asteroid-odyssey 0.1.21__py3-none-any.whl → 1.0.0__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 (96) hide show
  1. asteroid_odyssey/__init__.py +20 -34
  2. asteroid_odyssey/client.py +387 -337
  3. asteroid_odyssey/openapi_client/__init__.py +73 -0
  4. asteroid_odyssey/openapi_client/api/__init__.py +7 -0
  5. asteroid_odyssey/openapi_client/api/api_api.py +516 -0
  6. asteroid_odyssey/openapi_client/api/execution_api.py +335 -0
  7. asteroid_odyssey/openapi_client/api/sdk_api.py +1434 -0
  8. asteroid_odyssey/openapi_client/api_client.py +801 -0
  9. asteroid_odyssey/openapi_client/api_response.py +21 -0
  10. asteroid_odyssey/openapi_client/configuration.py +606 -0
  11. asteroid_odyssey/openapi_client/exceptions.py +216 -0
  12. asteroid_odyssey/openapi_client/models/__init__.py +27 -0
  13. asteroid_odyssey/openapi_client/models/browser_session_recording_response.py +87 -0
  14. asteroid_odyssey/openapi_client/models/error_response.py +87 -0
  15. asteroid_odyssey/openapi_client/models/execution_response.py +87 -0
  16. asteroid_odyssey/openapi_client/models/execution_result.py +101 -0
  17. asteroid_odyssey/openapi_client/models/execution_result_response.py +100 -0
  18. asteroid_odyssey/openapi_client/models/execution_status_response.py +95 -0
  19. asteroid_odyssey/openapi_client/models/health_check200_response.py +87 -0
  20. asteroid_odyssey/openapi_client/models/health_check500_response.py +87 -0
  21. asteroid_odyssey/openapi_client/models/status.py +43 -0
  22. asteroid_odyssey/openapi_client/models/structured_agent_execution_request.py +89 -0
  23. asteroid_odyssey/openapi_client/models/upload_execution_files200_response.py +89 -0
  24. asteroid_odyssey/openapi_client/rest.py +258 -0
  25. asteroid_odyssey-1.0.0.dist-info/METADATA +208 -0
  26. asteroid_odyssey-1.0.0.dist-info/RECORD +29 -0
  27. {asteroid_odyssey-0.1.21.dist-info → asteroid_odyssey-1.0.0.dist-info}/WHEEL +1 -1
  28. asteroid_odyssey/api/generated/asteroid_agents_api_client/__init__.py +0 -8
  29. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/__init__.py +0 -1
  30. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/agent/get_agents.py +0 -127
  31. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/api/__init__.py +0 -0
  32. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/api/get_open_api.py +0 -79
  33. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/api/health_check.py +0 -131
  34. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/credentials/__init__.py +0 -0
  35. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/credentials/get_credentials_public_key.py +0 -127
  36. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/__init__.py +0 -0
  37. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/delete_execution.py +0 -156
  38. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_browser_session.py +0 -154
  39. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_execution.py +0 -154
  40. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_execution_files.py +0 -159
  41. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_execution_progress.py +0 -159
  42. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_executions_for_workflow.py +0 -156
  43. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/update_execution_status.py +0 -115
  44. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/notifications/__init__.py +0 -0
  45. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/notifications/set_slack_channel.py +0 -107
  46. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/optimiser/__init__.py +0 -0
  47. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/optimiser/queue_optimisation_job.py +0 -103
  48. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/__init__.py +0 -0
  49. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/add_workflow_credential.py +0 -111
  50. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/create_workflow.py +0 -174
  51. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/delete_workflow.py +0 -156
  52. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/delete_workflow_credentials.py +0 -96
  53. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/execute_workflow.py +0 -179
  54. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_agent_workflow_executions.py +0 -155
  55. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_workflow.py +0 -154
  56. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_workflow_credentials.py +0 -154
  57. asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_workflow_versions.py +0 -159
  58. asteroid_odyssey/api/generated/asteroid_agents_api_client/client.py +0 -268
  59. asteroid_odyssey/api/generated/asteroid_agents_api_client/errors.py +0 -16
  60. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/__init__.py +0 -61
  61. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/agent.py +0 -90
  62. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/browser_session.py +0 -136
  63. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/create_workflow_request.py +0 -126
  64. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/create_workflow_request_fields.py +0 -48
  65. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/create_workflow_request_provider.py +0 -9
  66. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/credential.py +0 -66
  67. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/credentials_request.py +0 -72
  68. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/credentials_response.py +0 -80
  69. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_execution_response_200.py +0 -58
  70. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_execution_response_404.py +0 -58
  71. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_workflow_response_200.py +0 -58
  72. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_workflow_response_404.py +0 -58
  73. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution.py +0 -147
  74. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution_dynamic_data.py +0 -48
  75. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution_result.py +0 -43
  76. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution_status.py +0 -89
  77. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/file.py +0 -127
  78. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/health_check_response_200.py +0 -58
  79. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/health_check_response_500.py +0 -58
  80. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/optimisation_request.py +0 -59
  81. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/progress_update.py +0 -77
  82. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/result_schema.py +0 -51
  83. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/slack_channel_request.py +0 -58
  84. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/status.py +0 -13
  85. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow.py +0 -152
  86. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow_execution.py +0 -82
  87. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow_execution_request.py +0 -48
  88. asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow_fields.py +0 -48
  89. asteroid_odyssey/api/generated/asteroid_agents_api_client/py.typed +0 -1
  90. asteroid_odyssey/api/generated/asteroid_agents_api_client/types.py +0 -45
  91. asteroid_odyssey/exceptions.py +0 -15
  92. asteroid_odyssey-0.1.21.dist-info/METADATA +0 -31
  93. asteroid_odyssey-0.1.21.dist-info/RECORD +0 -72
  94. asteroid_odyssey-0.1.21.dist-info/entry_points.txt +0 -2
  95. /asteroid_odyssey/{api/generated/asteroid_agents_api_client/api/agent/__init__.py → openapi_client/py.typed} +0 -0
  96. {asteroid_odyssey-0.1.21.dist-info → asteroid_odyssey-1.0.0.dist-info}/top_level.txt +0 -0
@@ -1,268 +0,0 @@
1
- import ssl
2
- from typing import Any, Dict, Optional, Union
3
-
4
- import httpx
5
- from attrs import define, evolve, field
6
-
7
-
8
- @define
9
- class Client:
10
- """A class for keeping track of data related to the API
11
-
12
- The following are accepted as keyword arguments and will be used to construct httpx Clients internally:
13
-
14
- ``base_url``: The base URL for the API, all requests are made to a relative path to this URL
15
-
16
- ``cookies``: A dictionary of cookies to be sent with every request
17
-
18
- ``headers``: A dictionary of headers to be sent with every request
19
-
20
- ``timeout``: The maximum amount of a time a request can take. API functions will raise
21
- httpx.TimeoutException if this is exceeded.
22
-
23
- ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,
24
- but can be set to False for testing purposes.
25
-
26
- ``follow_redirects``: Whether or not to follow redirects. Default value is False.
27
-
28
- ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.
29
-
30
-
31
- Attributes:
32
- raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a
33
- status code that was not documented in the source OpenAPI document. Can also be provided as a keyword
34
- argument to the constructor.
35
- """
36
-
37
- raise_on_unexpected_status: bool = field(default=False, kw_only=True)
38
- _base_url: str = field(alias="base_url")
39
- _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies")
40
- _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers")
41
- _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout")
42
- _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl")
43
- _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects")
44
- _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args")
45
- _client: Optional[httpx.Client] = field(default=None, init=False)
46
- _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False)
47
-
48
- def with_headers(self, headers: Dict[str, str]) -> "Client":
49
- """Get a new client matching this one with additional headers"""
50
- if self._client is not None:
51
- self._client.headers.update(headers)
52
- if self._async_client is not None:
53
- self._async_client.headers.update(headers)
54
- return evolve(self, headers={**self._headers, **headers})
55
-
56
- def with_cookies(self, cookies: Dict[str, str]) -> "Client":
57
- """Get a new client matching this one with additional cookies"""
58
- if self._client is not None:
59
- self._client.cookies.update(cookies)
60
- if self._async_client is not None:
61
- self._async_client.cookies.update(cookies)
62
- return evolve(self, cookies={**self._cookies, **cookies})
63
-
64
- def with_timeout(self, timeout: httpx.Timeout) -> "Client":
65
- """Get a new client matching this one with a new timeout (in seconds)"""
66
- if self._client is not None:
67
- self._client.timeout = timeout
68
- if self._async_client is not None:
69
- self._async_client.timeout = timeout
70
- return evolve(self, timeout=timeout)
71
-
72
- def set_httpx_client(self, client: httpx.Client) -> "Client":
73
- """Manually set the underlying httpx.Client
74
-
75
- **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
76
- """
77
- self._client = client
78
- return self
79
-
80
- def get_httpx_client(self) -> httpx.Client:
81
- """Get the underlying httpx.Client, constructing a new one if not previously set"""
82
- if self._client is None:
83
- self._client = httpx.Client(
84
- base_url=self._base_url,
85
- cookies=self._cookies,
86
- headers=self._headers,
87
- timeout=self._timeout,
88
- verify=self._verify_ssl,
89
- follow_redirects=self._follow_redirects,
90
- **self._httpx_args,
91
- )
92
- return self._client
93
-
94
- def __enter__(self) -> "Client":
95
- """Enter a context manager for self.client—you cannot enter twice (see httpx docs)"""
96
- self.get_httpx_client().__enter__()
97
- return self
98
-
99
- def __exit__(self, *args: Any, **kwargs: Any) -> None:
100
- """Exit a context manager for internal httpx.Client (see httpx docs)"""
101
- self.get_httpx_client().__exit__(*args, **kwargs)
102
-
103
- def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "Client":
104
- """Manually the underlying httpx.AsyncClient
105
-
106
- **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
107
- """
108
- self._async_client = async_client
109
- return self
110
-
111
- def get_async_httpx_client(self) -> httpx.AsyncClient:
112
- """Get the underlying httpx.AsyncClient, constructing a new one if not previously set"""
113
- if self._async_client is None:
114
- self._async_client = httpx.AsyncClient(
115
- base_url=self._base_url,
116
- cookies=self._cookies,
117
- headers=self._headers,
118
- timeout=self._timeout,
119
- verify=self._verify_ssl,
120
- follow_redirects=self._follow_redirects,
121
- **self._httpx_args,
122
- )
123
- return self._async_client
124
-
125
- async def __aenter__(self) -> "Client":
126
- """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)"""
127
- await self.get_async_httpx_client().__aenter__()
128
- return self
129
-
130
- async def __aexit__(self, *args: Any, **kwargs: Any) -> None:
131
- """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)"""
132
- await self.get_async_httpx_client().__aexit__(*args, **kwargs)
133
-
134
-
135
- @define
136
- class AuthenticatedClient:
137
- """A Client which has been authenticated for use on secured endpoints
138
-
139
- The following are accepted as keyword arguments and will be used to construct httpx Clients internally:
140
-
141
- ``base_url``: The base URL for the API, all requests are made to a relative path to this URL
142
-
143
- ``cookies``: A dictionary of cookies to be sent with every request
144
-
145
- ``headers``: A dictionary of headers to be sent with every request
146
-
147
- ``timeout``: The maximum amount of a time a request can take. API functions will raise
148
- httpx.TimeoutException if this is exceeded.
149
-
150
- ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,
151
- but can be set to False for testing purposes.
152
-
153
- ``follow_redirects``: Whether or not to follow redirects. Default value is False.
154
-
155
- ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.
156
-
157
-
158
- Attributes:
159
- raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a
160
- status code that was not documented in the source OpenAPI document. Can also be provided as a keyword
161
- argument to the constructor.
162
- token: The token to use for authentication
163
- prefix: The prefix to use for the Authorization header
164
- auth_header_name: The name of the Authorization header
165
- """
166
-
167
- raise_on_unexpected_status: bool = field(default=False, kw_only=True)
168
- _base_url: str = field(alias="base_url")
169
- _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies")
170
- _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers")
171
- _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout")
172
- _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl")
173
- _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects")
174
- _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args")
175
- _client: Optional[httpx.Client] = field(default=None, init=False)
176
- _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False)
177
-
178
- token: str
179
- prefix: str = "Bearer"
180
- auth_header_name: str = "Authorization"
181
-
182
- def with_headers(self, headers: Dict[str, str]) -> "AuthenticatedClient":
183
- """Get a new client matching this one with additional headers"""
184
- if self._client is not None:
185
- self._client.headers.update(headers)
186
- if self._async_client is not None:
187
- self._async_client.headers.update(headers)
188
- return evolve(self, headers={**self._headers, **headers})
189
-
190
- def with_cookies(self, cookies: Dict[str, str]) -> "AuthenticatedClient":
191
- """Get a new client matching this one with additional cookies"""
192
- if self._client is not None:
193
- self._client.cookies.update(cookies)
194
- if self._async_client is not None:
195
- self._async_client.cookies.update(cookies)
196
- return evolve(self, cookies={**self._cookies, **cookies})
197
-
198
- def with_timeout(self, timeout: httpx.Timeout) -> "AuthenticatedClient":
199
- """Get a new client matching this one with a new timeout (in seconds)"""
200
- if self._client is not None:
201
- self._client.timeout = timeout
202
- if self._async_client is not None:
203
- self._async_client.timeout = timeout
204
- return evolve(self, timeout=timeout)
205
-
206
- def set_httpx_client(self, client: httpx.Client) -> "AuthenticatedClient":
207
- """Manually set the underlying httpx.Client
208
-
209
- **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
210
- """
211
- self._client = client
212
- return self
213
-
214
- def get_httpx_client(self) -> httpx.Client:
215
- """Get the underlying httpx.Client, constructing a new one if not previously set"""
216
- if self._client is None:
217
- self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token
218
- self._client = httpx.Client(
219
- base_url=self._base_url,
220
- cookies=self._cookies,
221
- headers=self._headers,
222
- timeout=self._timeout,
223
- verify=self._verify_ssl,
224
- follow_redirects=self._follow_redirects,
225
- **self._httpx_args,
226
- )
227
- return self._client
228
-
229
- def __enter__(self) -> "AuthenticatedClient":
230
- """Enter a context manager for self.client—you cannot enter twice (see httpx docs)"""
231
- self.get_httpx_client().__enter__()
232
- return self
233
-
234
- def __exit__(self, *args: Any, **kwargs: Any) -> None:
235
- """Exit a context manager for internal httpx.Client (see httpx docs)"""
236
- self.get_httpx_client().__exit__(*args, **kwargs)
237
-
238
- def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "AuthenticatedClient":
239
- """Manually the underlying httpx.AsyncClient
240
-
241
- **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
242
- """
243
- self._async_client = async_client
244
- return self
245
-
246
- def get_async_httpx_client(self) -> httpx.AsyncClient:
247
- """Get the underlying httpx.AsyncClient, constructing a new one if not previously set"""
248
- if self._async_client is None:
249
- self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token
250
- self._async_client = httpx.AsyncClient(
251
- base_url=self._base_url,
252
- cookies=self._cookies,
253
- headers=self._headers,
254
- timeout=self._timeout,
255
- verify=self._verify_ssl,
256
- follow_redirects=self._follow_redirects,
257
- **self._httpx_args,
258
- )
259
- return self._async_client
260
-
261
- async def __aenter__(self) -> "AuthenticatedClient":
262
- """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)"""
263
- await self.get_async_httpx_client().__aenter__()
264
- return self
265
-
266
- async def __aexit__(self, *args: Any, **kwargs: Any) -> None:
267
- """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)"""
268
- await self.get_async_httpx_client().__aexit__(*args, **kwargs)
@@ -1,16 +0,0 @@
1
- """Contains shared errors types that can be raised from API functions"""
2
-
3
-
4
- class UnexpectedStatus(Exception):
5
- """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True"""
6
-
7
- def __init__(self, status_code: int, content: bytes):
8
- self.status_code = status_code
9
- self.content = content
10
-
11
- super().__init__(
12
- f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}"
13
- )
14
-
15
-
16
- __all__ = ["UnexpectedStatus"]
@@ -1,61 +0,0 @@
1
- """Contains all the data models used in inputs/outputs"""
2
-
3
- from .agent import Agent
4
- from .browser_session import BrowserSession
5
- from .create_workflow_request import CreateWorkflowRequest
6
- from .create_workflow_request_fields import CreateWorkflowRequestFields
7
- from .create_workflow_request_provider import CreateWorkflowRequestProvider
8
- from .credential import Credential
9
- from .credentials_request import CredentialsRequest
10
- from .credentials_response import CredentialsResponse
11
- from .delete_execution_response_200 import DeleteExecutionResponse200
12
- from .delete_execution_response_404 import DeleteExecutionResponse404
13
- from .delete_workflow_response_200 import DeleteWorkflowResponse200
14
- from .delete_workflow_response_404 import DeleteWorkflowResponse404
15
- from .execution import Execution
16
- from .execution_dynamic_data import ExecutionDynamicData
17
- from .execution_result import ExecutionResult
18
- from .execution_status import ExecutionStatus
19
- from .file import File
20
- from .health_check_response_200 import HealthCheckResponse200
21
- from .health_check_response_500 import HealthCheckResponse500
22
- from .optimisation_request import OptimisationRequest
23
- from .progress_update import ProgressUpdate
24
- from .result_schema import ResultSchema
25
- from .slack_channel_request import SlackChannelRequest
26
- from .status import Status
27
- from .workflow import Workflow
28
- from .workflow_execution import WorkflowExecution
29
- from .workflow_execution_request import WorkflowExecutionRequest
30
- from .workflow_fields import WorkflowFields
31
-
32
- __all__ = (
33
- "Agent",
34
- "BrowserSession",
35
- "CreateWorkflowRequest",
36
- "CreateWorkflowRequestFields",
37
- "CreateWorkflowRequestProvider",
38
- "Credential",
39
- "CredentialsRequest",
40
- "CredentialsResponse",
41
- "DeleteExecutionResponse200",
42
- "DeleteExecutionResponse404",
43
- "DeleteWorkflowResponse200",
44
- "DeleteWorkflowResponse404",
45
- "Execution",
46
- "ExecutionDynamicData",
47
- "ExecutionResult",
48
- "ExecutionStatus",
49
- "File",
50
- "HealthCheckResponse200",
51
- "HealthCheckResponse500",
52
- "OptimisationRequest",
53
- "ProgressUpdate",
54
- "ResultSchema",
55
- "SlackChannelRequest",
56
- "Status",
57
- "Workflow",
58
- "WorkflowExecution",
59
- "WorkflowExecutionRequest",
60
- "WorkflowFields",
61
- )
@@ -1,90 +0,0 @@
1
- from typing import Any, Dict, List, Type, TypeVar, cast
2
-
3
- from attrs import define as _attrs_define
4
- from attrs import field as _attrs_field
5
-
6
- T = TypeVar("T", bound="Agent")
7
-
8
-
9
- @_attrs_define
10
- class Agent:
11
- """
12
- Attributes:
13
- name (str): The name of the agent Example: my_agent.
14
- description (str): The description of the agent Example: This agent is used to queue jobs.
15
- visibility (str): The visibility of the agent Example: public.
16
- required_fields (List[str]): The required fields for the agent Example: ['system_prompt_template'].
17
- required_prompts (List[str]): The prompts for the agent Example: ['Hello {{.name}}, your model is {{.model}}'].
18
- """
19
-
20
- name: str
21
- description: str
22
- visibility: str
23
- required_fields: List[str]
24
- required_prompts: List[str]
25
- additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
26
-
27
- def to_dict(self) -> Dict[str, Any]:
28
- name = self.name
29
-
30
- description = self.description
31
-
32
- visibility = self.visibility
33
-
34
- required_fields = self.required_fields
35
-
36
- required_prompts = self.required_prompts
37
-
38
- field_dict: Dict[str, Any] = {}
39
- field_dict.update(self.additional_properties)
40
- field_dict.update(
41
- {
42
- "name": name,
43
- "description": description,
44
- "visibility": visibility,
45
- "required_fields": required_fields,
46
- "required_prompts": required_prompts,
47
- }
48
- )
49
-
50
- return field_dict
51
-
52
- @classmethod
53
- def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
54
- d = src_dict.copy()
55
- name = d.pop("name")
56
-
57
- description = d.pop("description")
58
-
59
- visibility = d.pop("visibility")
60
-
61
- required_fields = cast(List[str], d.pop("required_fields"))
62
-
63
- required_prompts = cast(List[str], d.pop("required_prompts"))
64
-
65
- agent = cls(
66
- name=name,
67
- description=description,
68
- visibility=visibility,
69
- required_fields=required_fields,
70
- required_prompts=required_prompts,
71
- )
72
-
73
- agent.additional_properties = d
74
- return agent
75
-
76
- @property
77
- def additional_keys(self) -> List[str]:
78
- return list(self.additional_properties.keys())
79
-
80
- def __getitem__(self, key: str) -> Any:
81
- return self.additional_properties[key]
82
-
83
- def __setitem__(self, key: str, value: Any) -> None:
84
- self.additional_properties[key] = value
85
-
86
- def __delitem__(self, key: str) -> None:
87
- del self.additional_properties[key]
88
-
89
- def __contains__(self, key: str) -> bool:
90
- return key in self.additional_properties
@@ -1,136 +0,0 @@
1
- from typing import Any, Dict, List, Type, TypeVar, Union
2
- from uuid import UUID
3
-
4
- from attrs import define as _attrs_define
5
- from attrs import field as _attrs_field
6
-
7
- from ..types import UNSET, Unset
8
-
9
- T = TypeVar("T", bound="BrowserSession")
10
-
11
-
12
- @_attrs_define
13
- class BrowserSession:
14
- """
15
- Attributes:
16
- id (Union[Unset, UUID]): Browser session identifier.
17
- browser_name (Union[Unset, str]): Browser name (Anchor, Browserbase, etc.)
18
- execution_id (Union[Unset, UUID]): Execution ID.
19
- cdp_url (Union[Unset, str]): CDP URL.
20
- debugger_url (Union[Unset, str]): Debugger URL.
21
- session_id (Union[Unset, str]): Session ID.
22
- session_url (Union[Unset, str]): Session URL.
23
- recording_url (Union[Unset, str]): Recording URL.
24
- """
25
-
26
- id: Union[Unset, UUID] = UNSET
27
- browser_name: Union[Unset, str] = UNSET
28
- execution_id: Union[Unset, UUID] = UNSET
29
- cdp_url: Union[Unset, str] = UNSET
30
- debugger_url: Union[Unset, str] = UNSET
31
- session_id: Union[Unset, str] = UNSET
32
- session_url: Union[Unset, str] = UNSET
33
- recording_url: Union[Unset, str] = UNSET
34
- additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
35
-
36
- def to_dict(self) -> Dict[str, Any]:
37
- id: Union[Unset, str] = UNSET
38
- if not isinstance(self.id, Unset):
39
- id = str(self.id)
40
-
41
- browser_name = self.browser_name
42
-
43
- execution_id: Union[Unset, str] = UNSET
44
- if not isinstance(self.execution_id, Unset):
45
- execution_id = str(self.execution_id)
46
-
47
- cdp_url = self.cdp_url
48
-
49
- debugger_url = self.debugger_url
50
-
51
- session_id = self.session_id
52
-
53
- session_url = self.session_url
54
-
55
- recording_url = self.recording_url
56
-
57
- field_dict: Dict[str, Any] = {}
58
- field_dict.update(self.additional_properties)
59
- field_dict.update({})
60
- if id is not UNSET:
61
- field_dict["id"] = id
62
- if browser_name is not UNSET:
63
- field_dict["browser_name"] = browser_name
64
- if execution_id is not UNSET:
65
- field_dict["execution_id"] = execution_id
66
- if cdp_url is not UNSET:
67
- field_dict["cdp_url"] = cdp_url
68
- if debugger_url is not UNSET:
69
- field_dict["debugger_url"] = debugger_url
70
- if session_id is not UNSET:
71
- field_dict["session_id"] = session_id
72
- if session_url is not UNSET:
73
- field_dict["session_url"] = session_url
74
- if recording_url is not UNSET:
75
- field_dict["recording_url"] = recording_url
76
-
77
- return field_dict
78
-
79
- @classmethod
80
- def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
81
- d = src_dict.copy()
82
- _id = d.pop("id", UNSET)
83
- id: Union[Unset, UUID]
84
- if isinstance(_id, Unset):
85
- id = UNSET
86
- else:
87
- id = UUID(_id)
88
-
89
- browser_name = d.pop("browser_name", UNSET)
90
-
91
- _execution_id = d.pop("execution_id", UNSET)
92
- execution_id: Union[Unset, UUID]
93
- if isinstance(_execution_id, Unset):
94
- execution_id = UNSET
95
- else:
96
- execution_id = UUID(_execution_id)
97
-
98
- cdp_url = d.pop("cdp_url", UNSET)
99
-
100
- debugger_url = d.pop("debugger_url", UNSET)
101
-
102
- session_id = d.pop("session_id", UNSET)
103
-
104
- session_url = d.pop("session_url", UNSET)
105
-
106
- recording_url = d.pop("recording_url", UNSET)
107
-
108
- browser_session = cls(
109
- id=id,
110
- browser_name=browser_name,
111
- execution_id=execution_id,
112
- cdp_url=cdp_url,
113
- debugger_url=debugger_url,
114
- session_id=session_id,
115
- session_url=session_url,
116
- recording_url=recording_url,
117
- )
118
-
119
- browser_session.additional_properties = d
120
- return browser_session
121
-
122
- @property
123
- def additional_keys(self) -> List[str]:
124
- return list(self.additional_properties.keys())
125
-
126
- def __getitem__(self, key: str) -> Any:
127
- return self.additional_properties[key]
128
-
129
- def __setitem__(self, key: str, value: Any) -> None:
130
- self.additional_properties[key] = value
131
-
132
- def __delitem__(self, key: str) -> None:
133
- del self.additional_properties[key]
134
-
135
- def __contains__(self, key: str) -> bool:
136
- return key in self.additional_properties