Skip to content

Commit df8429c

Browse files
authored
Merge pull request #56 from scaleapi/release-please--branches--main--changes--next
release: 0.2.6
2 parents 66a152d + a1d5b90 commit df8429c

File tree

12 files changed

+110
-15
lines changed

12 files changed

+110
-15
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.2.5"
2+
".": "0.2.6"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 34
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-e1efa8c7e58d81f5c0242d4ea49ac7637b5d455d10a40f217b1183c229b65dd2.yml
3-
openapi_spec_hash: 8fdf7cace40fb14a765c4e09c2d5bb95
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-4e1c137bb7977db9f224437bef638a51725f001c0453a1adf273cf3b920a7120.yml
3+
openapi_spec_hash: f52a4797cadb597b32615460abec2b18
44
config_hash: f6ec6016df1ff072b5b60cdf7b438361

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 0.2.6 (2025-08-01)
4+
5+
Full Changelog: [v0.2.5...v0.2.6](https://github.com/scaleapi/agentex-python/compare/v0.2.5...v0.2.6)
6+
7+
### Features
8+
9+
* **api:** add query params to tasks.list ([d4902d5](https://github.com/scaleapi/agentex-python/commit/d4902d52caf82e2f57d1bbf19527cdc1448ed397))
10+
* **client:** support file upload requests ([e004b30](https://github.com/scaleapi/agentex-python/commit/e004b304c22286151330c2200bcb85046a7ac111))
11+
312
## 0.2.5 (2025-07-30)
413

514
Full Changelog: [v0.2.4...v0.2.5](https://github.com/scaleapi/agentex-python/compare/v0.2.4...v0.2.5)

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ from agentex.types import Task, TaskListResponse
4747
Methods:
4848

4949
- <code title="get /tasks/{task_id}">client.tasks.<a href="./src/agentex/resources/tasks.py">retrieve</a>(task_id) -> <a href="./src/agentex/types/task.py">Task</a></code>
50-
- <code title="get /tasks">client.tasks.<a href="./src/agentex/resources/tasks.py">list</a>() -> <a href="./src/agentex/types/task_list_response.py">TaskListResponse</a></code>
50+
- <code title="get /tasks">client.tasks.<a href="./src/agentex/resources/tasks.py">list</a>(\*\*<a href="src/agentex/types/task_list_params.py">params</a>) -> <a href="./src/agentex/types/task_list_response.py">TaskListResponse</a></code>
5151
- <code title="delete /tasks/{task_id}">client.tasks.<a href="./src/agentex/resources/tasks.py">delete</a>(task_id) -> <a href="./src/agentex/types/shared/delete_response.py">DeleteResponse</a></code>
5252
- <code title="delete /tasks/name/{task_name}">client.tasks.<a href="./src/agentex/resources/tasks.py">delete_by_name</a>(task_name) -> <a href="./src/agentex/types/shared/delete_response.py">DeleteResponse</a></code>
5353
- <code title="get /tasks/name/{task_name}">client.tasks.<a href="./src/agentex/resources/tasks.py">retrieve_by_name</a>(task_name) -> <a href="./src/agentex/types/task.py">Task</a></code>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "agentex-sdk"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
description = "The official Python library for the agentex API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/agentex/_base_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,10 @@ def _build_request(
532532
is_body_allowed = options.method.lower() != "get"
533533

534534
if is_body_allowed:
535-
kwargs["json"] = json_data if is_given(json_data) else None
535+
if isinstance(json_data, bytes):
536+
kwargs["content"] = json_data
537+
else:
538+
kwargs["json"] = json_data if is_given(json_data) else None
536539
kwargs["files"] = files
537540
else:
538541
headers.pop("Content-Type", None)

src/agentex/_files.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
6969
return file
7070

7171
if is_tuple_t(file):
72-
return (file[0], _read_file_content(file[1]), *file[2:])
72+
return (file[0], read_file_content(file[1]), *file[2:])
7373

7474
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
7575

7676

77-
def _read_file_content(file: FileContent) -> HttpxFileContent:
77+
def read_file_content(file: FileContent) -> HttpxFileContent:
7878
if isinstance(file, os.PathLike):
7979
return pathlib.Path(file).read_bytes()
8080
return file
@@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
111111
return file
112112

113113
if is_tuple_t(file):
114-
return (file[0], await _async_read_file_content(file[1]), *file[2:])
114+
return (file[0], await async_read_file_content(file[1]), *file[2:])
115115

116116
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
117117

118118

119-
async def _async_read_file_content(file: FileContent) -> HttpxFileContent:
119+
async def async_read_file_content(file: FileContent) -> HttpxFileContent:
120120
if isinstance(file, os.PathLike):
121121
return await anyio.Path(file).read_bytes()
122122

src/agentex/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "agentex"
4-
__version__ = "0.2.5" # x-release-please-version
4+
__version__ = "0.2.6" # x-release-please-version

src/agentex/resources/tasks.py

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
6+
57
import httpx
68

9+
from ..types import task_list_params
710
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11+
from .._utils import maybe_transform, async_maybe_transform
812
from .._compat import cached_property
913
from .._resource import SyncAPIResource, AsyncAPIResource
1014
from .._response import (
@@ -78,18 +82,41 @@ def retrieve(
7882
def list(
7983
self,
8084
*,
85+
agent_id: Optional[str] | NotGiven = NOT_GIVEN,
86+
agent_name: Optional[str] | NotGiven = NOT_GIVEN,
8187
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8288
# The extra values given here take precedence over values defined on the client or passed to this method.
8389
extra_headers: Headers | None = None,
8490
extra_query: Query | None = None,
8591
extra_body: Body | None = None,
8692
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
8793
) -> TaskListResponse:
88-
"""List all tasks."""
94+
"""
95+
List all tasks.
96+
97+
Args:
98+
extra_headers: Send extra headers
99+
100+
extra_query: Add additional query parameters to the request
101+
102+
extra_body: Add additional JSON properties to the request
103+
104+
timeout: Override the client-level default timeout for this request, in seconds
105+
"""
89106
return self._get(
90107
"/tasks",
91108
options=make_request_options(
92-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
109+
extra_headers=extra_headers,
110+
extra_query=extra_query,
111+
extra_body=extra_body,
112+
timeout=timeout,
113+
query=maybe_transform(
114+
{
115+
"agent_id": agent_id,
116+
"agent_name": agent_name,
117+
},
118+
task_list_params.TaskListParams,
119+
),
93120
),
94121
cast_to=TaskListResponse,
95122
)
@@ -320,18 +347,41 @@ async def retrieve(
320347
async def list(
321348
self,
322349
*,
350+
agent_id: Optional[str] | NotGiven = NOT_GIVEN,
351+
agent_name: Optional[str] | NotGiven = NOT_GIVEN,
323352
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
324353
# The extra values given here take precedence over values defined on the client or passed to this method.
325354
extra_headers: Headers | None = None,
326355
extra_query: Query | None = None,
327356
extra_body: Body | None = None,
328357
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
329358
) -> TaskListResponse:
330-
"""List all tasks."""
359+
"""
360+
List all tasks.
361+
362+
Args:
363+
extra_headers: Send extra headers
364+
365+
extra_query: Add additional query parameters to the request
366+
367+
extra_body: Add additional JSON properties to the request
368+
369+
timeout: Override the client-level default timeout for this request, in seconds
370+
"""
331371
return await self._get(
332372
"/tasks",
333373
options=make_request_options(
334-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
374+
extra_headers=extra_headers,
375+
extra_query=extra_query,
376+
extra_body=extra_body,
377+
timeout=timeout,
378+
query=await async_maybe_transform(
379+
{
380+
"agent_id": agent_id,
381+
"agent_name": agent_name,
382+
},
383+
task_list_params.TaskListParams,
384+
),
335385
),
336386
cast_to=TaskListResponse,
337387
)

src/agentex/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from .agent_rpc_params import AgentRpcParams as AgentRpcParams
2020
from .agent_rpc_result import AgentRpcResult as AgentRpcResult
2121
from .span_list_params import SpanListParams as SpanListParams
22+
from .task_list_params import TaskListParams as TaskListParams
2223
from .agent_list_params import AgentListParams as AgentListParams
2324
from .event_list_params import EventListParams as EventListParams
2425
from .state_list_params import StateListParams as StateListParams

0 commit comments

Comments
 (0)