From 1af55086d738d85db55ac5a1116bd01950665902 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 19 Feb 2026 01:44:20 +0000
Subject: [PATCH 1/3] refactor: deprecate and make Nullable total_count and
remaining_count of ListViews (#7533)
---
.stats.yml | 4 +-
api.md | 2 +-
src/index.ts | 2 +
src/resources/agents.ts | 10 +++--
src/resources/benchmark-jobs.ts | 4 +-
src/resources/benchmark-runs.ts | 6 +--
src/resources/benchmarks.ts | 6 +--
src/resources/blueprints.ts | 4 +-
src/resources/devboxes/devboxes.ts | 40 +++++++++++++++----
src/resources/devboxes/index.ts | 1 +
src/resources/gateway-configs.ts | 5 ++-
src/resources/index.ts | 1 +
src/resources/mcp-configs.ts | 5 ++-
src/resources/network-policies.ts | 5 ++-
src/resources/objects.ts | 10 +++--
src/resources/repositories.ts | 6 +--
src/resources/scenarios/scenarios.ts | 11 +++--
src/resources/secrets.ts | 14 ++++---
tests/api-resources/devboxes/devboxes.test.ts | 7 ++++
19 files changed, 96 insertions(+), 47 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 3e985df2f..44040dae9 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 117
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-c8d61a0c8b88fa30666ba021d1239eb0d549902354513c4741e9216bcbfa8e6d.yml
-openapi_spec_hash: 433e6fb4ce076012b696f69ae7596c67
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8704a652545c3831c8b7e246ec17f1a626b59911eb5701ddc922ca6cae1c8d57.yml
+openapi_spec_hash: e609bc5ed3fdce498bc7d16921bbba5e
config_hash: eb28692edd68a6ae95cf92af931c9976
diff --git a/api.md b/api.md
index 27681f9f7..2b28ba3df 100644
--- a/api.md
+++ b/api.md
@@ -144,7 +144,7 @@ Methods:
- client.devboxes.removeTunnel(id, { ...params }) -> unknown
- client.devboxes.resume(id) -> DevboxView
- client.devboxes.retrieveResourceUsage(id) -> DevboxResourceUsageView
-- client.devboxes.shutdown(id) -> DevboxView
+- client.devboxes.shutdown(id, { ...params }) -> DevboxView
- client.devboxes.snapshotDisk(id, { ...params }) -> DevboxSnapshotView
- client.devboxes.snapshotDiskAsync(id, { ...params }) -> DevboxSnapshotView
- client.devboxes.suspend(id) -> DevboxView
diff --git a/src/index.ts b/src/index.ts
index 15e19ad55..1a0e5f455 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -197,6 +197,7 @@ import {
DevboxResourceUsageView,
DevboxSendStdInRequest,
DevboxSendStdInResult,
+ DevboxShutdownParams,
DevboxSnapshotDiskAsyncParams,
DevboxSnapshotDiskParams,
DevboxSnapshotListView,
@@ -630,6 +631,7 @@ export declare namespace Runloop {
type DevboxListDiskSnapshotsParams as DevboxListDiskSnapshotsParams,
type DevboxReadFileContentsParams as DevboxReadFileContentsParams,
type DevboxRemoveTunnelParams as DevboxRemoveTunnelParams,
+ type DevboxShutdownParams as DevboxShutdownParams,
type DevboxSnapshotDiskParams as DevboxSnapshotDiskParams,
type DevboxSnapshotDiskAsyncParams as DevboxSnapshotDiskAsyncParams,
type DevboxUploadFileParams as DevboxUploadFileParams,
diff --git a/src/resources/agents.ts b/src/resources/agents.ts
index 0f7931a70..16b517c22 100644
--- a/src/resources/agents.ts
+++ b/src/resources/agents.ts
@@ -78,14 +78,16 @@ export interface AgentListView {
has_more: boolean;
/**
- * The count of remaining Agents.
+ * The count of remaining Agents. Deprecated: will be removed in a future breaking
+ * change.
*/
- remaining_count: number;
+ remaining_count?: number | null;
/**
- * The total count of Agents.
+ * The total count of Agents. Deprecated: will be removed in a future breaking
+ * change.
*/
- total_count: number;
+ total_count?: number | null;
}
/**
diff --git a/src/resources/benchmark-jobs.ts b/src/resources/benchmark-jobs.ts
index e58a0992b..0ec85c78c 100644
--- a/src/resources/benchmark-jobs.ts
+++ b/src/resources/benchmark-jobs.ts
@@ -308,9 +308,9 @@ export interface BenchmarkJobListView {
*/
jobs: Array;
- remaining_count: number;
+ remaining_count?: number | null;
- total_count: number;
+ total_count?: number | null;
}
/**
diff --git a/src/resources/benchmark-runs.ts b/src/resources/benchmark-runs.ts
index 7d51c5195..8173f5863 100644
--- a/src/resources/benchmark-runs.ts
+++ b/src/resources/benchmark-runs.ts
@@ -85,14 +85,14 @@ export class BenchmarkRunViewsBenchmarkRunsCursorIDPage extends BenchmarkRunsCur
export interface BenchmarkRunListView {
has_more: boolean;
- remaining_count: number;
-
/**
* List of BenchmarkRuns matching filter.
*/
runs: Array;
- total_count: number;
+ remaining_count?: number | null;
+
+ total_count?: number | null;
}
/**
diff --git a/src/resources/benchmarks.ts b/src/resources/benchmarks.ts
index c0d264c9d..4b6611a95 100644
--- a/src/resources/benchmarks.ts
+++ b/src/resources/benchmarks.ts
@@ -299,14 +299,14 @@ export interface BenchmarkView {
export interface ScenarioDefinitionListView {
has_more: boolean;
- remaining_count: number;
-
/**
* List of Scenarios matching filter.
*/
scenarios: Array;
- total_count: number;
+ remaining_count?: number | null;
+
+ total_count?: number | null;
}
export interface StartBenchmarkRunParameters {
diff --git a/src/resources/blueprints.ts b/src/resources/blueprints.ts
index 61cc4e5de..688a25e67 100644
--- a/src/resources/blueprints.ts
+++ b/src/resources/blueprints.ts
@@ -456,9 +456,9 @@ export interface BlueprintListView {
has_more: boolean;
- remaining_count: number;
+ remaining_count?: number | null;
- total_count: number;
+ total_count?: number | null;
}
export interface BlueprintPreviewView {
diff --git a/src/resources/devboxes/devboxes.ts b/src/resources/devboxes/devboxes.ts
index f1ff6f9b4..5777d7f47 100644
--- a/src/resources/devboxes/devboxes.ts
+++ b/src/resources/devboxes/devboxes.ts
@@ -450,10 +450,26 @@ export class Devboxes extends APIResource {
/**
* Shutdown a running Devbox. This will permanently stop the Devbox. If you want to
* save the state of the Devbox, you should take a snapshot before shutting down or
- * should suspend the Devbox instead of shutting down.
+ * should suspend the Devbox instead of shutting down. If the Devbox has any
+ * in-progress snapshots, the shutdown will be rejected with a 409 Conflict unless
+ * force=true is specified.
*/
- shutdown(id: string, options?: Core.RequestOptions): Core.APIPromise {
- return this._client.post(`/v1/devboxes/${id}/shutdown`, options);
+ shutdown(
+ id: string,
+ params?: DevboxShutdownParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ shutdown(id: string, options?: Core.RequestOptions): Core.APIPromise;
+ shutdown(
+ id: string,
+ params: DevboxShutdownParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(params)) {
+ return this.shutdown(id, {}, params);
+ }
+ const { force } = params;
+ return this._client.post(`/v1/devboxes/${id}/shutdown`, { query: { force }, ...options });
}
/**
@@ -674,9 +690,9 @@ export interface DevboxListView {
has_more: boolean;
- remaining_count: number;
+ remaining_count?: number | null;
- total_count: number;
+ total_count?: number | null;
}
export interface DevboxResourceUsageView {
@@ -762,14 +778,14 @@ export interface DevboxSendStdInResult {
export interface DevboxSnapshotListView {
has_more: boolean;
- remaining_count: number;
-
/**
* List of snapshots matching filter.
*/
snapshots: Array;
- total_count: number;
+ remaining_count?: number | null;
+
+ total_count?: number | null;
}
/**
@@ -1380,6 +1396,13 @@ export interface DevboxRemoveTunnelParams {
port: number;
}
+export interface DevboxShutdownParams {
+ /**
+ * If true, force shutdown even if snapshots are in progress. Defaults to false.
+ */
+ force?: string;
+}
+
export interface DevboxSnapshotDiskParams {
/**
* (Optional) Commit message associated with the snapshot (max 1000 characters)
@@ -1500,6 +1523,7 @@ export declare namespace Devboxes {
type DevboxListDiskSnapshotsParams as DevboxListDiskSnapshotsParams,
type DevboxReadFileContentsParams as DevboxReadFileContentsParams,
type DevboxRemoveTunnelParams as DevboxRemoveTunnelParams,
+ type DevboxShutdownParams as DevboxShutdownParams,
type DevboxSnapshotDiskParams as DevboxSnapshotDiskParams,
type DevboxSnapshotDiskAsyncParams as DevboxSnapshotDiskAsyncParams,
type DevboxUploadFileParams as DevboxUploadFileParams,
diff --git a/src/resources/devboxes/index.ts b/src/resources/devboxes/index.ts
index 9c96a3fa6..3cf02ca1b 100644
--- a/src/resources/devboxes/index.ts
+++ b/src/resources/devboxes/index.ts
@@ -46,6 +46,7 @@ export {
type DevboxListDiskSnapshotsParams,
type DevboxReadFileContentsParams,
type DevboxRemoveTunnelParams,
+ type DevboxShutdownParams,
type DevboxSnapshotDiskParams,
type DevboxSnapshotDiskAsyncParams,
type DevboxUploadFileParams,
diff --git a/src/resources/gateway-configs.ts b/src/resources/gateway-configs.ts
index 457d02031..0fc22ef1e 100644
--- a/src/resources/gateway-configs.ts
+++ b/src/resources/gateway-configs.ts
@@ -140,9 +140,10 @@ export interface GatewayConfigListView {
has_more: boolean;
/**
- * Total count of GatewayConfigs that match the query.
+ * Total count of GatewayConfigs that match the query. Deprecated: will be removed
+ * in a future breaking change.
*/
- total_count: number;
+ total_count?: number | null;
}
/**
diff --git a/src/resources/index.ts b/src/resources/index.ts
index 5ff244289..9adfbced4 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -95,6 +95,7 @@ export {
type DevboxListDiskSnapshotsParams,
type DevboxReadFileContentsParams,
type DevboxRemoveTunnelParams,
+ type DevboxShutdownParams,
type DevboxSnapshotDiskParams,
type DevboxSnapshotDiskAsyncParams,
type DevboxUploadFileParams,
diff --git a/src/resources/mcp-configs.ts b/src/resources/mcp-configs.ts
index 21a9e8939..d5f81315a 100644
--- a/src/resources/mcp-configs.ts
+++ b/src/resources/mcp-configs.ts
@@ -120,9 +120,10 @@ export interface McpConfigListView {
mcp_configs: Array;
/**
- * Total count of McpConfigs that match the query.
+ * Total count of McpConfigs that match the query. Deprecated: will be removed in a
+ * future breaking change.
*/
- total_count: number;
+ total_count?: number | null;
}
/**
diff --git a/src/resources/network-policies.ts b/src/resources/network-policies.ts
index 23efcd876..4882ca2fa 100644
--- a/src/resources/network-policies.ts
+++ b/src/resources/network-policies.ts
@@ -128,9 +128,10 @@ export interface NetworkPolicyListView {
network_policies: Array;
/**
- * Total count of items in this response.
+ * Total count of items in this response. Deprecated: will be removed in a future
+ * breaking change.
*/
- total_count: number;
+ total_count?: number | null;
}
/**
diff --git a/src/resources/objects.ts b/src/resources/objects.ts
index 63bbcfd37..e3852d990 100644
--- a/src/resources/objects.ts
+++ b/src/resources/objects.ts
@@ -159,14 +159,16 @@ export interface ObjectListView {
objects: Array;
/**
- * Number of Objects remaining after this page.
+ * Number of Objects remaining after this page. Deprecated: will be removed in a
+ * future breaking change.
*/
- remaining_count: number;
+ remaining_count?: number | null;
/**
- * Total number of Objects across all pages.
+ * Total number of Objects across all pages. Deprecated: will be removed in a
+ * future breaking change.
*/
- total_count: number;
+ total_count?: number | null;
}
/**
diff --git a/src/resources/repositories.ts b/src/resources/repositories.ts
index 57adcc05b..27abebe46 100644
--- a/src/resources/repositories.ts
+++ b/src/resources/repositories.ts
@@ -128,14 +128,14 @@ export class RepositoryConnectionViewsRepositoriesCursorIDPage extends Repositor
export interface RepositoryConnectionListView {
has_more: boolean;
- remaining_count: number;
-
/**
* List of repositories matching filter.
*/
repositories: Array;
- total_count: number;
+ remaining_count?: number | null;
+
+ total_count?: number | null;
}
/**
diff --git a/src/resources/scenarios/scenarios.ts b/src/resources/scenarios/scenarios.ts
index 142543f38..cb2b2a976 100644
--- a/src/resources/scenarios/scenarios.ts
+++ b/src/resources/scenarios/scenarios.ts
@@ -251,14 +251,14 @@ export interface ScenarioEnvironment {
export interface ScenarioRunListView {
has_more: boolean;
- remaining_count: number;
-
/**
* List of ScenarioRuns matching filter.
*/
runs: Array;
- total_count: number;
+ remaining_count?: number | null;
+
+ total_count?: number | null;
}
/**
@@ -421,6 +421,11 @@ export interface ScenarioView {
*/
scoring_contract: ScoringContract;
+ /**
+ * The state of the scenario.
+ */
+ status: string;
+
/**
* The Environment in which the Scenario is run.
*/
diff --git a/src/resources/secrets.ts b/src/resources/secrets.ts
index 305b61dd3..a6f0b4d02 100644
--- a/src/resources/secrets.ts
+++ b/src/resources/secrets.ts
@@ -77,19 +77,21 @@ export interface SecretListView {
has_more: boolean;
/**
- * Number of Secrets remaining after this page.
+ * List of Secret objects. Values are omitted for security.
*/
- remaining_count: number;
+ secrets: Array;
/**
- * List of Secret objects. Values are omitted for security.
+ * Number of Secrets remaining after this page. Deprecated: will be removed in a
+ * future breaking change.
*/
- secrets: Array;
+ remaining_count?: number | null;
/**
- * Total number of Secrets across all pages.
+ * Total number of Secrets across all pages. Deprecated: will be removed in a
+ * future breaking change.
*/
- total_count: number;
+ total_count?: number | null;
}
/**
diff --git a/tests/api-resources/devboxes/devboxes.test.ts b/tests/api-resources/devboxes/devboxes.test.ts
index 06d942371..4d17c0d19 100644
--- a/tests/api-resources/devboxes/devboxes.test.ts
+++ b/tests/api-resources/devboxes/devboxes.test.ts
@@ -440,6 +440,13 @@ describe('resource devboxes', () => {
);
});
+ test('shutdown: request options and params are passed correctly', async () => {
+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
+ await expect(
+ client.devboxes.shutdown('id', { force: 'force' }, { path: '/_stainless_unknown_path' }),
+ ).rejects.toThrow(Runloop.NotFoundError);
+ });
+
test('snapshotDisk', async () => {
const responsePromise = client.devboxes.snapshotDisk('id');
const rawResponse = await responsePromise.asResponse();
From 9148a6a007613b7841bf99c1de1df2156bd87f4b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 19 Feb 2026 03:19:00 +0000
Subject: [PATCH 2/3] release: 1.8.1
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 13 +++++++++++++
package.json | 2 +-
src/version.ts | 2 +-
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 099626f4f..7840fde9a 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "1.8.0"
+ ".": "1.8.1"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c63602343..e55864f00 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,18 @@
# Changelog
+## 1.8.1 (2026-02-19)
+
+Full Changelog: [v1.8.0...v1.8.1](https://github.com/runloopai/api-client-ts/compare/v1.8.0...v1.8.1)
+
+### Chores
+
+* **benchmarks:** removed unused validate scorer endpoint ([#716](https://github.com/runloopai/api-client-ts/issues/716)) ([54bb583](https://github.com/runloopai/api-client-ts/commit/54bb5834f011ad10f9cdb086cddca9810c05f13e))
+
+
+### Refactors
+
+* deprecate and make Nullable total_count and remaining_count of ListViews ([#7533](https://github.com/runloopai/api-client-ts/issues/7533)) ([1af5508](https://github.com/runloopai/api-client-ts/commit/1af55086d738d85db55ac5a1116bd01950665902))
+
## 1.8.0 (2026-02-12)
Full Changelog: [v1.7.0...v1.8.0](https://github.com/runloopai/api-client-ts/compare/v1.7.0...v1.8.0)
diff --git a/package.json b/package.json
index 50e735564..7326f4966 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@runloop/api-client",
- "version": "1.8.0",
+ "version": "1.8.1",
"description": "The official TypeScript library for the Runloop API",
"author": "Runloop ",
"types": "dist/sdk.d.ts",
diff --git a/src/version.ts b/src/version.ts
index 29d3ce71f..3c346f4fb 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '1.8.0'; // x-release-please-version
+export const VERSION = '1.8.1'; // x-release-please-version
From 3230331e09ecc0cbac46b0036b8a11faae357054 Mon Sep 17 00:00:00 2001
From: Albert Li
Date: Wed, 18 Feb 2026 17:48:27 -0800
Subject: [PATCH 3/3] Fix types
---
tests/objects/scenario.test.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/objects/scenario.test.ts b/tests/objects/scenario.test.ts
index f86c74dc6..e490f4888 100644
--- a/tests/objects/scenario.test.ts
+++ b/tests/objects/scenario.test.ts
@@ -17,11 +17,12 @@ describe('Scenario', () => {
input_context: {
problem_statement: 'Solve this problem',
},
- environment_parameters: {},
+ environment: {},
scoring_contract: {
scoring_function_parameters: [],
},
metadata: {},
+ status: 'active',
} as ScenarioView;
mockScenarioRunData = {