Skip to content

Commit fcc267a

Browse files
release: 1.2.0-beta (#676)
* feat(benchmarks): add `update_scenarios` method to benchmarks resource * fix(benchmarks): `update()` for benchmarks and scenarios replaces all provided fields and does not modify unspecified fields (#6702) * codegen metadata * chore(internal): codegen related update * chore: break long lines in snippets into multiline * chore(internal): upgrade babel, qs, js-yaml * feat(devbox): remove this one * feat(network-policy): add network policies to api * chore(internal): update `actions/checkout` version * release: 1.2.0-beta * cp dines * cp dines --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Alexander Dines <alex@runloop.ai>
1 parent ee67c94 commit fcc267a

43 files changed

Lines changed: 1297 additions & 269 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ${{ github.repository == 'stainless-sdks/runloop-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
2020
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
2121
steps:
22-
- uses: runloopai/checkout@main
22+
- uses: actions/checkout@v6
2323

2424
- name: Set up Node
2525
uses: runloopai/setup-node@main
@@ -41,7 +41,7 @@ jobs:
4141
contents: read
4242
id-token: write
4343
steps:
44-
- uses: runloopai/checkout@main
44+
- uses: actions/checkout@v6
4545

4646
- name: Set up Node
4747
uses: runloopai/setup-node@main
@@ -74,7 +74,7 @@ jobs:
7474
runs-on: ${{ github.repository == 'stainless-sdks/runloop-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
7575
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
7676
steps:
77-
- uses: runloopai/checkout@main
77+
- uses: actions/checkout@v6
7878

7979
- name: Set up Node
8080
uses: runloopai/setup-node@main

.github/workflows/publish-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: runloopai/checkout@main
17+
- uses: actions/checkout@v6
1818

1919
- name: Set up Node
2020
uses: runloopai/setup-node@main

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.repository == 'runloopai/api-client-ts' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1313

1414
steps:
15-
- uses: runloopai/checkout@main
15+
- uses: actions/checkout@v6
1616

1717
- name: Check release environment
1818
run: |

.release-please-manifest.json

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

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 97
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-370a5d676ff0ef41f3ca6ed669d29b6e3e6b7f0a914ac3dbed6bd45e75533c74.yml
3-
openapi_spec_hash: 7bb5ea1117d754b7985aff0da5bca3a7
4-
config_hash: 2363f563f42501d2b1587a4f64bdccaf
1+
configured_endpoints: 103
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8ebd9dbfacb180ec9c980f5e46a814b0c8a3cb6063136db18780271d33a8dfa6.yml
3+
openapi_spec_hash: 12d4edec72b722945bade9419636d63e
4+
config_hash: ec63e62d4660c9c924b39a8671c2fdb1

CHANGELOG.md

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

3+
## 1.2.0-beta (2026-01-19)
4+
5+
Full Changelog: [v1.1.0...v1.2.0-beta](https://github.com/runloopai/api-client-ts/compare/v1.1.0...v1.2.0-beta)
6+
7+
### Features
8+
9+
* **benchmarks:** add `update_scenarios` method to benchmarks resource ([4ef2680](https://github.com/runloopai/api-client-ts/commit/4ef26807dbb81cd171a1d1a91a4eadf4ec0cde73))
10+
* **devbox:** remove this one ([ffe23be](https://github.com/runloopai/api-client-ts/commit/ffe23bea59c737ad845bc179e007fecb07a721b7))
11+
* **mounts:** add convenience helper for inline mounting storage objects ([#675](https://github.com/runloopai/api-client-ts/issues/675)) ([2e5866c](https://github.com/runloopai/api-client-ts/commit/2e5866c4b4f80078144f218c4c7145f767e8b2a0))
12+
* **network-policy:** add network policies to api ([fd7c42c](https://github.com/runloopai/api-client-ts/commit/fd7c42c760cd5d80f5843fbf7e97b85d29d925d5))
13+
* **sdk:** added scorers to OO SDK ([#679](https://github.com/runloopai/api-client-ts/issues/679)) ([ee67c94](https://github.com/runloopai/api-client-ts/commit/ee67c9406a97731d38f2ce0ab8dcb16226322304))
14+
15+
16+
### Bug Fixes
17+
18+
* **benchmarks:** `update()` for benchmarks and scenarios replaces all provided fields and does not modify unspecified fields ([#6702](https://github.com/runloopai/api-client-ts/issues/6702)) ([0c2e0f0](https://github.com/runloopai/api-client-ts/commit/0c2e0f017684ddc578b80c31e3a08925bc582765))
19+
* **documentation:** added types to the typedoc main list and fixed some decorators ([#677](https://github.com/runloopai/api-client-ts/issues/677)) ([392007d](https://github.com/runloopai/api-client-ts/commit/392007d6555582d9a00b877e2ba6c1ea0de4236d))
20+
21+
22+
### Chores
23+
24+
* break long lines in snippets into multiline ([aea51a8](https://github.com/runloopai/api-client-ts/commit/aea51a857a3ec4f741281782bd7d1b40b3e33ca9))
25+
* **internal:** codegen related update ([f2acb64](https://github.com/runloopai/api-client-ts/commit/f2acb645f6854253dd74676570b03c1c6f325b2c))
26+
* **internal:** update `actions/checkout` version ([6f2a8ae](https://github.com/runloopai/api-client-ts/commit/6f2a8ae880dbe17fdfd66389fbe674baf5e75dc8))
27+
* **internal:** upgrade babel, qs, js-yaml ([3c31dd4](https://github.com/runloopai/api-client-ts/commit/3c31dd460e6f8e487ff326763bbe39b555fd136e))
28+
329
## 1.1.0 (2025-12-13)
430

531
Full Changelog: [v1.0.0...v1.1.0](https://github.com/runloopai/api-client-ts/compare/v1.0.0...v1.1.0)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2025 runloop
1+
Copyright 2026 runloop
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

README.md

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ The SDK provides object-oriented interfaces for all major Runloop resources:
6868

6969
The SDK is fully typed with comprehensive TypeScript definitions:
7070

71-
```typescript
72-
import { RunloopSDK, type DevboxView } from '@runloop/api-client';
73-
74-
const runloop = new RunloopSDK();
75-
const devbox: DevboxView = await runloop.devbox.create();
76-
```
77-
7871
### Scorers
7972

8073
Scorers are custom scoring functions used to evaluate scenario outputs. Create scorers via `runloop.scorer.create()`, then update or validate them with the returned `Scorer` instance:
@@ -141,8 +134,59 @@ const snapshot = await devbox.snapshotDisk();
141134
await snapshot.createDevbox();
142135
...
143136
await devbox.shutdown();
137+
144138
```
145139

140+
## File write
141+
142+
// You can also pass a `fetch` `Response`:
143+
await client.devboxes.uploadFile('id', {
144+
path: 'path',
145+
file: await fetch('https://somesite/file'),
146+
});
147+
148+
// Finally, if none of the above are convenient, you can use our `toFile` helper:
149+
await client.devboxes.uploadFile('id', {
150+
path: 'path',
151+
file: await toFile(Buffer.from('my bytes'), 'file'),
152+
});
153+
await client.devboxes.uploadFile('id', {
154+
path: 'path',
155+
file: await toFile(new Uint8Array([0, 1, 2]), 'file'),
156+
});
157+
158+
````
159+
160+
## Handling errors
161+
162+
When the library is unable to connect to the API,
163+
or if the API returns a non-success status code (i.e., 4xx or 5xx response),
164+
a subclass of `APIError` will be thrown:
165+
166+
<!-- prettier-ignore -->
167+
```ts
168+
const devboxView = await client.devboxes.create().catch(async (err) => {
169+
if (err instanceof Runloop.APIError) {
170+
console.log(err.status); // 400
171+
console.log(err.name); // BadRequestError
172+
console.log(err.headers); // {server: 'nginx', ...}
173+
} else {
174+
throw err;
175+
}
176+
});
177+
```typescript
178+
import { RunloopSDK, type DevboxView } from '@runloop/api-client';
179+
180+
const runloop = new RunloopSDK();
181+
const devbox: DevboxView = await runloop.devbox.create();
182+
````
183+
184+
// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
185+
await client.devboxes.uploadFile('id', {
186+
path: 'path',
187+
file: fs.createReadStream('/path/to/file'),
188+
});
189+
146190
## Advanced Configuration
147191

148192
Customize the SDK with your API token, endpoint, timeout, and retry settings:

api.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
Types:
44

55
- <code><a href="./src/resources/shared.ts">AfterIdle</a></code>
6+
- <code><a href="./src/resources/shared.ts">AgentMount</a></code>
67
- <code><a href="./src/resources/shared.ts">AgentSource</a></code>
78
- <code><a href="./src/resources/shared.ts">CodeMountParameters</a></code>
89
- <code><a href="./src/resources/shared.ts">LaunchParameters</a></code>
910
- <code><a href="./src/resources/shared.ts">Mount</a></code>
11+
- <code><a href="./src/resources/shared.ts">ObjectMount</a></code>
1012
- <code><a href="./src/resources/shared.ts">RunProfile</a></code>
1113

1214
# Benchmarks
@@ -16,6 +18,8 @@ Types:
1618
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkCreateParameters</a></code>
1719
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkRunListView</a></code>
1820
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkRunView</a></code>
21+
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkScenarioUpdateParameters</a></code>
22+
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkUpdateParameters</a></code>
1923
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkView</a></code>
2024
- <code><a href="./src/resources/benchmarks/benchmarks.ts">ScenarioDefinitionListView</a></code>
2125
- <code><a href="./src/resources/benchmarks/benchmarks.ts">StartBenchmarkRunParameters</a></code>
@@ -29,6 +33,7 @@ Methods:
2933
- <code title="get /v1/benchmarks/{id}/definitions">client.benchmarks.<a href="./src/resources/benchmarks/benchmarks.ts">definitions</a>(id, { ...params }) -> ScenarioDefinitionListView</code>
3034
- <code title="get /v1/benchmarks/list_public">client.benchmarks.<a href="./src/resources/benchmarks/benchmarks.ts">listPublic</a>({ ...params }) -> BenchmarkViewsBenchmarksCursorIDPage</code>
3135
- <code title="post /v1/benchmarks/start_run">client.benchmarks.<a href="./src/resources/benchmarks/benchmarks.ts">startRun</a>({ ...params }) -> BenchmarkRunView</code>
36+
- <code title="post /v1/benchmarks/{id}/scenarios">client.benchmarks.<a href="./src/resources/benchmarks/benchmarks.ts">updateScenarios</a>(id, { ...params }) -> BenchmarkView</code>
3237

3338
## Runs
3439

@@ -308,3 +313,20 @@ Methods:
308313
- <code title="post /v1/secrets/{name}">client.secrets.<a href="./src/resources/secrets.ts">update</a>(name, { ...params }) -> SecretView</code>
309314
- <code title="get /v1/secrets">client.secrets.<a href="./src/resources/secrets.ts">list</a>({ ...params }) -> SecretListView</code>
310315
- <code title="post /v1/secrets/{name}/delete">client.secrets.<a href="./src/resources/secrets.ts">delete</a>(name) -> SecretView</code>
316+
317+
# NetworkPolicies
318+
319+
Types:
320+
321+
- <code><a href="./src/resources/network-policies.ts">NetworkPolicyCreateParameters</a></code>
322+
- <code><a href="./src/resources/network-policies.ts">NetworkPolicyListView</a></code>
323+
- <code><a href="./src/resources/network-policies.ts">NetworkPolicyUpdateParameters</a></code>
324+
- <code><a href="./src/resources/network-policies.ts">NetworkPolicyView</a></code>
325+
326+
Methods:
327+
328+
- <code title="post /v1/network-policies">client.networkPolicies.<a href="./src/resources/network-policies.ts">create</a>({ ...params }) -> NetworkPolicyView</code>
329+
- <code title="get /v1/network-policies/{id}">client.networkPolicies.<a href="./src/resources/network-policies.ts">retrieve</a>(id) -> NetworkPolicyView</code>
330+
- <code title="post /v1/network-policies/{id}">client.networkPolicies.<a href="./src/resources/network-policies.ts">update</a>(id, { ...params }) -> NetworkPolicyView</code>
331+
- <code title="get /v1/network-policies">client.networkPolicies.<a href="./src/resources/network-policies.ts">list</a>({ ...params }) -> NetworkPolicyViewsNetworkPoliciesCursorIDPage</code>
332+
- <code title="post /v1/network-policies/{id}/delete">client.networkPolicies.<a href="./src/resources/network-policies.ts">delete</a>(id) -> NetworkPolicyView</code>

package-lock.json

Lines changed: 2 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)