From 116e95fe584ecbd6f544289ddf82375f271f55ca Mon Sep 17 00:00:00 2001 From: hai-wissem <200629804+hai-wissem@users.noreply.github.com> Date: Fri, 10 Jul 2026 12:24:13 +0000 Subject: [PATCH] chore(sdk): sync generated SDK (v1.0.7) --- openapi.json | 28 +++++++++++++++++++++++++ pyproject.toml | 2 +- src/hai_agents/core/client_wrapper.py | 4 ++-- src/hai_agents/polling.py | 3 ++- src/hai_agents/sessions/client.py | 20 ++++++++++++++++++ src/hai_agents/sessions/raw_client.py | 20 ++++++++++++++++++ src/hai_agents/types/session_request.py | 10 +++++++++ uv.lock | 2 +- 8 files changed, 84 insertions(+), 5 deletions(-) diff --git a/openapi.json b/openapi.json index 6b60c5b..7f1bf94 100644 --- a/openapi.json +++ b/openapi.json @@ -7054,6 +7054,34 @@ "title": "Idle Timeout S", "description": "Seconds to keep the session open for follow-up messages after each answer. Null ends the session as soon as the agent answers." }, + "delete_after_min": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Delete After Min", + "description": "Minutes after the session finishes before it is automatically deleted. Defaults to 30 days. Null keeps the session forever.", + "default": 43200 + }, + "delete_screenshot_after_min": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Delete Screenshot After Min", + "description": "Minutes after the session finishes before its screenshots are deleted. Defaults to 30 days. Null keeps screenshots for the session's lifetime.", + "default": 43200 + }, "queue": { "type": "boolean", "title": "Queue", diff --git a/pyproject.toml b/pyproject.toml index f7d7067..a71f65f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "hai-agents" -version = "1.0.6" +version = "1.0.7" description = "Python SDK for H Company's Computer-Use Agents: autonomous agents powered by Holo." requires-python = ">=3.10" readme = "README.md" diff --git a/src/hai_agents/core/client_wrapper.py b/src/hai_agents/core/client_wrapper.py index e64eb3a..0100d15 100644 --- a/src/hai_agents/core/client_wrapper.py +++ b/src/hai_agents/core/client_wrapper.py @@ -29,9 +29,9 @@ def get_headers(self) -> typing.Dict[str, str]: import platform headers: typing.Dict[str, str] = { - "User-Agent": "hai_agents/1.0.6", + "User-Agent": "hai_agents/1.0.7", "X-HCompany-Client-Name": "hai_agents", - "X-HCompany-Client-Version": "1.0.6", + "X-HCompany-Client-Version": "1.0.7", "X-HCompany-Client-Type": "sdk", "X-HCompany-Language": "Python", "X-HCompany-Runtime": f"python/{platform.python_version()}", diff --git a/src/hai_agents/polling.py b/src/hai_agents/polling.py index 575d76b..c279908 100644 --- a/src/hai_agents/polling.py +++ b/src/hai_agents/polling.py @@ -283,7 +283,8 @@ async def _async_execute_tool_call( result = f"Tool {name!r} is not registered with this client." else: try: - result = local_tool.fn(**(call.get("args") or {})) + args = call.get("args") or {} + result = await asyncio.get_running_loop().run_in_executor(None, lambda: local_tool.fn(**args)) if inspect.isawaitable(result): result = await result except Exception as exc: diff --git a/src/hai_agents/sessions/client.py b/src/hai_agents/sessions/client.py index aada66d..35c23f7 100644 --- a/src/hai_agents/sessions/client.py +++ b/src/hai_agents/sessions/client.py @@ -143,6 +143,8 @@ def create_session( max_steps: typing.Optional[int] = OMIT, max_time_s: typing.Optional[float] = OMIT, idle_timeout_s: typing.Optional[int] = OMIT, + delete_after_min: typing.Optional[int] = OMIT, + delete_screenshot_after_min: typing.Optional[int] = OMIT, queue: typing.Optional[bool] = OMIT, group_id: typing.Optional[str] = OMIT, parent_session_id: typing.Optional[str] = OMIT, @@ -171,6 +173,12 @@ def create_session( idle_timeout_s : typing.Optional[int] Seconds to keep the session open for follow-up messages after each answer. Null ends the session as soon as the agent answers. + delete_after_min : typing.Optional[int] + Minutes after the session finishes before it is automatically deleted. Defaults to 30 days. Null keeps the session forever. + + delete_screenshot_after_min : typing.Optional[int] + Minutes after the session finishes before its screenshots are deleted. Defaults to 30 days. Null keeps screenshots for the session's lifetime. + queue : typing.Optional[bool] When the organization is at its concurrent-session limit, accept this session into a queue (status 'queued') instead of rejecting it with 429. Queued sessions start automatically, oldest first, as running sessions finish. Set to false to get an immediate 429 when no slot is available. @@ -209,6 +217,8 @@ def create_session( max_steps=max_steps, max_time_s=max_time_s, idle_timeout_s=idle_timeout_s, + delete_after_min=delete_after_min, + delete_screenshot_after_min=delete_screenshot_after_min, queue=queue, group_id=group_id, parent_session_id=parent_session_id, @@ -920,6 +930,8 @@ async def create_session( max_steps: typing.Optional[int] = OMIT, max_time_s: typing.Optional[float] = OMIT, idle_timeout_s: typing.Optional[int] = OMIT, + delete_after_min: typing.Optional[int] = OMIT, + delete_screenshot_after_min: typing.Optional[int] = OMIT, queue: typing.Optional[bool] = OMIT, group_id: typing.Optional[str] = OMIT, parent_session_id: typing.Optional[str] = OMIT, @@ -948,6 +960,12 @@ async def create_session( idle_timeout_s : typing.Optional[int] Seconds to keep the session open for follow-up messages after each answer. Null ends the session as soon as the agent answers. + delete_after_min : typing.Optional[int] + Minutes after the session finishes before it is automatically deleted. Defaults to 30 days. Null keeps the session forever. + + delete_screenshot_after_min : typing.Optional[int] + Minutes after the session finishes before its screenshots are deleted. Defaults to 30 days. Null keeps screenshots for the session's lifetime. + queue : typing.Optional[bool] When the organization is at its concurrent-session limit, accept this session into a queue (status 'queued') instead of rejecting it with 429. Queued sessions start automatically, oldest first, as running sessions finish. Set to false to get an immediate 429 when no slot is available. @@ -994,6 +1012,8 @@ async def main() -> None: max_steps=max_steps, max_time_s=max_time_s, idle_timeout_s=idle_timeout_s, + delete_after_min=delete_after_min, + delete_screenshot_after_min=delete_screenshot_after_min, queue=queue, group_id=group_id, parent_session_id=parent_session_id, diff --git a/src/hai_agents/sessions/raw_client.py b/src/hai_agents/sessions/raw_client.py index 0a6b39a..e9b675c 100644 --- a/src/hai_agents/sessions/raw_client.py +++ b/src/hai_agents/sessions/raw_client.py @@ -167,6 +167,8 @@ def create_session( max_steps: typing.Optional[int] = OMIT, max_time_s: typing.Optional[float] = OMIT, idle_timeout_s: typing.Optional[int] = OMIT, + delete_after_min: typing.Optional[int] = OMIT, + delete_screenshot_after_min: typing.Optional[int] = OMIT, queue: typing.Optional[bool] = OMIT, group_id: typing.Optional[str] = OMIT, parent_session_id: typing.Optional[str] = OMIT, @@ -195,6 +197,12 @@ def create_session( idle_timeout_s : typing.Optional[int] Seconds to keep the session open for follow-up messages after each answer. Null ends the session as soon as the agent answers. + delete_after_min : typing.Optional[int] + Minutes after the session finishes before it is automatically deleted. Defaults to 30 days. Null keeps the session forever. + + delete_screenshot_after_min : typing.Optional[int] + Minutes after the session finishes before its screenshots are deleted. Defaults to 30 days. Null keeps screenshots for the session's lifetime. + queue : typing.Optional[bool] When the organization is at its concurrent-session limit, accept this session into a queue (status 'queued') instead of rejecting it with 429. Queued sessions start automatically, oldest first, as running sessions finish. Set to false to get an immediate 429 when no slot is available. @@ -228,6 +236,8 @@ def create_session( "max_steps": max_steps, "max_time_s": max_time_s, "idle_timeout_s": idle_timeout_s, + "delete_after_min": delete_after_min, + "delete_screenshot_after_min": delete_screenshot_after_min, "queue": queue, "group_id": group_id, "parent_session_id": parent_session_id, @@ -1284,6 +1294,8 @@ async def create_session( max_steps: typing.Optional[int] = OMIT, max_time_s: typing.Optional[float] = OMIT, idle_timeout_s: typing.Optional[int] = OMIT, + delete_after_min: typing.Optional[int] = OMIT, + delete_screenshot_after_min: typing.Optional[int] = OMIT, queue: typing.Optional[bool] = OMIT, group_id: typing.Optional[str] = OMIT, parent_session_id: typing.Optional[str] = OMIT, @@ -1312,6 +1324,12 @@ async def create_session( idle_timeout_s : typing.Optional[int] Seconds to keep the session open for follow-up messages after each answer. Null ends the session as soon as the agent answers. + delete_after_min : typing.Optional[int] + Minutes after the session finishes before it is automatically deleted. Defaults to 30 days. Null keeps the session forever. + + delete_screenshot_after_min : typing.Optional[int] + Minutes after the session finishes before its screenshots are deleted. Defaults to 30 days. Null keeps screenshots for the session's lifetime. + queue : typing.Optional[bool] When the organization is at its concurrent-session limit, accept this session into a queue (status 'queued') instead of rejecting it with 429. Queued sessions start automatically, oldest first, as running sessions finish. Set to false to get an immediate 429 when no slot is available. @@ -1345,6 +1363,8 @@ async def create_session( "max_steps": max_steps, "max_time_s": max_time_s, "idle_timeout_s": idle_timeout_s, + "delete_after_min": delete_after_min, + "delete_screenshot_after_min": delete_screenshot_after_min, "queue": queue, "group_id": group_id, "parent_session_id": parent_session_id, diff --git a/src/hai_agents/types/session_request.py b/src/hai_agents/types/session_request.py index 2628dff..bec997a 100644 --- a/src/hai_agents/types/session_request.py +++ b/src/hai_agents/types/session_request.py @@ -40,6 +40,16 @@ class SessionRequest(UniversalBaseModel): Seconds to keep the session open for follow-up messages after each answer. Null ends the session as soon as the agent answers. """ + delete_after_min: typing.Optional[int] = pydantic.Field(default=None) + """ + Minutes after the session finishes before it is automatically deleted. Defaults to 30 days. Null keeps the session forever. + """ + + delete_screenshot_after_min: typing.Optional[int] = pydantic.Field(default=None) + """ + Minutes after the session finishes before its screenshots are deleted. Defaults to 30 days. Null keeps screenshots for the session's lifetime. + """ + queue: typing.Optional[bool] = pydantic.Field(default=None) """ When the organization is at its concurrent-session limit, accept this session into a queue (status 'queued') instead of rejecting it with 429. Queued sessions start automatically, oldest first, as running sessions finish. Set to false to get an immediate 429 when no slot is available. diff --git a/uv.lock b/uv.lock index 88c9b7d..6d801f6 100644 --- a/uv.lock +++ b/uv.lock @@ -144,7 +144,7 @@ wheels = [ [[package]] name = "hai-agents" -version = "1.0.6" +version = "1.0.7" source = { editable = "." } dependencies = [ { name = "httpx" },