Skip to content

Commit c13884d

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

File tree

11 files changed

+559
-2
lines changed

11 files changed

+559
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 12
1+
configured_endpoints: 14
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-91a7db62ba0752b9bdccd4bac4c6d09c1d59b7b69788159fe13598b7a5def7ee.yml
33
openapi_spec_hash: f03a889deaf6df14d678643be1e4dbe3
4-
config_hash: 433e7a5579323a048aa173a0ace06bfc
4+
config_hash: 25c1059aa958c8c2ad60ef16c318514d

api.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ from oz_agent_sdk.types import (
1010
McpServerConfig,
1111
UserProfile,
1212
AgentListResponse,
13+
AgentGetArtifactResponse,
1314
AgentRunResponse,
1415
)
1516
```
1617

1718
Methods:
1819

1920
- <code title="get /agent">client.agent.<a href="./src/oz_agent_sdk/resources/agent/agent.py">list</a>(\*\*<a href="src/oz_agent_sdk/types/agent_list_params.py">params</a>) -> <a href="./src/oz_agent_sdk/types/agent_list_response.py">AgentListResponse</a></code>
21+
- <code title="get /agent/artifacts/{artifactUid}">client.agent.<a href="./src/oz_agent_sdk/resources/agent/agent.py">get_artifact</a>(artifact_uid) -> <a href="./src/oz_agent_sdk/types/agent_get_artifact_response.py">AgentGetArtifactResponse</a></code>
2022
- <code title="post /agent/run">client.agent.<a href="./src/oz_agent_sdk/resources/agent/agent.py">run</a>(\*\*<a href="src/oz_agent_sdk/types/agent_run_params.py">params</a>) -> <a href="./src/oz_agent_sdk/types/agent_run_response.py">AgentRunResponse</a></code>
2123

2224
## Runs
@@ -61,3 +63,15 @@ Methods:
6163
- <code title="delete /agent/schedules/{scheduleId}">client.agent.schedules.<a href="./src/oz_agent_sdk/resources/agent/schedules.py">delete</a>(schedule_id) -> <a href="./src/oz_agent_sdk/types/agent/schedule_delete_response.py">ScheduleDeleteResponse</a></code>
6264
- <code title="post /agent/schedules/{scheduleId}/pause">client.agent.schedules.<a href="./src/oz_agent_sdk/resources/agent/schedules.py">pause</a>(schedule_id) -> <a href="./src/oz_agent_sdk/types/agent/scheduled_agent_item.py">ScheduledAgentItem</a></code>
6365
- <code title="post /agent/schedules/{scheduleId}/resume">client.agent.schedules.<a href="./src/oz_agent_sdk/resources/agent/schedules.py">resume</a>(schedule_id) -> <a href="./src/oz_agent_sdk/types/agent/scheduled_agent_item.py">ScheduledAgentItem</a></code>
66+
67+
## Sessions
68+
69+
Types:
70+
71+
```python
72+
from oz_agent_sdk.types.agent import SessionCheckRedirectResponse
73+
```
74+
75+
Methods:
76+
77+
- <code title="get /agent/sessions/{sessionUuid}/redirect">client.agent.sessions.<a href="./src/oz_agent_sdk/resources/agent/sessions.py">check_redirect</a>(session_uuid) -> <a href="./src/oz_agent_sdk/types/agent/session_check_redirect_response.py">SessionCheckRedirectResponse</a></code>

src/oz_agent_sdk/resources/agent/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
AgentResourceWithStreamingResponse,
1717
AsyncAgentResourceWithStreamingResponse,
1818
)
19+
from .sessions import (
20+
SessionsResource,
21+
AsyncSessionsResource,
22+
SessionsResourceWithRawResponse,
23+
AsyncSessionsResourceWithRawResponse,
24+
SessionsResourceWithStreamingResponse,
25+
AsyncSessionsResourceWithStreamingResponse,
26+
)
1927
from .schedules import (
2028
SchedulesResource,
2129
AsyncSchedulesResource,
@@ -38,6 +46,12 @@
3846
"AsyncSchedulesResourceWithRawResponse",
3947
"SchedulesResourceWithStreamingResponse",
4048
"AsyncSchedulesResourceWithStreamingResponse",
49+
"SessionsResource",
50+
"AsyncSessionsResource",
51+
"SessionsResourceWithRawResponse",
52+
"AsyncSessionsResourceWithRawResponse",
53+
"SessionsResourceWithStreamingResponse",
54+
"AsyncSessionsResourceWithStreamingResponse",
4155
"AgentResource",
4256
"AsyncAgentResource",
4357
"AgentResourceWithRawResponse",

src/oz_agent_sdk/resources/agent/agent.py

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
from ...types import agent_run_params, agent_list_params
1919
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
2020
from ..._utils import maybe_transform, async_maybe_transform
21+
from .sessions import (
22+
SessionsResource,
23+
AsyncSessionsResource,
24+
SessionsResourceWithRawResponse,
25+
AsyncSessionsResourceWithRawResponse,
26+
SessionsResourceWithStreamingResponse,
27+
AsyncSessionsResourceWithStreamingResponse,
28+
)
2129
from ..._compat import cached_property
2230
from .schedules import (
2331
SchedulesResource,
@@ -38,6 +46,7 @@
3846
from ...types.agent_run_response import AgentRunResponse
3947
from ...types.agent_list_response import AgentListResponse
4048
from ...types.ambient_agent_config_param import AmbientAgentConfigParam
49+
from ...types.agent_get_artifact_response import AgentGetArtifactResponse
4150

4251
__all__ = ["AgentResource", "AsyncAgentResource"]
4352

@@ -51,6 +60,10 @@ def runs(self) -> RunsResource:
5160
def schedules(self) -> SchedulesResource:
5261
return SchedulesResource(self._client)
5362

63+
@cached_property
64+
def sessions(self) -> SessionsResource:
65+
return SessionsResource(self._client)
66+
5467
@cached_property
5568
def with_raw_response(self) -> AgentResourceWithRawResponse:
5669
"""
@@ -126,6 +139,41 @@ def list(
126139
cast_to=AgentListResponse,
127140
)
128141

142+
def get_artifact(
143+
self,
144+
artifact_uid: str,
145+
*,
146+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
147+
# The extra values given here take precedence over values defined on the client or passed to this method.
148+
extra_headers: Headers | None = None,
149+
extra_query: Query | None = None,
150+
extra_body: Body | None = None,
151+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
152+
) -> AgentGetArtifactResponse:
153+
"""Retrieve an artifact by its UUID.
154+
155+
For screenshot artifacts, returns a
156+
time-limited signed download URL.
157+
158+
Args:
159+
extra_headers: Send extra headers
160+
161+
extra_query: Add additional query parameters to the request
162+
163+
extra_body: Add additional JSON properties to the request
164+
165+
timeout: Override the client-level default timeout for this request, in seconds
166+
"""
167+
if not artifact_uid:
168+
raise ValueError(f"Expected a non-empty value for `artifact_uid` but received {artifact_uid!r}")
169+
return self._get(
170+
f"/agent/artifacts/{artifact_uid}",
171+
options=make_request_options(
172+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
173+
),
174+
cast_to=AgentGetArtifactResponse,
175+
)
176+
129177
def run(
130178
self,
131179
*,
@@ -211,6 +259,10 @@ def runs(self) -> AsyncRunsResource:
211259
def schedules(self) -> AsyncSchedulesResource:
212260
return AsyncSchedulesResource(self._client)
213261

262+
@cached_property
263+
def sessions(self) -> AsyncSessionsResource:
264+
return AsyncSessionsResource(self._client)
265+
214266
@cached_property
215267
def with_raw_response(self) -> AsyncAgentResourceWithRawResponse:
216268
"""
@@ -286,6 +338,41 @@ async def list(
286338
cast_to=AgentListResponse,
287339
)
288340

341+
async def get_artifact(
342+
self,
343+
artifact_uid: str,
344+
*,
345+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
346+
# The extra values given here take precedence over values defined on the client or passed to this method.
347+
extra_headers: Headers | None = None,
348+
extra_query: Query | None = None,
349+
extra_body: Body | None = None,
350+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
351+
) -> AgentGetArtifactResponse:
352+
"""Retrieve an artifact by its UUID.
353+
354+
For screenshot artifacts, returns a
355+
time-limited signed download URL.
356+
357+
Args:
358+
extra_headers: Send extra headers
359+
360+
extra_query: Add additional query parameters to the request
361+
362+
extra_body: Add additional JSON properties to the request
363+
364+
timeout: Override the client-level default timeout for this request, in seconds
365+
"""
366+
if not artifact_uid:
367+
raise ValueError(f"Expected a non-empty value for `artifact_uid` but received {artifact_uid!r}")
368+
return await self._get(
369+
f"/agent/artifacts/{artifact_uid}",
370+
options=make_request_options(
371+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
372+
),
373+
cast_to=AgentGetArtifactResponse,
374+
)
375+
289376
async def run(
290377
self,
291378
*,
@@ -369,6 +456,9 @@ def __init__(self, agent: AgentResource) -> None:
369456
self.list = to_raw_response_wrapper(
370457
agent.list,
371458
)
459+
self.get_artifact = to_raw_response_wrapper(
460+
agent.get_artifact,
461+
)
372462
self.run = to_raw_response_wrapper(
373463
agent.run,
374464
)
@@ -381,6 +471,10 @@ def runs(self) -> RunsResourceWithRawResponse:
381471
def schedules(self) -> SchedulesResourceWithRawResponse:
382472
return SchedulesResourceWithRawResponse(self._agent.schedules)
383473

474+
@cached_property
475+
def sessions(self) -> SessionsResourceWithRawResponse:
476+
return SessionsResourceWithRawResponse(self._agent.sessions)
477+
384478

385479
class AsyncAgentResourceWithRawResponse:
386480
def __init__(self, agent: AsyncAgentResource) -> None:
@@ -389,6 +483,9 @@ def __init__(self, agent: AsyncAgentResource) -> None:
389483
self.list = async_to_raw_response_wrapper(
390484
agent.list,
391485
)
486+
self.get_artifact = async_to_raw_response_wrapper(
487+
agent.get_artifact,
488+
)
392489
self.run = async_to_raw_response_wrapper(
393490
agent.run,
394491
)
@@ -401,6 +498,10 @@ def runs(self) -> AsyncRunsResourceWithRawResponse:
401498
def schedules(self) -> AsyncSchedulesResourceWithRawResponse:
402499
return AsyncSchedulesResourceWithRawResponse(self._agent.schedules)
403500

501+
@cached_property
502+
def sessions(self) -> AsyncSessionsResourceWithRawResponse:
503+
return AsyncSessionsResourceWithRawResponse(self._agent.sessions)
504+
404505

405506
class AgentResourceWithStreamingResponse:
406507
def __init__(self, agent: AgentResource) -> None:
@@ -409,6 +510,9 @@ def __init__(self, agent: AgentResource) -> None:
409510
self.list = to_streamed_response_wrapper(
410511
agent.list,
411512
)
513+
self.get_artifact = to_streamed_response_wrapper(
514+
agent.get_artifact,
515+
)
412516
self.run = to_streamed_response_wrapper(
413517
agent.run,
414518
)
@@ -421,6 +525,10 @@ def runs(self) -> RunsResourceWithStreamingResponse:
421525
def schedules(self) -> SchedulesResourceWithStreamingResponse:
422526
return SchedulesResourceWithStreamingResponse(self._agent.schedules)
423527

528+
@cached_property
529+
def sessions(self) -> SessionsResourceWithStreamingResponse:
530+
return SessionsResourceWithStreamingResponse(self._agent.sessions)
531+
424532

425533
class AsyncAgentResourceWithStreamingResponse:
426534
def __init__(self, agent: AsyncAgentResource) -> None:
@@ -429,6 +537,9 @@ def __init__(self, agent: AsyncAgentResource) -> None:
429537
self.list = async_to_streamed_response_wrapper(
430538
agent.list,
431539
)
540+
self.get_artifact = async_to_streamed_response_wrapper(
541+
agent.get_artifact,
542+
)
432543
self.run = async_to_streamed_response_wrapper(
433544
agent.run,
434545
)
@@ -440,3 +551,7 @@ def runs(self) -> AsyncRunsResourceWithStreamingResponse:
440551
@cached_property
441552
def schedules(self) -> AsyncSchedulesResourceWithStreamingResponse:
442553
return AsyncSchedulesResourceWithStreamingResponse(self._agent.schedules)
554+
555+
@cached_property
556+
def sessions(self) -> AsyncSessionsResourceWithStreamingResponse:
557+
return AsyncSessionsResourceWithStreamingResponse(self._agent.sessions)

0 commit comments

Comments
 (0)