Skip to content

Commit f43cf4f

Browse files
feat(api): api update
1 parent a530c11 commit f43cf4f

6 files changed

Lines changed: 55 additions & 8 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 23
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-410e07a5c3a6e0ff043e5f414d501e171d4dd9f8c91b3404cd9e3e93afebae46.yml
3-
openapi_spec_hash: ab7a6a235e8b2484df1747c69a096ab0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta/warp-api-4bc83c682f151e3779dabdac7cc9c83ec591510b4befc86a3b2995ccd6e61151.yml
3+
openapi_spec_hash: 35d33a8f98079873af81763e7381046e
44
config_hash: 236823a4936c76818117c16aa5c188df

src/resources/agent/agent.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,23 @@ export interface AmbientAgentConfig {
284284
session_sharing?: AmbientAgentConfig.SessionSharing;
285285

286286
/**
287-
* Skill specification identifying which agent skill to use. Format:
287+
* Skill specification identifying the primary agent skill to use. Format:
288288
* "{owner}/{repo}:{skill_path}" Example:
289-
* "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md" Use the list agents
290-
* endpoint to discover available skills.
289+
* "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md" Mutually exclusive with
290+
* skills in create/update requests. Responses include the first skills entry here
291+
* for backward compatibility. Use the list agents endpoint to discover available
292+
* skills.
291293
*/
292294
skill_spec?: string;
293295

296+
/**
297+
* Ordered skill specifications to attach to the run. Format:
298+
* "{owner}/{repo}:{skill_path}" Example:
299+
* "warpdotdev/warp-server:.claude/skills/deploy/SKILL.md" Mutually exclusive with
300+
* skill_spec in create/update requests.
301+
*/
302+
skills?: Array<string>;
303+
294304
/**
295305
* Self-hosted worker ID that should execute this task. If not specified or set to
296306
* "warp", the task runs on Warp-hosted workers.
@@ -1089,7 +1099,7 @@ export interface AgentRunParams {
10891099

10901100
/**
10911101
* The prompt/instruction for the agent to execute. Required unless a skill is
1092-
* specified via the skill field or config.skill_spec.
1102+
* specified via the skill field, config.skill_spec, or config.skills.
10931103
*/
10941104
prompt?: string;
10951105

src/resources/agent/agent_.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@ export interface AgentResponse {
146146
*/
147147
description?: string | null;
148148

149+
/**
150+
* Default cloud environment ID for runs executed by this agent. The precedence
151+
* order for environment resolution is:
152+
*
153+
* 1. The environment specified on the run itself
154+
* 2. The agent's default environment
155+
* 3. An empty environment
156+
*/
157+
environment_id?: string;
158+
149159
/**
150160
* Authentication secrets for third-party harnesses. Only the secret for the
151161
* harness specified gets injected into the environment.
@@ -263,6 +273,12 @@ export interface CreateAgentRequest {
263273
*/
264274
description?: string | null;
265275

276+
/**
277+
* Optional default cloud environment ID for runs executed by this agent. The
278+
* environment must be owned by the same team as the agent.
279+
*/
280+
environment_id?: string | null;
281+
266282
/**
267283
* Authentication secrets for third-party harnesses. Only the secret for the
268284
* harness specified gets injected into the environment.
@@ -412,6 +428,12 @@ export interface UpdateAgentRequest {
412428
*/
413429
description?: string | null;
414430

431+
/**
432+
* Replacement default cloud environment ID. Omit or pass `null` to leave
433+
* unchanged, or pass an empty string to clear.
434+
*/
435+
environment_id?: string | null;
436+
415437
/**
416438
* Authentication secrets for third-party harnesses. Only the secret for the
417439
* harness specified gets injected into the environment.
@@ -553,6 +575,12 @@ export interface AgentCreateParams {
553575
*/
554576
description?: string | null;
555577

578+
/**
579+
* Optional default cloud environment ID for runs executed by this agent. The
580+
* environment must be owned by the same team as the agent.
581+
*/
582+
environment_id?: string | null;
583+
556584
/**
557585
* Authentication secrets for third-party harnesses. Only the secret for the
558586
* harness specified gets injected into the environment.
@@ -691,6 +719,12 @@ export interface AgentUpdateParams {
691719
*/
692720
description?: string | null;
693721

722+
/**
723+
* Replacement default cloud environment ID. Omit or pass `null` to leave
724+
* unchanged, or pass an empty string to clear.
725+
*/
726+
environment_id?: string | null;
727+
694728
/**
695729
* Authentication secrets for third-party harnesses. Only the secret for the
696730
* harness specified gets injected into the environment.

src/resources/agent/schedules.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export interface ScheduleCreateParams {
258258

259259
/**
260260
* The prompt/instruction for the agent to execute. Required unless
261-
* agent_config.skill_spec is provided.
261+
* agent_config.skill_spec or agent_config.skills is provided.
262262
*/
263263
prompt?: string;
264264

@@ -304,7 +304,7 @@ export interface ScheduleUpdateParams {
304304

305305
/**
306306
* The prompt/instruction for the agent to execute. Required unless
307-
* agent_config.skill_spec is provided.
307+
* agent_config.skill_spec or agent_config.skills is provided.
308308
*/
309309
prompt?: string;
310310
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ describe('resource agent', () => {
2727
base_harness: 'base_harness',
2828
base_model: 'base_model',
2929
description: 'description',
30+
environment_id: 'environment_id',
3031
harness_auth_secrets: {
3132
claude_auth_secret_name: 'claude_auth_secret_name',
3233
codex_auth_secret_name: 'codex_auth_secret_name',

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ describe('resource schedules', () => {
6060
name: 'name',
6161
session_sharing: { public_access: 'VIEWER' },
6262
skill_spec: 'skill_spec',
63+
skills: ['string'],
6364
worker_host: 'worker_host',
6465
},
6566
agent_uid: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
@@ -136,6 +137,7 @@ describe('resource schedules', () => {
136137
name: 'name',
137138
session_sharing: { public_access: 'VIEWER' },
138139
skill_spec: 'skill_spec',
140+
skills: ['string'],
139141
worker_host: 'worker_host',
140142
},
141143
agent_uid: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',

0 commit comments

Comments
 (0)