Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Generate playground API client
Tomas Valenta31addac9ba1f
diff --git a/api-service/.openapi-generator/FILES b/api-service/.openapi-generator/FILESindex 44b3a4e1e..7b6bb46ab 100644--- a/api-service/.openapi-generator/FILES+++ b/api-service/.openapi-generator/FILES@@ -13,9 +13,9 @@ playground_client/docs/OutStdoutResponse.mdplayground_client/docs/OutType.mdplayground_client/docs/OutTypeStderr.mdplayground_client/docs/OutTypeStdout.md+playground_client/docs/ProcessResponse.mdplayground_client/docs/ReadFilesystemFileResponse.mdplayground_client/docs/RunProcessParams.md-playground_client/docs/RunProcessResponse.mdplayground_client/docs/WriteFilesystemFileRequest.mdplayground_client/docs/WriteProcessStdinRequest.mdplayground_client/exceptions.py@@ -29,9 +29,9 @@ playground_client/models/out_stdout_response.pyplayground_client/models/out_type.pyplayground_client/models/out_type_stderr.pyplayground_client/models/out_type_stdout.py+playground_client/models/process_response.pyplayground_client/models/read_filesystem_file_response.pyplayground_client/models/run_process_params.py-playground_client/models/run_process_response.pyplayground_client/models/write_filesystem_file_request.pyplayground_client/models/write_process_stdin_request.pyplayground_client/rest.py@@ -46,9 +46,9 @@ playground_client/test/test_out_stdout_response.pyplayground_client/test/test_out_type.pyplayground_client/test/test_out_type_stderr.pyplayground_client/test/test_out_type_stdout.py+playground_client/test/test_process_response.pyplayground_client/test/test_read_filesystem_file_response.pyplayground_client/test/test_run_process_params.py-playground_client/test/test_run_process_response.pyplayground_client/test/test_write_filesystem_file_request.pyplayground_client/test/test_write_process_stdin_request.pyplayground_client_README.mddiff --git a/api-service/playground_client/__init__.py b/api-service/playground_client/__init__.pyindex 1c1574a13..7d68bc5ca 100644--- a/api-service/playground_client/__init__.py+++ b/api-service/playground_client/__init__.py@@ -38,8 +38,8 @@ from playground_client.models.out_stdout_response import OutStdoutResponsefrom playground_client.models.out_type import OutTypefrom playground_client.models.out_type_stderr import OutTypeStderrfrom playground_client.models.out_type_stdout import OutTypeStdout+from playground_client.models.process_response import ProcessResponsefrom playground_client.models.read_filesystem_file_response import ReadFilesystemFileResponsefrom playground_client.models.run_process_params import RunProcessParams-from playground_client.models.run_process_response import RunProcessResponsefrom playground_client.models.write_filesystem_file_request import WriteFilesystemFileRequestfrom playground_client.models.write_process_stdin_request import WriteProcessStdinRequestdiff --git a/api-service/playground_client/api/default_api.py b/api-service/playground_client/api/default_api.pyindex 79eb84af0..bd0f1d319 100644--- a/api-service/playground_client/api/default_api.py+++ b/api-service/playground_client/api/default_api.py@@ -17,14 +17,14 @@ import re # noqa: F401from pydantic import validate_arguments, ValidationErrorfrom typing_extensions import Annotated-from pydantic import StrictBool, StrictStr+from pydantic import Field, StrictBool, StrictStrfrom playground_client.models.create_session_response import CreateSessionResponsefrom playground_client.models.create_sessions_request import CreateSessionsRequestfrom playground_client.models.list_filesystem_dir_response import ListFilesystemDirResponse+from playground_client.models.process_response import ProcessResponsefrom playground_client.models.read_filesystem_file_response import ReadFilesystemFileResponsefrom playground_client.models.run_process_params import RunProcessParams-from playground_client.models.run_process_response import RunProcessResponsefrom playground_client.models.write_filesystem_file_request import WriteFilesystemFileRequestfrom playground_client.models.write_process_stdin_request import WriteProcessStdinRequest@@ -473,7 +473,7 @@ class DefaultApi(object):_request_auth=_params.get('_request_auth'))@validate_arguments- def get_process(self, id : StrictStr, process_id : StrictStr, wait : StrictBool, **kwargs) -> RunProcessResponse: # noqa: E501+ def get_process(self, id : StrictStr, process_id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], **kwargs) -> ProcessResponse: # noqa: E501"""get_process # noqa: E501This method makes a synchronous HTTP request by default. To make an@@ -486,7 +486,7 @@ class DefaultApi(object)::type id: str:param process_id: (required):type process_id: str- :param wait: (required)+ :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (required):type wait: bool:param async_req: Whether to execute the request asynchronously.:type async_req: bool, optional@@ -501,13 +501,13 @@ class DefaultApi(object)::return: Returns the result object.If the method is called asynchronously,returns the request thread.- :rtype: RunProcessResponse+ :rtype: ProcessResponse"""kwargs['_return_http_data_only'] = Truereturn self.get_process_with_http_info(id, process_id, wait, **kwargs) # noqa: E501@validate_arguments- def get_process_with_http_info(self, id : StrictStr, process_id : StrictStr, wait : StrictBool, **kwargs): # noqa: E501+ def get_process_with_http_info(self, id : StrictStr, process_id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], **kwargs): # noqa: E501"""get_process # noqa: E501This method makes a synchronous HTTP request by default. To make an@@ -520,7 +520,7 @@ class DefaultApi(object)::type id: str:param process_id: (required):type process_id: str- :param wait: (required)+ :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (required):type wait: bool:param async_req: Whether to execute the request asynchronously.:type async_req: bool, optional@@ -543,7 +543,7 @@ class DefaultApi(object)::return: Returns the result object.If the method is called asynchronously,returns the request thread.- :rtype: tuple(RunProcessResponse, status_code(int), headers(HTTPHeaderDict))+ :rtype: tuple(ProcessResponse, status_code(int), headers(HTTPHeaderDict))"""_params = locals()@@ -607,7 +607,7 @@ class DefaultApi(object):_auth_settings = [] # noqa: E501_response_types_map = {- '200': "RunProcessResponse",+ '200': "ProcessResponse",}return self.api_client.call_api(@@ -1066,7 +1066,7 @@ class DefaultApi(object):_request_auth=_params.get('_request_auth'))@validate_arguments- def start_process(self, id : StrictStr, wait : StrictBool, run_process_params : RunProcessParams, **kwargs) -> RunProcessResponse: # noqa: E501+ def start_process(self, id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], run_process_params : RunProcessParams, **kwargs) -> ProcessResponse: # noqa: E501"""start_process # noqa: E501This method makes a synchronous HTTP request by default. To make an@@ -1077,7 +1077,7 @@ class DefaultApi(object)::param id: (required):type id: str- :param wait: (required)+ :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (required):type wait: bool:param run_process_params: (required):type run_process_params: RunProcessParams@@ -1094,13 +1094,13 @@ class DefaultApi(object)::return: Returns the result object.If the method is called asynchronously,returns the request thread.- :rtype: RunProcessResponse+ :rtype: ProcessResponse"""kwargs['_return_http_data_only'] = Truereturn self.start_process_with_http_info(id, wait, run_process_params, **kwargs) # noqa: E501@validate_arguments- def start_process_with_http_info(self, id : StrictStr, wait : StrictBool, run_process_params : RunProcessParams, **kwargs): # noqa: E501+ def start_process_with_http_info(self, id : StrictStr, wait : Annotated[StrictBool, Field(..., description="if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.")], run_process_params : RunProcessParams, **kwargs): # noqa: E501"""start_process # noqa: E501This method makes a synchronous HTTP request by default. To make an@@ -1111,7 +1111,7 @@ class DefaultApi(object)::param id: (required):type id: str- :param wait: (required)+ :param wait: if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. (required):type wait: bool:param run_process_params: (required):type run_process_params: RunProcessParams@@ -1136,7 +1136,7 @@ class DefaultApi(object)::return: Returns the result object.If the method is called asynchronously,returns the request thread.- :rtype: tuple(RunProcessResponse, status_code(int), headers(HTTPHeaderDict))+ :rtype: tuple(ProcessResponse, status_code(int), headers(HTTPHeaderDict))"""_params = locals()@@ -1207,7 +1207,7 @@ class DefaultApi(object):_auth_settings = [] # noqa: E501_response_types_map = {- '200': "RunProcessResponse",+ '200': "ProcessResponse",}return self.api_client.call_api(diff --git a/api-service/playground_client/docs/DefaultApi.md b/api-service/playground_client/docs/DefaultApi.mdindex 7793fdbc4..b9921108b 100644--- a/api-service/playground_client/docs/DefaultApi.md+++ b/api-service/playground_client/docs/DefaultApi.md@@ -199,7 +199,7 @@ No authorization required[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)# **get_process**-> RunProcessResponse get_process(id, process_id, wait)+> ProcessResponse get_process(id, process_id, wait)@@ -225,7 +225,7 @@ with playground_client.ApiClient(configuration) as api_client:api_instance = playground_client.DefaultApi(api_client)id = 'id_example' # str |process_id = 'process_id_example' # str |- wait = True # bool |+ wait = True # bool | if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.try:api_response = api_instance.get_process(id, process_id, wait)@@ -241,11 +241,11 @@ Name | Type | Description | Notes------------- | ------------- | ------------- | -------------**id** | **str**| |**process_id** | **str**| |- **wait** | **bool**| |+ **wait** | **bool**| if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. |### Return type-[**RunProcessResponse**](RunProcessResponse.md)+[**ProcessResponse**](ProcessResponse.md)### Authorization@@ -259,7 +259,7 @@ No authorization required### HTTP response details| Status code | Description | Response headers ||-------------|-------------|------------------|-**200** | Ok | - |+**200** | `processID` and all `stdout` and `stderr` that the process outputted until now. | - |[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)@@ -451,7 +451,7 @@ No authorization required[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)# **start_process**-> RunProcessResponse start_process(id, wait, run_process_params)+> ProcessResponse start_process(id, wait, run_process_params)@@ -476,7 +476,7 @@ with playground_client.ApiClient(configuration) as api_client:# Create an instance of the API classapi_instance = playground_client.DefaultApi(api_client)id = 'id_example' # str |- wait = True # bool |+ wait = True # bool | if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`.run_process_params = playground_client.RunProcessParams() # RunProcessParams |try:@@ -492,12 +492,12 @@ with playground_client.ApiClient(configuration) as api_client:Name | Type | Description | Notes------------- | ------------- | ------------- | -------------**id** | **str**| |- **wait** | **bool**| |+ **wait** | **bool**| if true the request will wait until the process ends and then return the `stdout`, `stderr` and `processID`. |**run_process_params** | [**RunProcessParams**](RunProcessParams.md)| |### Return type-[**RunProcessResponse**](RunProcessResponse.md)+[**ProcessResponse**](ProcessResponse.md)### Authorization@@ -511,7 +511,7 @@ No authorization required### HTTP response details| Status code | Description | Response headers ||-------------|-------------|------------------|-**200** | Ok | - |+**200** | `processID` and all `stdout` and `stderr` that the process outputted until now. | - |[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)diff --git a/api-service/playground_client/docs/RunProcessResponse.md b/api-service/playground_client/docs/ProcessResponse.mdsimilarity index 56%rename from api-service/playground_client/docs/RunProcessResponse.mdrename to api-service/playground_client/docs/ProcessResponse.mdindex d26acfb78..f0a560270 100644--- a/api-service/playground_client/docs/RunProcessResponse.md+++ b/api-service/playground_client/docs/ProcessResponse.md@@ -1,4 +1,4 @@-# RunProcessResponse+# ProcessResponse## Properties@@ -11,19 +11,19 @@ Name | Type | Description | Notes## Example```python-from playground_client.models.run_process_response import RunProcessResponse+from playground_client.models.process_response import ProcessResponse# TODO update the JSON string belowjson = "{}"-# create an instance of RunProcessResponse from a JSON string-run_process_response_instance = RunProcessResponse.from_json(json)+# create an instance of ProcessResponse from a JSON string+process_response_instance = ProcessResponse.from_json(json)# print the JSON string representation of the object-print RunProcessResponse.to_json()+print ProcessResponse.to_json()# convert the object into a dict-run_process_response_dict = run_process_response_instance.to_dict()-# create an instance of RunProcessResponse from a dict-run_process_response_form_dict = run_process_response.from_dict(run_process_response_dict)+process_response_dict = process_response_instance.to_dict()+# create an instance of ProcessResponse from a dict+process_response_form_dict = process_response.from_dict(process_response_dict)```[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)diff --git a/api-service/playground_client/models/__init__.py b/api-service/playground_client/models/__init__.pyindex 46521afb2..a6521119f 100644--- a/api-service/playground_client/models/__init__.py+++ b/api-service/playground_client/models/__init__.py@@ -23,8 +23,8 @@ from playground_client.models.out_stdout_response import OutStdoutResponsefrom playground_client.models.out_type import OutTypefrom playground_client.models.out_type_stderr import OutTypeStderrfrom playground_client.models.out_type_stdout import OutTypeStdout+from playground_client.models.process_response import ProcessResponsefrom playground_client.models.read_filesystem_file_response import ReadFilesystemFileResponsefrom playground_client.models.run_process_params import RunProcessParams-from playground_client.models.run_process_response import RunProcessResponsefrom playground_client.models.write_filesystem_file_request import WriteFilesystemFileRequestfrom playground_client.models.write_process_stdin_request import WriteProcessStdinRequestdiff --git a/api-service/playground_client/models/run_process_response.py b/api-service/playground_client/models/process_response.pysimilarity index 86%rename from api-service/playground_client/models/run_process_response.pyrename to api-service/playground_client/models/process_response.pyindex 2ff2262fc..5205734db 100644--- a/api-service/playground_client/models/run_process_response.py+++ b/api-service/playground_client/models/process_response.py@@ -22,7 +22,7 @@ from pydantic import BaseModel, Field, StrictStrfrom playground_client.models.out_stderr_response import OutStderrResponsefrom playground_client.models.out_stdout_response import OutStdoutResponse-class RunProcessResponse(BaseModel):+class ProcessResponse(BaseModel):"""NOTE: This class is auto generated by OpenAPI Generator.Ref: https://openapi-generator.tech@@ -46,8 +46,8 @@ class RunProcessResponse(BaseModel):return json.dumps(self.to_dict())@classmethod- def from_json(cls, json_str: str) -> RunProcessResponse:- """Create an instance of RunProcessResponse from a JSON string"""+ def from_json(cls, json_str: str) -> ProcessResponse:+ """Create an instance of ProcessResponse from a JSON string"""return cls.from_dict(json.loads(json_str))def to_dict(self):@@ -73,20 +73,20 @@ class RunProcessResponse(BaseModel):return _dict@classmethod- def from_dict(cls, obj: dict) -> RunProcessResponse:- """Create an instance of RunProcessResponse from a dict"""+ def from_dict(cls, obj: dict) -> ProcessResponse:+ """Create an instance of ProcessResponse from a dict"""if obj is None:return Noneif type(obj) is not dict:- return RunProcessResponse.parse_obj(obj)+ return ProcessResponse.parse_obj(obj)# raise errors for additional fields in the inputfor _key in obj.keys():if _key not in cls.__properties:- raise ValueError("Error due to additional fields (not defined in RunProcessResponse) in the input: " + obj)+ raise ValueError("Error due to additional fields (not defined in ProcessResponse) in the input: " + obj)- _obj = RunProcessResponse.parse_obj({+ _obj = ProcessResponse.parse_obj({"stderr": [OutStderrResponse.from_dict(_item) for _item in obj.get("stderr")] if obj.get("stderr") is not None else None,"stdout": [OutStdoutResponse.from_dict(_item) for _item in obj.get("stdout")] if obj.get("stdout") is not None else None,"process_id": obj.get("processID")diff --git a/api-service/playground_client/test/test_run_process_response.py b/api-service/playground_client/test/test_process_response.pysimilarity index 79%rename from api-service/playground_client/test/test_run_process_response.pyrename to api-service/playground_client/test/test_process_response.pyindex 40b9f24a1..e08609350 100644--- a/api-service/playground_client/test/test_run_process_response.py+++ b/api-service/playground_client/test/test_process_response.py@@ -16,11 +16,11 @@ import unittestimport datetimeimport playground_client-from playground_client.models.run_process_response import RunProcessResponse # noqa: E501+from playground_client.models.process_response import ProcessResponse # noqa: E501from playground_client.rest import ApiException-class TestRunProcessResponse(unittest.TestCase):- """RunProcessResponse unit test stubs"""+class TestProcessResponse(unittest.TestCase):+ """ProcessResponse unit test stubs"""def setUp(self):pass@@ -29,15 +29,15 @@ class TestRunProcessResponse(unittest.TestCase):passdef make_instance(self, include_optional):- """Test RunProcessResponse+ """Test ProcessResponseinclude_option is a boolean, when False only requiredparams are included, when True both required andoptional params are included """- # uncomment below to create an instance of `RunProcessResponse`+ # uncomment below to create an instance of `ProcessResponse`"""- model = playground_client.models.run_process_response.RunProcessResponse() # noqa: E501+ model = playground_client.models.process_response.ProcessResponse() # noqa: E501if include_optional :- return RunProcessResponse(+ return ProcessResponse(stderr = [playground_client.models.out_stderr_response.OutStderrResponse(type = 'Stderr',@@ -53,7 +53,7 @@ class TestRunProcessResponse(unittest.TestCase):process_id = '')else :- return RunProcessResponse(+ return ProcessResponse(stderr = [playground_client.models.out_stderr_response.OutStderrResponse(type = 'Stderr',@@ -70,8 +70,8 @@ class TestRunProcessResponse(unittest.TestCase):)"""- def testRunProcessResponse(self):- """Test RunProcessResponse"""+ def testProcessResponse(self):+ """Test ProcessResponse"""# inst_req_only = self.make_instance(include_optional=False)# inst_req_and_optional = self.make_instance(include_optional=True)diff --git a/api-service/playground_client_README.md b/api-service/playground_client_README.mdindex 353f10cf6..6f0807b21 100644--- a/api-service/playground_client_README.md+++ b/api-service/playground_client_README.md@@ -88,9 +88,9 @@ Class | Method | HTTP request | Description- [OutType](playground_client/docs/OutType.md)- [OutTypeStderr](playground_client/docs/OutTypeStderr.md)- [OutTypeStdout](playground_client/docs/OutTypeStdout.md)+ - [ProcessResponse](playground_client/docs/ProcessResponse.md)- [ReadFilesystemFileResponse](playground_client/docs/ReadFilesystemFileResponse.md)- [RunProcessParams](playground_client/docs/RunProcessParams.md)- - [RunProcessResponse](playground_client/docs/RunProcessResponse.md)- [WriteFilesystemFileRequest](playground_client/docs/WriteFilesystemFileRequest.md)- [WriteProcessStdinRequest](playground_client/docs/WriteProcessStdinRequest.md)