runloop_api_client 0.61.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 (187) hide show
  1. runloop_api_client/__init__.py +92 -0
  2. runloop_api_client/_base_client.py +1995 -0
  3. runloop_api_client/_client.py +668 -0
  4. runloop_api_client/_compat.py +219 -0
  5. runloop_api_client/_constants.py +14 -0
  6. runloop_api_client/_exceptions.py +108 -0
  7. runloop_api_client/_files.py +123 -0
  8. runloop_api_client/_models.py +835 -0
  9. runloop_api_client/_qs.py +150 -0
  10. runloop_api_client/_resource.py +43 -0
  11. runloop_api_client/_response.py +832 -0
  12. runloop_api_client/_streaming.py +520 -0
  13. runloop_api_client/_types.py +260 -0
  14. runloop_api_client/_utils/__init__.py +64 -0
  15. runloop_api_client/_utils/_compat.py +45 -0
  16. runloop_api_client/_utils/_datetime_parse.py +136 -0
  17. runloop_api_client/_utils/_logs.py +25 -0
  18. runloop_api_client/_utils/_proxy.py +65 -0
  19. runloop_api_client/_utils/_reflection.py +42 -0
  20. runloop_api_client/_utils/_resources_proxy.py +24 -0
  21. runloop_api_client/_utils/_streams.py +12 -0
  22. runloop_api_client/_utils/_sync.py +86 -0
  23. runloop_api_client/_utils/_transform.py +457 -0
  24. runloop_api_client/_utils/_typing.py +156 -0
  25. runloop_api_client/_utils/_utils.py +421 -0
  26. runloop_api_client/_version.py +4 -0
  27. runloop_api_client/lib/.keep +4 -0
  28. runloop_api_client/lib/polling.py +75 -0
  29. runloop_api_client/lib/polling_async.py +60 -0
  30. runloop_api_client/pagination.py +761 -0
  31. runloop_api_client/py.typed +0 -0
  32. runloop_api_client/resources/__init__.py +103 -0
  33. runloop_api_client/resources/benchmarks/__init__.py +33 -0
  34. runloop_api_client/resources/benchmarks/benchmarks.py +982 -0
  35. runloop_api_client/resources/benchmarks/runs.py +587 -0
  36. runloop_api_client/resources/blueprints.py +1206 -0
  37. runloop_api_client/resources/devboxes/__init__.py +89 -0
  38. runloop_api_client/resources/devboxes/browsers.py +267 -0
  39. runloop_api_client/resources/devboxes/computers.py +648 -0
  40. runloop_api_client/resources/devboxes/devboxes.py +3414 -0
  41. runloop_api_client/resources/devboxes/disk_snapshots.py +519 -0
  42. runloop_api_client/resources/devboxes/executions.py +1059 -0
  43. runloop_api_client/resources/devboxes/logs.py +197 -0
  44. runloop_api_client/resources/objects.py +860 -0
  45. runloop_api_client/resources/repositories.py +717 -0
  46. runloop_api_client/resources/scenarios/__init__.py +47 -0
  47. runloop_api_client/resources/scenarios/runs.py +949 -0
  48. runloop_api_client/resources/scenarios/scenarios.py +1079 -0
  49. runloop_api_client/resources/scenarios/scorers.py +629 -0
  50. runloop_api_client/resources/secrets.py +500 -0
  51. runloop_api_client/types/__init__.py +95 -0
  52. runloop_api_client/types/benchmark_create_params.py +40 -0
  53. runloop_api_client/types/benchmark_definitions_params.py +15 -0
  54. runloop_api_client/types/benchmark_list_params.py +15 -0
  55. runloop_api_client/types/benchmark_list_public_params.py +15 -0
  56. runloop_api_client/types/benchmark_run_list_view.py +19 -0
  57. runloop_api_client/types/benchmark_run_view.py +51 -0
  58. runloop_api_client/types/benchmark_start_run_params.py +25 -0
  59. runloop_api_client/types/benchmark_update_params.py +40 -0
  60. runloop_api_client/types/benchmark_view.py +45 -0
  61. runloop_api_client/types/benchmarks/__init__.py +6 -0
  62. runloop_api_client/types/benchmarks/run_list_params.py +18 -0
  63. runloop_api_client/types/benchmarks/run_list_scenario_runs_params.py +18 -0
  64. runloop_api_client/types/blueprint_build_log.py +16 -0
  65. runloop_api_client/types/blueprint_build_logs_list_view.py +16 -0
  66. runloop_api_client/types/blueprint_build_parameters.py +87 -0
  67. runloop_api_client/types/blueprint_create_params.py +90 -0
  68. runloop_api_client/types/blueprint_list_params.py +18 -0
  69. runloop_api_client/types/blueprint_list_public_params.py +18 -0
  70. runloop_api_client/types/blueprint_list_view.py +19 -0
  71. runloop_api_client/types/blueprint_preview_params.py +90 -0
  72. runloop_api_client/types/blueprint_preview_view.py +10 -0
  73. runloop_api_client/types/blueprint_view.py +86 -0
  74. runloop_api_client/types/devbox_async_execution_detail_view.py +40 -0
  75. runloop_api_client/types/devbox_create_params.py +70 -0
  76. runloop_api_client/types/devbox_create_ssh_key_response.py +16 -0
  77. runloop_api_client/types/devbox_create_tunnel_params.py +12 -0
  78. runloop_api_client/types/devbox_download_file_params.py +15 -0
  79. runloop_api_client/types/devbox_execute_async_params.py +25 -0
  80. runloop_api_client/types/devbox_execute_params.py +34 -0
  81. runloop_api_client/types/devbox_execute_sync_params.py +25 -0
  82. runloop_api_client/types/devbox_execution_detail_view.py +24 -0
  83. runloop_api_client/types/devbox_list_disk_snapshots_params.py +29 -0
  84. runloop_api_client/types/devbox_list_params.py +20 -0
  85. runloop_api_client/types/devbox_list_view.py +19 -0
  86. runloop_api_client/types/devbox_read_file_contents_params.py +15 -0
  87. runloop_api_client/types/devbox_read_file_contents_response.py +7 -0
  88. runloop_api_client/types/devbox_remove_tunnel_params.py +12 -0
  89. runloop_api_client/types/devbox_snapshot_disk_async_params.py +16 -0
  90. runloop_api_client/types/devbox_snapshot_disk_params.py +16 -0
  91. runloop_api_client/types/devbox_snapshot_list_view.py +19 -0
  92. runloop_api_client/types/devbox_snapshot_view.py +24 -0
  93. runloop_api_client/types/devbox_tunnel_view.py +16 -0
  94. runloop_api_client/types/devbox_update_params.py +16 -0
  95. runloop_api_client/types/devbox_upload_file_params.py +19 -0
  96. runloop_api_client/types/devbox_view.py +94 -0
  97. runloop_api_client/types/devbox_wait_for_command_params.py +25 -0
  98. runloop_api_client/types/devbox_write_file_contents_params.py +18 -0
  99. runloop_api_client/types/devboxes/__init__.py +32 -0
  100. runloop_api_client/types/devboxes/browser_create_params.py +13 -0
  101. runloop_api_client/types/devboxes/browser_view.py +25 -0
  102. runloop_api_client/types/devboxes/computer_create_params.py +24 -0
  103. runloop_api_client/types/devboxes/computer_keyboard_interaction_params.py +16 -0
  104. runloop_api_client/types/devboxes/computer_keyboard_interaction_response.py +15 -0
  105. runloop_api_client/types/devboxes/computer_mouse_interaction_params.py +30 -0
  106. runloop_api_client/types/devboxes/computer_mouse_interaction_response.py +15 -0
  107. runloop_api_client/types/devboxes/computer_screen_interaction_params.py +12 -0
  108. runloop_api_client/types/devboxes/computer_screen_interaction_response.py +15 -0
  109. runloop_api_client/types/devboxes/computer_view.py +19 -0
  110. runloop_api_client/types/devboxes/devbox_logs_list_view.py +39 -0
  111. runloop_api_client/types/devboxes/devbox_snapshot_async_status_view.py +20 -0
  112. runloop_api_client/types/devboxes/disk_snapshot_list_params.py +29 -0
  113. runloop_api_client/types/devboxes/disk_snapshot_update_params.py +16 -0
  114. runloop_api_client/types/devboxes/execution_execute_async_params.py +25 -0
  115. runloop_api_client/types/devboxes/execution_execute_sync_params.py +25 -0
  116. runloop_api_client/types/devboxes/execution_kill_params.py +18 -0
  117. runloop_api_client/types/devboxes/execution_retrieve_params.py +14 -0
  118. runloop_api_client/types/devboxes/execution_stream_stderr_updates_params.py +14 -0
  119. runloop_api_client/types/devboxes/execution_stream_stdout_updates_params.py +14 -0
  120. runloop_api_client/types/devboxes/execution_update_chunk.py +15 -0
  121. runloop_api_client/types/devboxes/log_list_params.py +15 -0
  122. runloop_api_client/types/input_context.py +15 -0
  123. runloop_api_client/types/input_context_param.py +16 -0
  124. runloop_api_client/types/input_context_update_param.py +16 -0
  125. runloop_api_client/types/object_create_params.py +19 -0
  126. runloop_api_client/types/object_download_params.py +12 -0
  127. runloop_api_client/types/object_download_url_view.py +10 -0
  128. runloop_api_client/types/object_list_params.py +27 -0
  129. runloop_api_client/types/object_list_public_params.py +27 -0
  130. runloop_api_client/types/object_list_view.py +22 -0
  131. runloop_api_client/types/object_view.py +28 -0
  132. runloop_api_client/types/repository_connection_list_view.py +19 -0
  133. runloop_api_client/types/repository_connection_view.py +16 -0
  134. runloop_api_client/types/repository_create_params.py +22 -0
  135. runloop_api_client/types/repository_inspection_details.py +77 -0
  136. runloop_api_client/types/repository_inspection_list_view.py +13 -0
  137. runloop_api_client/types/repository_list_params.py +21 -0
  138. runloop_api_client/types/repository_manifest_view.py +158 -0
  139. runloop_api_client/types/repository_refresh_params.py +16 -0
  140. runloop_api_client/types/scenario_create_params.py +53 -0
  141. runloop_api_client/types/scenario_definition_list_view.py +19 -0
  142. runloop_api_client/types/scenario_environment.py +25 -0
  143. runloop_api_client/types/scenario_environment_param.py +27 -0
  144. runloop_api_client/types/scenario_list_params.py +21 -0
  145. runloop_api_client/types/scenario_list_public_params.py +18 -0
  146. runloop_api_client/types/scenario_run_list_view.py +19 -0
  147. runloop_api_client/types/scenario_run_view.py +50 -0
  148. runloop_api_client/types/scenario_start_run_params.py +28 -0
  149. runloop_api_client/types/scenario_update_params.py +46 -0
  150. runloop_api_client/types/scenario_view.py +57 -0
  151. runloop_api_client/types/scenarios/__init__.py +14 -0
  152. runloop_api_client/types/scenarios/run_list_params.py +18 -0
  153. runloop_api_client/types/scenarios/scorer_create_params.py +18 -0
  154. runloop_api_client/types/scenarios/scorer_create_response.py +16 -0
  155. runloop_api_client/types/scenarios/scorer_list_params.py +15 -0
  156. runloop_api_client/types/scenarios/scorer_list_response.py +16 -0
  157. runloop_api_client/types/scenarios/scorer_retrieve_response.py +16 -0
  158. runloop_api_client/types/scenarios/scorer_update_params.py +18 -0
  159. runloop_api_client/types/scenarios/scorer_update_response.py +16 -0
  160. runloop_api_client/types/scenarios/scorer_validate_params.py +17 -0
  161. runloop_api_client/types/scenarios/scorer_validate_response.py +23 -0
  162. runloop_api_client/types/scoring_contract.py +13 -0
  163. runloop_api_client/types/scoring_contract_param.py +15 -0
  164. runloop_api_client/types/scoring_contract_result_view.py +16 -0
  165. runloop_api_client/types/scoring_contract_update_param.py +15 -0
  166. runloop_api_client/types/scoring_function.py +135 -0
  167. runloop_api_client/types/scoring_function_param.py +131 -0
  168. runloop_api_client/types/scoring_function_result_view.py +21 -0
  169. runloop_api_client/types/secret_create_params.py +23 -0
  170. runloop_api_client/types/secret_list_params.py +12 -0
  171. runloop_api_client/types/secret_list_view.py +22 -0
  172. runloop_api_client/types/secret_update_params.py +16 -0
  173. runloop_api_client/types/secret_view.py +22 -0
  174. runloop_api_client/types/shared/__init__.py +6 -0
  175. runloop_api_client/types/shared/after_idle.py +15 -0
  176. runloop_api_client/types/shared/code_mount_parameters.py +24 -0
  177. runloop_api_client/types/shared/launch_parameters.py +79 -0
  178. runloop_api_client/types/shared/run_profile.py +33 -0
  179. runloop_api_client/types/shared_params/__init__.py +6 -0
  180. runloop_api_client/types/shared_params/after_idle.py +15 -0
  181. runloop_api_client/types/shared_params/code_mount_parameters.py +25 -0
  182. runloop_api_client/types/shared_params/launch_parameters.py +81 -0
  183. runloop_api_client/types/shared_params/run_profile.py +34 -0
  184. runloop_api_client-0.61.0.dist-info/METADATA +496 -0
  185. runloop_api_client-0.61.0.dist-info/RECORD +187 -0
  186. runloop_api_client-0.61.0.dist-info/WHEEL +4 -0
  187. runloop_api_client-0.61.0.dist-info/licenses/LICENSE +7 -0
@@ -0,0 +1,16 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+ from typing_extensions import TypedDict
7
+
8
+ __all__ = ["InputContextUpdateParam"]
9
+
10
+
11
+ class InputContextUpdateParam(TypedDict, total=False):
12
+ additional_context: Optional[object]
13
+ """Additional JSON structured input context."""
14
+
15
+ problem_statement: Optional[str]
16
+ """The problem statement for the Scenario."""
@@ -0,0 +1,19 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Dict, Optional
6
+ from typing_extensions import Literal, Required, TypedDict
7
+
8
+ __all__ = ["ObjectCreateParams"]
9
+
10
+
11
+ class ObjectCreateParams(TypedDict, total=False):
12
+ content_type: Required[Literal["unspecified", "text", "binary", "gzip", "tar", "tgz"]]
13
+ """The content type of the Object."""
14
+
15
+ name: Required[str]
16
+ """The name of the Object."""
17
+
18
+ metadata: Optional[Dict[str, str]]
19
+ """User defined metadata to attach to the object for organization."""
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["ObjectDownloadParams"]
8
+
9
+
10
+ class ObjectDownloadParams(TypedDict, total=False):
11
+ duration_seconds: int
12
+ """Duration in seconds for the presigned URL validity (default: 3600)."""
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+
5
+ __all__ = ["ObjectDownloadURLView"]
6
+
7
+
8
+ class ObjectDownloadURLView(BaseModel):
9
+ download_url: str
10
+ """The presigned download URL for the Object."""
@@ -0,0 +1,27 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["ObjectListParams"]
8
+
9
+
10
+ class ObjectListParams(TypedDict, total=False):
11
+ content_type: str
12
+ """Filter objects by content type."""
13
+
14
+ limit: int
15
+ """The limit of items to return. Default is 20."""
16
+
17
+ name: str
18
+ """Filter objects by name (partial match supported)."""
19
+
20
+ search: str
21
+ """Search by object ID or name."""
22
+
23
+ starting_after: str
24
+ """Load the next page of data starting after the item with the given ID."""
25
+
26
+ state: str
27
+ """Filter objects by state (UPLOADING, READ_ONLY, DELETED)."""
@@ -0,0 +1,27 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["ObjectListPublicParams"]
8
+
9
+
10
+ class ObjectListPublicParams(TypedDict, total=False):
11
+ content_type: str
12
+ """Filter objects by content type."""
13
+
14
+ limit: int
15
+ """The limit of items to return. Default is 20."""
16
+
17
+ name: str
18
+ """Filter objects by name (partial match supported)."""
19
+
20
+ search: str
21
+ """Search by object ID or name."""
22
+
23
+ starting_after: str
24
+ """Load the next page of data starting after the item with the given ID."""
25
+
26
+ state: str
27
+ """Filter objects by state (UPLOADING, READ_ONLY, DELETED)."""
@@ -0,0 +1,22 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+
5
+ from .._models import BaseModel
6
+ from .object_view import ObjectView
7
+
8
+ __all__ = ["ObjectListView"]
9
+
10
+
11
+ class ObjectListView(BaseModel):
12
+ has_more: bool
13
+ """True if there are more results available beyond this page."""
14
+
15
+ objects: List[ObjectView]
16
+ """List of Object entities."""
17
+
18
+ remaining_count: int
19
+ """Number of Objects remaining after this page."""
20
+
21
+ total_count: int
22
+ """Total number of Objects across all pages."""
@@ -0,0 +1,28 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["ObjectView"]
9
+
10
+
11
+ class ObjectView(BaseModel):
12
+ id: str
13
+ """The unique identifier of the Object."""
14
+
15
+ content_type: Literal["unspecified", "text", "binary", "gzip", "tar", "tgz"]
16
+ """The content type of the Object."""
17
+
18
+ name: str
19
+ """The name of the Object."""
20
+
21
+ state: str
22
+ """The current state of the Object."""
23
+
24
+ size_bytes: Optional[int] = None
25
+ """The size of the Object content in bytes (null until uploaded)."""
26
+
27
+ upload_url: Optional[str] = None
28
+ """Presigned URL for uploading content to S3 (only present on create)."""
@@ -0,0 +1,19 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+
5
+ from .._models import BaseModel
6
+ from .repository_connection_view import RepositoryConnectionView
7
+
8
+ __all__ = ["RepositoryConnectionListView"]
9
+
10
+
11
+ class RepositoryConnectionListView(BaseModel):
12
+ has_more: bool
13
+
14
+ remaining_count: int
15
+
16
+ repositories: List[RepositoryConnectionView]
17
+ """List of repositories matching filter."""
18
+
19
+ total_count: int
@@ -0,0 +1,16 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+
5
+ __all__ = ["RepositoryConnectionView"]
6
+
7
+
8
+ class RepositoryConnectionView(BaseModel):
9
+ id: str
10
+ """The ID of the Repository."""
11
+
12
+ name: str
13
+ """The name of the Repository."""
14
+
15
+ owner: str
16
+ """The account owner of the Repository."""
@@ -0,0 +1,22 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ __all__ = ["RepositoryCreateParams"]
9
+
10
+
11
+ class RepositoryCreateParams(TypedDict, total=False):
12
+ name: Required[str]
13
+ """Name of the repository."""
14
+
15
+ owner: Required[str]
16
+ """Account owner of the repository."""
17
+
18
+ blueprint_id: Optional[str]
19
+ """ID of blueprint to use as base for resulting RepositoryVersion blueprint."""
20
+
21
+ github_auth_token: Optional[str]
22
+ """GitHub authentication token for accessing private repositories."""
@@ -0,0 +1,77 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+ from .repository_manifest_view import RepositoryManifestView
8
+
9
+ __all__ = ["RepositoryInspectionDetails", "WorkflowContexts", "WorkflowContextsActionsContext"]
10
+
11
+
12
+ class WorkflowContextsActionsContext(BaseModel):
13
+ actions_skipped_unnecessary: List[str]
14
+ """
15
+ Actions that were skipped because they were unnecessary (e.g., upload
16
+ artifacts).
17
+ """
18
+
19
+ actions_taken: List[str]
20
+ """Actions that were translated into commands and executed."""
21
+
22
+ actions_unknown: List[str]
23
+ """
24
+ Actions that were not understood and skipped because we did not know what to do.
25
+ """
26
+
27
+
28
+ class WorkflowContexts(BaseModel):
29
+ actions_context: WorkflowContextsActionsContext
30
+ """Details about actions processing for this workflow."""
31
+
32
+ file_name: str
33
+ """The file name of the workflow."""
34
+
35
+
36
+ class RepositoryInspectionDetails(BaseModel):
37
+ id: str
38
+ """The ID of the inspection."""
39
+
40
+ commit_sha: str
41
+ """The sha of the inspected version of the Repository."""
42
+
43
+ inspected_at: int
44
+ """Inspection time of the Repository Version (Unix timestamp milliseconds)."""
45
+
46
+ repository_manifest: RepositoryManifestView
47
+ """Repository manifest containing container config and workspace details."""
48
+
49
+ status: Literal[
50
+ "invalid",
51
+ "repo_auth_pending",
52
+ "repo_authentication_failure",
53
+ "repo_access_failure",
54
+ "inspection_pending",
55
+ "inspection_failed",
56
+ "inspection_success",
57
+ "inspection_user_manifest_added",
58
+ ]
59
+ """The status of the repository inspection."""
60
+
61
+ blueprint_id: Optional[str] = None
62
+ """The blueprint ID associated with this inspection if successful."""
63
+
64
+ blueprint_name: Optional[str] = None
65
+ """The blueprint name associated with this inspection if successful."""
66
+
67
+ build_status: Optional[Literal["image_building", "image_build_success", "image_build_failure"]] = None
68
+ """The status of the linked Blueprint build."""
69
+
70
+ user_manifest: Optional[RepositoryManifestView] = None
71
+ """
72
+ User uploaded repository manifest containing container config and workspace
73
+ details.
74
+ """
75
+
76
+ workflow_contexts: Optional[Dict[str, WorkflowContexts]] = None
77
+ """Workflow contexts mapping workflow names to their processing details."""
@@ -0,0 +1,13 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+
5
+ from .._models import BaseModel
6
+ from .repository_inspection_details import RepositoryInspectionDetails
7
+
8
+ __all__ = ["RepositoryInspectionListView"]
9
+
10
+
11
+ class RepositoryInspectionListView(BaseModel):
12
+ inspections: List[RepositoryInspectionDetails]
13
+ """List of inspections for this repository."""
@@ -0,0 +1,21 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["RepositoryListParams"]
8
+
9
+
10
+ class RepositoryListParams(TypedDict, total=False):
11
+ limit: int
12
+ """The limit of items to return. Default is 20."""
13
+
14
+ name: str
15
+ """Filter by repository name"""
16
+
17
+ owner: str
18
+ """Filter by repository owner"""
19
+
20
+ starting_after: str
21
+ """Load the next page of data starting after the item with the given ID."""
@@ -0,0 +1,158 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = [
9
+ "RepositoryManifestView",
10
+ "ContainerConfig",
11
+ "Language",
12
+ "Workspace",
13
+ "WorkspaceDevCommands",
14
+ "ContainerizedService",
15
+ "ContainerizedServiceCredentials",
16
+ ]
17
+
18
+
19
+ class ContainerConfig(BaseModel):
20
+ base_image_name: str
21
+ """The name of the base image.
22
+
23
+ Should be one of the GitHub public images like ubuntu-latest, ubuntu-24.04,
24
+ ubuntu-22.04, windows-latest, windows-2022, macos-latest etc.
25
+ """
26
+
27
+ architecture: Optional[Literal["x86_64", "arm64"]] = None
28
+ """The target architecture for the Repository Container."""
29
+
30
+ setup_commands: Optional[List[str]] = None
31
+ """
32
+ Commands to run to setup the base container such as installing necessary
33
+ toolchains (e.g. apt install).
34
+ """
35
+
36
+
37
+ class Language(BaseModel):
38
+ language: Optional[str] = None
39
+
40
+ version: Optional[str] = None
41
+
42
+
43
+ class WorkspaceDevCommands(BaseModel):
44
+ build: Optional[List[str]] = None
45
+ """Build command (e.g. npm run build)."""
46
+
47
+ install: Optional[List[str]] = None
48
+ """Installation command (e.g. pip install -r requirements.txt)."""
49
+
50
+ lint: Optional[List[str]] = None
51
+ """Lint command (e.g. flake8)."""
52
+
53
+ scripts: Optional[List[str]] = None
54
+ """Script commands."""
55
+
56
+ test: Optional[List[str]] = None
57
+ """Test command (e.g. pytest)."""
58
+
59
+
60
+ class Workspace(BaseModel):
61
+ build_tool: List[str]
62
+ """Name of the build tool used (e.g. pip, npm)."""
63
+
64
+ dev_commands: Optional[WorkspaceDevCommands] = None
65
+ """
66
+ Extracted common commands important to the developer life cycle like linting,
67
+ testing, building, etc.
68
+ """
69
+
70
+ name: Optional[str] = None
71
+ """Name of the workspace.
72
+
73
+ Can be empty if the workspace is the root of the repository. Only necessary for
74
+ monorepo style repositories.
75
+ """
76
+
77
+ path: Optional[str] = None
78
+ """Path to the workspace from the root of the repository.
79
+
80
+ Can be empty if the workspace is the root of the repository. Only necessary for
81
+ monorepo style repositories.
82
+ """
83
+
84
+ workspace_refresh_commands: Optional[List[str]] = None
85
+ """
86
+ Commands to run to refresh this workspace after pulling the latest changes to
87
+ the repository via git (e.g. npm install).
88
+ """
89
+
90
+ workspace_setup_commands: Optional[List[str]] = None
91
+ """
92
+ Commands to run to setup this workspace after a fresh clone of the repository on
93
+ a new container such as installing necessary toolchains and dependencies (e.g.
94
+ npm install).
95
+ """
96
+
97
+
98
+ class ContainerizedServiceCredentials(BaseModel):
99
+ password: str
100
+ """The password of the container service."""
101
+
102
+ username: str
103
+ """The username of the container service."""
104
+
105
+
106
+ class ContainerizedService(BaseModel):
107
+ image: str
108
+ """The image of the container service."""
109
+
110
+ name: str
111
+ """The name of the container service."""
112
+
113
+ credentials: Optional[ContainerizedServiceCredentials] = None
114
+ """The credentials of the container service."""
115
+
116
+ env: Optional[Dict[str, str]] = None
117
+ """The environment variables of the container service."""
118
+
119
+ options: Optional[str] = None
120
+ """Additional Docker container create options."""
121
+
122
+ port_mappings: Optional[List[str]] = None
123
+ """The port mappings of the container service.
124
+
125
+ Port mappings are in the format of <host_port>:<container_port>.
126
+ """
127
+
128
+
129
+ class RepositoryManifestView(BaseModel):
130
+ container_config: ContainerConfig
131
+ """Container configuration specifying the base image and setup commands."""
132
+
133
+ languages: List[Language]
134
+ """List of required languages found in Repository."""
135
+
136
+ workspaces: List[Workspace]
137
+ """List of workspaces within the repository.
138
+
139
+ Each workspace represents a buildable unit of code.
140
+ """
141
+
142
+ containerized_services: Optional[List[ContainerizedService]] = None
143
+ """List of discovered ContainerizedServices.
144
+
145
+ Services can be explicitly started when creating a Devbox.
146
+ """
147
+
148
+ env_vars: Optional[Dict[str, str]] = None
149
+ """
150
+ Qualified environment variables and values that should be set for this
151
+ repository to run correctly.
152
+ """
153
+
154
+ required_env_vars: Optional[List[str]] = None
155
+ """
156
+ Missing environment variables that (may) be required for this repository to run
157
+ correctly.
158
+ """
@@ -0,0 +1,16 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+ from typing_extensions import TypedDict
7
+
8
+ __all__ = ["RepositoryRefreshParams"]
9
+
10
+
11
+ class RepositoryRefreshParams(TypedDict, total=False):
12
+ blueprint_id: Optional[str]
13
+ """ID of blueprint to use as base for resulting RepositoryVersion blueprint."""
14
+
15
+ github_auth_token: Optional[str]
16
+ """GitHub authentication token for accessing private repositories."""
@@ -0,0 +1,53 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Dict, Optional
6
+ from typing_extensions import Literal, Required, TypedDict
7
+
8
+ from .._types import SequenceNotStr
9
+ from .input_context_param import InputContextParam
10
+ from .scoring_contract_param import ScoringContractParam
11
+ from .scenario_environment_param import ScenarioEnvironmentParam
12
+
13
+ __all__ = ["ScenarioCreateParams"]
14
+
15
+
16
+ class ScenarioCreateParams(TypedDict, total=False):
17
+ input_context: Required[InputContextParam]
18
+ """The input context for the Scenario."""
19
+
20
+ name: Required[str]
21
+ """Name of the scenario."""
22
+
23
+ scoring_contract: Required[ScoringContractParam]
24
+ """The scoring contract for the Scenario."""
25
+
26
+ environment_parameters: Optional[ScenarioEnvironmentParam]
27
+ """The Environment in which the Scenario will run."""
28
+
29
+ metadata: Optional[Dict[str, str]]
30
+ """User defined metadata to attach to the scenario for organization."""
31
+
32
+ reference_output: Optional[str]
33
+ """A string representation of the reference output to solve the scenario.
34
+
35
+ Commonly can be the result of a git diff or a sequence of command actions to
36
+ apply to the environment.
37
+ """
38
+
39
+ required_environment_variables: Optional[SequenceNotStr[str]]
40
+ """Environment variables required to run the scenario.
41
+
42
+ If these variables are not provided, the scenario will fail to start.
43
+ """
44
+
45
+ required_secret_names: Optional[SequenceNotStr[str]]
46
+ """
47
+ Secrets required to run the scenario (user secret name to scenario required
48
+ secret name). If these secrets are not provided or the mapping is incorrect, the
49
+ scenario will fail to start.
50
+ """
51
+
52
+ validation_type: Optional[Literal["UNSPECIFIED", "FORWARD", "REVERSE", "EVALUATION"]]
53
+ """Validation strategy."""
@@ -0,0 +1,19 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+
5
+ from .._models import BaseModel
6
+ from .scenario_view import ScenarioView
7
+
8
+ __all__ = ["ScenarioDefinitionListView"]
9
+
10
+
11
+ class ScenarioDefinitionListView(BaseModel):
12
+ has_more: bool
13
+
14
+ remaining_count: int
15
+
16
+ scenarios: List[ScenarioView]
17
+ """List of Scenarios matching filter."""
18
+
19
+ total_count: int
@@ -0,0 +1,25 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from .._models import BaseModel
6
+ from .shared.launch_parameters import LaunchParameters
7
+
8
+ __all__ = ["ScenarioEnvironment"]
9
+
10
+
11
+ class ScenarioEnvironment(BaseModel):
12
+ blueprint_id: Optional[str] = None
13
+ """Use the blueprint with matching ID."""
14
+
15
+ launch_parameters: Optional[LaunchParameters] = None
16
+ """Optional launch parameters to apply to the devbox environment at launch."""
17
+
18
+ snapshot_id: Optional[str] = None
19
+ """Use the snapshot with matching ID."""
20
+
21
+ working_directory: Optional[str] = None
22
+ """The working directory where the agent is expected to fulfill the scenario.
23
+
24
+ Scoring functions also run from the working directory.
25
+ """
@@ -0,0 +1,27 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+ from typing_extensions import TypedDict
7
+
8
+ from .shared_params.launch_parameters import LaunchParameters
9
+
10
+ __all__ = ["ScenarioEnvironmentParam"]
11
+
12
+
13
+ class ScenarioEnvironmentParam(TypedDict, total=False):
14
+ blueprint_id: Optional[str]
15
+ """Use the blueprint with matching ID."""
16
+
17
+ launch_parameters: Optional[LaunchParameters]
18
+ """Optional launch parameters to apply to the devbox environment at launch."""
19
+
20
+ snapshot_id: Optional[str]
21
+ """Use the snapshot with matching ID."""
22
+
23
+ working_directory: Optional[str]
24
+ """The working directory where the agent is expected to fulfill the scenario.
25
+
26
+ Scoring functions also run from the working directory.
27
+ """
@@ -0,0 +1,21 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["ScenarioListParams"]
8
+
9
+
10
+ class ScenarioListParams(TypedDict, total=False):
11
+ benchmark_id: str
12
+ """Filter scenarios by benchmark ID."""
13
+
14
+ limit: int
15
+ """The limit of items to return. Default is 20."""
16
+
17
+ name: str
18
+ """Query for Scenarios with a given name."""
19
+
20
+ starting_after: str
21
+ """Load the next page of data starting after the item with the given ID."""