plato-sdk-v2 2.0.50__py3-none-any.whl → 2.2.4__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.
- plato/__init__.py +7 -6
- plato/_generated/__init__.py +1 -1
- plato/_generated/api/v1/env/evaluate_session.py +3 -3
- plato/_generated/api/v1/env/log_state_mutation.py +4 -4
- plato/_generated/api/v1/sandbox/checkpoint_vm.py +3 -3
- plato/_generated/api/v1/sandbox/save_vm_snapshot.py +3 -3
- plato/_generated/api/v1/sandbox/setup_sandbox.py +8 -8
- plato/_generated/api/v1/session/__init__.py +2 -0
- plato/_generated/api/v1/session/get_sessions_for_archival.py +100 -0
- plato/_generated/api/v1/testcases/__init__.py +6 -2
- plato/_generated/api/v1/testcases/get_mutation_groups_for_testcase.py +98 -0
- plato/_generated/api/v1/testcases/{get_next_output_testcase_for_scoring.py → get_next_testcase_for_scoring.py} +23 -10
- plato/_generated/api/v1/testcases/get_testcase_metadata_for_scoring.py +74 -0
- plato/_generated/api/v2/__init__.py +2 -1
- plato/_generated/api/v2/jobs/__init__.py +4 -0
- plato/_generated/api/v2/jobs/checkpoint.py +3 -3
- plato/_generated/api/v2/jobs/disk_snapshot.py +3 -3
- plato/_generated/api/v2/jobs/log_for_job.py +4 -39
- plato/_generated/api/v2/jobs/make.py +4 -4
- plato/_generated/api/v2/jobs/setup_sandbox.py +97 -0
- plato/_generated/api/v2/jobs/snapshot.py +3 -3
- plato/_generated/api/v2/jobs/snapshot_store.py +91 -0
- plato/_generated/api/v2/sessions/__init__.py +4 -0
- plato/_generated/api/v2/sessions/checkpoint.py +3 -3
- plato/_generated/api/v2/sessions/disk_snapshot.py +3 -3
- plato/_generated/api/v2/sessions/evaluate.py +3 -3
- plato/_generated/api/v2/sessions/log_job_mutation.py +4 -39
- plato/_generated/api/v2/sessions/make.py +4 -4
- plato/_generated/api/v2/sessions/setup_sandbox.py +98 -0
- plato/_generated/api/v2/sessions/snapshot.py +3 -3
- plato/_generated/api/v2/sessions/snapshot_store.py +94 -0
- plato/_generated/api/v2/user/__init__.py +7 -0
- plato/_generated/api/v2/user/get_current_user.py +76 -0
- plato/_generated/models/__init__.py +174 -23
- plato/_sims_generator/__init__.py +19 -4
- plato/_sims_generator/instruction.py +203 -0
- plato/_sims_generator/templates/instruction/helpers.py.jinja +161 -0
- plato/_sims_generator/templates/instruction/init.py.jinja +43 -0
- plato/agents/__init__.py +107 -517
- plato/agents/base.py +145 -0
- plato/agents/build.py +61 -0
- plato/agents/config.py +160 -0
- plato/agents/logging.py +401 -0
- plato/agents/runner.py +161 -0
- plato/agents/trajectory.py +266 -0
- plato/chronos/__init__.py +37 -0
- plato/chronos/api/__init__.py +3 -0
- plato/chronos/api/agents/__init__.py +13 -0
- plato/chronos/api/agents/create_agent.py +63 -0
- plato/chronos/api/agents/delete_agent.py +61 -0
- plato/chronos/api/agents/get_agent.py +62 -0
- plato/chronos/api/agents/get_agent_schema.py +72 -0
- plato/chronos/api/agents/get_agent_versions.py +62 -0
- plato/chronos/api/agents/list_agents.py +57 -0
- plato/chronos/api/agents/lookup_agent.py +74 -0
- plato/chronos/api/auth/__init__.py +9 -0
- plato/chronos/api/auth/debug_auth_api_auth_debug_get.py +43 -0
- plato/chronos/api/auth/get_auth_status_api_auth_status_get.py +61 -0
- plato/chronos/api/auth/get_current_user_route_api_auth_me_get.py +60 -0
- plato/chronos/api/callback/__init__.py +11 -0
- plato/chronos/api/callback/push_agent_logs.py +61 -0
- plato/chronos/api/callback/update_agent_status.py +57 -0
- plato/chronos/api/callback/upload_artifacts.py +59 -0
- plato/chronos/api/callback/upload_logs_zip.py +57 -0
- plato/chronos/api/callback/upload_trajectory.py +57 -0
- plato/chronos/api/default/__init__.py +7 -0
- plato/chronos/api/default/health.py +43 -0
- plato/chronos/api/jobs/__init__.py +7 -0
- plato/chronos/api/jobs/launch_job.py +63 -0
- plato/chronos/api/registry/__init__.py +19 -0
- plato/chronos/api/registry/get_agent_schema_api_registry_agents__agent_name__schema_get.py +62 -0
- plato/chronos/api/registry/get_agent_versions_api_registry_agents__agent_name__versions_get.py +52 -0
- plato/chronos/api/registry/get_world_schema_api_registry_worlds__package_name__schema_get.py +68 -0
- plato/chronos/api/registry/get_world_versions_api_registry_worlds__package_name__versions_get.py +52 -0
- plato/chronos/api/registry/list_registry_agents_api_registry_agents_get.py +44 -0
- plato/chronos/api/registry/list_registry_worlds_api_registry_worlds_get.py +44 -0
- plato/chronos/api/runtimes/__init__.py +11 -0
- plato/chronos/api/runtimes/create_runtime.py +63 -0
- plato/chronos/api/runtimes/delete_runtime.py +61 -0
- plato/chronos/api/runtimes/get_runtime.py +62 -0
- plato/chronos/api/runtimes/list_runtimes.py +57 -0
- plato/chronos/api/runtimes/test_runtime.py +67 -0
- plato/chronos/api/secrets/__init__.py +11 -0
- plato/chronos/api/secrets/create_secret.py +63 -0
- plato/chronos/api/secrets/delete_secret.py +61 -0
- plato/chronos/api/secrets/get_secret.py +62 -0
- plato/chronos/api/secrets/list_secrets.py +57 -0
- plato/chronos/api/secrets/update_secret.py +68 -0
- plato/chronos/api/sessions/__init__.py +10 -0
- plato/chronos/api/sessions/get_session.py +62 -0
- plato/chronos/api/sessions/get_session_logs.py +72 -0
- plato/chronos/api/sessions/get_session_logs_download.py +62 -0
- plato/chronos/api/sessions/list_sessions.py +57 -0
- plato/chronos/api/status/__init__.py +8 -0
- plato/chronos/api/status/get_status_api_status_get.py +44 -0
- plato/chronos/api/status/get_version_info_api_version_get.py +44 -0
- plato/chronos/api/templates/__init__.py +11 -0
- plato/chronos/api/templates/create_template.py +63 -0
- plato/chronos/api/templates/delete_template.py +61 -0
- plato/chronos/api/templates/get_template.py +62 -0
- plato/chronos/api/templates/list_templates.py +57 -0
- plato/chronos/api/templates/update_template.py +68 -0
- plato/chronos/api/trajectories/__init__.py +8 -0
- plato/chronos/api/trajectories/get_trajectory.py +62 -0
- plato/chronos/api/trajectories/list_trajectories.py +62 -0
- plato/chronos/api/worlds/__init__.py +10 -0
- plato/chronos/api/worlds/create_world.py +63 -0
- plato/chronos/api/worlds/delete_world.py +61 -0
- plato/chronos/api/worlds/get_world.py +62 -0
- plato/chronos/api/worlds/list_worlds.py +57 -0
- plato/chronos/client.py +171 -0
- plato/chronos/errors.py +141 -0
- plato/chronos/models/__init__.py +647 -0
- plato/chronos/py.typed +0 -0
- plato/sims/cli.py +299 -123
- plato/sims/registry.py +77 -4
- plato/v1/cli/agent.py +88 -84
- plato/v1/cli/main.py +2 -0
- plato/v1/cli/pm.py +441 -119
- plato/v1/cli/sandbox.py +747 -191
- plato/v1/cli/sim.py +11 -0
- plato/v1/cli/verify.py +1269 -0
- plato/v1/cli/world.py +3 -0
- plato/v1/flow_executor.py +21 -17
- plato/v1/models/env.py +11 -11
- plato/v1/sdk.py +2 -2
- plato/v1/sync_env.py +11 -11
- plato/v1/sync_flow_executor.py +21 -17
- plato/v1/sync_sdk.py +4 -2
- plato/v2/__init__.py +2 -0
- plato/v2/async_/environment.py +20 -1
- plato/v2/async_/session.py +54 -3
- plato/v2/sync/environment.py +2 -1
- plato/v2/sync/session.py +52 -2
- plato/worlds/README.md +218 -0
- plato/worlds/__init__.py +54 -18
- plato/worlds/base.py +304 -93
- plato/worlds/config.py +239 -73
- plato/worlds/runner.py +391 -80
- {plato_sdk_v2-2.0.50.dist-info → plato_sdk_v2-2.2.4.dist-info}/METADATA +1 -3
- {plato_sdk_v2-2.0.50.dist-info → plato_sdk_v2-2.2.4.dist-info}/RECORD +143 -68
- {plato_sdk_v2-2.0.50.dist-info → plato_sdk_v2-2.2.4.dist-info}/entry_points.txt +1 -0
- plato/_generated/api/v2/interfaces/__init__.py +0 -27
- plato/_generated/api/v2/interfaces/v2_interface_browser_create.py +0 -68
- plato/_generated/api/v2/interfaces/v2_interface_cdp_url.py +0 -65
- plato/_generated/api/v2/interfaces/v2_interface_click.py +0 -64
- plato/_generated/api/v2/interfaces/v2_interface_close.py +0 -59
- plato/_generated/api/v2/interfaces/v2_interface_computer_create.py +0 -68
- plato/_generated/api/v2/interfaces/v2_interface_cursor.py +0 -64
- plato/_generated/api/v2/interfaces/v2_interface_key.py +0 -68
- plato/_generated/api/v2/interfaces/v2_interface_screenshot.py +0 -65
- plato/_generated/api/v2/interfaces/v2_interface_scroll.py +0 -70
- plato/_generated/api/v2/interfaces/v2_interface_type.py +0 -64
- plato/world/__init__.py +0 -44
- plato/world/base.py +0 -267
- plato/world/config.py +0 -139
- plato/world/types.py +0 -47
- {plato_sdk_v2-2.0.50.dist-info → plato_sdk_v2-2.2.4.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: tmp7svjeeij.json
|
|
3
|
+
# timestamp: 2026-01-17T02:28:53+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from typing import Annotated, Any
|
|
8
|
+
|
|
9
|
+
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AgentConfig(BaseModel):
|
|
13
|
+
model_config = ConfigDict(
|
|
14
|
+
extra="allow",
|
|
15
|
+
)
|
|
16
|
+
agent_id: Annotated[str, Field(title="Agent Id")]
|
|
17
|
+
config: Annotated[dict[str, Any] | None, Field(title="Config")] = {}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class AgentCreate(BaseModel):
|
|
21
|
+
model_config = ConfigDict(
|
|
22
|
+
extra="allow",
|
|
23
|
+
)
|
|
24
|
+
name: Annotated[str, Field(title="Name")]
|
|
25
|
+
version: Annotated[str, Field(title="Version")]
|
|
26
|
+
image_uri: Annotated[str, Field(title="Image Uri")]
|
|
27
|
+
config_schema: Annotated[dict[str, Any] | None, Field(title="Config Schema")] = None
|
|
28
|
+
secrets_schema: Annotated[dict[str, Any] | None, Field(title="Secrets Schema")] = None
|
|
29
|
+
template_variables: Annotated[dict[str, str] | None, Field(title="Template Variables")] = None
|
|
30
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class AgentInfo(BaseModel):
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
extra="allow",
|
|
36
|
+
)
|
|
37
|
+
slot_name: Annotated[str, Field(title="Slot Name")]
|
|
38
|
+
name: Annotated[str, Field(title="Name")]
|
|
39
|
+
public_id: Annotated[str, Field(title="Public Id")]
|
|
40
|
+
config: Annotated[dict[str, Any] | None, Field(title="Config")] = {}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class AgentLogEntry(BaseModel):
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
extra="allow",
|
|
46
|
+
)
|
|
47
|
+
level: Annotated[str | None, Field(title="Level")] = "info"
|
|
48
|
+
"""
|
|
49
|
+
Log level: debug, info, warning, error
|
|
50
|
+
"""
|
|
51
|
+
message: Annotated[str, Field(title="Message")]
|
|
52
|
+
"""
|
|
53
|
+
Log message
|
|
54
|
+
"""
|
|
55
|
+
timestamp: Annotated[str | None, Field(title="Timestamp")] = None
|
|
56
|
+
"""
|
|
57
|
+
ISO timestamp, defaults to now
|
|
58
|
+
"""
|
|
59
|
+
extra: Annotated[dict[str, Any] | None, Field(title="Extra")] = None
|
|
60
|
+
"""
|
|
61
|
+
Additional structured data
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class AgentLogsRequest(BaseModel):
|
|
66
|
+
model_config = ConfigDict(
|
|
67
|
+
extra="allow",
|
|
68
|
+
)
|
|
69
|
+
session_id: Annotated[str, Field(title="Session Id")]
|
|
70
|
+
"""
|
|
71
|
+
Chronos session ID
|
|
72
|
+
"""
|
|
73
|
+
logs: Annotated[list[AgentLogEntry], Field(title="Logs")]
|
|
74
|
+
"""
|
|
75
|
+
Log entries to add
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class AgentLogsResponse(BaseModel):
|
|
80
|
+
model_config = ConfigDict(
|
|
81
|
+
extra="allow",
|
|
82
|
+
)
|
|
83
|
+
success: Annotated[bool, Field(title="Success")]
|
|
84
|
+
count: Annotated[int, Field(title="Count")]
|
|
85
|
+
"""
|
|
86
|
+
Number of logs added
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class AgentLookupResponse(BaseModel):
|
|
91
|
+
model_config = ConfigDict(
|
|
92
|
+
extra="allow",
|
|
93
|
+
)
|
|
94
|
+
public_id: Annotated[str, Field(title="Public Id")]
|
|
95
|
+
name: Annotated[str, Field(title="Name")]
|
|
96
|
+
version: Annotated[str, Field(title="Version")]
|
|
97
|
+
image_uri: Annotated[str, Field(title="Image Uri")]
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class AgentResponse(BaseModel):
|
|
101
|
+
model_config = ConfigDict(
|
|
102
|
+
extra="allow",
|
|
103
|
+
)
|
|
104
|
+
public_id: Annotated[str, Field(title="Public Id")]
|
|
105
|
+
name: Annotated[str, Field(title="Name")]
|
|
106
|
+
version: Annotated[str, Field(title="Version")]
|
|
107
|
+
image_uri: Annotated[str, Field(title="Image Uri")]
|
|
108
|
+
config_schema: Annotated[dict[str, Any] | None, Field(title="Config Schema")] = None
|
|
109
|
+
secrets_schema: Annotated[dict[str, Any] | None, Field(title="Secrets Schema")] = None
|
|
110
|
+
template_variables: Annotated[dict[str, str] | None, Field(title="Template Variables")] = None
|
|
111
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
112
|
+
created_at: Annotated[AwareDatetime, Field(title="Created At")]
|
|
113
|
+
archived_at: Annotated[AwareDatetime | None, Field(title="Archived At")] = None
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class AgentSchemaResponse(BaseModel):
|
|
117
|
+
model_config = ConfigDict(
|
|
118
|
+
extra="allow",
|
|
119
|
+
)
|
|
120
|
+
name: Annotated[str, Field(title="Name")]
|
|
121
|
+
version: Annotated[str, Field(title="Version")]
|
|
122
|
+
config_schema: Annotated[dict[str, Any] | None, Field(title="Config Schema")] = None
|
|
123
|
+
secrets_schema: Annotated[dict[str, Any] | None, Field(title="Secrets Schema")] = None
|
|
124
|
+
template_variables: Annotated[dict[str, Any] | None, Field(title="Template Variables")] = None
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class AgentStatusRequest(BaseModel):
|
|
128
|
+
model_config = ConfigDict(
|
|
129
|
+
extra="allow",
|
|
130
|
+
)
|
|
131
|
+
session_id: Annotated[str, Field(title="Session Id")]
|
|
132
|
+
"""
|
|
133
|
+
Chronos session ID
|
|
134
|
+
"""
|
|
135
|
+
status: Annotated[str, Field(title="Status")]
|
|
136
|
+
"""
|
|
137
|
+
New status: running, completed, failed
|
|
138
|
+
"""
|
|
139
|
+
message: Annotated[str | None, Field(title="Message")] = None
|
|
140
|
+
"""
|
|
141
|
+
Status message
|
|
142
|
+
"""
|
|
143
|
+
extra: Annotated[dict[str, Any] | None, Field(title="Extra")] = None
|
|
144
|
+
"""
|
|
145
|
+
Additional data
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class AgentVersionInfo(BaseModel):
|
|
150
|
+
model_config = ConfigDict(
|
|
151
|
+
extra="allow",
|
|
152
|
+
)
|
|
153
|
+
version: Annotated[str, Field(title="Version")]
|
|
154
|
+
created_at: Annotated[str | None, Field(title="Created At")] = None
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class AgentVersionsResponse(BaseModel):
|
|
158
|
+
model_config = ConfigDict(
|
|
159
|
+
extra="allow",
|
|
160
|
+
)
|
|
161
|
+
name: Annotated[str, Field(title="Name")]
|
|
162
|
+
versions: Annotated[list[AgentVersionInfo], Field(title="Versions")]
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class ArtifactsUploadRequest(BaseModel):
|
|
166
|
+
model_config = ConfigDict(
|
|
167
|
+
extra="allow",
|
|
168
|
+
)
|
|
169
|
+
session_id: Annotated[str, Field(title="Session Id")]
|
|
170
|
+
"""
|
|
171
|
+
Chronos session ID
|
|
172
|
+
"""
|
|
173
|
+
trajectory: Annotated[dict[str, Any] | None, Field(title="Trajectory")] = None
|
|
174
|
+
"""
|
|
175
|
+
AITF trajectory JSON
|
|
176
|
+
"""
|
|
177
|
+
logs_base64: Annotated[str | None, Field(title="Logs Base64")] = None
|
|
178
|
+
"""
|
|
179
|
+
Base64 encoded zip file
|
|
180
|
+
"""
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
class ArtifactsUploadResponse(BaseModel):
|
|
184
|
+
model_config = ConfigDict(
|
|
185
|
+
extra="allow",
|
|
186
|
+
)
|
|
187
|
+
success: Annotated[bool, Field(title="Success")]
|
|
188
|
+
logs_url: Annotated[str | None, Field(title="Logs Url")] = None
|
|
189
|
+
"""
|
|
190
|
+
S3 URL of uploaded logs
|
|
191
|
+
"""
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
class AuthStatusResponse(BaseModel):
|
|
195
|
+
model_config = ConfigDict(
|
|
196
|
+
extra="allow",
|
|
197
|
+
)
|
|
198
|
+
authenticated: Annotated[bool, Field(title="Authenticated")]
|
|
199
|
+
user: Annotated[dict[str, Any] | None, Field(title="User")] = None
|
|
200
|
+
env: Annotated[str, Field(title="Env")]
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class EnvSecretCreate(BaseModel):
|
|
204
|
+
model_config = ConfigDict(
|
|
205
|
+
extra="allow",
|
|
206
|
+
)
|
|
207
|
+
name: Annotated[str, Field(title="Name")]
|
|
208
|
+
value: Annotated[str, Field(title="Value")]
|
|
209
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class EnvSecretResponse(BaseModel):
|
|
213
|
+
model_config = ConfigDict(
|
|
214
|
+
extra="allow",
|
|
215
|
+
)
|
|
216
|
+
id: Annotated[int, Field(title="Id")]
|
|
217
|
+
name: Annotated[str, Field(title="Name")]
|
|
218
|
+
value: Annotated[str, Field(title="Value")]
|
|
219
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
220
|
+
created_at: Annotated[AwareDatetime, Field(title="Created At")]
|
|
221
|
+
updated_at: Annotated[AwareDatetime, Field(title="Updated At")]
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
class EnvSecretUpdate(BaseModel):
|
|
225
|
+
model_config = ConfigDict(
|
|
226
|
+
extra="allow",
|
|
227
|
+
)
|
|
228
|
+
value: Annotated[str | None, Field(title="Value")] = None
|
|
229
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
class JobTemplateCreate(BaseModel):
|
|
233
|
+
model_config = ConfigDict(
|
|
234
|
+
extra="allow",
|
|
235
|
+
)
|
|
236
|
+
name: Annotated[str, Field(title="Name")]
|
|
237
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
238
|
+
world_id: Annotated[str, Field(title="World Id")]
|
|
239
|
+
world_config: Annotated[dict[str, Any] | None, Field(title="World Config")] = None
|
|
240
|
+
agent_configs: Annotated[dict[str, Any] | None, Field(title="Agent Configs")] = {}
|
|
241
|
+
secrets: Annotated[dict[str, str] | None, Field(title="Secrets")] = {}
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
class JobTemplateResponse(BaseModel):
|
|
245
|
+
model_config = ConfigDict(
|
|
246
|
+
extra="allow",
|
|
247
|
+
)
|
|
248
|
+
public_id: Annotated[str, Field(title="Public Id")]
|
|
249
|
+
name: Annotated[str, Field(title="Name")]
|
|
250
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
251
|
+
world_id: Annotated[str, Field(title="World Id")]
|
|
252
|
+
world_config: Annotated[dict[str, Any], Field(title="World Config")]
|
|
253
|
+
agent_configs: Annotated[dict[str, Any], Field(title="Agent Configs")]
|
|
254
|
+
secrets: Annotated[dict[str, str], Field(title="Secrets")]
|
|
255
|
+
created_at: Annotated[AwareDatetime, Field(title="Created At")]
|
|
256
|
+
updated_at: Annotated[AwareDatetime, Field(title="Updated At")]
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
class JobTemplateUpdate(BaseModel):
|
|
260
|
+
model_config = ConfigDict(
|
|
261
|
+
extra="allow",
|
|
262
|
+
)
|
|
263
|
+
name: Annotated[str | None, Field(title="Name")] = None
|
|
264
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
265
|
+
world_id: Annotated[str | None, Field(title="World Id")] = None
|
|
266
|
+
world_config: Annotated[dict[str, Any] | None, Field(title="World Config")] = None
|
|
267
|
+
agent_configs: Annotated[dict[str, Any] | None, Field(title="Agent Configs")] = None
|
|
268
|
+
secrets: Annotated[dict[str, str] | None, Field(title="Secrets")] = None
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
class LaunchJobRequest(BaseModel):
|
|
272
|
+
model_config = ConfigDict(
|
|
273
|
+
extra="allow",
|
|
274
|
+
)
|
|
275
|
+
world_package: Annotated[str, Field(title="World Package")]
|
|
276
|
+
"""
|
|
277
|
+
World package name
|
|
278
|
+
"""
|
|
279
|
+
world_version: Annotated[str | None, Field(title="World Version")] = None
|
|
280
|
+
"""
|
|
281
|
+
World version (latest if not specified)
|
|
282
|
+
"""
|
|
283
|
+
world_config: Annotated[dict[str, Any] | None, Field(title="World Config")] = None
|
|
284
|
+
"""
|
|
285
|
+
World configuration
|
|
286
|
+
"""
|
|
287
|
+
agent_configs: Annotated[dict[str, AgentConfig], Field(title="Agent Configs")]
|
|
288
|
+
"""
|
|
289
|
+
Agent configs keyed by slot name
|
|
290
|
+
"""
|
|
291
|
+
secret_ids: Annotated[list[int] | None, Field(title="Secret Ids")] = None
|
|
292
|
+
"""
|
|
293
|
+
IDs of secrets from env_secrets table
|
|
294
|
+
"""
|
|
295
|
+
runtime_artifact_id: Annotated[str | None, Field(title="Runtime Artifact Id")] = None
|
|
296
|
+
"""
|
|
297
|
+
Runtime artifact ID for cached environment
|
|
298
|
+
"""
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
class LaunchJobResponse(BaseModel):
|
|
302
|
+
model_config = ConfigDict(
|
|
303
|
+
extra="allow",
|
|
304
|
+
)
|
|
305
|
+
session_id: Annotated[str, Field(title="Session Id")]
|
|
306
|
+
"""
|
|
307
|
+
Chronos session public ID
|
|
308
|
+
"""
|
|
309
|
+
plato_session_id: Annotated[str, Field(title="Plato Session Id")]
|
|
310
|
+
"""
|
|
311
|
+
Plato session ID
|
|
312
|
+
"""
|
|
313
|
+
status: Annotated[str, Field(title="Status")]
|
|
314
|
+
"""
|
|
315
|
+
Job status
|
|
316
|
+
"""
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
class LogsDownloadResponse(BaseModel):
|
|
320
|
+
model_config = ConfigDict(
|
|
321
|
+
extra="allow",
|
|
322
|
+
)
|
|
323
|
+
download_url: Annotated[str | None, Field(title="Download Url")] = None
|
|
324
|
+
expires_in: Annotated[int | None, Field(title="Expires In")] = 3600
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
class LogsUploadRequest(BaseModel):
|
|
328
|
+
model_config = ConfigDict(
|
|
329
|
+
extra="allow",
|
|
330
|
+
)
|
|
331
|
+
session_id: Annotated[str, Field(title="Session Id")]
|
|
332
|
+
"""
|
|
333
|
+
Chronos session ID
|
|
334
|
+
"""
|
|
335
|
+
logs_base64: Annotated[str, Field(title="Logs Base64")]
|
|
336
|
+
"""
|
|
337
|
+
Base64 encoded zip file
|
|
338
|
+
"""
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
LogsUploadResponse = ArtifactsUploadResponse
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
class RuntimeCreate(BaseModel):
|
|
345
|
+
model_config = ConfigDict(
|
|
346
|
+
extra="allow",
|
|
347
|
+
)
|
|
348
|
+
name: Annotated[str, Field(title="Name")]
|
|
349
|
+
world_package: Annotated[str, Field(title="World Package")]
|
|
350
|
+
world_version: Annotated[str | None, Field(title="World Version")] = None
|
|
351
|
+
agent_images: Annotated[list[str] | None, Field(title="Agent Images")] = []
|
|
352
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
class RuntimeCreateResponse(BaseModel):
|
|
356
|
+
model_config = ConfigDict(
|
|
357
|
+
extra="allow",
|
|
358
|
+
)
|
|
359
|
+
session_id: Annotated[str, Field(title="Session Id")]
|
|
360
|
+
name: Annotated[str, Field(title="Name")]
|
|
361
|
+
world_package: Annotated[str, Field(title="World Package")]
|
|
362
|
+
world_version: Annotated[str | None, Field(title="World Version")] = None
|
|
363
|
+
agent_images: Annotated[list[str], Field(title="Agent Images")]
|
|
364
|
+
status: Annotated[str, Field(title="Status")]
|
|
365
|
+
message: Annotated[str, Field(title="Message")]
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
class RuntimeResponse(BaseModel):
|
|
369
|
+
model_config = ConfigDict(
|
|
370
|
+
extra="allow",
|
|
371
|
+
)
|
|
372
|
+
artifact_id: Annotated[str, Field(title="Artifact Id")]
|
|
373
|
+
name: Annotated[str, Field(title="Name")]
|
|
374
|
+
world_package: Annotated[str, Field(title="World Package")]
|
|
375
|
+
world_version: Annotated[str | None, Field(title="World Version")] = None
|
|
376
|
+
agent_images: Annotated[list[str], Field(title="Agent Images")]
|
|
377
|
+
status: Annotated[str, Field(title="Status")]
|
|
378
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
379
|
+
created_at: Annotated[AwareDatetime, Field(title="Created At")]
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
class ServiceStatuses(BaseModel):
|
|
383
|
+
model_config = ConfigDict(
|
|
384
|
+
extra="allow",
|
|
385
|
+
)
|
|
386
|
+
database: Annotated[str, Field(title="Database")]
|
|
387
|
+
registry: Annotated[str, Field(title="Registry")]
|
|
388
|
+
plato: Annotated[str, Field(title="Plato")]
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
class StatusResponse(BaseModel):
|
|
392
|
+
model_config = ConfigDict(
|
|
393
|
+
extra="allow",
|
|
394
|
+
)
|
|
395
|
+
status: Annotated[str, Field(title="Status")]
|
|
396
|
+
services: ServiceStatuses
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
class TrajectoryResponse(BaseModel):
|
|
400
|
+
model_config = ConfigDict(
|
|
401
|
+
extra="allow",
|
|
402
|
+
)
|
|
403
|
+
public_id: Annotated[str, Field(title="Public Id")]
|
|
404
|
+
session_id: Annotated[int, Field(title="Session Id")]
|
|
405
|
+
agent_id: Annotated[int | None, Field(title="Agent Id")] = None
|
|
406
|
+
log_type: Annotated[str, Field(title="Log Type")]
|
|
407
|
+
content: Annotated[str, Field(title="Content")]
|
|
408
|
+
extra: Annotated[dict[str, Any] | None, Field(title="Extra")] = None
|
|
409
|
+
created_at: Annotated[AwareDatetime, Field(title="Created At")]
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
class TrajectoryUploadRequest(BaseModel):
|
|
413
|
+
model_config = ConfigDict(
|
|
414
|
+
extra="allow",
|
|
415
|
+
)
|
|
416
|
+
session_id: Annotated[str, Field(title="Session Id")]
|
|
417
|
+
"""
|
|
418
|
+
Chronos session ID
|
|
419
|
+
"""
|
|
420
|
+
trajectory: Annotated[dict[str, Any], Field(title="Trajectory")]
|
|
421
|
+
"""
|
|
422
|
+
AITF trajectory JSON
|
|
423
|
+
"""
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
class TrajectoryUploadResponse(BaseModel):
|
|
427
|
+
model_config = ConfigDict(
|
|
428
|
+
extra="allow",
|
|
429
|
+
)
|
|
430
|
+
success: Annotated[bool, Field(title="Success")]
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
class ValidationError(BaseModel):
|
|
434
|
+
model_config = ConfigDict(
|
|
435
|
+
extra="allow",
|
|
436
|
+
)
|
|
437
|
+
loc: Annotated[list[str | int], Field(title="Location")]
|
|
438
|
+
msg: Annotated[str, Field(title="Message")]
|
|
439
|
+
type: Annotated[str, Field(title="Error Type")]
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
class VersionResponse(BaseModel):
|
|
443
|
+
model_config = ConfigDict(
|
|
444
|
+
extra="allow",
|
|
445
|
+
)
|
|
446
|
+
version: Annotated[str, Field(title="Version")]
|
|
447
|
+
sha: Annotated[str, Field(title="Sha")]
|
|
448
|
+
deployment: Annotated[str | None, Field(title="Deployment")] = None
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
class WorldCreate(BaseModel):
|
|
452
|
+
model_config = ConfigDict(
|
|
453
|
+
extra="allow",
|
|
454
|
+
)
|
|
455
|
+
name: Annotated[str, Field(title="Name")]
|
|
456
|
+
package_name: Annotated[str, Field(title="Package Name")]
|
|
457
|
+
version: Annotated[str | None, Field(title="Version")] = None
|
|
458
|
+
config_schema: Annotated[dict[str, Any] | None, Field(title="Config Schema")] = None
|
|
459
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
class WorldInfo(BaseModel):
|
|
463
|
+
model_config = ConfigDict(
|
|
464
|
+
extra="allow",
|
|
465
|
+
)
|
|
466
|
+
name: Annotated[str, Field(title="Name")]
|
|
467
|
+
package_name: Annotated[str, Field(title="Package Name")]
|
|
468
|
+
version: Annotated[str | None, Field(title="Version")] = None
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
class WorldResponse(BaseModel):
|
|
472
|
+
model_config = ConfigDict(
|
|
473
|
+
extra="allow",
|
|
474
|
+
)
|
|
475
|
+
public_id: Annotated[str, Field(title="Public Id")]
|
|
476
|
+
name: Annotated[str, Field(title="Name")]
|
|
477
|
+
package_name: Annotated[str, Field(title="Package Name")]
|
|
478
|
+
version: Annotated[str | None, Field(title="Version")] = None
|
|
479
|
+
config_schema: Annotated[dict[str, Any] | None, Field(title="Config Schema")] = None
|
|
480
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
481
|
+
created_at: Annotated[AwareDatetime, Field(title="Created At")]
|
|
482
|
+
archived_at: Annotated[AwareDatetime | None, Field(title="Archived At")] = None
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
class WorldSchemaResponse(BaseModel):
|
|
486
|
+
model_config = ConfigDict(
|
|
487
|
+
extra="allow",
|
|
488
|
+
)
|
|
489
|
+
name: Annotated[str | None, Field(title="Name")] = None
|
|
490
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
491
|
+
version: Annotated[str | None, Field(title="Version")] = None
|
|
492
|
+
config_schema: Annotated[dict[str, Any] | None, Field(title="Config Schema")] = None
|
|
493
|
+
secrets_schema: Annotated[dict[str, Any] | None, Field(title="Secrets Schema")] = None
|
|
494
|
+
agent_slots: Annotated[list[dict[str, Any]] | None, Field(title="Agent Slots")] = None
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
class WorldVersionsResponse(BaseModel):
|
|
498
|
+
model_config = ConfigDict(
|
|
499
|
+
extra="allow",
|
|
500
|
+
)
|
|
501
|
+
package: Annotated[str, Field(title="Package")]
|
|
502
|
+
versions: Annotated[list[str], Field(title="Versions")]
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
class ChronosApiRegistryAgentInfo(BaseModel):
|
|
506
|
+
model_config = ConfigDict(
|
|
507
|
+
extra="allow",
|
|
508
|
+
)
|
|
509
|
+
name: Annotated[str, Field(title="Name")]
|
|
510
|
+
version: Annotated[str, Field(title="Version")]
|
|
511
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
512
|
+
image_uri: Annotated[str, Field(title="Image Uri")]
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
class ChronosApiRegistryAgentListResponse(BaseModel):
|
|
516
|
+
model_config = ConfigDict(
|
|
517
|
+
extra="allow",
|
|
518
|
+
)
|
|
519
|
+
agents: Annotated[list[ChronosApiRegistryAgentInfo], Field(title="Agents")]
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
class ChronosApiRegistryWorldInfo(BaseModel):
|
|
523
|
+
model_config = ConfigDict(
|
|
524
|
+
extra="allow",
|
|
525
|
+
)
|
|
526
|
+
name: Annotated[str, Field(title="Name")]
|
|
527
|
+
package: Annotated[str, Field(title="Package")]
|
|
528
|
+
description: Annotated[str | None, Field(title="Description")] = None
|
|
529
|
+
versions: Annotated[list[str] | None, Field(title="Versions")] = []
|
|
530
|
+
latest_version: Annotated[str | None, Field(title="Latest Version")] = None
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
class ChronosModelsAgentAgentSchemaResponse(BaseModel):
|
|
534
|
+
model_config = ConfigDict(
|
|
535
|
+
extra="allow",
|
|
536
|
+
)
|
|
537
|
+
name: Annotated[str, Field(title="Name")]
|
|
538
|
+
version: Annotated[str, Field(title="Version")]
|
|
539
|
+
config_schema: Annotated[dict[str, Any] | None, Field(title="Config Schema")] = None
|
|
540
|
+
secrets_schema: Annotated[dict[str, Any] | None, Field(title="Secrets Schema")] = None
|
|
541
|
+
template_variables: Annotated[dict[str, str] | None, Field(title="Template Variables")] = None
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
class ChronosModelsAgentAgentVersionInfo(BaseModel):
|
|
545
|
+
model_config = ConfigDict(
|
|
546
|
+
extra="allow",
|
|
547
|
+
)
|
|
548
|
+
version: Annotated[str, Field(title="Version")]
|
|
549
|
+
created_at: Annotated[AwareDatetime, Field(title="Created At")]
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
class ChronosModelsAgentAgentVersionsResponse(BaseModel):
|
|
553
|
+
model_config = ConfigDict(
|
|
554
|
+
extra="allow",
|
|
555
|
+
)
|
|
556
|
+
name: Annotated[str, Field(title="Name")]
|
|
557
|
+
versions: Annotated[list[ChronosModelsAgentAgentVersionInfo], Field(title="Versions")]
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
class AgentListResponse(BaseModel):
|
|
561
|
+
model_config = ConfigDict(
|
|
562
|
+
extra="allow",
|
|
563
|
+
)
|
|
564
|
+
agents: Annotated[list[AgentResponse], Field(title="Agents")]
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
class EnvSecretListResponse(BaseModel):
|
|
568
|
+
model_config = ConfigDict(
|
|
569
|
+
extra="allow",
|
|
570
|
+
)
|
|
571
|
+
secrets: Annotated[list[EnvSecretResponse], Field(title="Secrets")]
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
class HTTPValidationError(BaseModel):
|
|
575
|
+
model_config = ConfigDict(
|
|
576
|
+
extra="allow",
|
|
577
|
+
)
|
|
578
|
+
detail: Annotated[list[ValidationError] | None, Field(title="Detail")] = None
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
class JobTemplateListResponse(BaseModel):
|
|
582
|
+
model_config = ConfigDict(
|
|
583
|
+
extra="allow",
|
|
584
|
+
)
|
|
585
|
+
templates: Annotated[list[JobTemplateResponse], Field(title="Templates")]
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
class RuntimeListResponse(BaseModel):
|
|
589
|
+
model_config = ConfigDict(
|
|
590
|
+
extra="allow",
|
|
591
|
+
)
|
|
592
|
+
runtimes: Annotated[list[RuntimeResponse], Field(title="Runtimes")]
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
class SessionLogsResponse(BaseModel):
|
|
596
|
+
model_config = ConfigDict(
|
|
597
|
+
extra="allow",
|
|
598
|
+
)
|
|
599
|
+
logs: Annotated[list[TrajectoryResponse], Field(title="Logs")]
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
class SessionResponse(BaseModel):
|
|
603
|
+
model_config = ConfigDict(
|
|
604
|
+
extra="allow",
|
|
605
|
+
)
|
|
606
|
+
public_id: Annotated[str, Field(title="Public Id")]
|
|
607
|
+
plato_session_id: Annotated[str | None, Field(title="Plato Session Id")] = None
|
|
608
|
+
status: Annotated[str, Field(title="Status")]
|
|
609
|
+
started_at: Annotated[AwareDatetime | None, Field(title="Started At")] = None
|
|
610
|
+
ended_at: Annotated[AwareDatetime | None, Field(title="Ended At")] = None
|
|
611
|
+
created_at: Annotated[AwareDatetime, Field(title="Created At")]
|
|
612
|
+
world: WorldInfo | None = None
|
|
613
|
+
world_config: Annotated[dict[str, Any] | None, Field(title="World Config")] = {}
|
|
614
|
+
agents: Annotated[list[AgentInfo] | None, Field(title="Agents")] = []
|
|
615
|
+
agent_configs: Annotated[dict[str, Any] | None, Field(title="Agent Configs")] = {}
|
|
616
|
+
secret_ids: Annotated[list[int] | None, Field(title="Secret Ids")] = []
|
|
617
|
+
trajectory: Annotated[dict[str, Any] | None, Field(title="Trajectory")] = None
|
|
618
|
+
logs_url: Annotated[str | None, Field(title="Logs Url")] = None
|
|
619
|
+
runtime_artifact_id: Annotated[str | None, Field(title="Runtime Artifact Id")] = None
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
class TrajectoryListResponse(BaseModel):
|
|
623
|
+
model_config = ConfigDict(
|
|
624
|
+
extra="allow",
|
|
625
|
+
)
|
|
626
|
+
trajectories: Annotated[list[TrajectoryResponse], Field(title="Trajectories")]
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
class WorldCatalogResponse(BaseModel):
|
|
630
|
+
model_config = ConfigDict(
|
|
631
|
+
extra="allow",
|
|
632
|
+
)
|
|
633
|
+
worlds: Annotated[list[ChronosApiRegistryWorldInfo], Field(title="Worlds")]
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
class WorldListResponse(BaseModel):
|
|
637
|
+
model_config = ConfigDict(
|
|
638
|
+
extra="allow",
|
|
639
|
+
)
|
|
640
|
+
worlds: Annotated[list[WorldResponse], Field(title="Worlds")]
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
class SessionListResponse(BaseModel):
|
|
644
|
+
model_config = ConfigDict(
|
|
645
|
+
extra="allow",
|
|
646
|
+
)
|
|
647
|
+
sessions: Annotated[list[SessionResponse], Field(title="Sessions")]
|
plato/chronos/py.typed
ADDED
|
File without changes
|