Skip to content

Commit d871614

Browse files
feat(api): add computer_use_enabled param
1 parent 0c50dd3 commit d871614

File tree

12 files changed

+72
-13
lines changed

12 files changed

+72
-13
lines changed

.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/warp_agent_sdk/resources/agent/runs.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,11 @@ def list(
9292
environment_id: str | Omit = omit,
9393
limit: int | Omit = omit,
9494
model_id: str | Omit = omit,
95+
schedule_id: str | Omit = omit,
96+
skill_spec: str | Omit = omit,
9597
source: RunSourceType | Omit = omit,
9698
state: List[RunState] | Omit = omit,
99+
updated_after: Union[str, datetime] | Omit = omit,
97100
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
98101
# The extra values given here take precedence over values defined on the client or passed to this method.
99102
extra_headers: Headers | None = None,
@@ -123,11 +126,17 @@ def list(
123126
124127
model_id: Filter by model ID
125128
129+
schedule_id: Filter runs by the scheduled agent ID that created them
130+
131+
skill_spec: Filter runs by skill spec (e.g., "owner/repo:path/to/SKILL.md")
132+
126133
source: Filter by run source type
127134
128135
state: Filter by run state. Can be specified multiple times to match any of the given
129136
states.
130137
138+
updated_after: Filter runs updated after this timestamp (RFC3339 format)
139+
131140
extra_headers: Send extra headers
132141
133142
extra_query: Add additional query parameters to the request
@@ -153,8 +162,11 @@ def list(
153162
"environment_id": environment_id,
154163
"limit": limit,
155164
"model_id": model_id,
165+
"schedule_id": schedule_id,
166+
"skill_spec": skill_spec,
156167
"source": source,
157168
"state": state,
169+
"updated_after": updated_after,
158170
},
159171
run_list_params.RunListParams,
160172
),
@@ -263,8 +275,11 @@ async def list(
263275
environment_id: str | Omit = omit,
264276
limit: int | Omit = omit,
265277
model_id: str | Omit = omit,
278+
schedule_id: str | Omit = omit,
279+
skill_spec: str | Omit = omit,
266280
source: RunSourceType | Omit = omit,
267281
state: List[RunState] | Omit = omit,
282+
updated_after: Union[str, datetime] | Omit = omit,
268283
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
269284
# The extra values given here take precedence over values defined on the client or passed to this method.
270285
extra_headers: Headers | None = None,
@@ -294,11 +309,17 @@ async def list(
294309
295310
model_id: Filter by model ID
296311
312+
schedule_id: Filter runs by the scheduled agent ID that created them
313+
314+
skill_spec: Filter runs by skill spec (e.g., "owner/repo:path/to/SKILL.md")
315+
297316
source: Filter by run source type
298317
299318
state: Filter by run state. Can be specified multiple times to match any of the given
300319
states.
301320
321+
updated_after: Filter runs updated after this timestamp (RFC3339 format)
322+
302323
extra_headers: Send extra headers
303324
304325
extra_query: Add additional query parameters to the request
@@ -324,8 +345,11 @@ async def list(
324345
"environment_id": environment_id,
325346
"limit": limit,
326347
"model_id": model_id,
348+
"schedule_id": schedule_id,
349+
"skill_spec": skill_spec,
327350
"source": source,
328351
"state": state,
352+
"updated_after": updated_after,
329353
},
330354
run_list_params.RunListParams,
331355
),

src/warp_agent_sdk/types/agent/artifact_item.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
from ..._utils import PropertyInfo
88
from ..._models import BaseModel
99

10-
__all__ = ["ArtifactItem", "PlanArtifact", "PlanArtifactPlan", "PullRequestArtifact", "PullRequestArtifactPullRequest"]
10+
__all__ = ["ArtifactItem", "PlanArtifact", "PlanArtifactData", "PullRequestArtifact", "PullRequestArtifactData"]
1111

1212

13-
class PlanArtifactPlan(BaseModel):
13+
class PlanArtifactData(BaseModel):
1414
document_uid: str
1515
"""Unique identifier for the plan document"""
1616

@@ -22,16 +22,16 @@ class PlanArtifactPlan(BaseModel):
2222

2323

2424
class PlanArtifact(BaseModel):
25-
artifact_type: Literal["plan"]
25+
artifact_type: Literal["PLAN"]
2626
"""Type of the artifact"""
2727

2828
created_at: datetime
2929
"""Timestamp when the artifact was created (RFC3339)"""
3030

31-
plan: PlanArtifactPlan
31+
data: PlanArtifactData
3232

3333

34-
class PullRequestArtifactPullRequest(BaseModel):
34+
class PullRequestArtifactData(BaseModel):
3535
branch: str
3636
"""Branch name for the pull request"""
3737

@@ -40,13 +40,13 @@ class PullRequestArtifactPullRequest(BaseModel):
4040

4141

4242
class PullRequestArtifact(BaseModel):
43-
artifact_type: Literal["pull_request"]
43+
artifact_type: Literal["PULL_REQUEST"]
4444
"""Type of the artifact"""
4545

4646
created_at: datetime
4747
"""Timestamp when the artifact was created (RFC3339)"""
4848

49-
pull_request: PullRequestArtifactPullRequest
49+
data: PullRequestArtifactData
5050

5151

5252
ArtifactItem: TypeAlias = Annotated[

src/warp_agent_sdk/types/agent/run_item.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class RunItem(BaseModel):
6262
- INPROGRESS: Run is actively being executed
6363
- SUCCEEDED: Run completed successfully
6464
- FAILED: Run failed
65+
- CANCELLED: Run was cancelled by user
6566
"""
6667

6768
task_id: str

src/warp_agent_sdk/types/agent/run_list_params.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class RunListParams(TypedDict, total=False):
2929
cursor: str
3030
"""Pagination cursor from previous response"""
3131

32-
environment_id: Annotated[str, PropertyInfo(alias="environmentId")]
32+
environment_id: str
3333
"""Filter runs by environment ID"""
3434

3535
limit: int
@@ -38,6 +38,12 @@ class RunListParams(TypedDict, total=False):
3838
model_id: str
3939
"""Filter by model ID"""
4040

41+
schedule_id: str
42+
"""Filter runs by the scheduled agent ID that created them"""
43+
44+
skill_spec: str
45+
"""Filter runs by skill spec (e.g., "owner/repo:path/to/SKILL.md")"""
46+
4147
source: RunSourceType
4248
"""Filter by run source type"""
4349

@@ -46,3 +52,6 @@ class RunListParams(TypedDict, total=False):
4652
4753
Can be specified multiple times to match any of the given states.
4854
"""
55+
56+
updated_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
57+
"""Filter runs updated after this timestamp (RFC3339 format)"""

src/warp_agent_sdk/types/agent/run_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
__all__ = ["RunState"]
66

7-
RunState: TypeAlias = Literal["QUEUED", "PENDING", "CLAIMED", "INPROGRESS", "SUCCEEDED", "FAILED"]
7+
RunState: TypeAlias = Literal["QUEUED", "PENDING", "CLAIMED", "INPROGRESS", "SUCCEEDED", "FAILED", "CANCELLED"]

src/warp_agent_sdk/types/agent_run_response.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ class AgentRunResponse(BaseModel):
1919
- INPROGRESS: Run is actively being executed
2020
- SUCCEEDED: Run completed successfully
2121
- FAILED: Run failed
22+
- CANCELLED: Run was cancelled by user
2223
"""

src/warp_agent_sdk/types/ambient_agent_config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ class AmbientAgentConfig(BaseModel):
1616
base_prompt: Optional[str] = None
1717
"""Custom base prompt for the agent"""
1818

19+
computer_use_enabled: Optional[bool] = None
20+
"""
21+
Controls whether computer use is enabled for this agent. If not set, defaults to
22+
false.
23+
"""
24+
1925
environment_id: Optional[str] = None
2026
"""UID of the environment to run the agent in"""
2127

src/warp_agent_sdk/types/ambient_agent_config_param.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ class AmbientAgentConfigParam(TypedDict, total=False):
1616
base_prompt: str
1717
"""Custom base prompt for the agent"""
1818

19+
computer_use_enabled: bool
20+
"""
21+
Controls whether computer use is enabled for this agent. If not set, defaults to
22+
false.
23+
"""
24+
1925
environment_id: str
2026
"""UID of the environment to run the agent in"""
2127

tests/api_resources/agent/test_runs.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,14 @@ def test_method_list_with_all_params(self, client: WarpAPI) -> None:
7575
created_before=parse_datetime("2019-12-27T18:11:19.117Z"),
7676
creator="creator",
7777
cursor="cursor",
78-
environment_id="environmentId",
78+
environment_id="environment_id",
7979
limit=1,
8080
model_id="model_id",
81+
schedule_id="schedule_id",
82+
skill_spec="skill_spec",
8183
source="LINEAR",
8284
state=["QUEUED"],
85+
updated_after=parse_datetime("2019-12-27T18:11:19.117Z"),
8386
)
8487
assert_matches_type(RunListResponse, run, path=["response"])
8588

@@ -210,11 +213,14 @@ async def test_method_list_with_all_params(self, async_client: AsyncWarpAPI) ->
210213
created_before=parse_datetime("2019-12-27T18:11:19.117Z"),
211214
creator="creator",
212215
cursor="cursor",
213-
environment_id="environmentId",
216+
environment_id="environment_id",
214217
limit=1,
215218
model_id="model_id",
219+
schedule_id="schedule_id",
220+
skill_spec="skill_spec",
216221
source="LINEAR",
217222
state=["QUEUED"],
223+
updated_after=parse_datetime("2019-12-27T18:11:19.117Z"),
218224
)
219225
assert_matches_type(RunListResponse, run, path=["response"])
220226

0 commit comments

Comments
 (0)