From c549088788b08d5e95f04daabda14228e22691a1 Mon Sep 17 00:00:00 2001 From: abonneth <206544678+abonneth@users.noreply.github.com> Date: Wed, 1 Jul 2026 11:53:02 +0000 Subject: [PATCH] chore(sdk): sync to agent_platform@7ad5e91 (v1.0.3) --- openapi.json | 157 ++----------------- pyproject.toml | 2 +- src/hai_agents/__init__.py | 6 - src/hai_agents/core/client_wrapper.py | 4 +- src/hai_agents/environments/client.py | 73 +++------ src/hai_agents/environments/raw_client.py | 81 +++------- src/hai_agents/types/__init__.py | 6 - src/hai_agents/types/browser.py | 5 + src/hai_agents/types/mcp_server.py | 57 ------- src/hai_agents/types/mcp_server_transport.py | 5 - uv.lock | 2 +- 11 files changed, 70 insertions(+), 328 deletions(-) delete mode 100644 src/hai_agents/types/mcp_server.py delete mode 100644 src/hai_agents/types/mcp_server_transport.py diff --git a/openapi.json b/openapi.json index e997ec2..18f48c6 100644 --- a/openapi.json +++ b/openapi.json @@ -3823,6 +3823,12 @@ "description": "Initial URL to open.", "default": "https://www.bing.com" }, + "headless": { + "type": "boolean", + "title": "Headless", + "description": "Run the browser without a visible window.", + "default": false + }, "mode": { "oneOf": [ { @@ -4449,82 +4455,6 @@ "title": "LiveViewUrlEvent", "description": "A live view URL became available." }, - "MCPServer": { - "properties": { - "name": { - "type": "string", - "minLength": 1, - "pattern": "^[A-Za-z0-9_.-]+$", - "title": "Name", - "description": "Unique name for this server." - }, - "transport": { - "type": "string", - "enum": [ - "stdio", - "streamable_http", - "sse" - ], - "title": "Transport", - "description": "Transport used to reach the server." - }, - "command": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Command", - "description": "Executable to launch, for the stdio transport." - }, - "args": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Args", - "description": "Command-line arguments, for the stdio transport." - }, - "env": { - "additionalProperties": { - "type": "string" - }, - "type": "object", - "title": "Env", - "description": "Subprocess environment variables, for the stdio transport." - }, - "url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Url", - "description": "Server endpoint URL, for the HTTP transports." - }, - "headers": { - "additionalProperties": { - "type": "string" - }, - "type": "object", - "title": "Headers", - "description": "Request headers, for the HTTP transports." - } - }, - "type": "object", - "required": [ - "name", - "transport" - ], - "title": "MCPServer", - "description": "An MCP server an environment connects to." - }, "MessageEvent": { "properties": { "kind": { @@ -5128,16 +5058,16 @@ ], "title": "Start Url" }, - "session_id": { + "headless": { "anyOf": [ { - "type": "string" + "type": "boolean" }, { "type": "null" } ], - "title": "Session Id" + "title": "Headless" }, "mode": { "anyOf": [ @@ -5197,75 +5127,6 @@ "type": "null" } ] - }, - "pip_packages": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Pip Packages" - }, - "env": { - "anyOf": [ - { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Env" - }, - "mcp_servers": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/MCPServer" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Mcp Servers" - }, - "servers": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/MCPServer" - }, - "type": "array", - "minItems": 1 - }, - { - "type": "null" - } - ], - "title": "Servers" - }, - "namespace": { - "anyOf": [ - { - "type": "string", - "minLength": 1 - }, - { - "type": "null" - } - ], - "title": "Namespace" } }, "type": "object", diff --git a/pyproject.toml b/pyproject.toml index 37d21dd..320308a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "hai-agents" -version = "1.0.2" +version = "1.0.3" 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/__init__.py b/src/hai_agents/__init__.py index 80825a6..660af3b 100644 --- a/src/hai_agents/__init__.py +++ b/src/hai_agents/__init__.py @@ -59,8 +59,6 @@ JsonValue, LiveViewUrlData, LiveViewUrlEvent, - McpServer, - McpServerTransport, MessageEvent, MessageEventContentItem, Metrics, @@ -244,8 +242,6 @@ "LiveViewUrlData": ".types", "LiveViewUrlEvent": ".types", "MAX_REQUEST_BYTES": ".polling", - "McpServer": ".types", - "McpServerTransport": ".types", "MessageEvent": ".types", "MessageEventContentItem": ".types", "Metrics": ".types", @@ -444,8 +440,6 @@ def __dir__(): "LiveViewUrlData", "LiveViewUrlEvent", "MAX_REQUEST_BYTES", - "McpServer", - "McpServerTransport", "MessageEvent", "MessageEventContentItem", "Metrics", diff --git a/src/hai_agents/core/client_wrapper.py b/src/hai_agents/core/client_wrapper.py index 20015b5..f1f815e 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.2", + "User-Agent": "hai_agents/1.0.3", "X-HCompany-Client-Name": "hai_agents", - "X-HCompany-Client-Version": "1.0.2", + "X-HCompany-Client-Version": "1.0.3", "X-HCompany-Client-Type": "sdk", "X-HCompany-Language": "Python", "X-HCompany-Runtime": f"python/{platform.python_version()}", diff --git a/src/hai_agents/environments/client.py b/src/hai_agents/environments/client.py index 3193df3..5e17ac9 100644 --- a/src/hai_agents/environments/client.py +++ b/src/hai_agents/environments/client.py @@ -10,7 +10,6 @@ from ..types.environment import Environment from ..types.environment_kind import EnvironmentKind from ..types.environment_page import EnvironmentPage -from ..types.mcp_server import McpServer from .raw_client import AsyncRawEnvironmentsClient, RawEnvironmentsClient from .types.list_environments_request_sort_item import ListEnvironmentsRequestSortItem from .types.patch_environment_mode import PatchEnvironmentMode @@ -96,6 +95,7 @@ def create_environment( id: str, kind: typing.Optional[BrowserKind] = OMIT, start_url: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[BrowserMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, @@ -115,6 +115,9 @@ def create_environment( start_url : typing.Optional[str] Initial URL to open. + headless : typing.Optional[bool] + Run the browser without a visible window. + mode : typing.Optional[BrowserMode] How the agent perceives and drives the browser. @@ -150,6 +153,7 @@ def create_environment( id=id, kind=kind, start_url=start_url, + headless=headless, mode=mode, vault_id=vault_id, browser_profile_id=browser_profile_id, @@ -195,6 +199,7 @@ def update_environment( id: str, kind: typing.Optional[BrowserKind] = OMIT, start_url: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[BrowserMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, @@ -216,6 +221,9 @@ def update_environment( start_url : typing.Optional[str] Initial URL to open. + headless : typing.Optional[bool] + Run the browser without a visible window. + mode : typing.Optional[BrowserMode] How the agent perceives and drives the browser. @@ -253,6 +261,7 @@ def update_environment( id=id, kind=kind, start_url=start_url, + headless=headless, mode=mode, vault_id=vault_id, browser_profile_id=browser_profile_id, @@ -295,16 +304,11 @@ def patch_environment( id: str, *, start_url: typing.Optional[str] = OMIT, - session_id: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[PatchEnvironmentMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, network: typing.Optional[BrowserNetwork] = OMIT, - pip_packages: typing.Optional[typing.Sequence[str]] = OMIT, - env: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - mcp_servers: typing.Optional[typing.Sequence[McpServer]] = OMIT, - servers: typing.Optional[typing.Sequence[McpServer]] = OMIT, - namespace: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Environment: """ @@ -316,7 +320,7 @@ def patch_environment( start_url : typing.Optional[str] - session_id : typing.Optional[str] + headless : typing.Optional[bool] mode : typing.Optional[PatchEnvironmentMode] @@ -326,16 +330,6 @@ def patch_environment( network : typing.Optional[BrowserNetwork] - pip_packages : typing.Optional[typing.Sequence[str]] - - env : typing.Optional[typing.Dict[str, typing.Optional[str]]] - - mcp_servers : typing.Optional[typing.Sequence[McpServer]] - - servers : typing.Optional[typing.Sequence[McpServer]] - - namespace : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -358,16 +352,11 @@ def patch_environment( _response = self._raw_client.patch_environment( id, start_url=start_url, - session_id=session_id, + headless=headless, mode=mode, vault_id=vault_id, browser_profile_id=browser_profile_id, network=network, - pip_packages=pip_packages, - env=env, - mcp_servers=mcp_servers, - servers=servers, - namespace=namespace, request_options=request_options, ) return _response.data @@ -458,6 +447,7 @@ async def create_environment( id: str, kind: typing.Optional[BrowserKind] = OMIT, start_url: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[BrowserMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, @@ -477,6 +467,9 @@ async def create_environment( start_url : typing.Optional[str] Initial URL to open. + headless : typing.Optional[bool] + Run the browser without a visible window. + mode : typing.Optional[BrowserMode] How the agent perceives and drives the browser. @@ -520,6 +513,7 @@ async def main() -> None: id=id, kind=kind, start_url=start_url, + headless=headless, mode=mode, vault_id=vault_id, browser_profile_id=browser_profile_id, @@ -573,6 +567,7 @@ async def update_environment( id: str, kind: typing.Optional[BrowserKind] = OMIT, start_url: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[BrowserMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, @@ -594,6 +589,9 @@ async def update_environment( start_url : typing.Optional[str] Initial URL to open. + headless : typing.Optional[bool] + Run the browser without a visible window. + mode : typing.Optional[BrowserMode] How the agent perceives and drives the browser. @@ -639,6 +637,7 @@ async def main() -> None: id=id, kind=kind, start_url=start_url, + headless=headless, mode=mode, vault_id=vault_id, browser_profile_id=browser_profile_id, @@ -689,16 +688,11 @@ async def patch_environment( id: str, *, start_url: typing.Optional[str] = OMIT, - session_id: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[PatchEnvironmentMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, network: typing.Optional[BrowserNetwork] = OMIT, - pip_packages: typing.Optional[typing.Sequence[str]] = OMIT, - env: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - mcp_servers: typing.Optional[typing.Sequence[McpServer]] = OMIT, - servers: typing.Optional[typing.Sequence[McpServer]] = OMIT, - namespace: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> Environment: """ @@ -710,7 +704,7 @@ async def patch_environment( start_url : typing.Optional[str] - session_id : typing.Optional[str] + headless : typing.Optional[bool] mode : typing.Optional[PatchEnvironmentMode] @@ -720,16 +714,6 @@ async def patch_environment( network : typing.Optional[BrowserNetwork] - pip_packages : typing.Optional[typing.Sequence[str]] - - env : typing.Optional[typing.Dict[str, typing.Optional[str]]] - - mcp_servers : typing.Optional[typing.Sequence[McpServer]] - - servers : typing.Optional[typing.Sequence[McpServer]] - - namespace : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -760,16 +744,11 @@ async def main() -> None: _response = await self._raw_client.patch_environment( id, start_url=start_url, - session_id=session_id, + headless=headless, mode=mode, vault_id=vault_id, browser_profile_id=browser_profile_id, network=network, - pip_packages=pip_packages, - env=env, - mcp_servers=mcp_servers, - servers=servers, - namespace=namespace, request_options=request_options, ) return _response.data diff --git a/src/hai_agents/environments/raw_client.py b/src/hai_agents/environments/raw_client.py index d507a12..37ff859 100644 --- a/src/hai_agents/environments/raw_client.py +++ b/src/hai_agents/environments/raw_client.py @@ -19,7 +19,6 @@ from ..types.environment_kind import EnvironmentKind from ..types.environment_page import EnvironmentPage from ..types.http_validation_error import HttpValidationError -from ..types.mcp_server import McpServer from .types.list_environments_request_sort_item import ListEnvironmentsRequestSortItem from .types.patch_environment_mode import PatchEnvironmentMode from pydantic import ValidationError @@ -123,6 +122,7 @@ def create_environment( id: str, kind: typing.Optional[BrowserKind] = OMIT, start_url: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[BrowserMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, @@ -142,6 +142,9 @@ def create_environment( start_url : typing.Optional[str] Initial URL to open. + headless : typing.Optional[bool] + Run the browser without a visible window. + mode : typing.Optional[BrowserMode] How the agent perceives and drives the browser. @@ -169,6 +172,7 @@ def create_environment( "id": id, "kind": kind, "start_url": start_url, + "headless": headless, "mode": convert_and_respect_annotation_metadata( object_=mode, annotation=BrowserMode, direction="write" ), @@ -274,6 +278,7 @@ def update_environment( id: str, kind: typing.Optional[BrowserKind] = OMIT, start_url: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[BrowserMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, @@ -295,6 +300,9 @@ def update_environment( start_url : typing.Optional[str] Initial URL to open. + headless : typing.Optional[bool] + Run the browser without a visible window. + mode : typing.Optional[BrowserMode] How the agent perceives and drives the browser. @@ -322,6 +330,7 @@ def update_environment( "id": id, "kind": kind, "start_url": start_url, + "headless": headless, "mode": convert_and_respect_annotation_metadata( object_=mode, annotation=BrowserMode, direction="write" ), @@ -417,16 +426,11 @@ def patch_environment( id: str, *, start_url: typing.Optional[str] = OMIT, - session_id: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[PatchEnvironmentMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, network: typing.Optional[BrowserNetwork] = OMIT, - pip_packages: typing.Optional[typing.Sequence[str]] = OMIT, - env: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - mcp_servers: typing.Optional[typing.Sequence[McpServer]] = OMIT, - servers: typing.Optional[typing.Sequence[McpServer]] = OMIT, - namespace: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[Environment]: """ @@ -438,7 +442,7 @@ def patch_environment( start_url : typing.Optional[str] - session_id : typing.Optional[str] + headless : typing.Optional[bool] mode : typing.Optional[PatchEnvironmentMode] @@ -448,16 +452,6 @@ def patch_environment( network : typing.Optional[BrowserNetwork] - pip_packages : typing.Optional[typing.Sequence[str]] - - env : typing.Optional[typing.Dict[str, typing.Optional[str]]] - - mcp_servers : typing.Optional[typing.Sequence[McpServer]] - - servers : typing.Optional[typing.Sequence[McpServer]] - - namespace : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -471,7 +465,7 @@ def patch_environment( method="PATCH", json={ "start_url": start_url, - "session_id": session_id, + "headless": headless, "mode": convert_and_respect_annotation_metadata( object_=mode, annotation=typing.Optional[PatchEnvironmentMode], direction="write" ), @@ -480,15 +474,6 @@ def patch_environment( "network": convert_and_respect_annotation_metadata( object_=network, annotation=typing.Optional[BrowserNetwork], direction="write" ), - "pip_packages": pip_packages, - "env": env, - "mcp_servers": convert_and_respect_annotation_metadata( - object_=mcp_servers, annotation=typing.Optional[typing.Sequence[McpServer]], direction="write" - ), - "servers": convert_and_respect_annotation_metadata( - object_=servers, annotation=typing.Optional[typing.Sequence[McpServer]], direction="write" - ), - "namespace": namespace, }, headers={ "content-type": "application/json", @@ -622,6 +607,7 @@ async def create_environment( id: str, kind: typing.Optional[BrowserKind] = OMIT, start_url: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[BrowserMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, @@ -641,6 +627,9 @@ async def create_environment( start_url : typing.Optional[str] Initial URL to open. + headless : typing.Optional[bool] + Run the browser without a visible window. + mode : typing.Optional[BrowserMode] How the agent perceives and drives the browser. @@ -668,6 +657,7 @@ async def create_environment( "id": id, "kind": kind, "start_url": start_url, + "headless": headless, "mode": convert_and_respect_annotation_metadata( object_=mode, annotation=BrowserMode, direction="write" ), @@ -773,6 +763,7 @@ async def update_environment( id: str, kind: typing.Optional[BrowserKind] = OMIT, start_url: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[BrowserMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, @@ -794,6 +785,9 @@ async def update_environment( start_url : typing.Optional[str] Initial URL to open. + headless : typing.Optional[bool] + Run the browser without a visible window. + mode : typing.Optional[BrowserMode] How the agent perceives and drives the browser. @@ -821,6 +815,7 @@ async def update_environment( "id": id, "kind": kind, "start_url": start_url, + "headless": headless, "mode": convert_and_respect_annotation_metadata( object_=mode, annotation=BrowserMode, direction="write" ), @@ -916,16 +911,11 @@ async def patch_environment( id: str, *, start_url: typing.Optional[str] = OMIT, - session_id: typing.Optional[str] = OMIT, + headless: typing.Optional[bool] = OMIT, mode: typing.Optional[PatchEnvironmentMode] = OMIT, vault_id: typing.Optional[str] = OMIT, browser_profile_id: typing.Optional[str] = OMIT, network: typing.Optional[BrowserNetwork] = OMIT, - pip_packages: typing.Optional[typing.Sequence[str]] = OMIT, - env: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT, - mcp_servers: typing.Optional[typing.Sequence[McpServer]] = OMIT, - servers: typing.Optional[typing.Sequence[McpServer]] = OMIT, - namespace: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[Environment]: """ @@ -937,7 +927,7 @@ async def patch_environment( start_url : typing.Optional[str] - session_id : typing.Optional[str] + headless : typing.Optional[bool] mode : typing.Optional[PatchEnvironmentMode] @@ -947,16 +937,6 @@ async def patch_environment( network : typing.Optional[BrowserNetwork] - pip_packages : typing.Optional[typing.Sequence[str]] - - env : typing.Optional[typing.Dict[str, typing.Optional[str]]] - - mcp_servers : typing.Optional[typing.Sequence[McpServer]] - - servers : typing.Optional[typing.Sequence[McpServer]] - - namespace : typing.Optional[str] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -970,7 +950,7 @@ async def patch_environment( method="PATCH", json={ "start_url": start_url, - "session_id": session_id, + "headless": headless, "mode": convert_and_respect_annotation_metadata( object_=mode, annotation=typing.Optional[PatchEnvironmentMode], direction="write" ), @@ -979,15 +959,6 @@ async def patch_environment( "network": convert_and_respect_annotation_metadata( object_=network, annotation=typing.Optional[BrowserNetwork], direction="write" ), - "pip_packages": pip_packages, - "env": env, - "mcp_servers": convert_and_respect_annotation_metadata( - object_=mcp_servers, annotation=typing.Optional[typing.Sequence[McpServer]], direction="write" - ), - "servers": convert_and_respect_annotation_metadata( - object_=servers, annotation=typing.Optional[typing.Sequence[McpServer]], direction="write" - ), - "namespace": namespace, }, headers={ "content-type": "application/json", diff --git a/src/hai_agents/types/__init__.py b/src/hai_agents/types/__init__.py index f739cc6..184fa49 100644 --- a/src/hai_agents/types/__init__.py +++ b/src/hai_agents/types/__init__.py @@ -58,8 +58,6 @@ from .json_value import JsonValue from .live_view_url_data import LiveViewUrlData from .live_view_url_event import LiveViewUrlEvent - from .mcp_server import McpServer - from .mcp_server_transport import McpServerTransport from .message_event import MessageEvent from .message_event_content_item import MessageEventContentItem from .metrics import Metrics @@ -183,8 +181,6 @@ "JsonValue": ".json_value", "LiveViewUrlData": ".live_view_url_data", "LiveViewUrlEvent": ".live_view_url_event", - "McpServer": ".mcp_server", - "McpServerTransport": ".mcp_server_transport", "MessageEvent": ".message_event", "MessageEventContentItem": ".message_event_content_item", "Metrics": ".metrics", @@ -328,8 +324,6 @@ def __dir__(): "JsonValue", "LiveViewUrlData", "LiveViewUrlEvent", - "McpServer", - "McpServerTransport", "MessageEvent", "MessageEventContentItem", "Metrics", diff --git a/src/hai_agents/types/browser.py b/src/hai_agents/types/browser.py index b399c4f..948c285 100644 --- a/src/hai_agents/types/browser.py +++ b/src/hai_agents/types/browser.py @@ -25,6 +25,11 @@ class Browser(UniversalBaseModel): Initial URL to open. """ + headless: typing.Optional[bool] = pydantic.Field(default=None) + """ + Run the browser without a visible window. + """ + mode: typing.Optional[BrowserMode] = pydantic.Field(default=None) """ How the agent perceives and drives the browser. diff --git a/src/hai_agents/types/mcp_server.py b/src/hai_agents/types/mcp_server.py deleted file mode 100644 index 2ce2312..0000000 --- a/src/hai_agents/types/mcp_server.py +++ /dev/null @@ -1,57 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .mcp_server_transport import McpServerTransport - - -class McpServer(UniversalBaseModel): - """ - An MCP server an environment connects to. - """ - - name: str = pydantic.Field() - """ - Unique name for this server. - """ - - transport: McpServerTransport = pydantic.Field() - """ - Transport used to reach the server. - """ - - command: typing.Optional[str] = pydantic.Field(default=None) - """ - Executable to launch, for the stdio transport. - """ - - args: typing.Optional[typing.List[str]] = pydantic.Field(default=None) - """ - Command-line arguments, for the stdio transport. - """ - - env: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None) - """ - Subprocess environment variables, for the stdio transport. - """ - - url: typing.Optional[str] = pydantic.Field(default=None) - """ - Server endpoint URL, for the HTTP transports. - """ - - headers: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None) - """ - Request headers, for the HTTP transports. - """ - - if IS_PYDANTIC_V2: - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 - else: - - class Config: - frozen = True - smart_union = True - extra = pydantic.Extra.allow diff --git a/src/hai_agents/types/mcp_server_transport.py b/src/hai_agents/types/mcp_server_transport.py deleted file mode 100644 index 8504882..0000000 --- a/src/hai_agents/types/mcp_server_transport.py +++ /dev/null @@ -1,5 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -McpServerTransport = typing.Union[typing.Literal["stdio", "streamable_http", "sse"], typing.Any] diff --git a/uv.lock b/uv.lock index ad9ce8e..d704e42 100644 --- a/uv.lock +++ b/uv.lock @@ -88,7 +88,7 @@ wheels = [ [[package]] name = "hai-agents" -version = "1.0.2" +version = "1.0.3" source = { editable = "." } dependencies = [ { name = "httpx" },