Skip to content
Open
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
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.26.0"
".": "1.27.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 119
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-0b7cd0c2fc193b18189cd7f44cf45ece7726b5d485fb72577f7d235266432ea0.yml
openapi_spec_hash: 78c340dbfb9d3d58b24ef318fc2a657b
config_hash: 218b8d25038e627faab98532392ee9a0
configured_endpoints: 120
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-50686c7a06e432373c5dd7e771ab1483a6ca0531b1dd9a10fc31c0cf2833bcdf.yml
openapi_spec_hash: a554b4d3815148c094778b53bfe20b21
config_hash: 6d102da8b9fcc3d0deb42d7a707e78c6
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 1.27.0 (2026-07-24)

Full Changelog: [v1.26.0...v1.27.0](https://github.com/runloopai/api-client-ts/compare/v1.26.0...v1.27.0)

### Features

* **mux:** wait_for_eviction endpoint for flex eviction notifications ([#10325](https://github.com/runloopai/api-client-ts/issues/10325)) ([429f2b1](https://github.com/runloopai/api-client-ts/commit/429f2b1ea76284ab6006e6e819457dfeddaaf5c9))


### Bug Fixes

* **mux:** field-level merge on network policy egress updates ([#10338](https://github.com/runloopai/api-client-ts/issues/10338)) ([835c772](https://github.com/runloopai/api-client-ts/commit/835c7720715b525a371c06745dc93aac249b01ee))
* **mux:** move eviction-watch SSE route off the /{id} slot ([#10409](https://github.com/runloopai/api-client-ts/issues/10409)) ([80d82cf](https://github.com/runloopai/api-client-ts/commit/80d82cf7798ce423dff86876ff89bd752f80d0f0))


### Chores

* **stainless:** generate watch_evictions as an SSE stream ([#10404](https://github.com/runloopai/api-client-ts/issues/10404)) ([043ebbc](https://github.com/runloopai/api-client-ts/commit/043ebbc407067c3d7d620b9a00fa1937dd3bcb3b))

## 1.26.0 (2026-07-22)

Full Changelog: [v1.25.0...v1.26.0](https://github.com/runloopai/api-client-ts/compare/v1.25.0...v1.26.0)
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Methods:
Types:

- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxAsyncExecutionDetailView</a></code>
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxEvictionEventView</a></code>
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxExecutionDetailView</a></code>
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxKillExecutionRequest</a></code>
- <code><a href="./src/resources/devboxes/devboxes.ts">DevboxListView</a></code>
Expand Down Expand Up @@ -213,6 +214,7 @@ Methods:
- <code title="post /v1/devboxes/{id}/suspend">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">suspend</a>(id) -> DevboxView</code>
- <code title="post /v1/devboxes/{id}/upload_file">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">uploadFile</a>(id, { ...params }) -> unknown</code>
- <code title="post /v1/devboxes/{devbox_id}/executions/{execution_id}/wait_for_status">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">waitForCommand</a>(devboxId, executionId, { ...params }) -> DevboxAsyncExecutionDetailView</code>
- <code title="get /v1/devboxes/evictions/watch">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">watchEvictions</a>() -> DevboxEvictionEventView</code>
- <code title="post /v1/devboxes/{id}/write_file_contents">client.devboxes.<a href="./src/resources/devboxes/devboxes.ts">writeFileContents</a>(id, { ...params }) -> DevboxExecutionDetailView</code>

## DiskSnapshots
Expand Down
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.26.0",
"version": "1.27.0",
"description": "The official TypeScript library for the Runloop API",
"author": "Runloop <support@runloop.ai>",
"types": "dist/sdk.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dxt_version": "0.2",
"name": "@runloop/api-client-mcp",
"version": "1.26.0",
"version": "1.27.0",
"description": "The official MCP Server for the Runloop API",
"author": {
"name": "Runloop",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@runloop/api-client-mcp",
"version": "1.26.0",
"version": "1.27.0",
"description": "The official MCP Server for the Runloop API",
"author": "Runloop <support@runloop.ai>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const newMcpServer = async (stainlessApiKey: string | undefined) =>
new McpServer(
{
name: 'runloop_api_client_api',
version: '1.26.0',
version: '1.27.0',
},
{
instructions: await getInstructions(stainlessApiKey),
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ import {
DevboxDeleteDiskSnapshotResponse,
DevboxDownloadFileParams,
DevboxEnableTunnelParams,
DevboxEvictionEventView,
DevboxExecuteAsyncParams,
DevboxExecuteParams,
DevboxExecuteSyncParams,
Expand Down Expand Up @@ -673,6 +674,7 @@ export declare namespace Runloop {
export {
Devboxes as Devboxes,
type DevboxAsyncExecutionDetailView as DevboxAsyncExecutionDetailView,
type DevboxEvictionEventView as DevboxEvictionEventView,
type DevboxExecutionDetailView as DevboxExecutionDetailView,
type DevboxKillExecutionRequest as DevboxKillExecutionRequest,
type DevboxListView as DevboxListView,
Expand Down
29 changes: 29 additions & 0 deletions src/resources/devboxes/devboxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { APIResource } from '../../resource';
import { isRequestOptions } from '../../core';
import { APIPromise } from '../../core';
import * as Core from '../../core';
import * as Shared from '../shared';
import * as DiskSnapshotsAPI from './disk-snapshots';
Expand Down Expand Up @@ -32,6 +33,7 @@ import {
DiskSnapshotsCursorIDPage,
type DiskSnapshotsCursorIDPageParams,
} from '../../pagination';
import { Stream } from '../../streaming';
import { type Response } from '../../_shims/index';
import {
longPollUntil,
Expand Down Expand Up @@ -538,6 +540,19 @@ export class Devboxes extends APIResource {
});
}

/**
* Subscribe, via server-sent events, to pending infrastructure evictions for every
* Devbox in the account. On connect the stream emits one event per Devbox that
* currently has a pending eviction, then one event as each further eviction is
* scheduled. Best-effort and advisory: a Devbox stays running until its deadline,
* and delivery is not guaranteed.
*/
watchEvictions(options?: Core.RequestOptions): APIPromise<Stream<DevboxEvictionEventView>> {
return this._client.get('/v1/devboxes/evictions/watch', { ...options, stream: true }) as APIPromise<
Stream<DevboxEvictionEventView>
>;
}

/**
* Write UTF-8 string contents to a file at path on the Devbox. Note for large
* files (larger than 100MB), the upload_file endpoint must be used.
Expand Down Expand Up @@ -619,6 +634,19 @@ export interface DevboxAsyncExecutionDetailView {
stdout_truncated?: boolean | null;
}

export interface DevboxEvictionEventView {
/**
* The ID of the Devbox with a pending eviction.
*/
devbox_id: string;

/**
* Unix timestamp (milliseconds) after which the Devbox will be suspended. Advisory
* and best-effort.
*/
eviction_deadline_ms: number;
}

export interface DevboxExecutionDetailView {
/**
* Devbox id where command was executed.
Expand Down Expand Up @@ -1539,6 +1567,7 @@ Devboxes.Executions = Executions;
export declare namespace Devboxes {
export {
type DevboxAsyncExecutionDetailView as DevboxAsyncExecutionDetailView,
type DevboxEvictionEventView as DevboxEvictionEventView,
type DevboxExecutionDetailView as DevboxExecutionDetailView,
type DevboxKillExecutionRequest as DevboxKillExecutionRequest,
type DevboxListView as DevboxListView,
Expand Down
1 change: 1 addition & 0 deletions src/resources/devboxes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export {
DevboxViewsDevboxesCursorIDPage,
Devboxes,
type DevboxAsyncExecutionDetailView,
type DevboxEvictionEventView,
type DevboxExecutionDetailView,
type DevboxKillExecutionRequest,
type DevboxListView,
Expand Down
1 change: 1 addition & 0 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export {
DevboxViewsDevboxesCursorIDPage,
Devboxes,
type DevboxAsyncExecutionDetailView,
type DevboxEvictionEventView,
type DevboxExecutionDetailView,
type DevboxKillExecutionRequest,
type DevboxListView,
Expand Down
3 changes: 2 additions & 1 deletion src/resources/network-policies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export class NetworkPolicies extends APIResource {
}

/**
* Update an existing NetworkPolicy. All fields are optional.
* Update an existing NetworkPolicy. All fields are optional - null fields preserve
* existing values, provided fields replace entirely.
*/
update(
id: string,
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '1.26.0'; // x-release-please-version
export const VERSION = '1.27.0'; // x-release-please-version
11 changes: 11 additions & 0 deletions tests/api-resources/devboxes/devboxes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,17 @@ describe('resource devboxes', () => {
});
});

test('watchEvictions', async () => {
const responsePromise = client.devboxes.watchEvictions();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
expect(response).not.toBeInstanceOf(Response);
const dataAndResponse = await responsePromise.withResponse();
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});

test('writeFileContents: only required params', async () => {
const responsePromise = client.devboxes.writeFileContents('id', {
contents: 'contents',
Expand Down