Skip to content

Commit c9f5d1b

Browse files
release: 1.10.3 (#731)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Alexander Dines <alex@runloop.ai>
1 parent ffef871 commit c9f5d1b

File tree

12 files changed

+77
-47
lines changed

12 files changed

+77
-47
lines changed

.release-please-manifest.json

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

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-439b1a08248ef3bc7457c7b0a9a6218149732535a9f0dd541501fc35e2a3f8c2.yml
3-
openapi_spec_hash: 35b12a086d98484417ce3d2543c47929
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-132ed160716591bdcd9231c00da8c506d9451a5486b165fc27b2a01d93202082.yml
3+
openapi_spec_hash: c2b44d9e9cda56e32141a7ea3794bbba
44
config_hash: cbda3692cb48ab8582a0df1674b9e5c8

CHANGELOG.md

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

3+
## 1.10.3 (2026-02-27)
4+
5+
Full Changelog: [v1.10.2...v1.10.3](https://github.com/runloopai/api-client-ts/compare/v1.10.2...v1.10.3)
6+
7+
### Bug Fixes
8+
9+
* switching to MCP definition to specify a secret name per MCP server ([#7715](https://github.com/runloopai/api-client-ts/issues/7715)) ([ee0078f](https://github.com/runloopai/api-client-ts/commit/ee0078f21eedd7fd04d3d9bc39ee7f14dae3009c))
10+
11+
12+
### Chores
13+
14+
* add mcp example ([#730](https://github.com/runloopai/api-client-ts/issues/730)) ([ed77255](https://github.com/runloopai/api-client-ts/commit/ed77255e95b49fbc815cb9118df73144bb2bd790))
15+
* **internal:** move stringifyQuery implementation to internal function ([aab68c2](https://github.com/runloopai/api-client-ts/commit/aab68c2e4c7ac559d1b36f0ec945602b8fc93c12))
16+
17+
18+
### Documentation
19+
20+
* fix examples.md ([#732](https://github.com/runloopai/api-client-ts/issues/732)) ([ffef871](https://github.com/runloopai/api-client-ts/commit/ffef871a74138c29791c1b834248a5bbc948c0a8))
21+
322
## 1.10.2 (2026-02-26)
423

524
Full Changelog: [v1.10.1...v1.10.2](https://github.com/runloopai/api-client-ts/compare/v1.10.1...v1.10.2)

examples/mcp-github-tools.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ async function main() {
7575
resource_size_request: 'SMALL',
7676
keep_alive_time_seconds: 300,
7777
},
78-
mcp: [
79-
{
78+
mcp: {
79+
MCP_SECRET: {
8080
mcp_config: mcpConfig.id,
8181
secret: SECRET_NAME,
8282
},
83-
],
83+
},
8484
});
8585
console.log(` Devbox: ${devbox.id}`);
8686

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@runloop/api-client",
3-
"version": "1.10.2",
3+
"version": "1.10.3",
44
"description": "The official TypeScript library for the Runloop API",
55
"author": "Runloop <support@runloop.ai>",
66
"types": "dist/sdk.d.ts",

src/core.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
APIConnectionTimeoutError,
88
APIUserAbortError,
99
} from './error';
10+
import { stringifyQuery } from './internal/utils/query';
1011
import {
1112
kind as shimsKind,
1213
type Readable,
@@ -542,27 +543,14 @@ export abstract class APIClient {
542543
}
543544

544545
if (typeof query === 'object' && query && !Array.isArray(query)) {
545-
url.search = this.stringifyQuery(query as Record<string, unknown>);
546+
url.search = this.stringifyQuery(query);
546547
}
547548

548549
return url.toString();
549550
}
550551

551-
protected stringifyQuery(query: Record<string, unknown>): string {
552-
return Object.entries(query)
553-
.filter(([_, value]) => typeof value !== 'undefined')
554-
.map(([key, value]) => {
555-
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
556-
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
557-
}
558-
if (value === null) {
559-
return `${encodeURIComponent(key)}=`;
560-
}
561-
throw new RunloopError(
562-
`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
563-
);
564-
})
565-
.join('&');
552+
protected stringifyQuery(query: object | Record<string, unknown>): string {
553+
return stringifyQuery(query);
566554
}
567555

568556
async fetchWithTimeout(

src/internal/utils/query.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
import { RunloopError } from '../../error';
4+
5+
/**
6+
* Basic re-implementation of `qs.stringify` for primitive types.
7+
*/
8+
export function stringifyQuery(query: object | Record<string, unknown>) {
9+
return Object.entries(query)
10+
.filter(([_, value]) => typeof value !== 'undefined')
11+
.map(([key, value]) => {
12+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
13+
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
14+
}
15+
if (value === null) {
16+
return `${encodeURIComponent(key)}=`;
17+
}
18+
throw new RunloopError(
19+
`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
20+
);
21+
})
22+
.join('&');
23+
}

src/resources/devboxes/devboxes.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -938,10 +938,11 @@ export interface DevboxView {
938938
initiator_type?: 'unknown' | 'api' | 'scenario' | 'scoring_validation';
939939

940940
/**
941-
* [Beta] MCP specifications configured for this devbox. Each spec links an MCP
942-
* config to a secret for MCP server access through the MCP hub.
941+
* [Beta] MCP specifications configured for this devbox. Map key is the environment
942+
* variable name for the MCP token envelope. Each spec links an MCP config to a
943+
* secret for MCP server access through the MCP hub.
943944
*/
944-
mcp_specs?: Array<DevboxView.McpSpec> | null;
945+
mcp_specs?: { [key: string]: DevboxView.McpSpecs } | null;
945946

946947
/**
947948
* The name of the Devbox.
@@ -1010,7 +1011,7 @@ export namespace DevboxView {
10101011
secret_id: string;
10111012
}
10121013

1013-
export interface McpSpec {
1014+
export interface McpSpecs {
10141015
/**
10151016
* The ID of the MCP config (e.g., mcp_123abc).
10161017
*/
@@ -1150,12 +1151,13 @@ export interface DevboxCreateParams {
11501151
launch_parameters?: Shared.LaunchParameters | null;
11511152

11521153
/**
1153-
* [Beta] (Optional) MCP specifications for MCP server access. Each spec links an
1154-
* MCP config to a secret. The devbox will receive environment variables
1155-
* (RL_MCP_URL, RL_MCP_TOKEN) for accessing MCP servers through the MCP hub.
1156-
* Example: [{'mcp_config': 'github-readonly', 'secret': 'MY_GITHUB_TOKEN'}]
1154+
* [Beta] (Optional) MCP specifications for MCP server access. Map key is the
1155+
* environment variable name for the MCP token envelope. Each spec links an MCP
1156+
* config to a secret. The devbox will also receive RL_MCP_URL for the MCP hub
1157+
* endpoint. Example: {'MCP_SECRET': {'mcp_config': 'github-readonly', 'secret':
1158+
* 'MY_GITHUB_TOKEN'}}
11571159
*/
1158-
mcp?: Array<DevboxCreateParams.Mcp> | null;
1160+
mcp?: { [key: string]: DevboxCreateParams.Mcp } | null;
11591161

11601162
/**
11611163
* User defined metadata to attach to the devbox for organization.

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '1.10.2'; // x-release-please-version
1+
export const VERSION = '1.10.3'; // x-release-please-version

tests/api-resources/devboxes/devboxes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('resource devboxes', () => {
6161
resource_size_request: 'X_SMALL',
6262
user_parameters: { uid: 0, username: 'username' },
6363
},
64-
mcp: [{ mcp_config: 'mcp_config', secret: 'secret' }],
64+
mcp: { foo: { mcp_config: 'mcp_config', secret: 'secret' } },
6565
metadata: { foo: 'string' },
6666
mounts: [
6767
{

0 commit comments

Comments
 (0)