Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/runloop-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: runloopai/checkout@main
- uses: actions/checkout@v6

- name: Set up Node
uses: runloopai/setup-node@main
Expand All @@ -41,7 +41,7 @@ jobs:
contents: read
id-token: write
steps:
- uses: runloopai/checkout@main
- uses: actions/checkout@v6

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

- name: Set up Node
uses: runloopai/setup-node@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: runloopai/checkout@main
- uses: actions/checkout@v6

- name: Set up Node
uses: runloopai/setup-node@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
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')

steps:
- uses: runloopai/checkout@main
- uses: actions/checkout@v6

- name: Check release environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.1.0"
".": "1.2.0-beta"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 97
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-370a5d676ff0ef41f3ca6ed669d29b6e3e6b7f0a914ac3dbed6bd45e75533c74.yml
openapi_spec_hash: 7bb5ea1117d754b7985aff0da5bca3a7
config_hash: 2363f563f42501d2b1587a4f64bdccaf
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8ebd9dbfacb180ec9c980f5e46a814b0c8a3cb6063136db18780271d33a8dfa6.yml
openapi_spec_hash: 12d4edec72b722945bade9419636d63e
config_hash: ec63e62d4660c9c924b39a8671c2fdb1
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## 1.2.0-beta (2026-01-19)

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

### Features

* **benchmarks:** add `update_scenarios` method to benchmarks resource ([4ef2680](https://github.com/runloopai/api-client-ts/commit/4ef26807dbb81cd171a1d1a91a4eadf4ec0cde73))
* **devbox:** remove this one ([ffe23be](https://github.com/runloopai/api-client-ts/commit/ffe23bea59c737ad845bc179e007fecb07a721b7))
* **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))
* **network-policy:** add network policies to api ([fd7c42c](https://github.com/runloopai/api-client-ts/commit/fd7c42c760cd5d80f5843fbf7e97b85d29d925d5))
* **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))


### Bug Fixes

* **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))
* **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))


### Chores

* break long lines in snippets into multiline ([aea51a8](https://github.com/runloopai/api-client-ts/commit/aea51a857a3ec4f741281782bd7d1b40b3e33ca9))
* **internal:** codegen related update ([f2acb64](https://github.com/runloopai/api-client-ts/commit/f2acb645f6854253dd74676570b03c1c6f325b2c))
* **internal:** update `actions/checkout` version ([6f2a8ae](https://github.com/runloopai/api-client-ts/commit/6f2a8ae880dbe17fdfd66389fbe674baf5e75dc8))
* **internal:** upgrade babel, qs, js-yaml ([3c31dd4](https://github.com/runloopai/api-client-ts/commit/3c31dd460e6f8e487ff326763bbe39b555fd136e))

## 1.1.0 (2025-12-13)

Full Changelog: [v1.0.0...v1.1.0](https://github.com/runloopai/api-client-ts/compare/v1.0.0...v1.1.0)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2025 runloop
Copyright 2026 runloop

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:

Expand Down
58 changes: 51 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ The SDK provides object-oriented interfaces for all major Runloop resources:

The SDK is fully typed with comprehensive TypeScript definitions:

```typescript
import { RunloopSDK, type DevboxView } from '@runloop/api-client';

const runloop = new RunloopSDK();
const devbox: DevboxView = await runloop.devbox.create();
```

### Scorers

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:
Expand Down Expand Up @@ -141,8 +134,59 @@ const snapshot = await devbox.snapshotDisk();
await snapshot.createDevbox();
...
await devbox.shutdown();

```

## File write

// You can also pass a `fetch` `Response`:
await client.devboxes.uploadFile('id', {
path: 'path',
file: await fetch('https://somesite/file'),
});

// Finally, if none of the above are convenient, you can use our `toFile` helper:
await client.devboxes.uploadFile('id', {
path: 'path',
file: await toFile(Buffer.from('my bytes'), 'file'),
});
await client.devboxes.uploadFile('id', {
path: 'path',
file: await toFile(new Uint8Array([0, 1, 2]), 'file'),
});

````

## Handling errors

When the library is unable to connect to the API,
or if the API returns a non-success status code (i.e., 4xx or 5xx response),
a subclass of `APIError` will be thrown:

<!-- prettier-ignore -->
```ts
const devboxView = await client.devboxes.create().catch(async (err) => {
if (err instanceof Runloop.APIError) {
console.log(err.status); // 400
console.log(err.name); // BadRequestError
console.log(err.headers); // {server: 'nginx', ...}
} else {
throw err;
}
});
```typescript
import { RunloopSDK, type DevboxView } from '@runloop/api-client';

const runloop = new RunloopSDK();
const devbox: DevboxView = await runloop.devbox.create();
````

// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
await client.devboxes.uploadFile('id', {
path: 'path',
file: fs.createReadStream('/path/to/file'),
});

## Advanced Configuration

Customize the SDK with your API token, endpoint, timeout, and retry settings:
Expand Down
22 changes: 22 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
Types:

- <code><a href="./src/resources/shared.ts">AfterIdle</a></code>
- <code><a href="./src/resources/shared.ts">AgentMount</a></code>
- <code><a href="./src/resources/shared.ts">AgentSource</a></code>
- <code><a href="./src/resources/shared.ts">CodeMountParameters</a></code>
- <code><a href="./src/resources/shared.ts">LaunchParameters</a></code>
- <code><a href="./src/resources/shared.ts">Mount</a></code>
- <code><a href="./src/resources/shared.ts">ObjectMount</a></code>
- <code><a href="./src/resources/shared.ts">RunProfile</a></code>

# Benchmarks
Expand All @@ -16,6 +18,8 @@ Types:
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkCreateParameters</a></code>
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkRunListView</a></code>
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkRunView</a></code>
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkScenarioUpdateParameters</a></code>
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkUpdateParameters</a></code>
- <code><a href="./src/resources/benchmarks/benchmarks.ts">BenchmarkView</a></code>
- <code><a href="./src/resources/benchmarks/benchmarks.ts">ScenarioDefinitionListView</a></code>
- <code><a href="./src/resources/benchmarks/benchmarks.ts">StartBenchmarkRunParameters</a></code>
Expand All @@ -29,6 +33,7 @@ Methods:
- <code title="get /v1/benchmarks/{id}/definitions">client.benchmarks.<a href="./src/resources/benchmarks/benchmarks.ts">definitions</a>(id, { ...params }) -> ScenarioDefinitionListView</code>
- <code title="get /v1/benchmarks/list_public">client.benchmarks.<a href="./src/resources/benchmarks/benchmarks.ts">listPublic</a>({ ...params }) -> BenchmarkViewsBenchmarksCursorIDPage</code>
- <code title="post /v1/benchmarks/start_run">client.benchmarks.<a href="./src/resources/benchmarks/benchmarks.ts">startRun</a>({ ...params }) -> BenchmarkRunView</code>
- <code title="post /v1/benchmarks/{id}/scenarios">client.benchmarks.<a href="./src/resources/benchmarks/benchmarks.ts">updateScenarios</a>(id, { ...params }) -> BenchmarkView</code>

## Runs

Expand Down Expand Up @@ -308,3 +313,20 @@ Methods:
- <code title="post /v1/secrets/{name}">client.secrets.<a href="./src/resources/secrets.ts">update</a>(name, { ...params }) -> SecretView</code>
- <code title="get /v1/secrets">client.secrets.<a href="./src/resources/secrets.ts">list</a>({ ...params }) -> SecretListView</code>
- <code title="post /v1/secrets/{name}/delete">client.secrets.<a href="./src/resources/secrets.ts">delete</a>(name) -> SecretView</code>

# NetworkPolicies

Types:

- <code><a href="./src/resources/network-policies.ts">NetworkPolicyCreateParameters</a></code>
- <code><a href="./src/resources/network-policies.ts">NetworkPolicyListView</a></code>
- <code><a href="./src/resources/network-policies.ts">NetworkPolicyUpdateParameters</a></code>
- <code><a href="./src/resources/network-policies.ts">NetworkPolicyView</a></code>

Methods:

- <code title="post /v1/network-policies">client.networkPolicies.<a href="./src/resources/network-policies.ts">create</a>({ ...params }) -> NetworkPolicyView</code>
- <code title="get /v1/network-policies/{id}">client.networkPolicies.<a href="./src/resources/network-policies.ts">retrieve</a>(id) -> NetworkPolicyView</code>
- <code title="post /v1/network-policies/{id}">client.networkPolicies.<a href="./src/resources/network-policies.ts">update</a>(id, { ...params }) -> NetworkPolicyView</code>
- <code title="get /v1/network-policies">client.networkPolicies.<a href="./src/resources/network-policies.ts">list</a>({ ...params }) -> NetworkPolicyViewsNetworkPoliciesCursorIDPage</code>
- <code title="post /v1/network-policies/{id}/delete">client.networkPolicies.<a href="./src/resources/network-policies.ts">delete</a>(id) -> NetworkPolicyView</code>
16 changes: 2 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@runloop/api-client",
"version": "1.1.0",
"version": "1.2.0-beta",
"description": "The official TypeScript library for the Runloop API",
"author": "Runloop <support@runloop.ai>",
"types": "dist/sdk.d.ts",
Expand Down
Loading
Loading