Skip to content

Commit d7275a8

Browse files
feat(api): add models for agent skill, user profile
1 parent f4ec2c4 commit d7275a8

8 files changed

Lines changed: 88 additions & 84 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 12
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-3ee19d97da1711b8dfcba85f38c3c345fa96aaf78ea7f025e1ae490d17e97517.yml
33
openapi_spec_hash: 2d03e7a248b1be5bd5600b62912cdab8
4-
config_hash: 9db55bfa03e8dd5e251342bd7491408c
4+
config_hash: 07820b17df23cbea39cb77fa05292538

api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
Types:
44

5+
- <code><a href="./src/resources/agent/agent.ts">AgentSkill</a></code>
56
- <code><a href="./src/resources/agent/agent.ts">AmbientAgentConfig</a></code>
67
- <code><a href="./src/resources/agent/agent.ts">CloudEnvironmentConfig</a></code>
78
- <code><a href="./src/resources/agent/agent.ts">McpServerConfig</a></code>
8-
- <code><a href="./src/resources/agent/agent.ts">RunCreatorInfo</a></code>
9+
- <code><a href="./src/resources/agent/agent.ts">UserProfile</a></code>
910
- <code><a href="./src/resources/agent/agent.ts">AgentListResponse</a></code>
1011
- <code><a href="./src/resources/agent/agent.ts">AgentRunResponse</a></code>
1112

src/client.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ import {
2323
AgentListResponse,
2424
AgentRunParams,
2525
AgentRunResponse,
26+
AgentSkill,
2627
AmbientAgentConfig,
2728
CloudEnvironmentConfig,
2829
McpServerConfig,
29-
RunCreatorInfo,
30+
UserProfile,
3031
} from './resources/agent/agent';
3132
import { type Fetch } from './internal/builtin-types';
3233
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
@@ -721,10 +722,11 @@ export declare namespace WarpAPI {
721722

722723
export {
723724
Agent as Agent,
725+
type AgentSkill as AgentSkill,
724726
type AmbientAgentConfig as AmbientAgentConfig,
725727
type CloudEnvironmentConfig as CloudEnvironmentConfig,
726728
type McpServerConfig as McpServerConfig,
727-
type RunCreatorInfo as RunCreatorInfo,
729+
type UserProfile as UserProfile,
728730
type AgentListResponse as AgentListResponse,
729731
type AgentRunResponse as AgentRunResponse,
730732
type AgentListParams as AgentListParams,

src/resources/agent/agent.ts

Lines changed: 74 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,76 @@ export class Agent extends APIResource {
6060
}
6161
}
6262

63+
export interface AgentSkill {
64+
/**
65+
* Human-readable name of the agent
66+
*/
67+
name: string;
68+
69+
/**
70+
* Available variants of this agent
71+
*/
72+
variants: Array<AgentSkill.Variant>;
73+
}
74+
75+
export namespace AgentSkill {
76+
export interface Variant {
77+
/**
78+
* Stable identifier for this skill variant. Format: "{owner}/{repo}:{skill_path}"
79+
* Example: "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"
80+
*/
81+
id: string;
82+
83+
/**
84+
* Base prompt/instructions for the agent
85+
*/
86+
base_prompt: string;
87+
88+
/**
89+
* Description of the agent variant
90+
*/
91+
description: string;
92+
93+
/**
94+
* Environments where this agent variant is available
95+
*/
96+
environments: Array<Variant.Environment>;
97+
98+
source: Variant.Source;
99+
}
100+
101+
export namespace Variant {
102+
export interface Environment {
103+
/**
104+
* Human-readable name of the environment
105+
*/
106+
name: string;
107+
108+
/**
109+
* Unique identifier for the environment
110+
*/
111+
uid: string;
112+
}
113+
114+
export interface Source {
115+
/**
116+
* GitHub repository name
117+
*/
118+
name: string;
119+
120+
/**
121+
* GitHub repository owner
122+
*/
123+
owner: string;
124+
125+
/**
126+
* Path to the skill definition file within the repository
127+
*/
128+
skill_path: string;
129+
}
130+
}
131+
}
132+
63133
/**
64134
* Configuration for an ambient agent run
65135
*/
@@ -184,7 +254,7 @@ export interface McpServerConfig {
184254
warp_id?: string;
185255
}
186256

187-
export interface RunCreatorInfo {
257+
export interface UserProfile {
188258
/**
189259
* Display name of the creator
190260
*/
@@ -210,79 +280,7 @@ export interface AgentListResponse {
210280
/**
211281
* List of available agents
212282
*/
213-
agents: Array<AgentListResponse.Agent>;
214-
}
215-
216-
export namespace AgentListResponse {
217-
export interface Agent {
218-
/**
219-
* Human-readable name of the agent
220-
*/
221-
name: string;
222-
223-
/**
224-
* Available variants of this agent
225-
*/
226-
variants: Array<Agent.Variant>;
227-
}
228-
229-
export namespace Agent {
230-
export interface Variant {
231-
/**
232-
* Stable identifier for this skill variant. Format: "{owner}/{repo}:{skill_path}"
233-
* Example: "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"
234-
*/
235-
id: string;
236-
237-
/**
238-
* Base prompt/instructions for the agent
239-
*/
240-
base_prompt: string;
241-
242-
/**
243-
* Description of the agent variant
244-
*/
245-
description: string;
246-
247-
/**
248-
* Environments where this agent variant is available
249-
*/
250-
environments: Array<Variant.Environment>;
251-
252-
source: Variant.Source;
253-
}
254-
255-
export namespace Variant {
256-
export interface Environment {
257-
/**
258-
* Human-readable name of the environment
259-
*/
260-
name: string;
261-
262-
/**
263-
* Unique identifier for the environment
264-
*/
265-
uid: string;
266-
}
267-
268-
export interface Source {
269-
/**
270-
* GitHub repository name
271-
*/
272-
name: string;
273-
274-
/**
275-
* GitHub repository owner
276-
*/
277-
owner: string;
278-
279-
/**
280-
* Path to the skill definition file within the repository
281-
*/
282-
skill_path: string;
283-
}
284-
}
285-
}
283+
agents: Array<AgentSkill>;
286284
}
287285

288286
export interface AgentRunResponse {
@@ -339,10 +337,11 @@ Agent.Schedules = Schedules;
339337

340338
export declare namespace Agent {
341339
export {
340+
type AgentSkill as AgentSkill,
342341
type AmbientAgentConfig as AmbientAgentConfig,
343342
type CloudEnvironmentConfig as CloudEnvironmentConfig,
344343
type McpServerConfig as McpServerConfig,
345-
type RunCreatorInfo as RunCreatorInfo,
344+
type UserProfile as UserProfile,
346345
type AgentListResponse as AgentListResponse,
347346
type AgentRunResponse as AgentRunResponse,
348347
type AgentListParams as AgentListParams,

src/resources/agent/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
export {
44
Agent,
5+
type AgentSkill,
56
type AmbientAgentConfig,
67
type CloudEnvironmentConfig,
78
type McpServerConfig,
8-
type RunCreatorInfo,
9+
type UserProfile,
910
type AgentListResponse,
1011
type AgentRunResponse,
1112
type AgentListParams,

src/resources/agent/runs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export interface RunItem {
170170
*/
171171
conversation_id?: string;
172172

173-
creator?: AgentAPI.RunCreatorInfo;
173+
creator?: AgentAPI.UserProfile;
174174

175175
/**
176176
* Whether the sandbox environment is currently running

src/resources/agent/schedules.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export interface ScheduledAgentItem {
162162
*/
163163
agent_config?: AgentAPI.AmbientAgentConfig;
164164

165-
created_by?: AgentAPI.RunCreatorInfo;
165+
created_by?: AgentAPI.UserProfile;
166166

167167
/**
168168
* Configuration for a cloud environment used by scheduled agents
@@ -179,7 +179,7 @@ export interface ScheduledAgentItem {
179179
*/
180180
last_spawn_error?: string | null;
181181

182-
updated_by?: AgentAPI.RunCreatorInfo;
182+
updated_by?: AgentAPI.UserProfile;
183183
}
184184

185185
export namespace ScheduledAgentItem {

src/resources/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
export {
44
Agent,
5+
type AgentSkill,
56
type AmbientAgentConfig,
67
type CloudEnvironmentConfig,
78
type McpServerConfig,
8-
type RunCreatorInfo,
9+
type UserProfile,
910
type AgentListResponse,
1011
type AgentRunResponse,
1112
type AgentListParams,

0 commit comments

Comments
 (0)