Skip to content

Commit 010459f

Browse files
feat(api): manual updates
1 parent 6159f07 commit 010459f

18 files changed

+154
-100
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-c99d72d8d845f1eeabf7a716949a12408df952a2a0ca2b97df570da3a7c8bb49.yml
3-
openapi_spec_hash: 8a503cbccc8a5741554282327a557114
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-91a7db62ba0752b9bdccd4bac4c6d09c1d59b7b69788159fe13598b7a5def7ee.yml
3+
openapi_spec_hash: f03a889deaf6df14d678643be1e4dbe3
44
config_hash: 433e7a5579323a048aa173a0ace06bfc

src/oz_agent_sdk/resources/agent/agent.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ def list(
129129
def run(
130130
self,
131131
*,
132+
attachments: Iterable[agent_run_params.Attachment] | Omit = omit,
132133
config: AmbientAgentConfigParam | Omit = omit,
133134
conversation_id: str | Omit = omit,
134-
images: Iterable[agent_run_params.Image] | Omit = omit,
135135
prompt: str | Omit = omit,
136136
skill: str | Omit = omit,
137137
team: bool | Omit = omit,
@@ -143,20 +143,20 @@ def run(
143143
extra_body: Body | None = None,
144144
timeout: float | httpx.Timeout | None | NotGiven = not_given,
145145
) -> AgentRunResponse:
146-
"""Spawn an cloud agent with a prompt and optional configuration.
146+
"""Spawn a cloud agent with a prompt and optional configuration.
147147
148148
The agent will be
149149
queued for execution and assigned a unique run ID.
150150
151151
Args:
152-
config: Configuration for an cloud agent run
152+
attachments: Optional file attachments to include with the prompt (max 5). Attachments are
153+
uploaded to cloud storage and made available to the agent.
154+
155+
config: Configuration for a cloud agent run
153156
154157
conversation_id: Optional conversation ID to continue an existing conversation. If provided, the
155158
agent will continue from where the previous run left off.
156159
157-
images: Optional images to include with the prompt (max 5). Images are uploaded to cloud
158-
storage and made available to the agent.
159-
160160
prompt: The prompt/instruction for the agent to execute. Required unless a skill is
161161
specified via the skill field or config.skill_spec.
162162
@@ -185,9 +185,9 @@ def run(
185185
"/agent/run",
186186
body=maybe_transform(
187187
{
188+
"attachments": attachments,
188189
"config": config,
189190
"conversation_id": conversation_id,
190-
"images": images,
191191
"prompt": prompt,
192192
"skill": skill,
193193
"team": team,
@@ -289,9 +289,9 @@ async def list(
289289
async def run(
290290
self,
291291
*,
292+
attachments: Iterable[agent_run_params.Attachment] | Omit = omit,
292293
config: AmbientAgentConfigParam | Omit = omit,
293294
conversation_id: str | Omit = omit,
294-
images: Iterable[agent_run_params.Image] | Omit = omit,
295295
prompt: str | Omit = omit,
296296
skill: str | Omit = omit,
297297
team: bool | Omit = omit,
@@ -303,20 +303,20 @@ async def run(
303303
extra_body: Body | None = None,
304304
timeout: float | httpx.Timeout | None | NotGiven = not_given,
305305
) -> AgentRunResponse:
306-
"""Spawn an cloud agent with a prompt and optional configuration.
306+
"""Spawn a cloud agent with a prompt and optional configuration.
307307
308308
The agent will be
309309
queued for execution and assigned a unique run ID.
310310
311311
Args:
312-
config: Configuration for an cloud agent run
312+
attachments: Optional file attachments to include with the prompt (max 5). Attachments are
313+
uploaded to cloud storage and made available to the agent.
314+
315+
config: Configuration for a cloud agent run
313316
314317
conversation_id: Optional conversation ID to continue an existing conversation. If provided, the
315318
agent will continue from where the previous run left off.
316319
317-
images: Optional images to include with the prompt (max 5). Images are uploaded to cloud
318-
storage and made available to the agent.
319-
320320
prompt: The prompt/instruction for the agent to execute. Required unless a skill is
321321
specified via the skill field or config.skill_spec.
322322
@@ -345,9 +345,9 @@ async def run(
345345
"/agent/run",
346346
body=await async_maybe_transform(
347347
{
348+
"attachments": attachments,
348349
"config": config,
349350
"conversation_id": conversation_id,
350-
"images": images,
351351
"prompt": prompt,
352352
"skill": skill,
353353
"team": team,

src/oz_agent_sdk/resources/agent/runs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def retrieve(
8585
def list(
8686
self,
8787
*,
88-
artifact_type: Literal["PLAN", "PULL_REQUEST"] | Omit = omit,
88+
artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] | Omit = omit,
8989
created_after: Union[str, datetime] | Omit = omit,
9090
created_before: Union[str, datetime] | Omit = omit,
9191
creator: str | Omit = omit,
@@ -281,7 +281,7 @@ async def retrieve(
281281
async def list(
282282
self,
283283
*,
284-
artifact_type: Literal["PLAN", "PULL_REQUEST"] | Omit = omit,
284+
artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] | Omit = omit,
285285
created_after: Union[str, datetime] | Omit = omit,
286286
created_before: Union[str, datetime] | Omit = omit,
287287
creator: str | Omit = omit,

src/oz_agent_sdk/resources/agent/schedules.py

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ def create(
4949
*,
5050
cron_schedule: str,
5151
name: str,
52-
prompt: str,
5352
agent_config: AmbientAgentConfigParam | Omit = omit,
5453
enabled: bool | Omit = omit,
54+
prompt: str | Omit = omit,
5555
team: bool | Omit = omit,
5656
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5757
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -71,12 +71,13 @@ def create(
7171
7272
name: Human-readable name for the schedule
7373
74-
prompt: The prompt/instruction for the agent to execute
75-
76-
agent_config: Configuration for an cloud agent run
74+
agent_config: Configuration for a cloud agent run
7775
7876
enabled: Whether the schedule should be active immediately
7977
78+
prompt: The prompt/instruction for the agent to execute. Required unless
79+
agent_config.skill_spec is provided.
80+
8081
team: Whether to create a team-owned schedule. Defaults to true for users on a single
8182
team.
8283
@@ -94,9 +95,9 @@ def create(
9495
{
9596
"cron_schedule": cron_schedule,
9697
"name": name,
97-
"prompt": prompt,
9898
"agent_config": agent_config,
9999
"enabled": enabled,
100+
"prompt": prompt,
100101
"team": team,
101102
},
102103
schedule_create_params.ScheduleCreateParams,
@@ -148,8 +149,8 @@ def update(
148149
cron_schedule: str,
149150
enabled: bool,
150151
name: str,
151-
prompt: str,
152152
agent_config: AmbientAgentConfigParam | Omit = omit,
153+
prompt: str | Omit = omit,
153154
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
154155
# The extra values given here take precedence over values defined on the client or passed to this method.
155156
extra_headers: Headers | None = None,
@@ -169,9 +170,10 @@ def update(
169170
170171
name: Human-readable name for the schedule
171172
172-
prompt: The prompt/instruction for the agent to execute
173+
agent_config: Configuration for a cloud agent run
173174
174-
agent_config: Configuration for an cloud agent run
175+
prompt: The prompt/instruction for the agent to execute. Required unless
176+
agent_config.skill_spec is provided.
175177
176178
extra_headers: Send extra headers
177179
@@ -190,8 +192,8 @@ def update(
190192
"cron_schedule": cron_schedule,
191193
"enabled": enabled,
192194
"name": name,
193-
"prompt": prompt,
194195
"agent_config": agent_config,
196+
"prompt": prompt,
195197
},
196198
schedule_update_params.ScheduleUpdateParams,
197199
),
@@ -354,9 +356,9 @@ async def create(
354356
*,
355357
cron_schedule: str,
356358
name: str,
357-
prompt: str,
358359
agent_config: AmbientAgentConfigParam | Omit = omit,
359360
enabled: bool | Omit = omit,
361+
prompt: str | Omit = omit,
360362
team: bool | Omit = omit,
361363
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
362364
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -376,12 +378,13 @@ async def create(
376378
377379
name: Human-readable name for the schedule
378380
379-
prompt: The prompt/instruction for the agent to execute
380-
381-
agent_config: Configuration for an cloud agent run
381+
agent_config: Configuration for a cloud agent run
382382
383383
enabled: Whether the schedule should be active immediately
384384
385+
prompt: The prompt/instruction for the agent to execute. Required unless
386+
agent_config.skill_spec is provided.
387+
385388
team: Whether to create a team-owned schedule. Defaults to true for users on a single
386389
team.
387390
@@ -399,9 +402,9 @@ async def create(
399402
{
400403
"cron_schedule": cron_schedule,
401404
"name": name,
402-
"prompt": prompt,
403405
"agent_config": agent_config,
404406
"enabled": enabled,
407+
"prompt": prompt,
405408
"team": team,
406409
},
407410
schedule_create_params.ScheduleCreateParams,
@@ -453,8 +456,8 @@ async def update(
453456
cron_schedule: str,
454457
enabled: bool,
455458
name: str,
456-
prompt: str,
457459
agent_config: AmbientAgentConfigParam | Omit = omit,
460+
prompt: str | Omit = omit,
458461
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
459462
# The extra values given here take precedence over values defined on the client or passed to this method.
460463
extra_headers: Headers | None = None,
@@ -474,9 +477,10 @@ async def update(
474477
475478
name: Human-readable name for the schedule
476479
477-
prompt: The prompt/instruction for the agent to execute
480+
agent_config: Configuration for a cloud agent run
478481
479-
agent_config: Configuration for an cloud agent run
482+
prompt: The prompt/instruction for the agent to execute. Required unless
483+
agent_config.skill_spec is provided.
480484
481485
extra_headers: Send extra headers
482486
@@ -495,8 +499,8 @@ async def update(
495499
"cron_schedule": cron_schedule,
496500
"enabled": enabled,
497501
"name": name,
498-
"prompt": prompt,
499502
"agent_config": agent_config,
503+
"prompt": prompt,
500504
},
501505
schedule_update_params.ScheduleUpdateParams,
502506
),

src/oz_agent_sdk/types/agent/artifact_item.py

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

10-
__all__ = ["ArtifactItem", "PlanArtifact", "PlanArtifactData", "PullRequestArtifact", "PullRequestArtifactData"]
10+
__all__ = [
11+
"ArtifactItem",
12+
"PlanArtifact",
13+
"PlanArtifactData",
14+
"PullRequestArtifact",
15+
"PullRequestArtifactData",
16+
"ScreenshotArtifact",
17+
"ScreenshotArtifactData",
18+
]
1119

1220

1321
class PlanArtifactData(BaseModel):
@@ -49,6 +57,27 @@ class PullRequestArtifact(BaseModel):
4957
data: PullRequestArtifactData
5058

5159

60+
class ScreenshotArtifactData(BaseModel):
61+
artifact_uid: str
62+
"""Unique identifier for the screenshot artifact"""
63+
64+
mime_type: str
65+
"""MIME type of the screenshot image"""
66+
67+
description: Optional[str] = None
68+
"""Optional description of the screenshot"""
69+
70+
71+
class ScreenshotArtifact(BaseModel):
72+
artifact_type: Literal["SCREENSHOT"]
73+
"""Type of the artifact"""
74+
75+
created_at: datetime
76+
"""Timestamp when the artifact was created (RFC3339)"""
77+
78+
data: ScreenshotArtifactData
79+
80+
5281
ArtifactItem: TypeAlias = Annotated[
53-
Union[PlanArtifact, PullRequestArtifact], PropertyInfo(discriminator="artifact_type")
82+
Union[PlanArtifact, PullRequestArtifact, ScreenshotArtifact], PropertyInfo(discriminator="artifact_type")
5483
]

src/oz_agent_sdk/types/agent/run_item.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ class RunItem(BaseModel):
9292
- INPROGRESS: Run is actively being executed
9393
- SUCCEEDED: Run completed successfully
9494
- FAILED: Run failed
95+
- BLOCKED: Run is blocked (e.g., awaiting user input or approval)
96+
- ERROR: Run encountered an error
9597
- CANCELLED: Run was cancelled by user
9698
"""
9799

@@ -108,7 +110,7 @@ class RunItem(BaseModel):
108110
"""Timestamp when the run was last updated (RFC3339)"""
109111

110112
agent_config: Optional[AmbientAgentConfig] = None
111-
"""Configuration for an cloud agent run"""
113+
"""Configuration for a cloud agent run"""
112114

113115
agent_skill: Optional[AgentSkill] = None
114116
"""

src/oz_agent_sdk/types/agent/run_list_params.py

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

1515

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

2020
created_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]

src/oz_agent_sdk/types/agent/run_state.py

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

55
__all__ = ["RunState"]
66

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

src/oz_agent_sdk/types/agent/schedule_create_params.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@ class ScheduleCreateParams(TypedDict, total=False):
1919
name: Required[str]
2020
"""Human-readable name for the schedule"""
2121

22-
prompt: Required[str]
23-
"""The prompt/instruction for the agent to execute"""
24-
2522
agent_config: AmbientAgentConfigParam
26-
"""Configuration for an cloud agent run"""
23+
"""Configuration for a cloud agent run"""
2724

2825
enabled: bool
2926
"""Whether the schedule should be active immediately"""
3027

28+
prompt: str
29+
"""
30+
The prompt/instruction for the agent to execute. Required unless
31+
agent_config.skill_spec is provided.
32+
"""
33+
3134
team: bool
3235
"""
3336
Whether to create a team-owned schedule. Defaults to true for users on a single

src/oz_agent_sdk/types/agent/schedule_update_params.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ class ScheduleUpdateParams(TypedDict, total=False):
1919
name: Required[str]
2020
"""Human-readable name for the schedule"""
2121

22-
prompt: Required[str]
23-
"""The prompt/instruction for the agent to execute"""
24-
2522
agent_config: AmbientAgentConfigParam
26-
"""Configuration for an cloud agent run"""
23+
"""Configuration for a cloud agent run"""
24+
25+
prompt: str
26+
"""
27+
The prompt/instruction for the agent to execute. Required unless
28+
agent_config.skill_spec is provided.
29+
"""

0 commit comments

Comments
 (0)