Skip to content

Commit b13e49f

Browse files
feat(api): api update
1 parent 736c122 commit b13e49f

4 files changed

Lines changed: 33 additions & 8 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 94
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-6bdf8a52fe1e6d7564c6cc54b3743ea05ea324a9420808764b17d02483dbaf86.yml
3-
openapi_spec_hash: 23c253ceed235b9f13794beb091941c8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-d1cc15eb5ef9125c6eef2855fc9ccc1129f68116e20ac0a72a9c77a445909033.yml
3+
openapi_spec_hash: 925f218d18ed7f1faff9389b318a674f
44
config_hash: 82af97d4d6dde958eed9f5e4ae55f75a

src/runloop_api_client/resources/devboxes/executions.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import typing_extensions
66
from typing import Optional, cast
7+
from typing_extensions import Literal
78

89
import httpx
910

@@ -338,7 +339,8 @@ def send_std_in(
338339
execution_id: str,
339340
*,
340341
devbox_id: str,
341-
text: str | Omit = omit,
342+
signal: Optional[Literal["EOF", "INTERRUPT"]] | Omit = omit,
343+
text: Optional[str] | Omit = omit,
342344
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
343345
# The extra values given here take precedence over values defined on the client or passed to this method.
344346
extra_headers: Headers | None = None,
@@ -351,6 +353,8 @@ def send_std_in(
351353
Send content to the Std In of a running execution.
352354
353355
Args:
356+
signal: Signal to send to std in of the running execution.
357+
354358
text: Text to send to std in of the running execution.
355359
356360
extra_headers: Send extra headers
@@ -369,7 +373,13 @@ def send_std_in(
369373
raise ValueError(f"Expected a non-empty value for `execution_id` but received {execution_id!r}")
370374
return self._post(
371375
f"/v1/devboxes/{devbox_id}/executions/{execution_id}/send_std_in",
372-
body=maybe_transform({"text": text}, execution_send_std_in_params.ExecutionSendStdInParams),
376+
body=maybe_transform(
377+
{
378+
"signal": signal,
379+
"text": text,
380+
},
381+
execution_send_std_in_params.ExecutionSendStdInParams,
382+
),
373383
options=make_request_options(
374384
extra_headers=extra_headers,
375385
extra_query=extra_query,
@@ -838,7 +848,8 @@ async def send_std_in(
838848
execution_id: str,
839849
*,
840850
devbox_id: str,
841-
text: str | Omit = omit,
851+
signal: Optional[Literal["EOF", "INTERRUPT"]] | Omit = omit,
852+
text: Optional[str] | Omit = omit,
842853
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
843854
# The extra values given here take precedence over values defined on the client or passed to this method.
844855
extra_headers: Headers | None = None,
@@ -851,6 +862,8 @@ async def send_std_in(
851862
Send content to the Std In of a running execution.
852863
853864
Args:
865+
signal: Signal to send to std in of the running execution.
866+
854867
text: Text to send to std in of the running execution.
855868
856869
extra_headers: Send extra headers
@@ -869,7 +882,13 @@ async def send_std_in(
869882
raise ValueError(f"Expected a non-empty value for `execution_id` but received {execution_id!r}")
870883
return await self._post(
871884
f"/v1/devboxes/{devbox_id}/executions/{execution_id}/send_std_in",
872-
body=await async_maybe_transform({"text": text}, execution_send_std_in_params.ExecutionSendStdInParams),
885+
body=await async_maybe_transform(
886+
{
887+
"signal": signal,
888+
"text": text,
889+
},
890+
execution_send_std_in_params.ExecutionSendStdInParams,
891+
),
873892
options=make_request_options(
874893
extra_headers=extra_headers,
875894
extra_query=extra_query,

src/runloop_api_client/types/devboxes/execution_send_std_in_params.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, TypedDict
5+
from typing import Optional
6+
from typing_extensions import Literal, Required, TypedDict
67

78
__all__ = ["ExecutionSendStdInParams"]
89

910

1011
class ExecutionSendStdInParams(TypedDict, total=False):
1112
devbox_id: Required[str]
1213

13-
text: str
14+
signal: Optional[Literal["EOF", "INTERRUPT"]]
15+
"""Signal to send to std in of the running execution."""
16+
17+
text: Optional[str]
1418
"""Text to send to std in of the running execution."""

tests/api_resources/devboxes/test_executions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ def test_method_send_std_in_with_all_params(self, client: Runloop) -> None:
260260
execution = client.devboxes.executions.send_std_in(
261261
execution_id="execution_id",
262262
devbox_id="devbox_id",
263+
signal="EOF",
263264
text="text",
264265
)
265266
assert_matches_type(DevboxAsyncExecutionDetailView, execution, path=["response"])
@@ -840,6 +841,7 @@ async def test_method_send_std_in_with_all_params(self, async_client: AsyncRunlo
840841
execution = await async_client.devboxes.executions.send_std_in(
841842
execution_id="execution_id",
842843
devbox_id="devbox_id",
844+
signal="EOF",
843845
text="text",
844846
)
845847
assert_matches_type(DevboxAsyncExecutionDetailView, execution, path=["response"])

0 commit comments

Comments
 (0)