Skip to content

Commit 39de30f

Browse files
author
stlc-bot
committed
feat!: remove the agent API and agent mounts
Stainless-Generated-From: d9f23e48bd3ea0bec32cb159b2c013d58b7c8634
1 parent d3de4b2 commit 39de30f

11 files changed

Lines changed: 4 additions & 721 deletions

File tree

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 94
1+
configured_endpoints: 88

‎api.md‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
Types:
44

55
- <code><a href="./src/resources/shared.ts">AfterIdle</a></code>
6-
- <code><a href="./src/resources/shared.ts">AgentMount</a></code>
7-
- <code><a href="./src/resources/shared.ts">AgentSource</a></code>
86
- <code><a href="./src/resources/shared.ts">AuthMechanism</a></code>
97
- <code><a href="./src/resources/shared.ts">BrokerMount</a></code>
108
- <code><a href="./src/resources/shared.ts">CodeMountParameters</a></code>
@@ -26,25 +24,6 @@ Methods:
2624

2725
- <code title="get /v1/accounts/me">client.accounts.<a href="./src/resources/accounts.ts">me</a>() -> AccountView</code>
2826

29-
# Agents
30-
31-
Types:
32-
33-
- <code><a href="./src/resources/agents.ts">AgentCreateParameters</a></code>
34-
- <code><a href="./src/resources/agents.ts">AgentDevboxCountsView</a></code>
35-
- <code><a href="./src/resources/agents.ts">AgentListView</a></code>
36-
- <code><a href="./src/resources/agents.ts">AgentView</a></code>
37-
- <code><a href="./src/resources/agents.ts">AgentDeleteResponse</a></code>
38-
39-
Methods:
40-
41-
- <code title="post /v1/agents">client.agents.<a href="./src/resources/agents.ts">create</a>({ ...params }) -> AgentView</code>
42-
- <code title="get /v1/agents/{id}">client.agents.<a href="./src/resources/agents.ts">retrieve</a>(id) -> AgentView</code>
43-
- <code title="get /v1/agents">client.agents.<a href="./src/resources/agents.ts">list</a>({ ...params }) -> AgentViewsAgentsCursorIDPage</code>
44-
- <code title="post /v1/agents/{id}/delete">client.agents.<a href="./src/resources/agents.ts">delete</a>(id) -> unknown</code>
45-
- <code title="get /v1/agents/devbox_counts">client.agents.<a href="./src/resources/agents.ts">devboxCounts</a>() -> AgentDevboxCountsView</code>
46-
- <code title="get /v1/agents/list_public">client.agents.<a href="./src/resources/agents.ts">listPublic</a>({ ...params }) -> AgentViewsAgentsCursorIDPage</code>
47-
4827
# Axons
4928

5029
Types:

‎scripts/mock‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎src/index.ts‎

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import * as Core from './core';
66
import * as Errors from './error';
77
import * as Pagination from './pagination';
88
import {
9-
type AgentsCursorIDPageParams,
10-
AgentsCursorIDPageResponse,
119
type AxonsCursorIDPageParams,
1210
AxonsCursorIDPageResponse,
1311
type BlueprintsCursorIDPageParams,
@@ -28,18 +26,6 @@ import {
2826
import * as Uploads from './uploads';
2927
import * as API from './resources/index';
3028
import { AccountView, Accounts } from './resources/accounts';
31-
import {
32-
AgentCreateParameters,
33-
AgentCreateParams,
34-
AgentDeleteResponse,
35-
AgentDevboxCountsView,
36-
AgentListParams,
37-
AgentListPublicParams,
38-
AgentListView,
39-
AgentView,
40-
AgentViewsAgentsCursorIDPage,
41-
Agents,
42-
} from './resources/agents';
4329
import { APIKeyCreateParameters, APIKeyCreatedView, ApikeyCreateParams, Apikeys } from './resources/apikeys';
4430
import {
4531
BlueprintBuildLog,
@@ -355,7 +341,6 @@ export class Runloop extends Core.APIClient {
355341
}
356342

357343
accounts: API.Accounts = new API.Accounts(this);
358-
agents: API.Agents = new API.Agents(this);
359344
axons: API.Axons = new API.Axons(this);
360345
blueprints: API.Blueprints = new API.Blueprints(this);
361346
devboxes: API.Devboxes = new API.Devboxes(this);
@@ -412,8 +397,6 @@ export class Runloop extends Core.APIClient {
412397
}
413398

414399
Runloop.Accounts = Accounts;
415-
Runloop.Agents = Agents;
416-
Runloop.AgentViewsAgentsCursorIDPage = AgentViewsAgentsCursorIDPage;
417400
Runloop.Axons = Axons;
418401
Runloop.AxonViewsAxonsCursorIDPage = AxonViewsAxonsCursorIDPage;
419402
Runloop.Blueprints = Blueprints;
@@ -455,12 +438,6 @@ export declare namespace Runloop {
455438
type DiskSnapshotsCursorIDPageResponse as DiskSnapshotsCursorIDPageResponse,
456439
};
457440

458-
export import AgentsCursorIDPage = Pagination.AgentsCursorIDPage;
459-
export {
460-
type AgentsCursorIDPageParams as AgentsCursorIDPageParams,
461-
type AgentsCursorIDPageResponse as AgentsCursorIDPageResponse,
462-
};
463-
464441
export import AxonsCursorIDPage = Pagination.AxonsCursorIDPage;
465442
export {
466443
type AxonsCursorIDPageParams as AxonsCursorIDPageParams,
@@ -493,19 +470,6 @@ export declare namespace Runloop {
493470

494471
export { Accounts as Accounts, type AccountView as AccountView };
495472

496-
export {
497-
Agents as Agents,
498-
type AgentCreateParameters as AgentCreateParameters,
499-
type AgentDevboxCountsView as AgentDevboxCountsView,
500-
type AgentListView as AgentListView,
501-
type AgentView as AgentView,
502-
type AgentDeleteResponse as AgentDeleteResponse,
503-
AgentViewsAgentsCursorIDPage as AgentViewsAgentsCursorIDPage,
504-
type AgentCreateParams as AgentCreateParams,
505-
type AgentListParams as AgentListParams,
506-
type AgentListPublicParams as AgentListPublicParams,
507-
};
508-
509473
export {
510474
Axons as Axons,
511475
type AxonCreateParams as AxonCreateParams,
@@ -677,8 +641,6 @@ export declare namespace Runloop {
677641
};
678642

679643
export type AfterIdle = API.AfterIdle;
680-
export type AgentMount = API.AgentMount;
681-
export type AgentSource = API.AgentSource;
682644
export type AuthMechanism = API.AuthMechanism;
683645
export type BrokerMount = API.BrokerMount;
684646
export type CodeMountParameters = API.CodeMountParameters;

‎src/pagination.ts‎

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -224,80 +224,6 @@ export class DiskSnapshotsCursorIDPage<Item extends { id: string }>
224224
}
225225
}
226226

227-
export interface AgentsCursorIDPageResponse<Item> {
228-
agents: Array<Item>;
229-
230-
has_more: boolean;
231-
232-
total_count: number;
233-
}
234-
235-
export interface AgentsCursorIDPageParams {
236-
starting_after?: string;
237-
238-
limit?: number;
239-
}
240-
241-
export class AgentsCursorIDPage<Item extends { id: string }>
242-
extends AbstractPage<Item>
243-
implements AgentsCursorIDPageResponse<Item>
244-
{
245-
agents: Array<Item>;
246-
247-
has_more: boolean;
248-
249-
total_count: number;
250-
251-
constructor(
252-
client: APIClient,
253-
response: Response,
254-
body: AgentsCursorIDPageResponse<Item>,
255-
options: FinalRequestOptions,
256-
) {
257-
super(client, response, body, options);
258-
259-
this.agents = body.agents || [];
260-
this.has_more = body.has_more || false;
261-
this.total_count = body.total_count || 0;
262-
}
263-
264-
getPaginatedItems(): Item[] {
265-
return this.agents ?? [];
266-
}
267-
268-
override hasNextPage(): boolean {
269-
if (this.has_more === false) {
270-
return false;
271-
}
272-
273-
return super.hasNextPage();
274-
}
275-
276-
// @deprecated Please use `nextPageInfo()` instead
277-
nextPageParams(): Partial<AgentsCursorIDPageParams> | null {
278-
const info = this.nextPageInfo();
279-
if (!info) return null;
280-
if ('params' in info) return info.params;
281-
const params = Object.fromEntries(info.url.searchParams);
282-
if (!Object.keys(params).length) return null;
283-
return params;
284-
}
285-
286-
nextPageInfo(): PageInfo | null {
287-
const agents = this.getPaginatedItems();
288-
if (!agents.length) {
289-
return null;
290-
}
291-
292-
const id = agents[agents.length - 1]?.id;
293-
if (!id) {
294-
return null;
295-
}
296-
297-
return { params: { starting_after: id } };
298-
}
299-
}
300-
301227
export interface AxonsCursorIDPageResponse<Item> {
302228
axons: Array<Item>;
303229

0 commit comments

Comments
 (0)