Skip to content

Commit aeb9296

Browse files
feat(api): api update
1 parent b09a339 commit aeb9296

6 files changed

Lines changed: 179 additions & 5 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 22
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-f5a88aa4f1991447272228b7024ebfbec99d31706b8806058917a3f90dd39d00.yml
3-
openapi_spec_hash: 1952fae99172f1adaf35d800b0d63936
4-
config_hash: 44a1e8f98607a5cf03815a63bae63453
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-8eb8e46de29b887cbcb25b90fec55d34e11ff82b174b7a5c1d1ce4ba4d7c2fb4.yml
3+
openapi_spec_hash: a071b7c932453dc870e7e6cf39df0535
4+
config_hash: c15534df6c8d861059e44d9dd5483b3f

src/resources/agent/agent.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,9 @@ export namespace AmbientAgentConfig {
300300
* - oz: Warp's built-in harness (default)
301301
* - claude: Claude Code harness
302302
* - gemini: Gemini CLI harness
303+
* - codex: Codex CLI harness
303304
*/
304-
type?: 'oz' | 'claude' | 'gemini';
305+
type?: 'oz' | 'claude' | 'gemini' | 'codex';
305306
}
306307

307308
/**

src/resources/agent/agent_.ts

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,42 +85,201 @@ export interface AgentResponse {
8585
*/
8686
name: string;
8787

88+
/**
89+
* Secrets that this agent may access by default.
90+
*/
91+
secrets: Array<AgentResponse.Secret>;
92+
93+
/**
94+
* Ordered list of normalized skill specs associated with this agent. Always
95+
* present; empty when no skills are attached.
96+
*/
97+
skills: Array<string>;
98+
8899
/**
89100
* Unique identifier for the agent
90101
*/
91102
uid: string;
103+
104+
/**
105+
* Optional description of the agent
106+
*/
107+
description?: string | null;
108+
}
109+
110+
export namespace AgentResponse {
111+
/**
112+
* Reference to a managed secret by name.
113+
*/
114+
export interface Secret {
115+
/**
116+
* Name of the managed secret.
117+
*/
118+
name: string;
119+
}
92120
}
93121

94122
export interface CreateAgentRequest {
95123
/**
96124
* A name for the agent
97125
*/
98126
name: string;
127+
128+
/**
129+
* Optional description of the agent
130+
*/
131+
description?: string | null;
132+
133+
/**
134+
* Optional list of secrets associated with the agent. Duplicate names within a
135+
* single request are rejected.
136+
*/
137+
secrets?: Array<CreateAgentRequest.Secret>;
138+
139+
/**
140+
* Optional list of skill specs to associate with the agent. Format:
141+
* "{owner}/{repo}:{skill_path}" (e.g.,
142+
* "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"). Each spec is validated
143+
* and normalized at attach time using the team's GitHub credentials; inaccessible
144+
* or malformed specs are rejected.
145+
*/
146+
skills?: Array<string>;
147+
}
148+
149+
export namespace CreateAgentRequest {
150+
/**
151+
* Reference to a managed secret by name.
152+
*/
153+
export interface Secret {
154+
/**
155+
* Name of the managed secret.
156+
*/
157+
name: string;
158+
}
99159
}
100160

101161
export interface ListAgentIdentitiesResponse {
102162
agents: Array<AgentResponse>;
103163
}
104164

165+
/**
166+
* Partial update for an agent. Each field is optional:
167+
*
168+
* - Omitted or `null`: leave the field unchanged.
169+
* - Empty value: clear the field.
170+
* - Non-empty: replace the field wholesale with the provided value.
171+
*/
105172
export interface UpdateAgentRequest {
173+
/**
174+
* Replacement description. Omit or pass `null` to leave unchanged, or use an empty
175+
* value to clear.
176+
*/
177+
description?: string | null;
178+
106179
/**
107180
* The new name for the agent
108181
*/
109182
name?: string;
183+
184+
/**
185+
* Replacement list of secrets. Omit to leave unchanged, pass an empty array to
186+
* clear, or pass a non-empty array to replace. Duplicate names are rejected.
187+
*/
188+
secrets?: Array<UpdateAgentRequest.Secret> | null;
189+
190+
/**
191+
* Replacement list of skill specs. Omit to leave unchanged, pass an empty array to
192+
* clear, or pass a non-empty array to replace.
193+
*/
194+
skills?: Array<string> | null;
195+
}
196+
197+
export namespace UpdateAgentRequest {
198+
/**
199+
* Reference to a managed secret by name.
200+
*/
201+
export interface Secret {
202+
/**
203+
* Name of the managed secret.
204+
*/
205+
name: string;
206+
}
110207
}
111208

112209
export interface AgentCreateParams {
113210
/**
114211
* A name for the agent
115212
*/
116213
name: string;
214+
215+
/**
216+
* Optional description of the agent
217+
*/
218+
description?: string | null;
219+
220+
/**
221+
* Optional list of secrets associated with the agent. Duplicate names within a
222+
* single request are rejected.
223+
*/
224+
secrets?: Array<AgentCreateParams.Secret>;
225+
226+
/**
227+
* Optional list of skill specs to associate with the agent. Format:
228+
* "{owner}/{repo}:{skill_path}" (e.g.,
229+
* "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md"). Each spec is validated
230+
* and normalized at attach time using the team's GitHub credentials; inaccessible
231+
* or malformed specs are rejected.
232+
*/
233+
skills?: Array<string>;
234+
}
235+
236+
export namespace AgentCreateParams {
237+
/**
238+
* Reference to a managed secret by name.
239+
*/
240+
export interface Secret {
241+
/**
242+
* Name of the managed secret.
243+
*/
244+
name: string;
245+
}
117246
}
118247

119248
export interface AgentUpdateParams {
249+
/**
250+
* Replacement description. Omit or pass `null` to leave unchanged, or use an empty
251+
* value to clear.
252+
*/
253+
description?: string | null;
254+
120255
/**
121256
* The new name for the agent
122257
*/
123258
name?: string;
259+
260+
/**
261+
* Replacement list of secrets. Omit to leave unchanged, pass an empty array to
262+
* clear, or pass a non-empty array to replace. Duplicate names are rejected.
263+
*/
264+
secrets?: Array<AgentUpdateParams.Secret> | null;
265+
266+
/**
267+
* Replacement list of skill specs. Omit to leave unchanged, pass an empty array to
268+
* clear, or pass a non-empty array to replace.
269+
*/
270+
skills?: Array<string> | null;
271+
}
272+
273+
export namespace AgentUpdateParams {
274+
/**
275+
* Reference to a managed secret by name.
276+
*/
277+
export interface Secret {
278+
/**
279+
* Name of the managed secret.
280+
*/
281+
name: string;
282+
}
124283
}
125284

126285
export declare namespace Agent {

src/resources/agent/runs.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ export interface RunItem {
345345
*/
346346
execution_location?: 'LOCAL' | 'REMOTE';
347347

348+
executor?: AgentAPI.UserProfile;
349+
348350
/**
349351
* Whether the sandbox environment is currently running
350352
*/
@@ -655,6 +657,12 @@ export interface RunListParams extends RunsCursorPageParams {
655657
*/
656658
execution_location?: 'LOCAL' | 'REMOTE';
657659

660+
/**
661+
* Filter by the user or agent that executed the run. This will often be the same
662+
* as the creator, but not always: users may delegate tasks to agents.
663+
*/
664+
executor?: string;
665+
658666
/**
659667
* Filter by model ID
660668
*/

tests/api-resources/agent/agent_.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ describe('resource agent', () => {
2222

2323
// Mock server tests are disabled
2424
test.skip('create: required and optional params', async () => {
25-
const response = await client.agent.agent.create({ name: 'name' });
25+
const response = await client.agent.agent.create({
26+
name: 'name',
27+
description: 'description',
28+
secrets: [{ name: 'name' }],
29+
skills: ['string'],
30+
});
2631
});
2732

2833
// Mock server tests are disabled

tests/api-resources/agent/runs.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ describe('resource runs', () => {
4646
cursor: 'cursor',
4747
environment_id: 'environment_id',
4848
execution_location: 'LOCAL',
49+
executor: 'executor',
4950
limit: 1,
5051
model_id: 'model_id',
5152
name: 'name',

0 commit comments

Comments
 (0)