From 960a249773062d0b9c3835b6a10edcd16cb0e812 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 21:48:43 +0000 Subject: [PATCH 01/12] chore: remove dead port configuration code, mark deprecated / ignored in the API (#8195) --- .stats.yml | 4 ++-- src/resources/shared.ts | 6 ------ tests/api-resources/benchmarks.test.ts | 1 - tests/api-resources/blueprints.test.ts | 3 --- tests/api-resources/devboxes/devboxes.test.ts | 1 - tests/api-resources/scenarios/scenarios.test.ts | 3 --- 6 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index ab8cc33c0..57fda9e71 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-0568973e19e8af9fa953b2ded109ab2b69e76e90e2b74f33617dbf7092e26274.yml -openapi_spec_hash: 10ba804ce69510d7985e05c77d0ffcf6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-b56067b06cdf0eb4150f81d8f53e46d9c79b8cbecba6f8c0ee82f798d8cd2447.yml +openapi_spec_hash: 4e0020f255cd31baa79227a5888e1eac config_hash: de99cfce88e2d1f02246dc6c2f43bc6c diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 98baf2c13..62d06f696 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -199,12 +199,6 @@ export interface LaunchParameters { */ architecture?: 'x86_64' | 'arm64' | null; - /** - * A list of ports to make available on the Devbox. Only ports made available will - * be surfaced to create tunnels via the 'createTunnel' API. - */ - available_ports?: Array | null; - /** * Custom CPU cores. Must be 0.5, 1, or a multiple of 2. Max is 16. */ diff --git a/tests/api-resources/benchmarks.test.ts b/tests/api-resources/benchmarks.test.ts index 6220f7f70..5fddae066 100644 --- a/tests/api-resources/benchmarks.test.ts +++ b/tests/api-resources/benchmarks.test.ts @@ -197,7 +197,6 @@ describe('resource benchmarks', () => { launchParameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', - available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, diff --git a/tests/api-resources/blueprints.test.ts b/tests/api-resources/blueprints.test.ts index 888ae59fa..9e8f9861a 100644 --- a/tests/api-resources/blueprints.test.ts +++ b/tests/api-resources/blueprints.test.ts @@ -40,7 +40,6 @@ describe('resource blueprints', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', - available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, @@ -184,7 +183,6 @@ describe('resource blueprints', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', - available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, @@ -283,7 +281,6 @@ describe('resource blueprints', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', - available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, diff --git a/tests/api-resources/devboxes/devboxes.test.ts b/tests/api-resources/devboxes/devboxes.test.ts index a169ed73e..21297c1df 100644 --- a/tests/api-resources/devboxes/devboxes.test.ts +++ b/tests/api-resources/devboxes/devboxes.test.ts @@ -50,7 +50,6 @@ describe('resource devboxes', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', - available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, diff --git a/tests/api-resources/scenarios/scenarios.test.ts b/tests/api-resources/scenarios/scenarios.test.ts index 84e05196a..4d921e3c6 100644 --- a/tests/api-resources/scenarios/scenarios.test.ts +++ b/tests/api-resources/scenarios/scenarios.test.ts @@ -62,7 +62,6 @@ describe('resource scenarios', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', - available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, @@ -132,7 +131,6 @@ describe('resource scenarios', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', - available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, @@ -283,7 +281,6 @@ describe('resource scenarios', () => { launchParameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', - available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, From 1ad5e7623d62f06c3aef1f6f11c57fb1fb6ff162 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 19:56:47 +0000 Subject: [PATCH 02/12] refactor(tests): switch from prism to steady --- CONTRIBUTING.md | 2 +- scripts/mock | 26 +++++++++++----------- scripts/test | 20 ++++++++--------- tests/api-resources/scenarios/runs.test.ts | 3 +-- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aa6af7e9d..c85b52f7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,7 +65,7 @@ $ pnpm link --global @runloop/api-client ## Running tests -Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. +Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests. ```sh $ ./scripts/mock diff --git a/scripts/mock b/scripts/mock index bcf3b392b..38201de83 100755 --- a/scripts/mock +++ b/scripts/mock @@ -19,34 +19,34 @@ fi echo "==> Starting mock server with URL ${URL}" -# Run prism mock on the given spec +# Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version + npm exec --package=@stdy/cli@0.19.3 -- steady --version - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL" &> .stdy.log & - # Wait for server to come online (max 30s) + # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" attempts=0 - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do + if ! kill -0 $! 2>/dev/null; then + echo + cat .stdy.log + exit 1 + fi attempts=$((attempts + 1)) if [ "$attempts" -ge 300 ]; then echo - echo "Timed out waiting for Prism server to start" - cat .prism.log + echo "Timed out waiting for Steady server to start" + cat .stdy.log exit 1 fi echo -n "." sleep 0.1 done - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - echo else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 7228df058..e17242d0d 100755 --- a/scripts/test +++ b/scripts/test @@ -9,6 +9,10 @@ GREEN='\033[0;32m' YELLOW='\033[0;33m' NC='\033[0m' # No Color +function steady_is_running() { + curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1 +} + # Parse command line arguments RUN_SMOKE_TESTS=false JEST_ARGS=() @@ -26,10 +30,6 @@ while [[ $# -gt 0 ]]; do esac done -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 -} - kill_server_on_port() { pids=$(lsof -t -i tcp:"$1" || echo "") if [ "$pids" != "" ]; then @@ -42,7 +42,7 @@ function is_overriding_api_base_url() { [ -n "$TEST_API_BASE_URL" ] } -if ! is_overriding_api_base_url && ! prism_is_running ; then +if ! is_overriding_api_base_url && ! steady_is_running ; then # When we exit this script, make sure to kill the background mock server process trap 'kill_server_on_port 4010' EXIT @@ -53,19 +53,19 @@ fi if is_overriding_api_base_url ; then echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" +elif ! steady_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server" echo -e "running against your OpenAPI spec." echo echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" + echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets${NC}" echo exit 1 else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}" echo fi diff --git a/tests/api-resources/scenarios/runs.test.ts b/tests/api-resources/scenarios/runs.test.ts index 8d5ce1629..0997ff36f 100644 --- a/tests/api-resources/scenarios/runs.test.ts +++ b/tests/api-resources/scenarios/runs.test.ts @@ -98,8 +98,7 @@ describe('resource runs', () => { ); }); - // Mock server doesn't support application/zip responses - test.skip('downloadLogs: request options instead of params are passed correctly', async () => { + test('downloadLogs: request options instead of 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.scenarios.runs.downloadLogs('id', { path: '/_stainless_unknown_path' }), From 6d2a6041e49f1f9ca85ae1f43d7be94041e87610 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 19:26:05 +0000 Subject: [PATCH 03/12] refactor: undeprecate total_count from pagination API, remove remaining_count (#8084) --- .stats.yml | 4 ++-- src/resources/agents.ts | 15 +++++++------ src/resources/benchmark-jobs.ts | 8 +++++-- src/resources/benchmark-runs.ts | 14 +++++++++++-- src/resources/benchmarks.ts | 16 +++++++++++--- src/resources/blueprints.ts | 14 +++++++++++-- src/resources/devboxes/devboxes.ts | 16 ++++++++++---- src/resources/devboxes/disk-snapshots.ts | 6 ++++++ src/resources/gateway-configs.ts | 9 ++++++-- src/resources/mcp-configs.ts | 9 ++++++-- src/resources/network-policies.ts | 9 ++++++-- src/resources/objects.ts | 21 ++++++++++++------- src/resources/repositories.ts | 8 +++++-- src/resources/scenarios/runs.ts | 6 ++++++ src/resources/scenarios/scenarios.ts | 14 +++++++++++-- src/resources/scenarios/scorers.ts | 8 ++++++- src/resources/secrets.ts | 9 +------- src/resources/shared.ts | 6 ++++++ tests/api-resources/agents.test.ts | 1 + tests/api-resources/benchmark-jobs.test.ts | 1 + tests/api-resources/benchmark-runs.test.ts | 2 ++ tests/api-resources/benchmarks.test.ts | 8 ++++++- tests/api-resources/blueprints.test.ts | 5 +++++ tests/api-resources/devboxes/devboxes.test.ts | 3 +++ .../devboxes/disk-snapshots.test.ts | 1 + tests/api-resources/gateway-configs.test.ts | 1 + tests/api-resources/mcp-configs.test.ts | 1 + tests/api-resources/network-policies.test.ts | 1 + tests/api-resources/objects.test.ts | 2 ++ tests/api-resources/repositories.test.ts | 1 + tests/api-resources/scenarios/runs.test.ts | 1 + .../api-resources/scenarios/scenarios.test.ts | 5 +++++ tests/api-resources/scenarios/scorers.test.ts | 6 +++++- 33 files changed, 179 insertions(+), 52 deletions(-) diff --git a/.stats.yml b/.stats.yml index 57fda9e71..96414b617 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-b56067b06cdf0eb4150f81d8f53e46d9c79b8cbecba6f8c0ee82f798d8cd2447.yml -openapi_spec_hash: 4e0020f255cd31baa79227a5888e1eac +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-3d441e9c2074aef7bd1e87b2ebfbe5c25e340084dbdfeed8a2e4dc9384561e3b.yml +openapi_spec_hash: 250bfdf2c2270ade53c058419e23c5dc config_hash: de99cfce88e2d1f02246dc6c2f43bc6c diff --git a/src/resources/agents.ts b/src/resources/agents.ts index 16b517c22..dd1f7d8e5 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -78,14 +78,7 @@ export interface AgentListView { has_more: boolean; /** - * The count of remaining Agents. Deprecated: will be removed in a future breaking - * change. - */ - remaining_count?: number | null; - - /** - * The total count of Agents. Deprecated: will be removed in a future breaking - * change. + * The total count of Agents. */ total_count?: number | null; } @@ -150,6 +143,12 @@ export interface AgentCreateParams { } export interface AgentListParams extends AgentsCursorIDPageParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter agents by public visibility. */ diff --git a/src/resources/benchmark-jobs.ts b/src/resources/benchmark-jobs.ts index ddd532047..8d8f9d344 100644 --- a/src/resources/benchmark-jobs.ts +++ b/src/resources/benchmark-jobs.ts @@ -308,8 +308,6 @@ export interface BenchmarkJobListView { */ jobs: Array; - remaining_count?: number | null; - total_count?: number | null; } @@ -990,6 +988,12 @@ export namespace BenchmarkJobCreateParams { } export interface BenchmarkJobListParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * The limit of items to return. Default is 20. Max is 5000. */ diff --git a/src/resources/benchmark-runs.ts b/src/resources/benchmark-runs.ts index 0584557bf..f7f529be6 100644 --- a/src/resources/benchmark-runs.ts +++ b/src/resources/benchmark-runs.ts @@ -92,8 +92,6 @@ export interface BenchmarkRunListView { */ runs: Array; - remaining_count?: number | null; - total_count?: number | null; } @@ -168,6 +166,12 @@ export interface BenchmarkRunListParams extends BenchmarkRunsCursorIDPageParams */ benchmark_id?: string; + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by name */ @@ -175,6 +179,12 @@ export interface BenchmarkRunListParams extends BenchmarkRunsCursorIDPageParams } export interface BenchmarkRunListScenarioRunsParams extends BenchmarkRunsCursorIDPageParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by Scenario Run state */ diff --git a/src/resources/benchmarks.ts b/src/resources/benchmarks.ts index 4b6611a95..57128638d 100644 --- a/src/resources/benchmarks.ts +++ b/src/resources/benchmarks.ts @@ -304,8 +304,6 @@ export interface ScenarioDefinitionListView { */ scenarios: Array; - remaining_count?: number | null; - total_count?: number | null; } @@ -413,6 +411,12 @@ export interface BenchmarkUpdateParams { } export interface BenchmarkListParams extends BenchmarksCursorIDPageParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by name */ @@ -431,7 +435,13 @@ export interface BenchmarkDefinitionsParams { starting_after?: string; } -export interface BenchmarkListPublicParams extends BenchmarksCursorIDPageParams {} +export interface BenchmarkListPublicParams extends BenchmarksCursorIDPageParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; +} export interface BenchmarkStartRunParams { /** diff --git a/src/resources/blueprints.ts b/src/resources/blueprints.ts index 688a25e67..ce4ae4a6d 100644 --- a/src/resources/blueprints.ts +++ b/src/resources/blueprints.ts @@ -456,8 +456,6 @@ export interface BlueprintListView { has_more: boolean; - remaining_count?: number | null; - total_count?: number | null; } @@ -767,6 +765,12 @@ export namespace BlueprintCreateParams { } export interface BlueprintListParams extends BlueprintsCursorIDPageParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by name */ @@ -826,6 +830,12 @@ export interface BlueprintCreateFromInspectionParams { } export interface BlueprintListPublicParams extends BlueprintsCursorIDPageParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by name */ diff --git a/src/resources/devboxes/devboxes.ts b/src/resources/devboxes/devboxes.ts index 13d5af600..46576f610 100644 --- a/src/resources/devboxes/devboxes.ts +++ b/src/resources/devboxes/devboxes.ts @@ -675,8 +675,6 @@ export interface DevboxListView { has_more: boolean; - remaining_count?: number | null; - total_count?: number | null; } @@ -768,8 +766,6 @@ export interface DevboxSnapshotListView { */ snapshots: Array; - remaining_count?: number | null; - total_count?: number | null; } @@ -1237,6 +1233,12 @@ export interface DevboxUpdateParams { } export interface DevboxListParams extends DevboxesCursorIDPageParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by status */ @@ -1363,6 +1365,12 @@ export interface DevboxListDiskSnapshotsParams extends DiskSnapshotsCursorIDPage */ devbox_id?: string; + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter snapshots by metadata key-value pair. Can be used multiple times for * different keys. diff --git a/src/resources/devboxes/disk-snapshots.ts b/src/resources/devboxes/disk-snapshots.ts index 2741771b8..01d0fce8a 100644 --- a/src/resources/devboxes/disk-snapshots.ts +++ b/src/resources/devboxes/disk-snapshots.ts @@ -147,6 +147,12 @@ export interface DiskSnapshotListParams extends DiskSnapshotsCursorIDPageParams */ devbox_id?: string; + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter snapshots by metadata key-value pair. Can be used multiple times for * different keys. diff --git a/src/resources/gateway-configs.ts b/src/resources/gateway-configs.ts index 58107192c..5ae5d0b07 100644 --- a/src/resources/gateway-configs.ts +++ b/src/resources/gateway-configs.ts @@ -139,8 +139,7 @@ export interface GatewayConfigListView { has_more: boolean; /** - * Total count of GatewayConfigs that match the query. Deprecated: will be removed - * in a future breaking change. + * Total count of GatewayConfigs that match the query. */ total_count?: number | null; } @@ -335,6 +334,12 @@ export interface GatewayConfigListParams extends GatewayConfigsCursorIDPageParam */ id?: string; + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by name (partial match supported). */ diff --git a/src/resources/mcp-configs.ts b/src/resources/mcp-configs.ts index d5f81315a..4b1aead02 100644 --- a/src/resources/mcp-configs.ts +++ b/src/resources/mcp-configs.ts @@ -120,8 +120,7 @@ export interface McpConfigListView { mcp_configs: Array; /** - * Total count of McpConfigs that match the query. Deprecated: will be removed in a - * future breaking change. + * Total count of McpConfigs that match the query. */ total_count?: number | null; } @@ -245,6 +244,12 @@ export interface McpConfigListParams extends McpConfigsCursorIDPageParams { */ id?: string; + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by name (prefix match supported). */ diff --git a/src/resources/network-policies.ts b/src/resources/network-policies.ts index 274cdfba8..c603116b0 100644 --- a/src/resources/network-policies.ts +++ b/src/resources/network-policies.ts @@ -140,8 +140,7 @@ export interface NetworkPolicyListView { network_policies: Array; /** - * Total count of items in this response. Deprecated: will be removed in a future - * breaking change. + * Total count of items in this response. */ total_count?: number | null; } @@ -346,6 +345,12 @@ export interface NetworkPolicyListParams extends NetworkPoliciesCursorIDPagePara */ id?: string; + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by name (partial match supported). */ diff --git a/src/resources/objects.ts b/src/resources/objects.ts index e3852d990..a9b3b8adc 100644 --- a/src/resources/objects.ts +++ b/src/resources/objects.ts @@ -159,14 +159,7 @@ export interface ObjectListView { objects: Array; /** - * Number of Objects remaining after this page. Deprecated: will be removed in a - * future breaking change. - */ - remaining_count?: number | null; - - /** - * Total number of Objects across all pages. Deprecated: will be removed in a - * future breaking change. + * Total number of Objects across all pages. */ total_count?: number | null; } @@ -252,6 +245,12 @@ export interface ObjectListParams extends ObjectsCursorIDPageParams { */ content_type?: 'unspecified' | 'text' | 'binary' | 'gzip' | 'tar' | 'tgz'; + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter storage objects by name (partial match supported). */ @@ -285,6 +284,12 @@ export interface ObjectListPublicParams extends ObjectsCursorIDPageParams { */ content_type?: 'unspecified' | 'text' | 'binary' | 'gzip' | 'tar' | 'tgz'; + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter storage objects by name (partial match supported). */ diff --git a/src/resources/repositories.ts b/src/resources/repositories.ts index 27abebe46..a7c4e2154 100644 --- a/src/resources/repositories.ts +++ b/src/resources/repositories.ts @@ -133,8 +133,6 @@ export interface RepositoryConnectionListView { */ repositories: Array; - remaining_count?: number | null; - total_count?: number | null; } @@ -491,6 +489,12 @@ export interface RepositoryCreateParams { } export interface RepositoryListParams extends RepositoriesCursorIDPageParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by repository name */ diff --git a/src/resources/scenarios/runs.ts b/src/resources/scenarios/runs.ts index 61ac0e939..647e1fd3c 100644 --- a/src/resources/scenarios/runs.ts +++ b/src/resources/scenarios/runs.ts @@ -136,6 +136,12 @@ export interface RunListParams extends BenchmarkRunsCursorIDPageParams { */ benchmark_run_id?: string; + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Filter by name */ diff --git a/src/resources/scenarios/scenarios.ts b/src/resources/scenarios/scenarios.ts index c3d6f4287..0936b335c 100644 --- a/src/resources/scenarios/scenarios.ts +++ b/src/resources/scenarios/scenarios.ts @@ -264,8 +264,6 @@ export interface ScenarioRunListView { */ runs: Array; - remaining_count?: number | null; - total_count?: number | null; } @@ -837,6 +835,12 @@ export interface ScenarioListParams extends ScenariosCursorIDPageParams { */ benchmark_id?: string; + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Query for Scenarios with a given name. */ @@ -849,6 +853,12 @@ export interface ScenarioListParams extends ScenariosCursorIDPageParams { } export interface ScenarioListPublicParams extends ScenariosCursorIDPageParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; + /** * Query for Scenarios with a given name. */ diff --git a/src/resources/scenarios/scorers.ts b/src/resources/scenarios/scorers.ts index 86fbac8d8..3bcc01c87 100644 --- a/src/resources/scenarios/scorers.ts +++ b/src/resources/scenarios/scorers.ts @@ -163,7 +163,13 @@ export interface ScorerUpdateParams { type: string; } -export interface ScorerListParams extends ScenarioScorersCursorIDPageParams {} +export interface ScorerListParams extends ScenarioScorersCursorIDPageParams { + /** + * If true (default), includes total_count in the response. Set to false to skip + * the count query for better performance on large datasets. + */ + include_total_count?: boolean; +} Scorers.ScorerListResponsesScenarioScorersCursorIDPage = ScorerListResponsesScenarioScorersCursorIDPage; diff --git a/src/resources/secrets.ts b/src/resources/secrets.ts index 2dbfc8139..25b164d49 100644 --- a/src/resources/secrets.ts +++ b/src/resources/secrets.ts @@ -89,14 +89,7 @@ export interface SecretListView { secrets: Array; /** - * Number of Secrets remaining after this page. Deprecated: will be removed in a - * future breaking change. - */ - remaining_count?: number | null; - - /** - * Total number of Secrets across all pages. Deprecated: will be removed in a - * future breaking change. + * Total number of Secrets across all pages. */ total_count?: number | null; } diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 62d06f696..0f9ae852b 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -199,6 +199,12 @@ export interface LaunchParameters { */ architecture?: 'x86_64' | 'arm64' | null; + /** + * [Deprecated] A list of ports to make available on the Devbox. This field is + * ignored. + */ + available_ports?: Array | null; + /** * Custom CPU cores. Must be 0.5, 1, or a multiple of 2. Max is 16. */ diff --git a/tests/api-resources/agents.test.ts b/tests/api-resources/agents.test.ts index bfaf92237..a985f213a 100644 --- a/tests/api-resources/agents.test.ts +++ b/tests/api-resources/agents.test.ts @@ -87,6 +87,7 @@ describe('resource agents', () => { await expect( client.agents.list( { + include_total_count: true, is_public: true, limit: 0, name: 'name', diff --git a/tests/api-resources/benchmark-jobs.test.ts b/tests/api-resources/benchmark-jobs.test.ts index 8703928ab..3253a9748 100644 --- a/tests/api-resources/benchmark-jobs.test.ts +++ b/tests/api-resources/benchmark-jobs.test.ts @@ -81,6 +81,7 @@ describe('resource benchmarkJobs', () => { await expect( client.benchmarkJobs.list( { + include_total_count: true, limit: 0, name: 'name', starting_after: 'starting_after', diff --git a/tests/api-resources/benchmark-runs.test.ts b/tests/api-resources/benchmark-runs.test.ts index 1ea8a5ba9..5adf3c5ed 100644 --- a/tests/api-resources/benchmark-runs.test.ts +++ b/tests/api-resources/benchmark-runs.test.ts @@ -51,6 +51,7 @@ describe('resource benchmarkRuns', () => { client.benchmarkRuns.list( { benchmark_id: 'benchmark_id', + include_total_count: true, limit: 0, name: 'name', starting_after: 'starting_after', @@ -120,6 +121,7 @@ describe('resource benchmarkRuns', () => { client.benchmarkRuns.listScenarioRuns( 'id', { + include_total_count: true, limit: 0, starting_after: 'starting_after', state: 'running', diff --git a/tests/api-resources/benchmarks.test.ts b/tests/api-resources/benchmarks.test.ts index 5fddae066..7a48ab931 100644 --- a/tests/api-resources/benchmarks.test.ts +++ b/tests/api-resources/benchmarks.test.ts @@ -110,6 +110,7 @@ describe('resource benchmarks', () => { await expect( client.benchmarks.list( { + include_total_count: true, limit: 0, name: 'name', starting_after: 'starting_after', @@ -170,7 +171,11 @@ describe('resource benchmarks', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.benchmarks.listPublic( - { limit: 0, starting_after: 'starting_after' }, + { + include_total_count: true, + limit: 0, + starting_after: 'starting_after', + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Runloop.NotFoundError); @@ -197,6 +202,7 @@ describe('resource benchmarks', () => { launchParameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', + available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, diff --git a/tests/api-resources/blueprints.test.ts b/tests/api-resources/blueprints.test.ts index 9e8f9861a..e38a7192c 100644 --- a/tests/api-resources/blueprints.test.ts +++ b/tests/api-resources/blueprints.test.ts @@ -40,6 +40,7 @@ describe('resource blueprints', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', + available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, @@ -133,6 +134,7 @@ describe('resource blueprints', () => { await expect( client.blueprints.list( { + include_total_count: true, limit: 0, name: 'name', starting_after: 'starting_after', @@ -183,6 +185,7 @@ describe('resource blueprints', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', + available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, @@ -223,6 +226,7 @@ describe('resource blueprints', () => { await expect( client.blueprints.listPublic( { + include_total_count: true, limit: 0, name: 'name', starting_after: 'starting_after', @@ -281,6 +285,7 @@ describe('resource blueprints', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', + available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, diff --git a/tests/api-resources/devboxes/devboxes.test.ts b/tests/api-resources/devboxes/devboxes.test.ts index 21297c1df..5f82f4ad9 100644 --- a/tests/api-resources/devboxes/devboxes.test.ts +++ b/tests/api-resources/devboxes/devboxes.test.ts @@ -50,6 +50,7 @@ describe('resource devboxes', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', + available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, @@ -153,6 +154,7 @@ describe('resource devboxes', () => { await expect( client.devboxes.list( { + include_total_count: true, limit: 0, starting_after: 'starting_after', status: 'provisioning', @@ -333,6 +335,7 @@ describe('resource devboxes', () => { client.devboxes.listDiskSnapshots( { devbox_id: 'devbox_id', + include_total_count: true, limit: 0, 'metadata[key]': 'metadata[key]', 'metadata[key][in]': 'metadata[key][in]', diff --git a/tests/api-resources/devboxes/disk-snapshots.test.ts b/tests/api-resources/devboxes/disk-snapshots.test.ts index 449bea4e5..06cacb907 100644 --- a/tests/api-resources/devboxes/disk-snapshots.test.ts +++ b/tests/api-resources/devboxes/disk-snapshots.test.ts @@ -66,6 +66,7 @@ describe('resource diskSnapshots', () => { client.devboxes.diskSnapshots.list( { devbox_id: 'devbox_id', + include_total_count: true, limit: 0, 'metadata[key]': 'metadata[key]', 'metadata[key][in]': 'metadata[key][in]', diff --git a/tests/api-resources/gateway-configs.test.ts b/tests/api-resources/gateway-configs.test.ts index 67b704786..de7938812 100644 --- a/tests/api-resources/gateway-configs.test.ts +++ b/tests/api-resources/gateway-configs.test.ts @@ -109,6 +109,7 @@ describe('resource gatewayConfigs', () => { client.gatewayConfigs.list( { id: 'id', + include_total_count: true, limit: 0, name: 'name', starting_after: 'starting_after', diff --git a/tests/api-resources/mcp-configs.test.ts b/tests/api-resources/mcp-configs.test.ts index 78a8f38bb..76455f090 100644 --- a/tests/api-resources/mcp-configs.test.ts +++ b/tests/api-resources/mcp-configs.test.ts @@ -109,6 +109,7 @@ describe('resource mcpConfigs', () => { client.mcpConfigs.list( { id: 'id', + include_total_count: true, limit: 0, name: 'name', starting_after: 'starting_after', diff --git a/tests/api-resources/network-policies.test.ts b/tests/api-resources/network-policies.test.ts index 6ebe08f73..e36f224dc 100644 --- a/tests/api-resources/network-policies.test.ts +++ b/tests/api-resources/network-policies.test.ts @@ -111,6 +111,7 @@ describe('resource networkPolicies', () => { client.networkPolicies.list( { id: 'id', + include_total_count: true, limit: 0, name: 'name', starting_after: 'starting_after', diff --git a/tests/api-resources/objects.test.ts b/tests/api-resources/objects.test.ts index dd8bef81e..26d02011a 100644 --- a/tests/api-resources/objects.test.ts +++ b/tests/api-resources/objects.test.ts @@ -71,6 +71,7 @@ describe('resource objects', () => { client.objects.list( { content_type: 'unspecified', + include_total_count: true, limit: 0, name: 'name', search: 'search', @@ -167,6 +168,7 @@ describe('resource objects', () => { client.objects.listPublic( { content_type: 'unspecified', + include_total_count: true, limit: 0, name: 'name', search: 'search', diff --git a/tests/api-resources/repositories.test.ts b/tests/api-resources/repositories.test.ts index 80a69e28d..3d14c9696 100644 --- a/tests/api-resources/repositories.test.ts +++ b/tests/api-resources/repositories.test.ts @@ -70,6 +70,7 @@ describe('resource repositories', () => { await expect( client.repositories.list( { + include_total_count: true, limit: 0, name: 'name', owner: 'owner', diff --git a/tests/api-resources/scenarios/runs.test.ts b/tests/api-resources/scenarios/runs.test.ts index 0997ff36f..30637f331 100644 --- a/tests/api-resources/scenarios/runs.test.ts +++ b/tests/api-resources/scenarios/runs.test.ts @@ -51,6 +51,7 @@ describe('resource runs', () => { client.scenarios.runs.list( { benchmark_run_id: 'benchmark_run_id', + include_total_count: true, limit: 0, name: 'name', scenario_id: 'scenario_id', diff --git a/tests/api-resources/scenarios/scenarios.test.ts b/tests/api-resources/scenarios/scenarios.test.ts index 4d921e3c6..c70280b1f 100644 --- a/tests/api-resources/scenarios/scenarios.test.ts +++ b/tests/api-resources/scenarios/scenarios.test.ts @@ -62,6 +62,7 @@ describe('resource scenarios', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', + available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, @@ -131,6 +132,7 @@ describe('resource scenarios', () => { launch_parameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', + available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, @@ -199,6 +201,7 @@ describe('resource scenarios', () => { client.scenarios.list( { benchmark_id: 'benchmark_id', + include_total_count: true, limit: 0, name: 'name', starting_after: 'starting_after', @@ -250,6 +253,7 @@ describe('resource scenarios', () => { await expect( client.scenarios.listPublic( { + include_total_count: true, limit: 0, name: 'name', starting_after: 'starting_after', @@ -281,6 +285,7 @@ describe('resource scenarios', () => { launchParameters: { after_idle: { idle_time_seconds: 0, on_idle: 'shutdown' }, architecture: 'x86_64', + available_ports: [0], custom_cpu_cores: 0, custom_disk_size: 0, custom_gb_memory: 0, diff --git a/tests/api-resources/scenarios/scorers.test.ts b/tests/api-resources/scenarios/scorers.test.ts index b78ab2bb0..efd7c0f21 100644 --- a/tests/api-resources/scenarios/scorers.test.ts +++ b/tests/api-resources/scenarios/scorers.test.ts @@ -85,7 +85,11 @@ describe('resource scorers', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.scenarios.scorers.list( - { limit: 0, starting_after: 'starting_after' }, + { + include_total_count: true, + limit: 0, + starting_after: 'starting_after', + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Runloop.NotFoundError); From 3b49bf814b0e2fdb6695f3c1afe84a454af7a28b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 02:18:07 +0000 Subject: [PATCH 04/12] chore(tests): bump steady to v0.19.4 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 38201de83..e1c19e88f 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.3 -- steady --version + npm exec --package=@stdy/cli@0.19.4 -- steady --version - npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index e17242d0d..22c04a808 100755 --- a/scripts/test +++ b/scripts/test @@ -60,7 +60,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From c7d6cc25481ee89dab3310885d1cb4d5521a62aa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 02:24:13 +0000 Subject: [PATCH 05/12] chore(tests): bump steady to v0.19.5 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index e1c19e88f..ab814d383 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.4 -- steady --version + npm exec --package=@stdy/cli@0.19.5 -- steady --version - npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 22c04a808..ee4d918c7 100755 --- a/scripts/test +++ b/scripts/test @@ -60,7 +60,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.5 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From 52bd497f637f69df7c4d0b1b5252e0ebf6e185e5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 02:20:45 +0000 Subject: [PATCH 06/12] chore(internal): update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e4da8bc29..86279a128 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .vscode .prism.log +.stdy.log node_modules yarn-error.log codegen.log From 695a7d2a8c77c1bb3300a3e9be7e5395273a1bc2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 02:27:12 +0000 Subject: [PATCH 07/12] chore(tests): bump steady to v0.19.6 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index ab814d383..b319bdfbb 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.5 -- steady --version + npm exec --package=@stdy/cli@0.19.6 -- steady --version - npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index ee4d918c7..5c6d0e040 100755 --- a/scripts/test +++ b/scripts/test @@ -60,7 +60,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.5 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.6 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From 049b89c2c7ee56ce50794ab21bdc29ffd82d0e0f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 20:47:34 +0000 Subject: [PATCH 08/12] fix(tunnels): allow tunnel removal (#8257) --- .stats.yml | 4 ++-- api.md | 2 +- src/index.ts | 2 -- src/resources/devboxes/devboxes.ts | 21 +++---------------- src/resources/devboxes/index.ts | 1 - src/resources/devboxes/tools.ts | 8 +++---- src/resources/index.ts | 1 - src/sdk/devbox.ts | 8 +++---- tests/api-resources/devboxes/devboxes.test.ts | 11 ++++++---- tests/objects/devbox.test.ts | 8 ++----- 10 files changed, 21 insertions(+), 45 deletions(-) diff --git a/.stats.yml b/.stats.yml index 96414b617..0f058b7eb 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-3d441e9c2074aef7bd1e87b2ebfbe5c25e340084dbdfeed8a2e4dc9384561e3b.yml -openapi_spec_hash: 250bfdf2c2270ade53c058419e23c5dc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-64b2ded3d3cc58131c7ebf36c411f43c3d8dabae0b5b1edd65dd7dab307c54a1.yml +openapi_spec_hash: 80fabb5e89a61299203113505a894dc2 config_hash: de99cfce88e2d1f02246dc6c2f43bc6c diff --git a/api.md b/api.md index e52f4a6e8..a688ec5b4 100644 --- a/api.md +++ b/api.md @@ -139,7 +139,7 @@ Methods: - client.devboxes.keepAlive(id) -> unknown - client.devboxes.listDiskSnapshots({ ...params }) -> DevboxSnapshotViewsDiskSnapshotsCursorIDPage - client.devboxes.readFileContents(id, { ...params }) -> string -- client.devboxes.removeTunnel(id, { ...params }) -> unknown +- client.devboxes.removeTunnel(id) -> unknown - client.devboxes.resume(id) -> DevboxView - client.devboxes.retrieveResourceUsage(id) -> DevboxResourceUsageView - client.devboxes.shutdown(id, { ...params }) -> DevboxView diff --git a/src/index.ts b/src/index.ts index c9cb5f9e3..18e136d06 100644 --- a/src/index.ts +++ b/src/index.ts @@ -191,7 +191,6 @@ import { DevboxListView, DevboxReadFileContentsParams, DevboxReadFileContentsResponse, - DevboxRemoveTunnelParams, DevboxRemoveTunnelResponse, DevboxResourceUsageView, DevboxSendStdInRequest, @@ -626,7 +625,6 @@ export declare namespace Runloop { type DevboxExecuteSyncParams as DevboxExecuteSyncParams, type DevboxListDiskSnapshotsParams as DevboxListDiskSnapshotsParams, type DevboxReadFileContentsParams as DevboxReadFileContentsParams, - type DevboxRemoveTunnelParams as DevboxRemoveTunnelParams, type DevboxShutdownParams as DevboxShutdownParams, type DevboxSnapshotDiskParams as DevboxSnapshotDiskParams, type DevboxSnapshotDiskAsyncParams as DevboxSnapshotDiskAsyncParams, diff --git a/src/resources/devboxes/devboxes.ts b/src/resources/devboxes/devboxes.ts index 46576f610..94dd691e8 100644 --- a/src/resources/devboxes/devboxes.ts +++ b/src/resources/devboxes/devboxes.ts @@ -400,17 +400,10 @@ export class Devboxes extends APIResource { } /** - * @deprecated Only works with legacy tunnels created via {@link createTunnel}. - * V2 tunnels (from {@link enableTunnel}) remain active until devbox shutdown and cannot be removed. - * - * Remove a legacy tunnel from the devbox. + * Remove an existing V2 tunnel from the Devbox. */ - removeTunnel( - id: string, - body: DevboxRemoveTunnelParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - return this._client.post(`/v1/devboxes/${id}/remove_tunnel`, { body, ...options }); + removeTunnel(id: string, options?: Core.RequestOptions): Core.APIPromise { + return this._client.post(`/v1/devboxes/${id}/remove_tunnel`, options); } /** @@ -1396,13 +1389,6 @@ export interface DevboxReadFileContentsParams { file_path: string; } -export interface DevboxRemoveTunnelParams { - /** - * Devbox port that tunnel will expose. - */ - port: number; -} - export interface DevboxShutdownParams { /** * If true, force shutdown even if snapshots are in progress. Defaults to false. @@ -1527,7 +1513,6 @@ export declare namespace Devboxes { type DevboxExecuteSyncParams as DevboxExecuteSyncParams, type DevboxListDiskSnapshotsParams as DevboxListDiskSnapshotsParams, type DevboxReadFileContentsParams as DevboxReadFileContentsParams, - type DevboxRemoveTunnelParams as DevboxRemoveTunnelParams, type DevboxShutdownParams as DevboxShutdownParams, type DevboxSnapshotDiskParams as DevboxSnapshotDiskParams, type DevboxSnapshotDiskAsyncParams as DevboxSnapshotDiskAsyncParams, diff --git a/src/resources/devboxes/index.ts b/src/resources/devboxes/index.ts index 1f1168349..b8d076be8 100644 --- a/src/resources/devboxes/index.ts +++ b/src/resources/devboxes/index.ts @@ -43,7 +43,6 @@ export { type DevboxExecuteSyncParams, type DevboxListDiskSnapshotsParams, type DevboxReadFileContentsParams, - type DevboxRemoveTunnelParams, type DevboxShutdownParams, type DevboxSnapshotDiskParams, type DevboxSnapshotDiskAsyncParams, diff --git a/src/resources/devboxes/tools.ts b/src/resources/devboxes/tools.ts index 36d41a4e0..f7385132d 100644 --- a/src/resources/devboxes/tools.ts +++ b/src/resources/devboxes/tools.ts @@ -164,12 +164,10 @@ export class DevboxTools { remove_tunnel: createTool({ name: 'remove_tunnel', description: 'Delete a tunnel', - parameters: z.object({ - port: z.number().describe('The port of the tunnel to delete'), - }), - execute: async (params) => { + parameters: z.object({}), + execute: async () => { try { - await this.devboxes.removeTunnel(devboxId, { port: params.port }, options); + await this.devboxes.removeTunnel(devboxId, options); return 'Tunnel deleted successfully'; } catch (error) { return `Failed to delete tunnel: ${error}`; diff --git a/src/resources/index.ts b/src/resources/index.ts index c669111e2..577002693 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -92,7 +92,6 @@ export { type DevboxExecuteSyncParams, type DevboxListDiskSnapshotsParams, type DevboxReadFileContentsParams, - type DevboxRemoveTunnelParams, type DevboxShutdownParams, type DevboxSnapshotDiskParams, type DevboxSnapshotDiskAsyncParams, diff --git a/src/sdk/devbox.ts b/src/sdk/devbox.ts index eee19c5eb..52183384a 100644 --- a/src/sdk/devbox.ts +++ b/src/sdk/devbox.ts @@ -7,7 +7,6 @@ import type { DevboxAsyncExecutionDetailView, DevboxSnapshotDiskParams, DevboxEnableTunnelParams, - DevboxRemoveTunnelParams, DevboxReadFileContentsParams, DevboxWriteFileContentsParams, DevboxDownloadFileParams, @@ -139,15 +138,14 @@ export class DevboxNetOps { * @example * ```typescript * // Deprecated - only for legacy tunnels - * await devbox.net.removeTunnel({ port: 8080 }); + * await devbox.net.removeTunnel(); * ``` * - * @param {DevboxRemoveTunnelParams} params - Tunnel removal parameters including port * @param {Core.RequestOptions} [options] - Request options * @returns {Promise} Tunnel removal result */ - async removeTunnel(params: DevboxRemoveTunnelParams, options?: Core.RequestOptions) { - return this.client.devboxes.removeTunnel(this.devboxId, params, options); + async removeTunnel(options?: Core.RequestOptions) { + return this.client.devboxes.removeTunnel(this.devboxId, options); } } diff --git a/tests/api-resources/devboxes/devboxes.test.ts b/tests/api-resources/devboxes/devboxes.test.ts index 5f82f4ad9..998157c3c 100644 --- a/tests/api-resources/devboxes/devboxes.test.ts +++ b/tests/api-resources/devboxes/devboxes.test.ts @@ -362,8 +362,8 @@ describe('resource devboxes', () => { const response = await client.devboxes.readFileContents('id', { file_path: 'file_path' }); }); - test('removeTunnel: only required params', async () => { - const responsePromise = client.devboxes.removeTunnel('id', { port: 0 }); + test('removeTunnel', async () => { + const responsePromise = client.devboxes.removeTunnel('id'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -373,8 +373,11 @@ describe('resource devboxes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - test('removeTunnel: required and optional params', async () => { - const response = await client.devboxes.removeTunnel('id', { port: 0 }); + test('removeTunnel: request options instead of 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.removeTunnel('id', { path: '/_stainless_unknown_path' })).rejects.toThrow( + Runloop.NotFoundError, + ); }); test('resume', async () => { diff --git a/tests/objects/devbox.test.ts b/tests/objects/devbox.test.ts index 8ca1d8fa9..2dfc9f8f4 100644 --- a/tests/objects/devbox.test.ts +++ b/tests/objects/devbox.test.ts @@ -381,13 +381,9 @@ describe('Devbox (New API)', () => { it('should remove legacy tunnel', async () => { mockClient.devboxes.removeTunnel.mockResolvedValue(undefined); - const result = await devbox.net.removeTunnel({ port: 8080 }); + const result = await devbox.net.removeTunnel(); - expect(mockClient.devboxes.removeTunnel).toHaveBeenCalledWith( - 'devbox-123', - { port: 8080 }, - undefined, - ); + expect(mockClient.devboxes.removeTunnel).toHaveBeenCalledWith('devbox-123', undefined); expect(result).toBeUndefined(); }); }); From 81f048a2ebc688a60fddcf3e047bb12ee60dc41a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 20:54:05 +0000 Subject: [PATCH 09/12] feat: [beta] adding axon, an event communication channel (#8268) --- .stats.yml | 8 +- api.md | 18 ++++ src/index.ts | 21 +++++ src/resources/axons.ts | 131 ++++++++++++++++++++++++++++++ src/resources/index.ts | 9 ++ tests/api-resources/axons.test.ts | 101 +++++++++++++++++++++++ 6 files changed, 284 insertions(+), 4 deletions(-) create mode 100644 src/resources/axons.ts create mode 100644 tests/api-resources/axons.test.ts diff --git a/.stats.yml b/.stats.yml index 0f058b7eb..56f88441d 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-64b2ded3d3cc58131c7ebf36c411f43c3d8dabae0b5b1edd65dd7dab307c54a1.yml -openapi_spec_hash: 80fabb5e89a61299203113505a894dc2 -config_hash: de99cfce88e2d1f02246dc6c2f43bc6c +configured_endpoints: 122 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-d3f6f5cc574b570bb31c768e755f957273a97846257c7144ff5c0dcf7c00fd75.yml +openapi_spec_hash: 8d7f2b3ed5c1504d3d238e0e43d45383 +config_hash: 1b42d9862d8d811030df0ac4094f7a1d diff --git a/api.md b/api.md index a688ec5b4..9c5d94c39 100644 --- a/api.md +++ b/api.md @@ -76,6 +76,24 @@ Methods: - client.agents.retrieve(id) -> AgentView - client.agents.list({ ...params }) -> AgentViewsAgentsCursorIDPage +# Axons + +Types: + +- AxonCreateParams +- AxonListView +- AxonView +- PublishParams +- PublishResultView + +Methods: + +- client.axons.create() -> AxonView +- client.axons.retrieve(id) -> AxonView +- client.axons.list() -> AxonListView +- client.axons.publish(id, { ...params }) -> PublishResultView +- client.axons.subscribeSse(id) -> void + # Blueprints Types: diff --git a/src/index.ts b/src/index.ts index 18e136d06..eab52474e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -45,6 +45,15 @@ import { AgentViewsAgentsCursorIDPage, Agents, } from './resources/agents'; +import { + AxonCreateParams, + AxonListView, + AxonPublishParams, + AxonView, + Axons, + PublishParams, + PublishResultView, +} from './resources/axons'; import { BenchmarkJobCreateParameters, BenchmarkJobCreateParams, @@ -363,6 +372,7 @@ export class Runloop extends Core.APIClient { benchmarkRuns: API.BenchmarkRuns = new API.BenchmarkRuns(this); benchmarkJobs: API.BenchmarkJobs = new API.BenchmarkJobs(this); agents: API.Agents = new API.Agents(this); + axons: API.Axons = new API.Axons(this); blueprints: API.Blueprints = new API.Blueprints(this); devboxes: API.Devboxes = new API.Devboxes(this); scenarios: API.Scenarios = new API.Scenarios(this); @@ -423,6 +433,7 @@ Runloop.BenchmarkRunViewsBenchmarkRunsCursorIDPage = BenchmarkRunViewsBenchmarkR Runloop.BenchmarkJobs = BenchmarkJobs; Runloop.Agents = Agents; Runloop.AgentViewsAgentsCursorIDPage = AgentViewsAgentsCursorIDPage; +Runloop.Axons = Axons; Runloop.Blueprints = Blueprints; Runloop.BlueprintViewsBlueprintsCursorIDPage = BlueprintViewsBlueprintsCursorIDPage; Runloop.Devboxes = Devboxes; @@ -575,6 +586,16 @@ export declare namespace Runloop { type AgentListParams as AgentListParams, }; + export { + Axons as Axons, + type AxonCreateParams as AxonCreateParams, + type AxonListView as AxonListView, + type AxonView as AxonView, + type PublishParams as PublishParams, + type PublishResultView as PublishResultView, + type AxonPublishParams as AxonPublishParams, + }; + export { Blueprints as Blueprints, type BlueprintBuildFromInspectionParameters as BlueprintBuildFromInspectionParameters, diff --git a/src/resources/axons.ts b/src/resources/axons.ts new file mode 100644 index 000000000..0e7e113c7 --- /dev/null +++ b/src/resources/axons.ts @@ -0,0 +1,131 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../resource'; +import * as Core from '../core'; + +export class Axons extends APIResource { + /** + * [Beta] Create a new axon. + */ + create( + body?: AxonCreateParams | null | undefined, + options?: Core.RequestOptions, + ): Core.APIPromise { + return this._client.post('/v1/axons', { body, ...options }); + } + + /** + * [Beta] Get an axon given ID. + */ + retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise { + return this._client.get(`/v1/axons/${id}`, options); + } + + /** + * [Beta] List all active axons. + */ + list(options?: Core.RequestOptions): Core.APIPromise { + return this._client.get('/v1/axons', options); + } + + /** + * [Beta] Publish an event to a specified axon. + */ + publish( + id: string, + body: AxonPublishParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + return this._client.post(`/v1/axons/${id}/publish`, { body, ...options }); + } +} + +export type AxonCreateParams = unknown; + +export interface AxonListView { + /** + * List of active axons. + */ + axons: Array; +} + +export interface AxonView { + /** + * The axon identifier. + */ + id: string; + + /** + * Creation time in milliseconds since epoch. + */ + created_at_ms: number; +} + +export interface PublishParams { + /** + * The event type (e.g. push, pull_request). + */ + event_type: string; + + /** + * Event origin. + */ + origin: 'EXTERNAL_EVENT' | 'AGENT_EVENT' | 'USER_EVENT'; + + /** + * Event payload. + */ + payload: string; + + /** + * The source of the event (e.g. github, slack). + */ + source: string; +} + +export interface PublishResultView { + /** + * Assigned sequence number. + */ + sequence: number; + + /** + * Timestamp in milliseconds since epoch. + */ + timestamp_ms: number; +} + +export interface AxonCreateParams {} + +export interface AxonPublishParams { + /** + * The event type (e.g. push, pull_request). + */ + event_type: string; + + /** + * Event origin. + */ + origin: 'EXTERNAL_EVENT' | 'AGENT_EVENT' | 'USER_EVENT'; + + /** + * Event payload. + */ + payload: string; + + /** + * The source of the event (e.g. github, slack). + */ + source: string; +} + +export declare namespace Axons { + export { + type AxonCreateParams as AxonCreateParams, + type AxonListView as AxonListView, + type AxonView as AxonView, + type PublishParams as PublishParams, + type PublishResultView as PublishResultView, + type AxonPublishParams as AxonPublishParams, + }; +} diff --git a/src/resources/index.ts b/src/resources/index.ts index 577002693..a500fefa3 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -10,6 +10,15 @@ export { type AgentCreateParams, type AgentListParams, } from './agents'; +export { + Axons, + type AxonCreateParams, + type AxonListView, + type AxonView, + type PublishParams, + type PublishResultView, + type AxonPublishParams, +} from './axons'; export { BenchmarkJobs, type BenchmarkJobCreateParameters, diff --git a/tests/api-resources/axons.test.ts b/tests/api-resources/axons.test.ts new file mode 100644 index 000000000..257411e21 --- /dev/null +++ b/tests/api-resources/axons.test.ts @@ -0,0 +1,101 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Runloop from '@runloop/api-client'; +import { Response } from 'node-fetch'; + +const client = new Runloop({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource axons', () => { + test('create', async () => { + const responsePromise = client.axons.create(); + 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('create: 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.axons.create({}, { path: '/_stainless_unknown_path' })).rejects.toThrow( + Runloop.NotFoundError, + ); + }); + + test('retrieve', async () => { + const responsePromise = client.axons.retrieve('id'); + 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('retrieve: request options instead of 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.axons.retrieve('id', { path: '/_stainless_unknown_path' })).rejects.toThrow( + Runloop.NotFoundError, + ); + }); + + test('list', async () => { + const responsePromise = client.axons.list(); + 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('list: request options instead of 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.axons.list({ path: '/_stainless_unknown_path' })).rejects.toThrow( + Runloop.NotFoundError, + ); + }); + + test('publish: only required params', async () => { + const responsePromise = client.axons.publish('id', { + event_type: 'event_type', + origin: 'EXTERNAL_EVENT', + payload: 'payload', + source: 'source', + }); + 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('publish: required and optional params', async () => { + const response = await client.axons.publish('id', { + event_type: 'event_type', + origin: 'EXTERNAL_EVENT', + payload: 'payload', + source: 'source', + }); + }); + + test('subscribeSse', async () => { + const responsePromise = client.axons.subscribeSse('id'); + 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); + }); +}); From 6966e67e79a5a605cf7e4a6b60cccf851961eb60 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 21:04:33 +0000 Subject: [PATCH 10/12] fix: add AxonEventView schema to OpenAPI spec for SSE subscribe endpoint (#8274) --- .stats.yml | 6 +++--- api.md | 3 ++- src/index.ts | 2 ++ src/resources/axons.ts | 49 ++++++++++++++++++++++++++++++++++++++++++ src/resources/index.ts | 1 + 5 files changed, 57 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 56f88441d..d85c18351 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 122 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-d3f6f5cc574b570bb31c768e755f957273a97846257c7144ff5c0dcf7c00fd75.yml -openapi_spec_hash: 8d7f2b3ed5c1504d3d238e0e43d45383 -config_hash: 1b42d9862d8d811030df0ac4094f7a1d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-82e6ea2fc76e43ff397ca1d9997693307a006ef30ec1a001c0283319a3e2eb3b.yml +openapi_spec_hash: 69cf8a2d13bda298f2b588bd3ba1e562 +config_hash: c422b761c745873bce8fa5ccf03b7b98 diff --git a/api.md b/api.md index 9c5d94c39..ff9a8c2df 100644 --- a/api.md +++ b/api.md @@ -81,6 +81,7 @@ Methods: Types: - AxonCreateParams +- AxonEventView - AxonListView - AxonView - PublishParams @@ -92,7 +93,7 @@ Methods: - client.axons.retrieve(id) -> AxonView - client.axons.list() -> AxonListView - client.axons.publish(id, { ...params }) -> PublishResultView -- client.axons.subscribeSse(id) -> void +- client.axons.subscribeSse(id) -> AxonEventView # Blueprints diff --git a/src/index.ts b/src/index.ts index eab52474e..9747b8432 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,6 +47,7 @@ import { } from './resources/agents'; import { AxonCreateParams, + AxonEventView, AxonListView, AxonPublishParams, AxonView, @@ -589,6 +590,7 @@ export declare namespace Runloop { export { Axons as Axons, type AxonCreateParams as AxonCreateParams, + type AxonEventView as AxonEventView, type AxonListView as AxonListView, type AxonView as AxonView, type PublishParams as PublishParams, diff --git a/src/resources/axons.ts b/src/resources/axons.ts index 0e7e113c7..7d9c58625 100644 --- a/src/resources/axons.ts +++ b/src/resources/axons.ts @@ -1,7 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../resource'; +import { APIPromise } from '../core'; import * as Core from '../core'; +import { Stream } from '../streaming'; export class Axons extends APIResource { /** @@ -38,10 +40,56 @@ export class Axons extends APIResource { ): Core.APIPromise { return this._client.post(`/v1/axons/${id}/publish`, { body, ...options }); } + + /** + * [Beta] Subscribe to an axon event stream via server-sent events. + */ + subscribeSse(id: string, options?: Core.RequestOptions): APIPromise> { + return this._client.get(`/v1/axons/${id}/subscribe/sse`, { ...options, stream: true }) as APIPromise< + Stream + >; + } } export type AxonCreateParams = unknown; +export interface AxonEventView { + /** + * The axon identifier. + */ + axon_id: string; + + /** + * Event type (e.g. push, pull_request). + */ + event_type: string; + + /** + * Event origin. + */ + origin: 'EXTERNAL_EVENT' | 'AGENT_EVENT' | 'USER_EVENT' | 'SYSTEM_EVENT'; + + /** + * JSON-encoded event payload. + */ + payload: string; + + /** + * Monotonic sequence number. + */ + sequence: number; + + /** + * Event source (e.g. github, slack). + */ + source: string; + + /** + * Timestamp in milliseconds since epoch. + */ + timestamp_ms: number; +} + export interface AxonListView { /** * List of active axons. @@ -122,6 +170,7 @@ export interface AxonPublishParams { export declare namespace Axons { export { type AxonCreateParams as AxonCreateParams, + type AxonEventView as AxonEventView, type AxonListView as AxonListView, type AxonView as AxonView, type PublishParams as PublishParams, diff --git a/src/resources/index.ts b/src/resources/index.ts index a500fefa3..f88d7017f 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -13,6 +13,7 @@ export { export { Axons, type AxonCreateParams, + type AxonEventView, type AxonListView, type AxonView, type PublishParams, From 3e9232ba1ba650a4deed68ade5de97a3f80436bf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 21:52:11 +0000 Subject: [PATCH 11/12] fix: add name to Axon (#8277) --- .stats.yml | 4 ++-- api.md | 2 +- src/resources/axons.ts | 27 ++++++++++++++++++++++++--- tests/api-resources/axons.test.ts | 9 ++++++++- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index d85c18351..f43fecc35 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 122 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-82e6ea2fc76e43ff397ca1d9997693307a006ef30ec1a001c0283319a3e2eb3b.yml -openapi_spec_hash: 69cf8a2d13bda298f2b588bd3ba1e562 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-32e4b2dfb75745be076697d252bd80aff21c08464750928ffe2b7dd997d0b443.yml +openapi_spec_hash: eb0ccabfcda0fb8c56b53939b56f6d80 config_hash: c422b761c745873bce8fa5ccf03b7b98 diff --git a/api.md b/api.md index ff9a8c2df..a7c462c45 100644 --- a/api.md +++ b/api.md @@ -89,7 +89,7 @@ Types: Methods: -- client.axons.create() -> AxonView +- client.axons.create({ ...params }) -> AxonView - client.axons.retrieve(id) -> AxonView - client.axons.list() -> AxonListView - client.axons.publish(id, { ...params }) -> PublishResultView diff --git a/src/resources/axons.ts b/src/resources/axons.ts index 7d9c58625..2b7c02cbd 100644 --- a/src/resources/axons.ts +++ b/src/resources/axons.ts @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../resource'; +import { isRequestOptions } from '../core'; import { APIPromise } from '../core'; import * as Core from '../core'; import { Stream } from '../streaming'; @@ -9,10 +10,15 @@ export class Axons extends APIResource { /** * [Beta] Create a new axon. */ + create(body?: AxonCreateParams, options?: Core.RequestOptions): Core.APIPromise; + create(options?: Core.RequestOptions): Core.APIPromise; create( - body?: AxonCreateParams | null | undefined, + body: AxonCreateParams | Core.RequestOptions = {}, options?: Core.RequestOptions, ): Core.APIPromise { + if (isRequestOptions(body)) { + return this.create({}, body); + } return this._client.post('/v1/axons', { body, ...options }); } @@ -51,7 +57,12 @@ export class Axons extends APIResource { } } -export type AxonCreateParams = unknown; +export interface AxonCreateParams { + /** + * (Optional) Name for the axon. + */ + name?: string | null; +} export interface AxonEventView { /** @@ -107,6 +118,11 @@ export interface AxonView { * Creation time in milliseconds since epoch. */ created_at_ms: number; + + /** + * The name of the axon. + */ + name?: string | null; } export interface PublishParams { @@ -143,7 +159,12 @@ export interface PublishResultView { timestamp_ms: number; } -export interface AxonCreateParams {} +export interface AxonCreateParams { + /** + * (Optional) Name for the axon. + */ + name?: string | null; +} export interface AxonPublishParams { /** diff --git a/tests/api-resources/axons.test.ts b/tests/api-resources/axons.test.ts index 257411e21..90955fb00 100644 --- a/tests/api-resources/axons.test.ts +++ b/tests/api-resources/axons.test.ts @@ -20,9 +20,16 @@ describe('resource axons', () => { expect(dataAndResponse.response).toBe(rawResponse); }); + test('create: request options instead of 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.axons.create({ path: '/_stainless_unknown_path' })).rejects.toThrow( + Runloop.NotFoundError, + ); + }); + test('create: 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.axons.create({}, { path: '/_stainless_unknown_path' })).rejects.toThrow( + await expect(client.axons.create({ name: 'name' }, { path: '/_stainless_unknown_path' })).rejects.toThrow( Runloop.NotFoundError, ); }); From e62b36397af1216227bc2c902e676428b06987a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 21:52:39 +0000 Subject: [PATCH 12/12] release: 1.12.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 38 +++++++++++++++++++++++++++++++ package.json | 2 +- packages/mcp-server/manifest.json | 2 +- packages/mcp-server/package.json | 2 +- packages/mcp-server/src/server.ts | 2 +- src/version.ts | 2 +- 7 files changed, 44 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 33f2a7378..a09efe7f8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.11.2" + ".": "1.12.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index c3d20ab51..2992ecf46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,43 @@ # Changelog +## 1.12.0 (2026-03-24) + +Full Changelog: [v1.11.2...v1.12.0](https://github.com/runloopai/api-client-ts/compare/v1.11.2...v1.12.0) + +### Features + +* [beta] adding axon, an event communication channel ([#8268](https://github.com/runloopai/api-client-ts/issues/8268)) ([81f048a](https://github.com/runloopai/api-client-ts/commit/81f048a2ebc688a60fddcf3e047bb12ee60dc41a)) +* tunnel example ([#741](https://github.com/runloopai/api-client-ts/issues/741)) ([222e123](https://github.com/runloopai/api-client-ts/commit/222e123673b1e74dda6a76c55cacbbfbebde0221)) + + +### Bug Fixes + +* add AxonEventView schema to OpenAPI spec for SSE subscribe endpoint ([#8274](https://github.com/runloopai/api-client-ts/issues/8274)) ([6966e67](https://github.com/runloopai/api-client-ts/commit/6966e67e79a5a605cf7e4a6b60cccf851961eb60)) +* add name to Axon ([#8277](https://github.com/runloopai/api-client-ts/issues/8277)) ([3e9232b](https://github.com/runloopai/api-client-ts/commit/3e9232ba1ba650a4deed68ade5de97a3f80436bf)) +* avoid actually calling claude in example ([#753](https://github.com/runloopai/api-client-ts/issues/753)) ([7425502](https://github.com/runloopai/api-client-ts/commit/742550288e6d83a55635feda2ca3496ea1d70115)) +* **tunnels:** allow tunnel removal ([#8257](https://github.com/runloopai/api-client-ts/issues/8257)) ([049b89c](https://github.com/runloopai/api-client-ts/commit/049b89c2c7ee56ce50794ab21bdc29ffd82d0e0f)) + + +### Chores + +* **internal:** update gitignore ([52bd497](https://github.com/runloopai/api-client-ts/commit/52bd497f637f69df7c4d0b1b5252e0ebf6e185e5)) +* remove dead port configuration code, mark deprecated / ignored in the API ([#8195](https://github.com/runloopai/api-client-ts/issues/8195)) ([960a249](https://github.com/runloopai/api-client-ts/commit/960a249773062d0b9c3835b6a10edcd16cb0e812)) +* **tests:** bump steady to v0.19.4 ([3b49bf8](https://github.com/runloopai/api-client-ts/commit/3b49bf814b0e2fdb6695f3c1afe84a454af7a28b)) +* **tests:** bump steady to v0.19.5 ([c7d6cc2](https://github.com/runloopai/api-client-ts/commit/c7d6cc25481ee89dab3310885d1cb4d5521a62aa)) +* **tests:** bump steady to v0.19.6 ([695a7d2](https://github.com/runloopai/api-client-ts/commit/695a7d2a8c77c1bb3300a3e9be7e5395273a1bc2)) + + +### Documentation + +* add mounts example ([#752](https://github.com/runloopai/api-client-ts/issues/752)) ([8b8eda2](https://github.com/runloopai/api-client-ts/commit/8b8eda2764d980a372f8f0d76898e83fceb64f97)) +* add suspend, resume & snapshot documentation ([#754](https://github.com/runloopai/api-client-ts/issues/754)) ([0295cc6](https://github.com/runloopai/api-client-ts/commit/0295cc645201a5c3abae489ae08ad689c5dfadb1)) + + +### Refactors + +* **tests:** switch from prism to steady ([1ad5e76](https://github.com/runloopai/api-client-ts/commit/1ad5e7623d62f06c3aef1f6f11c57fb1fb6ff162)) +* undeprecate total_count from pagination API, remove remaining_count ([#8084](https://github.com/runloopai/api-client-ts/issues/8084)) ([6d2a604](https://github.com/runloopai/api-client-ts/commit/6d2a6041e49f1f9ca85ae1f43d7be94041e87610)) + ## 1.11.2 (2026-03-19) Full Changelog: [v1.11.1...v1.11.2](https://github.com/runloopai/api-client-ts/compare/v1.11.1...v1.11.2) diff --git a/package.json b/package.json index f9a06d6df..b9c6b5617 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@runloop/api-client", - "version": "1.11.2", + "version": "1.12.0", "description": "The official TypeScript library for the Runloop API", "author": "Runloop ", "types": "dist/sdk.d.ts", diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index 70704ce07..2a8d7e626 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -1,7 +1,7 @@ { "dxt_version": "0.2", "name": "@runloop/api-client-mcp", - "version": "1.11.2", + "version": "1.12.0", "description": "The official MCP Server for the Runloop API", "author": { "name": "Runloop", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 8ef61f27a..d70d788cd 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "@runloop/api-client-mcp", - "version": "1.11.2", + "version": "1.12.0", "description": "The official MCP Server for the Runloop API", "author": "Runloop ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 0d686b2ec..c895c626f 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -16,7 +16,7 @@ export const newMcpServer = async (stainlessApiKey: string | undefined) => new McpServer( { name: 'runloop_api_client_api', - version: '1.11.2', + version: '1.12.0', }, { instructions: await getInstructions(stainlessApiKey), diff --git a/src/version.ts b/src/version.ts index 5cab60c7c..f73650ece 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '1.11.2'; // x-release-please-version +export const VERSION = '1.12.0'; // x-release-please-version