Skip to content

Commit 5c21e94

Browse files
release: 0.68.0 (#646)
* feat(blueprint): adds queued state * codegen metadata * codegen metadata * feat(blueprints): prevent deletion of blueprints with dependent snapshots * fix(snapshot): added "deleted" status to DevboxSnapshotStatus enum \n fix(storage-object): added ObjectState enum, fixed createObject() to appropriately type content_type and state as the respective enums * feat(object): Added ability to give objects a Time To Live, after which they are automatically deleted.\nfeat(blueprints): Added the ability to attach objects as build contexts that can be referenced in your Dockerfile. * feat(blueprints): Cleanup the BuildContext API (#6407)\n\nTest * release: 0.68.0 * cp dines --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Alexander Dines <alex@runloop.ai>
1 parent dc9aa03 commit 5c21e94

21 files changed

Lines changed: 723 additions & 35 deletions

.release-please-manifest.json

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

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 94
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-63df0e3eb49d4874724f380b650693d90e071a41748bc163e93236b72a342883.yml
3-
openapi_spec_hash: eb5df67593bd1c4a5c8d1082f24d73fb
4-
config_hash: 95facb8cef59b5a1b05763b871bf6a4b
1+
configured_endpoints: 97
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-5f33221208c1febba343daf570f73a5086f150a9b128df045ebddc3fe2c86607.yml
3+
openapi_spec_hash: 0aea07130ddbe43a665a13a68231e2ca
4+
config_hash: 2363f563f42501d2b1587a4f64bdccaf

CHANGELOG.md

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

3+
## 0.68.0 (2025-11-19)
4+
5+
Full Changelog: [v0.67.1...v0.68.0](https://github.com/runloopai/api-client-ts/compare/v0.67.1...v0.68.0)
6+
7+
### Features
8+
9+
* **blueprint:** adds queued state ([c8f5e0b](https://github.com/runloopai/api-client-ts/commit/c8f5e0b01cbd2fd573403b7d9b61816efce03b1f))
10+
* **blueprints:** Cleanup the BuildContext API ([#6407](https://github.com/runloopai/api-client-ts/issues/6407))\n\nTest ([8bd1c44](https://github.com/runloopai/api-client-ts/commit/8bd1c4468565effadc66b8524594daa5761938a4))
11+
* **blueprints:** prevent deletion of blueprints with dependent snapshots ([f52eb9a](https://github.com/runloopai/api-client-ts/commit/f52eb9aedc5d9317a2ab27952c13b0f2b2172339))
12+
* **devbox:** adding devbox execution std out / err last n lines ([#643](https://github.com/runloopai/api-client-ts/issues/643)) ([71de54c](https://github.com/runloopai/api-client-ts/commit/71de54c13bca60f3057e8c8ed2b8e5e531fffc9f))
13+
* **object:** Added ability to give objects a Time To Live, after which they are automatically deleted.\nfeat(blueprints): Added the ability to attach objects as build contexts that can be referenced in your Dockerfile. ([0ee5067](https://github.com/runloopai/api-client-ts/commit/0ee50676c734c536a8d1b5c25ef19d154da1f121))
14+
* **streaming:** harden SSE timeout recovery ([#645](https://github.com/runloopai/api-client-ts/issues/645)) ([cb249a7](https://github.com/runloopai/api-client-ts/commit/cb249a7d2c854a28e3932f35b2ad98dd30c8737b))
15+
16+
17+
### Bug Fixes
18+
19+
* **file-mount:** client side validation for file_mount size checks ([#639](https://github.com/runloopai/api-client-ts/issues/639)) ([30e7123](https://github.com/runloopai/api-client-ts/commit/30e712315740c393c21dbfe34e4d2611dca0d0dc))
20+
* **snapshot:** added "deleted" status to DevboxSnapshotStatus enum \n fix(storage-object): added ObjectState enum, fixed createObject() to appropriately type content_type and state as the respective enums ([5f8b203](https://github.com/runloopai/api-client-ts/commit/5f8b2031aa38ff9a87e3554c9e5100189ea448e2))
21+
322
## 0.67.1 (2025-11-05)
423

524
Full Changelog: [v0.67.0...v0.67.1](https://github.com/runloopai/api-client-ts/compare/v0.67.0...v0.67.1)

api.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Types:
44

55
- <code><a href="./src/resources/shared.ts">AfterIdle</a></code>
66
- <code><a href="./src/resources/shared.ts">AgentMountParameters</a></code>
7+
- <code><a href="./src/resources/shared.ts">AgentSource</a></code>
78
- <code><a href="./src/resources/shared.ts">CodeMountParameters</a></code>
89
- <code><a href="./src/resources/shared.ts">LaunchParameters</a></code>
910
- <code><a href="./src/resources/shared.ts">Mount</a></code>
@@ -41,6 +42,20 @@ Methods:
4142
- <code title="post /v1/benchmarks/runs/{id}/complete">client.benchmarks.runs.<a href="./src/resources/benchmarks/runs.ts">complete</a>(id) -> BenchmarkRunView</code>
4243
- <code title="get /v1/benchmarks/runs/{id}/scenario_runs">client.benchmarks.runs.<a href="./src/resources/benchmarks/runs.ts">listScenarioRuns</a>(id, { ...params }) -> ScenarioRunViewsBenchmarkRunsCursorIDPage</code>
4344

45+
# Agents
46+
47+
Types:
48+
49+
- <code><a href="./src/resources/agents.ts">AgentCreateParameters</a></code>
50+
- <code><a href="./src/resources/agents.ts">AgentListView</a></code>
51+
- <code><a href="./src/resources/agents.ts">AgentView</a></code>
52+
53+
Methods:
54+
55+
- <code title="post /v1/agents">client.agents.<a href="./src/resources/agents.ts">create</a>({ ...params }) -> AgentView</code>
56+
- <code title="get /v1/agents/{id}">client.agents.<a href="./src/resources/agents.ts">retrieve</a>(id) -> AgentView</code>
57+
- <code title="get /v1/agents">client.agents.<a href="./src/resources/agents.ts">list</a>({ ...params }) -> AgentViewsAgentsCursorIDPage</code>
58+
4459
# Blueprints
4560

4661
Types:

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": "0.67.1",
3+
"version": "0.68.0",
44
"description": "The official TypeScript library for the Runloop API",
55
"author": "Runloop <support@runloop.ai>",
66
"types": "dist/sdk.d.ts",

src/index.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import * as Core from './core';
55
import * as Errors from './error';
66
import * as Pagination from './pagination';
77
import {
8+
type AgentsCursorIDPageParams,
9+
AgentsCursorIDPageResponse,
810
type BenchmarkRunsCursorIDPageParams,
911
BenchmarkRunsCursorIDPageResponse,
1012
type BenchmarksCursorIDPageParams,
@@ -28,6 +30,15 @@ import {
2830
} from './pagination';
2931
import * as Uploads from './uploads';
3032
import * as API from './resources/index';
33+
import {
34+
AgentCreateParameters,
35+
AgentCreateParams,
36+
AgentListParams,
37+
AgentListView,
38+
AgentView,
39+
AgentViewsAgentsCursorIDPage,
40+
Agents,
41+
} from './resources/agents';
3142
import {
3243
BlueprintBuildFromInspectionParameters,
3344
BlueprintBuildLog,
@@ -289,6 +300,7 @@ export class Runloop extends Core.APIClient {
289300
}
290301

291302
benchmarks: API.Benchmarks = new API.Benchmarks(this);
303+
agents: API.Agents = new API.Agents(this);
292304
blueprints: API.Blueprints = new API.Blueprints(this);
293305
devboxes: API.Devboxes = new API.Devboxes(this);
294306
scenarios: API.Scenarios = new API.Scenarios(this);
@@ -341,6 +353,8 @@ export class Runloop extends Core.APIClient {
341353

342354
Runloop.Benchmarks = Benchmarks;
343355
Runloop.BenchmarkViewsBenchmarksCursorIDPage = BenchmarkViewsBenchmarksCursorIDPage;
356+
Runloop.Agents = Agents;
357+
Runloop.AgentViewsAgentsCursorIDPage = AgentViewsAgentsCursorIDPage;
344358
Runloop.Blueprints = Blueprints;
345359
Runloop.BlueprintViewsBlueprintsCursorIDPage = BlueprintViewsBlueprintsCursorIDPage;
346360
Runloop.Devboxes = Devboxes;
@@ -387,6 +401,12 @@ export declare namespace Runloop {
387401
type BenchmarksCursorIDPageResponse as BenchmarksCursorIDPageResponse,
388402
};
389403

404+
export import AgentsCursorIDPage = Pagination.AgentsCursorIDPage;
405+
export {
406+
type AgentsCursorIDPageParams as AgentsCursorIDPageParams,
407+
type AgentsCursorIDPageResponse as AgentsCursorIDPageResponse,
408+
};
409+
390410
export import BenchmarkRunsCursorIDPage = Pagination.BenchmarkRunsCursorIDPage;
391411
export {
392412
type BenchmarkRunsCursorIDPageParams as BenchmarkRunsCursorIDPageParams,
@@ -434,6 +454,16 @@ export declare namespace Runloop {
434454
type BenchmarkStartRunParams as BenchmarkStartRunParams,
435455
};
436456

457+
export {
458+
Agents as Agents,
459+
type AgentCreateParameters as AgentCreateParameters,
460+
type AgentListView as AgentListView,
461+
type AgentView as AgentView,
462+
AgentViewsAgentsCursorIDPage as AgentViewsAgentsCursorIDPage,
463+
type AgentCreateParams as AgentCreateParams,
464+
type AgentListParams as AgentListParams,
465+
};
466+
437467
export {
438468
Blueprints as Blueprints,
439469
type BlueprintBuildFromInspectionParameters as BlueprintBuildFromInspectionParameters,
@@ -561,6 +591,7 @@ export declare namespace Runloop {
561591

562592
export type AfterIdle = API.AfterIdle;
563593
export type AgentMountParameters = API.AgentMountParameters;
594+
export type AgentSource = API.AgentSource;
564595
export type CodeMountParameters = API.CodeMountParameters;
565596
export type LaunchParameters = API.LaunchParameters;
566597
export type Mount = API.Mount;

src/pagination.ts

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,80 @@ export class BenchmarksCursorIDPage<Item extends { id: string }>
372372
}
373373
}
374374

375+
export interface AgentsCursorIDPageResponse<Item> {
376+
agents: Array<Item>;
377+
378+
has_more: boolean;
379+
380+
total_count: number;
381+
}
382+
383+
export interface AgentsCursorIDPageParams {
384+
starting_after?: string;
385+
386+
limit?: number;
387+
}
388+
389+
export class AgentsCursorIDPage<Item extends { id: string }>
390+
extends AbstractPage<Item>
391+
implements AgentsCursorIDPageResponse<Item>
392+
{
393+
agents: Array<Item>;
394+
395+
has_more: boolean;
396+
397+
total_count: number;
398+
399+
constructor(
400+
client: APIClient,
401+
response: Response,
402+
body: AgentsCursorIDPageResponse<Item>,
403+
options: FinalRequestOptions,
404+
) {
405+
super(client, response, body, options);
406+
407+
this.agents = body.agents || [];
408+
this.has_more = body.has_more || false;
409+
this.total_count = body.total_count || 0;
410+
}
411+
412+
getPaginatedItems(): Item[] {
413+
return this.agents ?? [];
414+
}
415+
416+
override hasNextPage(): boolean {
417+
if (this.has_more === false) {
418+
return false;
419+
}
420+
421+
return super.hasNextPage();
422+
}
423+
424+
// @deprecated Please use `nextPageInfo()` instead
425+
nextPageParams(): Partial<AgentsCursorIDPageParams> | null {
426+
const info = this.nextPageInfo();
427+
if (!info) return null;
428+
if ('params' in info) return info.params;
429+
const params = Object.fromEntries(info.url.searchParams);
430+
if (!Object.keys(params).length) return null;
431+
return params;
432+
}
433+
434+
nextPageInfo(): PageInfo | null {
435+
const agents = this.getPaginatedItems();
436+
if (!agents.length) {
437+
return null;
438+
}
439+
440+
const id = agents[agents.length - 1]?.id;
441+
if (!id) {
442+
return null;
443+
}
444+
445+
return { params: { starting_after: id } };
446+
}
447+
}
448+
375449
export interface BenchmarkRunsCursorIDPageResponse<Item> {
376450
runs: Array<Item>;
377451

src/resources/agents.ts

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
import { APIResource } from '../resource';
4+
import { isRequestOptions } from '../core';
5+
import * as Core from '../core';
6+
import * as Shared from './shared';
7+
import { AgentsCursorIDPage, type AgentsCursorIDPageParams } from '../pagination';
8+
9+
export class Agents extends APIResource {
10+
/**
11+
* Create a new Agent with a name and optional public visibility. The Agent will be
12+
* assigned a unique ID.
13+
*/
14+
create(body: AgentCreateParams, options?: Core.RequestOptions): Core.APIPromise<AgentView> {
15+
return this._client.post('/v1/agents', { body, ...options });
16+
}
17+
18+
/**
19+
* Retrieve a specific Agent by its unique identifier.
20+
*/
21+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<AgentView> {
22+
return this._client.get(`/v1/agents/${id}`, options);
23+
}
24+
25+
/**
26+
* List all Agents for the authenticated account with pagination support.
27+
*/
28+
list(
29+
query?: AgentListParams,
30+
options?: Core.RequestOptions,
31+
): Core.PagePromise<AgentViewsAgentsCursorIDPage, AgentView>;
32+
list(options?: Core.RequestOptions): Core.PagePromise<AgentViewsAgentsCursorIDPage, AgentView>;
33+
list(
34+
query: AgentListParams | Core.RequestOptions = {},
35+
options?: Core.RequestOptions,
36+
): Core.PagePromise<AgentViewsAgentsCursorIDPage, AgentView> {
37+
if (isRequestOptions(query)) {
38+
return this.list({}, query);
39+
}
40+
return this._client.getAPIList('/v1/agents', AgentViewsAgentsCursorIDPage, { query, ...options });
41+
}
42+
}
43+
44+
export class AgentViewsAgentsCursorIDPage extends AgentsCursorIDPage<AgentView> {}
45+
46+
/**
47+
* Parameters for creating a new Agent.
48+
*/
49+
export interface AgentCreateParameters {
50+
/**
51+
* The name of the Agent.
52+
*/
53+
name: string;
54+
55+
/**
56+
* The source configuration for the Agent.
57+
*/
58+
source?: Shared.AgentSource | null;
59+
}
60+
61+
/**
62+
* A paginated list of Agents.
63+
*/
64+
export interface AgentListView {
65+
/**
66+
* The list of Agents.
67+
*/
68+
agents: Array<AgentView>;
69+
70+
/**
71+
* Whether there are more Agents to fetch.
72+
*/
73+
has_more: boolean;
74+
75+
/**
76+
* The count of remaining Agents.
77+
*/
78+
remaining_count: number;
79+
80+
/**
81+
* The total count of Agents.
82+
*/
83+
total_count: number;
84+
}
85+
86+
/**
87+
* An Agent represents a registered AI agent entity.
88+
*/
89+
export interface AgentView {
90+
/**
91+
* The unique identifier of the Agent.
92+
*/
93+
id: string;
94+
95+
/**
96+
* The creation time of the Agent (Unix timestamp milliseconds).
97+
*/
98+
create_time_ms: number;
99+
100+
/**
101+
* Whether the Agent is publicly accessible.
102+
*/
103+
is_public: boolean;
104+
105+
/**
106+
* The name of the Agent.
107+
*/
108+
name: string;
109+
110+
/**
111+
* The source configuration for the Agent.
112+
*/
113+
source?: Shared.AgentSource | null;
114+
}
115+
116+
export interface AgentCreateParams {
117+
/**
118+
* The name of the Agent.
119+
*/
120+
name: string;
121+
122+
/**
123+
* The source configuration for the Agent.
124+
*/
125+
source?: Shared.AgentSource | null;
126+
}
127+
128+
export interface AgentListParams extends AgentsCursorIDPageParams {
129+
/**
130+
* Filter agents by public visibility.
131+
*/
132+
is_public?: boolean;
133+
134+
/**
135+
* Filter agents by name (partial match supported).
136+
*/
137+
name?: string;
138+
139+
/**
140+
* Search by agent ID or name.
141+
*/
142+
search?: string;
143+
}
144+
145+
Agents.AgentViewsAgentsCursorIDPage = AgentViewsAgentsCursorIDPage;
146+
147+
export declare namespace Agents {
148+
export {
149+
type AgentCreateParameters as AgentCreateParameters,
150+
type AgentListView as AgentListView,
151+
type AgentView as AgentView,
152+
AgentViewsAgentsCursorIDPage as AgentViewsAgentsCursorIDPage,
153+
type AgentCreateParams as AgentCreateParams,
154+
type AgentListParams as AgentListParams,
155+
};
156+
}

0 commit comments

Comments
 (0)