Skip to content

Commit deeea33

Browse files
committed
Merge branch 'main' into james/ctxt-loader
2 parents 7070b95 + 14c45c0 commit deeea33

68 files changed

Lines changed: 2413 additions & 386 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.69.0"
2+
".": "1.0.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 97
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-0dd27c6877ed117c50fe0af95cee4d54c646d2484368e131b8e3315eba3fffcc.yml
3-
openapi_spec_hash: 68f663172747aef8e66f2b23289efc7b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-cb2d725f71e87810cd872eacd70e867ca10f94980fdf9c78bb2844c02ee47bf3.yml
3+
openapi_spec_hash: 16ce3e9184fc2afdee66db18a83a96e8
44
config_hash: 2363f563f42501d2b1587a4f64bdccaf

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Changelog
22

3+
## 1.0.0 (2025-12-02)
4+
5+
Full Changelog: [v0.69.0...v1.0.0](https://github.com/runloopai/api-client-python/compare/v0.69.0...v1.0.0)
6+
7+
### ⚠ BREAKING CHANGES
8+
9+
* **devbox:** made command positional arg in exec and exec_async ([#695](https://github.com/runloopai/api-client-python/issues/695))
10+
11+
### Features
12+
13+
* **blueprints:** Add build context to the OpenAPI spec ([#6494](https://github.com/runloopai/api-client-python/issues/6494)) ([d202b94](https://github.com/runloopai/api-client-python/commit/d202b942c07614ca954a8bbe3a9a6302e9a04216))
14+
* **devbox:** added devbox.shell(shellName) command and stateful shell class to SDK ([#696](https://github.com/runloopai/api-client-python/issues/696)) ([c1e8f09](https://github.com/runloopai/api-client-python/commit/c1e8f0965a419ff53d830ba3c43a1c9a29dae5c7))
15+
* **devbox:** made command positional arg in exec and exec_async ([#695](https://github.com/runloopai/api-client-python/issues/695)) ([6cc8c2f](https://github.com/runloopai/api-client-python/commit/6cc8c2fd4f904e8cc4386d81558157ca6fb69bfa))
16+
* **sdk:** added scorer classes to sdk ([#698](https://github.com/runloopai/api-client-python/issues/698)) ([85f798f](https://github.com/runloopai/api-client-python/commit/85f798f2d8a7727b783e01a260ff0a52bdf01d78))
17+
18+
19+
### Bug Fixes
20+
21+
* **api:** don't ignore devbox keep_alive, suspend and resume in api ([fe3589f](https://github.com/runloopai/api-client-python/commit/fe3589f5fbb36a5b79f1d4a25e86f88676556fdb))
22+
* **devbox:** launch parameter typo ([1c9c346](https://github.com/runloopai/api-client-python/commit/1c9c346e475b64fc389928fee0f7140e532c4f9c))
23+
* **scenarios:** update parameters for manually maintained start_run_and_await_env_ready methods ([#692](https://github.com/runloopai/api-client-python/issues/692)) ([8000495](https://github.com/runloopai/api-client-python/commit/8000495f70b2e6f4f12742fb8a6d641dbbc088ca))
24+
* **scorer:** fixed RL_TEST_CONTEXT to RL_SCORER_CONTEXT ([df43a42](https://github.com/runloopai/api-client-python/commit/df43a42a45b9ce67aba27835a41c9a0ebfc6a407))
25+
26+
27+
### Chores
28+
29+
* **blueprints:** Add build context examples ([#694](https://github.com/runloopai/api-client-python/issues/694)) ([6e63928](https://github.com/runloopai/api-client-python/commit/6e6392864b3cde20dfea5d173fed9a156b960ccd))
30+
* hide build context APIs ([159a38f](https://github.com/runloopai/api-client-python/commit/159a38f0980c00430a1b949541076b0d63df2df2))
31+
* **mounts:** Update documentation for deprecated fields to direct the user to the replacement API ([4936844](https://github.com/runloopai/api-client-python/commit/4936844989ec7a0d37c835dd37b8007e8caba944))
32+
333
## 0.69.0 (2025-11-21)
434

535
Full Changelog: [v0.68.0...v0.69.0](https://github.com/runloopai/api-client-python/compare/v0.68.0...v0.69.0)

README-SDK.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ runloop = RunloopSDK()
5252

5353
# Create a ready-to-use devbox
5454
with runloop.devbox.create(name="my-devbox") as devbox:
55-
result = devbox.cmd.exec(command="echo 'Hello from Runloop!'")
55+
result = devbox.cmd.exec("echo 'Hello from Runloop!'")
5656
print(result.stdout())
5757

5858
# Stream stdout in real time
5959
devbox.cmd.exec(
60-
command="ls -la",
60+
"ls -la",
6161
stdout=lambda line: print("stdout:", line),
6262
)
6363

@@ -82,13 +82,13 @@ from runloop_api_client import AsyncRunloopSDK
8282
async def main():
8383
runloop = AsyncRunloopSDK()
8484
async with await runloop.devbox.create(name="async-devbox") as devbox:
85-
result = await devbox.cmd.exec(command="pwd")
85+
result = await devbox.cmd.exec("pwd")
8686
print(await result.stdout())
8787

8888
def capture(line: str) -> None:
8989
print(">>", line)
9090

91-
await devbox.cmd.exec(command="ls", stdout=capture)
91+
await devbox.cmd.exec("ls", stdout=capture)
9292

9393
asyncio.run(main())
9494
```
@@ -161,13 +161,13 @@ Execute commands synchronously or asynchronously:
161161

162162
```python
163163
# Synchronous command execution (waits for completion)
164-
result = devbox.cmd.exec(command="ls -la")
164+
result = devbox.cmd.exec("ls -la")
165165
print("Output:", result.stdout())
166166
print("Exit code:", result.exit_code)
167167
print("Success:", result.success)
168168

169169
# Asynchronous command execution (returns immediately)
170-
execution = devbox.cmd.exec_async(command="npm run dev")
170+
execution = devbox.cmd.exec_async("npm run dev")
171171

172172
# Check execution status
173173
state = execution.get_state()
@@ -187,7 +187,7 @@ The `Execution` object provides fine-grained control over asynchronous command e
187187

188188
```python
189189
# Start a long-running process
190-
execution = devbox.cmd.exec_async(command="python train_model.py")
190+
execution = devbox.cmd.exec_async("python train_model.py")
191191

192192
# Get the execution ID
193193
print("Execution ID:", execution.execution_id)
@@ -222,10 +222,10 @@ The `ExecutionResult` object contains the output and exit status of a completed
222222

223223
```python
224224
# From synchronous execution
225-
result = devbox.cmd.exec(command="ls -la /tmp")
225+
result = devbox.cmd.exec("ls -la /tmp")
226226

227227
# Or from asynchronous execution
228-
execution = devbox.cmd.exec_async(command="echo 'test'")
228+
execution = devbox.cmd.exec_async("echo 'test'")
229229
result = execution.result()
230230

231231
# Access execution results
@@ -264,7 +264,7 @@ def handle_output(line: str) -> None:
264264
print("LOG:", line)
265265

266266
result = devbox.cmd.exec(
267-
command="python train.py",
267+
"python train.py",
268268
stdout=handle_output,
269269
stderr=lambda line: print("ERR:", line),
270270
output=lambda line: print("ANY:", line),
@@ -281,7 +281,7 @@ def capture(line: str) -> None:
281281
log_queue.put_nowait(line)
282282

283283
await devbox.cmd.exec(
284-
command="tail -f /var/log/app.log",
284+
"tail -f /var/log/app.log",
285285
stdout=capture,
286286
)
287287
```
@@ -379,13 +379,13 @@ Devboxes support context managers for automatic cleanup:
379379
```python
380380
# Synchronous
381381
with runloop.devbox.create(name="temp-devbox") as devbox:
382-
result = devbox.cmd.exec(command="echo 'Hello'")
382+
result = devbox.cmd.exec("echo 'Hello'")
383383
print(result.stdout())
384384
# devbox is automatically shutdown when exiting the context
385385

386386
# Asynchronous
387387
async with await runloop.devbox.create(name="temp-devbox") as devbox:
388-
result = await devbox.cmd.exec(command="echo 'Hello'")
388+
result = await devbox.cmd.exec("echo 'Hello'")
389389
print(await result.stdout())
390390
# devbox is automatically shutdown when exiting the context
391391
```
@@ -646,7 +646,7 @@ devbox = runloop.devbox.create(
646646
)
647647

648648
# The storage object is now accessible at /home/user/data.txt in the devbox
649-
result = devbox.cmd.exec(command="cat /home/user/data.txt")
649+
result = devbox.cmd.exec("cat /home/user/data.txt")
650650
print(result.stdout()) # "Hello, World!"
651651

652652
# Mount archived objects (tar, tgz, gzip) - they get extracted to a directory
@@ -667,7 +667,7 @@ devbox_with_archive = runloop.devbox.create(
667667
)
668668

669669
# Access extracted archive contents
670-
result = devbox_with_archive.cmd.exec(command="ls -la /home/user/project/")
670+
result = devbox_with_archive.cmd.exec("ls -la /home/user/project/")
671671
print(result.stdout())
672672
```
673673

@@ -694,7 +694,7 @@ runloop = RunloopSDK()
694694

695695
try:
696696
devbox = runloop.devbox.create(name="example-devbox")
697-
result = devbox.cmd.exec(command="invalid-command")
697+
result = devbox.cmd.exec("invalid-command")
698698
except runloop_api_client.APIConnectionError as e:
699699
print("The server could not be reached")
700700
print(e.__cause__) # an underlying Exception, likely raised within httpx.
@@ -754,14 +754,14 @@ async def main():
754754

755755
# All the same operations, but with await
756756
async with await runloop.devbox.create(name="async-devbox") as devbox:
757-
result = await devbox.cmd.exec(command="pwd")
757+
result = await devbox.cmd.exec("pwd")
758758
print(await result.stdout())
759759

760760
# Streaming (note: callbacks must be synchronous)
761761
def capture(line: str) -> None:
762762
print(">>", line)
763763

764-
await devbox.cmd.exec(command="ls", stdout=capture)
764+
await devbox.cmd.exec("ls", stdout=capture)
765765

766766
# Async file operations
767767
await devbox.file.write(path="/tmp/test.txt", contents="Hello")

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Synchronous Example
3434
3535
# Create a ready-to-use devbox
3636
with runloop.devbox.create(name="my-devbox") as devbox:
37-
result = devbox.cmd.exec(command="echo 'Hello from Runloop!'")
37+
result = devbox.cmd.exec("echo 'Hello from Runloop!'")
3838
print(result.stdout())
3939
4040
Asynchronous Example
@@ -49,7 +49,7 @@ Asynchronous Example
4949
runloop = AsyncRunloopSDK()
5050
5151
async with await runloop.devbox.create(name="my-devbox") as devbox:
52-
result = await devbox.cmd.exec(command="echo 'Hello from Runloop!'")
52+
result = await devbox.cmd.exec("echo 'Hello from Runloop!'")
5353
print(await result.stdout())
5454
5555
asyncio.run(main())

docs/sdk/async/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ Asynchronous resource classes for working with devboxes, blueprints, snapshots,
2626
blueprint
2727
snapshot
2828
storage_object
29+
scorer
2930

docs/sdk/async/scorer.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Scorer
2+
======
3+
4+
The ``AsyncScorer`` class provides asynchronous methods for managing custom scenario scorers.
5+
6+
.. automodule:: runloop_api_client.sdk.async_scorer
7+
:members:
8+
9+

docs/sdk/sync/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ Synchronous resource classes for working with devboxes, blueprints, snapshots, a
2626
blueprint
2727
snapshot
2828
storage_object
29+
scorer
2930

docs/sdk/sync/scorer.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Scorer
2+
======
3+
4+
The ``Scorer`` class provides synchronous methods for managing custom scenario scorers.
5+
6+
.. automodule:: runloop_api_client.sdk.scorer
7+
:members:
8+
9+

docs/sdk/types.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@ These TypeDicts define parameters for storage object creation, listing, and down
7878

7979
.. autotypeddict:: runloop_api_client.sdk._types.SDKObjectDownloadParams
8080

81+
Scorer Parameters
82+
-----------------
83+
84+
These TypeDicts define parameters for scorer creation, listing, updating, and validation.
85+
86+
.. autotypeddict:: runloop_api_client.sdk._types.SDKScorerCreateParams
87+
88+
.. autotypeddict:: runloop_api_client.sdk._types.SDKScorerListParams
89+
90+
.. autotypeddict:: runloop_api_client.sdk._types.SDKScorerUpdateParams
91+
92+
.. autotypeddict:: runloop_api_client.sdk._types.SDKScorerValidateParams
93+
8194
Core Request Options
8295
--------------------
8396

0 commit comments

Comments
 (0)