Skip to content

Commit 31b5a63

Browse files
feat: Add VMIdleTimeoutMinutes param to API
1 parent 7fc79ef commit 31b5a63

File tree

8 files changed

+47
-11
lines changed

8 files changed

+47
-11
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: 14
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-c098713ad7d0db50c26687968fc23fbb61b919a674a9f26bb3375af48ea816f1.yml
3-
openapi_spec_hash: 633a8a510fd3d0eb0c17c61522de6003
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-4caffe00bccb10ade46f9043bec5c13558c78c49b35fc5dfa3e0ac6258465ce2.yml
3+
openapi_spec_hash: ed3c519d0d108a9a9da06d0ff1bad9a9
44
config_hash: e894152aaebba5a2e65e27efaf2712e2

src/oz_agent_sdk/resources/agent/runs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def list(
118118
to `sort_by=updated_at` and `sort_order=desc`.
119119
120120
Args:
121-
artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST)
121+
artifact_type: Filter runs by artifact type
122122
123123
created_after: Filter runs created after this timestamp (RFC3339 format)
124124
@@ -333,7 +333,7 @@ async def list(
333333
to `sort_by=updated_at` and `sort_order=desc`.
334334
335335
Args:
336-
artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST)
336+
artifact_type: Filter runs by artifact type
337337
338338
created_after: Filter runs created after this timestamp (RFC3339 format)
339339

src/oz_agent_sdk/resources/agent/schedules.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,7 @@ def pause(
275275
) -> ScheduledAgentItem:
276276
"""Pause a scheduled agent.
277277
278-
The agent will not run until resumed. This sets the
279-
enabled flag to false.
278+
The agent will not run until resumed.
280279
281280
Args:
282281
extra_headers: Send extra headers
@@ -311,7 +310,7 @@ def resume(
311310
"""Resume a paused scheduled agent.
312311
313312
The agent will start running according to its
314-
cron schedule. This sets the enabled flag to true.
313+
cron schedule.
315314
316315
Args:
317316
extra_headers: Send extra headers
@@ -584,8 +583,7 @@ async def pause(
584583
) -> ScheduledAgentItem:
585584
"""Pause a scheduled agent.
586585
587-
The agent will not run until resumed. This sets the
588-
enabled flag to false.
586+
The agent will not run until resumed.
589587
590588
Args:
591589
extra_headers: Send extra headers
@@ -620,7 +618,7 @@ async def resume(
620618
"""Resume a paused scheduled agent.
621619
622620
The agent will start running according to its
623-
cron schedule. This sets the enabled flag to true.
621+
cron schedule.
624622
625623
Args:
626624
extra_headers: Send extra headers

src/oz_agent_sdk/types/agent/run_list_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class RunListParams(TypedDict, total=False):
1717
artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"]
18-
"""Filter runs by artifact type (PLAN or PULL_REQUEST)"""
18+
"""Filter runs by artifact type"""
1919

2020
created_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
2121
"""Filter runs created after this timestamp (RFC3339 format)"""

src/oz_agent_sdk/types/ambient_agent_config.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ class AmbientAgentConfig(BaseModel):
2525
environment_id: Optional[str] = None
2626
"""UID of the environment to run the agent in"""
2727

28+
harness: Optional[str] = None
29+
"""
30+
Agent harness to use for the agent run. Default (empty) uses Warp's built-in Oz
31+
harness.
32+
"""
33+
34+
idle_timeout_minutes: Optional[int] = None
35+
"""
36+
Number of minutes to keep the agent environment alive after task completion. If
37+
not set, defaults to 10 minutes. Maximum allowed value is min(60,
38+
floor(max_instance_runtime_seconds / 60) for your billing tier).
39+
"""
40+
2841
mcp_servers: Optional[Dict[str, McpServerConfig]] = None
2942
"""Map of MCP server configurations by name"""
3043

src/oz_agent_sdk/types/ambient_agent_config_param.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ class AmbientAgentConfigParam(TypedDict, total=False):
2525
environment_id: str
2626
"""UID of the environment to run the agent in"""
2727

28+
harness: str
29+
"""
30+
Agent harness to use for the agent run. Default (empty) uses Warp's built-in Oz
31+
harness.
32+
"""
33+
34+
idle_timeout_minutes: int
35+
"""
36+
Number of minutes to keep the agent environment alive after task completion. If
37+
not set, defaults to 10 minutes. Maximum allowed value is min(60,
38+
floor(max_instance_runtime_seconds / 60) for your billing tier).
39+
"""
40+
2841
mcp_servers: Dict[str, McpServerConfigParam]
2942
"""Map of MCP server configurations by name"""
3043

tests/api_resources/agent/test_schedules.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None:
4040
"base_prompt": "base_prompt",
4141
"computer_use_enabled": True,
4242
"environment_id": "environment_id",
43+
"harness": "harness",
44+
"idle_timeout_minutes": 1,
4345
"mcp_servers": {
4446
"foo": {
4547
"args": ["string"],
@@ -154,6 +156,8 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None:
154156
"base_prompt": "base_prompt",
155157
"computer_use_enabled": True,
156158
"environment_id": "environment_id",
159+
"harness": "harness",
160+
"idle_timeout_minutes": 1,
157161
"mcp_servers": {
158162
"foo": {
159163
"args": ["string"],
@@ -395,6 +399,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) ->
395399
"base_prompt": "base_prompt",
396400
"computer_use_enabled": True,
397401
"environment_id": "environment_id",
402+
"harness": "harness",
403+
"idle_timeout_minutes": 1,
398404
"mcp_servers": {
399405
"foo": {
400406
"args": ["string"],
@@ -509,6 +515,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) ->
509515
"base_prompt": "base_prompt",
510516
"computer_use_enabled": True,
511517
"environment_id": "environment_id",
518+
"harness": "harness",
519+
"idle_timeout_minutes": 1,
512520
"mcp_servers": {
513521
"foo": {
514522
"args": ["string"],

tests/api_resources/test_agent.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None:
123123
"base_prompt": "base_prompt",
124124
"computer_use_enabled": True,
125125
"environment_id": "environment_id",
126+
"harness": "harness",
127+
"idle_timeout_minutes": 1,
126128
"mcp_servers": {
127129
"foo": {
128130
"args": ["string"],
@@ -277,6 +279,8 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non
277279
"base_prompt": "base_prompt",
278280
"computer_use_enabled": True,
279281
"environment_id": "environment_id",
282+
"harness": "harness",
283+
"idle_timeout_minutes": 1,
280284
"mcp_servers": {
281285
"foo": {
282286
"args": ["string"],

0 commit comments

Comments
 (0)