Skip to content

Commit 240bfbc

Browse files
feat(api): add computer_use_enabled param
1 parent 48a300d commit 240bfbc

6 files changed

Lines changed: 41 additions & 11 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: 12
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-71da0fb8e959241d9767c5a4879871711b501bd0d6cef087fbb7047a0b86791e.yml
3-
openapi_spec_hash: 8b0828210e5b33f36fc88093dbf066f1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-889ce13c0c43d5d3affffdc59a70d6f9a99b6b537f03d9f4e13685884e0ce163.yml
3+
openapi_spec_hash: 9ae86e64db36c40a13cf1afd24f6f736
44
config_hash: 07820b17df23cbea39cb77fa05292538

src/resources/agent/agent.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ export interface AmbientAgentConfig {
139139
*/
140140
base_prompt?: string;
141141

142+
/**
143+
* Controls whether computer use is enabled for this agent. If not set, defaults to
144+
* false.
145+
*/
146+
computer_use_enabled?: boolean;
147+
142148
/**
143149
* UID of the environment to run the agent in
144150
*/
@@ -298,6 +304,7 @@ export interface AgentRunResponse {
298304
* - INPROGRESS: Run is actively being executed
299305
* - SUCCEEDED: Run completed successfully
300306
* - FAILED: Run failed
307+
* - CANCELLED: Run was cancelled by user
301308
*/
302309
state: RunsAPI.RunState;
303310
}

src/resources/agent/runs.ts

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ export namespace ArtifactItem {
5454
/**
5555
* Type of the artifact
5656
*/
57-
artifact_type: 'plan';
57+
artifact_type: 'PLAN';
5858

5959
/**
6060
* Timestamp when the artifact was created (RFC3339)
6161
*/
6262
created_at: string;
6363

64-
plan: PlanArtifact.Plan;
64+
data: PlanArtifact.Data;
6565
}
6666

6767
export namespace PlanArtifact {
68-
export interface Plan {
68+
export interface Data {
6969
/**
7070
* Unique identifier for the plan document
7171
*/
@@ -87,18 +87,18 @@ export namespace ArtifactItem {
8787
/**
8888
* Type of the artifact
8989
*/
90-
artifact_type: 'pull_request';
90+
artifact_type: 'PULL_REQUEST';
9191

9292
/**
9393
* Timestamp when the artifact was created (RFC3339)
9494
*/
9595
created_at: string;
9696

97-
pull_request: PullRequestArtifact.PullRequest;
97+
data: PullRequestArtifact.Data;
9898
}
9999

100100
export namespace PullRequestArtifact {
101-
export interface PullRequest {
101+
export interface Data {
102102
/**
103103
* Branch name for the pull request
104104
*/
@@ -137,6 +137,7 @@ export interface RunItem {
137137
* - INPROGRESS: Run is actively being executed
138138
* - SUCCEEDED: Run completed successfully
139139
* - FAILED: Run failed
140+
* - CANCELLED: Run was cancelled by user
140141
*/
141142
state: RunState;
142143

@@ -293,8 +294,9 @@ export type RunSourceType =
293294
* - INPROGRESS: Run is actively being executed
294295
* - SUCCEEDED: Run completed successfully
295296
* - FAILED: Run failed
297+
* - CANCELLED: Run was cancelled by user
296298
*/
297-
export type RunState = 'QUEUED' | 'PENDING' | 'CLAIMED' | 'INPROGRESS' | 'SUCCEEDED' | 'FAILED';
299+
export type RunState = 'QUEUED' | 'PENDING' | 'CLAIMED' | 'INPROGRESS' | 'SUCCEEDED' | 'FAILED' | 'CANCELLED';
298300

299301
export interface RunListResponse {
300302
page_info: RunListResponse.PageInfo;
@@ -350,7 +352,7 @@ export interface RunListParams {
350352
/**
351353
* Filter runs by environment ID
352354
*/
353-
environmentId?: string;
355+
environment_id?: string;
354356

355357
/**
356358
* Maximum number of runs to return
@@ -362,6 +364,16 @@ export interface RunListParams {
362364
*/
363365
model_id?: string;
364366

367+
/**
368+
* Filter runs by the scheduled agent ID that created them
369+
*/
370+
schedule_id?: string;
371+
372+
/**
373+
* Filter runs by skill spec (e.g., "owner/repo:path/to/SKILL.md")
374+
*/
375+
skill_spec?: string;
376+
365377
/**
366378
* Filter by run source type
367379
*/
@@ -372,6 +384,11 @@ export interface RunListParams {
372384
* states.
373385
*/
374386
state?: Array<RunState>;
387+
388+
/**
389+
* Filter runs updated after this timestamp (RFC3339 format)
390+
*/
391+
updated_after?: string;
375392
}
376393

377394
export declare namespace Runs {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ describe('resource agent', () => {
4646
prompt: 'Fix the bug in auth.go',
4747
config: {
4848
base_prompt: 'base_prompt',
49+
computer_use_enabled: true,
4950
environment_id: 'environment_id',
5051
mcp_servers: {
5152
foo: {

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,14 @@ describe('resource runs', () => {
4343
created_before: '2019-12-27T18:11:19.117Z',
4444
creator: 'creator',
4545
cursor: 'cursor',
46-
environmentId: 'environmentId',
46+
environment_id: 'environment_id',
4747
limit: 1,
4848
model_id: 'model_id',
49+
schedule_id: 'schedule_id',
50+
skill_spec: 'skill_spec',
4951
source: 'LINEAR',
5052
state: ['QUEUED'],
53+
updated_after: '2019-12-27T18:11:19.117Z',
5154
},
5255
{ path: '/_stainless_unknown_path' },
5356
),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ describe('resource schedules', () => {
3232
prompt: 'Review open pull requests and provide feedback',
3333
agent_config: {
3434
base_prompt: 'base_prompt',
35+
computer_use_enabled: true,
3536
environment_id: 'environment_id',
3637
mcp_servers: {
3738
foo: {
@@ -91,6 +92,7 @@ describe('resource schedules', () => {
9192
prompt: 'prompt',
9293
agent_config: {
9394
base_prompt: 'base_prompt',
95+
computer_use_enabled: true,
9496
environment_id: 'environment_id',
9597
mcp_servers: {
9698
foo: {

0 commit comments

Comments
 (0)